generated-configure.sh revision 1884:7c2d7a7a2b24
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
653ENABLE_INTREE_EC
654HOTSPOT_MAKE_ARGS
655LIBZIP_CAN_USE_MMAP
656LIBDL
657LIBM
658USE_EXTERNAL_LCMS
659LCMS_LIBS
660LCMS_CFLAGS
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LIBGIF
666USE_EXTERNAL_LIBJPEG
667LLVM_LIBS
668LLVM_LDFLAGS
669LLVM_CFLAGS
670LLVM_CONFIG
671LIBFFI_LIBS
672LIBFFI_CFLAGS
673ALSA_LIBS
674ALSA_CFLAGS
675FREETYPE_BUNDLE_LIB_PATH
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678CUPS_CFLAGS
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684MSVCP_DLL
685MSVCR_DLL
686LIBCXX
687STATIC_CXX_SETTING
688FIXPATH_DETACH_FLAG
689FIXPATH
690GCOV_ENABLED
691ZIP_DEBUGINFO_FILES
692ENABLE_DEBUG_SYMBOLS
693STRIP_POLICY
694DEBUG_BINARIES
695NATIVE_DEBUG_SYMBOLS
696CFLAGS_WARNINGS_ARE_ERRORS
697DISABLE_WARNING_PREFIX
698HOTSPOT_SET_WARNINGS_AS_ERRORS
699WARNINGS_AS_ERRORS
700COMPILER_SUPPORTS_TARGET_BITS_FLAG
701ZERO_ARCHFLAG
702LDFLAGS_TESTEXE
703LDFLAGS_TESTLIB
704LDFLAGS_CXX_JDK
705JDKEXE_LIBS
706JDKLIB_LIBS
707LDFLAGS_JDKEXE
708LDFLAGS_JDKLIB
709CXXFLAGS_TESTEXE
710CXXFLAGS_TESTLIB
711CFLAGS_TESTEXE
712CFLAGS_TESTLIB
713CXXFLAGS_JDKEXE
714CXXFLAGS_JDKLIB
715CFLAGS_JDKEXE
716CFLAGS_JDKLIB
717MACOSX_VERSION_MIN
718CXX_O_FLAG_NONE
719CXX_O_FLAG_DEBUG
720CXX_O_FLAG_NORM
721CXX_O_FLAG_HI
722CXX_O_FLAG_HIGHEST
723C_O_FLAG_NONE
724C_O_FLAG_DEBUG
725C_O_FLAG_NORM
726C_O_FLAG_HI
727C_O_FLAG_HIGHEST
728CXXFLAGS_DEBUG_SYMBOLS
729CFLAGS_DEBUG_SYMBOLS
730CXX_FLAG_DEPS
731C_FLAG_DEPS
732SHARED_LIBRARY_FLAGS
733SET_SHARED_LIBRARY_MAPFILE
734SET_SHARED_LIBRARY_NAME
735SET_SHARED_LIBRARY_ORIGIN
736SET_EXECUTABLE_ORIGIN
737CXX_FLAG_REORDER
738C_FLAG_REORDER
739RC_FLAGS
740AR_OUT_OPTION
741LD_OUT_OPTION
742EXE_OUT_OPTION
743CC_OUT_OPTION
744STRIPFLAGS
745ARFLAGS
746COMPILER_COMMAND_FILE_FLAG
747COMPILER_TARGET_BITS_FLAG
748JT_HOME
749JTREGEXE
750USING_BROKEN_SUSE_LD
751PACKAGE_PATH
752USE_CLANG
753HOTSPOT_LD
754HOTSPOT_CXX
755HOTSPOT_RC
756HOTSPOT_MT
757BUILD_AS
758BUILD_LDCXX
759BUILD_LD
760BUILD_AR
761BUILD_NM
762BUILD_CXX
763BUILD_CC
764BUILD_SYSROOT_LDFLAGS
765BUILD_SYSROOT_CFLAGS
766ac_ct_OBJDUMP
767OBJDUMP
768ac_ct_OBJCOPY
769OBJCOPY
770ac_ct_NM
771ac_ct_STRIP
772GNM
773NM
774STRIP
775MSBUILD
776DUMPBIN
777RC
778MT
779LIPO
780ac_ct_AR
781AR
782AS
783LDCXX
784LD
785CXXCPP
786CPP
787ac_ct_CXX
788CXXFLAGS
789CXX
790ac_ct_PROPER_COMPILER_CXX
791PROPER_COMPILER_CXX
792TOOLCHAIN_PATH_CXX
793POTENTIAL_CXX
794OBJEXT
795EXEEXT
796ac_ct_CC
797CPPFLAGS
798LDFLAGS
799CFLAGS
800CC
801ac_ct_PROPER_COMPILER_CC
802PROPER_COMPILER_CC
803TOOLCHAIN_PATH_CC
804POTENTIAL_CC
805TOOLCHAIN_VERSION
806VS_LIB
807VS_INCLUDE
808VS_PATH
809CYGWIN_LINK
810SYSROOT_LDFLAGS
811SYSROOT_CFLAGS
812LEGACY_EXTRA_LDFLAGS
813LEGACY_EXTRA_CXXFLAGS
814LEGACY_EXTRA_CFLAGS
815EXE_SUFFIX
816OBJ_SUFFIX
817STATIC_LIBRARY
818SHARED_LIBRARY
819STATIC_LIBRARY_SUFFIX
820SHARED_LIBRARY_SUFFIX
821LIBRARY_PREFIX
822TOOLCHAIN_TYPE
823STATIC_BUILD
824BUILD_HOTSPOT
825HOTSPOT_DIST
826BUILD_OUTPUT
827JDK_TOPDIR
828NASHORN_TOPDIR
829HOTSPOT_TOPDIR
830JAXWS_TOPDIR
831JAXP_TOPDIR
832CORBA_TOPDIR
833LANGTOOLS_TOPDIR
834BOOT_JDK_BITS
835JAVAC_FLAGS
836BOOT_JDK_SOURCETARGET
837JARSIGNER
838JAR
839JAVAH
840JAVAC
841JAVA
842BOOT_JDK
843JAVA_CHECK
844JAVAC_CHECK
845VERSION_IS_GA
846VERSION_SHORT
847VERSION_STRING
848VERSION_NUMBER_FOUR_POSITIONS
849VERSION_NUMBER
850VERSION_OPT
851VERSION_BUILD
852VERSION_PRE
853VERSION_PATCH
854VERSION_SECURITY
855VERSION_MINOR
856VERSION_MAJOR
857MACOSX_BUNDLE_ID_BASE
858MACOSX_BUNDLE_NAME_BASE
859COMPANY_NAME
860JDK_RC_PLATFORM_NAME
861PRODUCT_SUFFIX
862PRODUCT_NAME
863LAUNCHER_NAME
864TEST_IN_BUILD
865COPYRIGHT_YEAR
866COMPRESS_JARS
867UNLIMITED_CRYPTO
868CACERTS_FILE
869BUILD_HEADLESS
870SUPPORT_HEADFUL
871SUPPORT_HEADLESS
872DEFAULT_MAKE_TARGET
873OS_VERSION_MICRO
874OS_VERSION_MINOR
875OS_VERSION_MAJOR
876PKG_CONFIG
877BASH_ARGS
878SETFILE
879CODESIGN
880XATTR
881DSYMUTIL
882IS_GNU_TIME
883PATCH
884TIME
885STAT
886HG
887READELF
888OTOOL
889LDD
890ZIP
891UNZIP
892FIND_DELETE
893OUTPUT_SYNC
894OUTPUT_SYNC_SUPPORTED
895CHECK_TOOLSDIR_MAKE
896CHECK_TOOLSDIR_GMAKE
897CHECK_MAKE
898CHECK_GMAKE
899MAKE
900PKGHANDLER
901CONFIGURESUPPORT_OUTPUTDIR
902OUTPUT_ROOT
903CONF_NAME
904SPEC
905SDKROOT
906XCODEBUILD
907BUILD_VARIANT_RELEASE
908DEBUG_CLASSFILES
909FASTDEBUG
910VARIANT
911DEBUG_LEVEL
912MACOSX_UNIVERSAL
913INCLUDE_SA
914JVM_VARIANT_CORE
915JVM_VARIANT_ZEROSHARK
916JVM_VARIANT_ZERO
917JVM_VARIANT_MINIMAL1
918JVM_VARIANT_CLIENT
919JVM_VARIANT_SERVER
920JVM_VARIANTS
921JVM_INTERPRETER
922JDK_VARIANT
923SET_OPENJDK
924CANONICAL_TOPDIR
925ORIGINAL_TOPDIR
926TOPDIR
927PATH_SEP
928ZERO_ARCHDEF
929DEFINE_CROSS_COMPILE_ARCH
930LP64
931OPENJDK_TARGET_OS_EXPORT_DIR
932OPENJDK_TARGET_CPU_JLI_CFLAGS
933OPENJDK_TARGET_CPU_OSARCH
934OPENJDK_TARGET_CPU_ISADIR
935OPENJDK_TARGET_CPU_LIBDIR
936OPENJDK_TARGET_CPU_LEGACY_LIB
937OPENJDK_TARGET_CPU_LEGACY
938REQUIRED_OS_VERSION
939REQUIRED_OS_NAME
940COMPILE_TYPE
941OPENJDK_TARGET_CPU_ENDIAN
942OPENJDK_TARGET_CPU_BITS
943OPENJDK_TARGET_CPU_ARCH
944OPENJDK_TARGET_CPU
945OPENJDK_TARGET_OS_ENV
946OPENJDK_TARGET_OS_TYPE
947OPENJDK_TARGET_OS
948OPENJDK_BUILD_CPU_ENDIAN
949OPENJDK_BUILD_CPU_BITS
950OPENJDK_BUILD_CPU_ARCH
951OPENJDK_BUILD_CPU
952OPENJDK_BUILD_OS_ENV
953OPENJDK_BUILD_OS_TYPE
954OPENJDK_BUILD_OS
955OPENJDK_BUILD_AUTOCONF_NAME
956OPENJDK_TARGET_AUTOCONF_NAME
957target_os
958target_vendor
959target_cpu
960target
961host_os
962host_vendor
963host_cpu
964host
965build_os
966build_vendor
967build_cpu
968build
969NICE
970CPIO
971DF
972READLINK
973CYGPATH
974SED
975FGREP
976EGREP
977GREP
978AWK
979XARGS
980WHICH
981WC
982UNIQ
983UNAME
984TR
985TOUCH
986TEE
987TAR
988TAIL
989SORT
990SH
991RMDIR
992RM
993PRINTF
994NAWK
995MV
996MKTEMP
997MKDIR
998LS
999LN
1000HEAD
1001FIND
1002FILE
1003EXPR
1004ECHO
1005DIRNAME
1006DIFF
1007DATE
1008CUT
1009CP
1010COMM
1011CMP
1012CHMOD
1013CAT
1014BASH
1015BASENAME
1016DATE_WHEN_CONFIGURED
1017ORIGINAL_PATH
1018CONFIGURE_COMMAND_LINE
1019target_alias
1020host_alias
1021build_alias
1022LIBS
1023ECHO_T
1024ECHO_N
1025ECHO_C
1026DEFS
1027mandir
1028localedir
1029libdir
1030psdir
1031pdfdir
1032dvidir
1033htmldir
1034infodir
1035docdir
1036oldincludedir
1037includedir
1038localstatedir
1039sharedstatedir
1040sysconfdir
1041datadir
1042datarootdir
1043libexecdir
1044sbindir
1045bindir
1046program_transform_name
1047prefix
1048exec_prefix
1049PACKAGE_URL
1050PACKAGE_BUGREPORT
1051PACKAGE_STRING
1052PACKAGE_VERSION
1053PACKAGE_TARNAME
1054PACKAGE_NAME
1055PATH_SEPARATOR
1056SHELL'
1057ac_subst_files=''
1058ac_user_opts='
1059enable_option_checking
1060with_target_bits
1061enable_openjdk_only
1062with_custom_make_dir
1063with_jdk_variant
1064with_jvm_interpreter
1065with_jvm_variants
1066enable_debug
1067with_debug_level
1068with_devkit
1069with_sys_root
1070with_sysroot
1071with_tools_dir
1072with_toolchain_path
1073with_extra_path
1074with_sdk_name
1075with_conf_name
1076with_output_sync
1077with_default_make_target
1078enable_headful
1079with_cacerts_file
1080enable_unlimited_crypto
1081with_copyright_year
1082enable_hotspot_test_in_build
1083with_milestone
1084with_update_version
1085with_user_release_suffix
1086with_build_number
1087with_version_string
1088with_version_pre
1089with_version_opt
1090with_version_build
1091with_version_major
1092with_version_minor
1093with_version_security
1094with_version_patch
1095with_boot_jdk
1096with_add_source_root
1097with_override_source_root
1098with_adds_and_overrides
1099with_override_langtools
1100with_override_corba
1101with_override_jaxp
1102with_override_jaxws
1103with_override_hotspot
1104with_override_nashorn
1105with_override_jdk
1106with_import_hotspot
1107enable_static_build
1108with_toolchain_type
1109with_extra_cflags
1110with_extra_cxxflags
1111with_extra_ldflags
1112with_toolchain_version
1113with_build_devkit
1114with_jtreg
1115enable_warnings_as_errors
1116with_native_debug_symbols
1117enable_debug_symbols
1118enable_zip_debug_info
1119enable_native_coverage
1120with_stdc__lib
1121with_msvcr_dll
1122with_msvcp_dll
1123with_x
1124with_cups
1125with_cups_include
1126with_freetype
1127with_freetype_include
1128with_freetype_lib
1129with_freetype_src
1130enable_freetype_bundling
1131with_alsa
1132with_alsa_include
1133with_alsa_lib
1134with_libffi
1135with_libffi_include
1136with_libffi_lib
1137with_libjpeg
1138with_giflib
1139with_libpng
1140with_zlib
1141with_lcms
1142with_dxsdk
1143with_dxsdk_lib
1144with_dxsdk_include
1145with_num_cores
1146with_memory_size
1147with_jobs
1148with_test_jobs
1149with_boot_jdk_jvmargs
1150with_sjavac_server_java
1151enable_sjavac
1152enable_javac_server
1153enable_icecc
1154enable_precompiled_headers
1155enable_ccache
1156with_ccache_dir
1157'
1158      ac_precious_vars='build_alias
1159host_alias
1160target_alias
1161BASENAME
1162BASH
1163CAT
1164CHMOD
1165CMP
1166COMM
1167CP
1168CUT
1169DATE
1170DIFF
1171DIRNAME
1172ECHO
1173EXPR
1174FILE
1175FIND
1176HEAD
1177LN
1178LS
1179MKDIR
1180MKTEMP
1181MV
1182NAWK
1183PRINTF
1184RM
1185RMDIR
1186SH
1187SORT
1188TAIL
1189TAR
1190TEE
1191TOUCH
1192TR
1193UNAME
1194UNIQ
1195WC
1196WHICH
1197XARGS
1198AWK
1199GREP
1200EGREP
1201FGREP
1202SED
1203CYGPATH
1204READLINK
1205DF
1206CPIO
1207NICE
1208MAKE
1209UNZIP
1210ZIP
1211LDD
1212OTOOL
1213READELF
1214HG
1215STAT
1216TIME
1217PATCH
1218DSYMUTIL
1219XATTR
1220CODESIGN
1221SETFILE
1222PKG_CONFIG
1223JAVA
1224JAVAC
1225JAVAH
1226JAR
1227JARSIGNER
1228CC
1229CFLAGS
1230LDFLAGS
1231LIBS
1232CPPFLAGS
1233CXX
1234CXXFLAGS
1235CCC
1236CPP
1237CXXCPP
1238AS
1239AR
1240LIPO
1241STRIP
1242NM
1243GNM
1244OBJCOPY
1245OBJDUMP
1246BUILD_CC
1247BUILD_CXX
1248BUILD_NM
1249BUILD_AR
1250JTREGEXE
1251XMKMF
1252FREETYPE_CFLAGS
1253FREETYPE_LIBS
1254ALSA_CFLAGS
1255ALSA_LIBS
1256LIBFFI_CFLAGS
1257LIBFFI_LIBS
1258PNG_CFLAGS
1259PNG_LIBS
1260LCMS_CFLAGS
1261LCMS_LIBS
1262ICECC_CMD
1263ICECC_CREATE_ENV
1264ICECC_WRAPPER
1265CCACHE'
1266
1267
1268# Initialize some variables set by options.
1269ac_init_help=
1270ac_init_version=false
1271ac_unrecognized_opts=
1272ac_unrecognized_sep=
1273# The variables have the same names as the options, with
1274# dashes changed to underlines.
1275cache_file=/dev/null
1276exec_prefix=NONE
1277no_create=
1278no_recursion=
1279prefix=NONE
1280program_prefix=NONE
1281program_suffix=NONE
1282program_transform_name=s,x,x,
1283silent=
1284site=
1285srcdir=
1286verbose=
1287x_includes=NONE
1288x_libraries=NONE
1289
1290# Installation directory options.
1291# These are left unexpanded so users can "make install exec_prefix=/foo"
1292# and all the variables that are supposed to be based on exec_prefix
1293# by default will actually change.
1294# Use braces instead of parens because sh, perl, etc. also accept them.
1295# (The list follows the same order as the GNU Coding Standards.)
1296bindir='${exec_prefix}/bin'
1297sbindir='${exec_prefix}/sbin'
1298libexecdir='${exec_prefix}/libexec'
1299datarootdir='${prefix}/share'
1300datadir='${datarootdir}'
1301sysconfdir='${prefix}/etc'
1302sharedstatedir='${prefix}/com'
1303localstatedir='${prefix}/var'
1304includedir='${prefix}/include'
1305oldincludedir='/usr/include'
1306docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1307infodir='${datarootdir}/info'
1308htmldir='${docdir}'
1309dvidir='${docdir}'
1310pdfdir='${docdir}'
1311psdir='${docdir}'
1312libdir='${exec_prefix}/lib'
1313localedir='${datarootdir}/locale'
1314mandir='${datarootdir}/man'
1315
1316ac_prev=
1317ac_dashdash=
1318for ac_option
1319do
1320  # If the previous option needs an argument, assign it.
1321  if test -n "$ac_prev"; then
1322    eval $ac_prev=\$ac_option
1323    ac_prev=
1324    continue
1325  fi
1326
1327  case $ac_option in
1328  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1329  *=)   ac_optarg= ;;
1330  *)    ac_optarg=yes ;;
1331  esac
1332
1333  # Accept the important Cygnus configure options, so we can diagnose typos.
1334
1335  case $ac_dashdash$ac_option in
1336  --)
1337    ac_dashdash=yes ;;
1338
1339  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1340    ac_prev=bindir ;;
1341  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1342    bindir=$ac_optarg ;;
1343
1344  -build | --build | --buil | --bui | --bu)
1345    ac_prev=build_alias ;;
1346  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1347    build_alias=$ac_optarg ;;
1348
1349  -cache-file | --cache-file | --cache-fil | --cache-fi \
1350  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1351    ac_prev=cache_file ;;
1352  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1353  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1354    cache_file=$ac_optarg ;;
1355
1356  --config-cache | -C)
1357    cache_file=config.cache ;;
1358
1359  -datadir | --datadir | --datadi | --datad)
1360    ac_prev=datadir ;;
1361  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1362    datadir=$ac_optarg ;;
1363
1364  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1365  | --dataroo | --dataro | --datar)
1366    ac_prev=datarootdir ;;
1367  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1368  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1369    datarootdir=$ac_optarg ;;
1370
1371  -disable-* | --disable-*)
1372    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1373    # Reject names that are not valid shell variable names.
1374    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1375      as_fn_error $? "invalid feature name: $ac_useropt"
1376    ac_useropt_orig=$ac_useropt
1377    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1378    case $ac_user_opts in
1379      *"
1380"enable_$ac_useropt"
1381"*) ;;
1382      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1383	 ac_unrecognized_sep=', ';;
1384    esac
1385    eval enable_$ac_useropt=no ;;
1386
1387  -docdir | --docdir | --docdi | --doc | --do)
1388    ac_prev=docdir ;;
1389  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1390    docdir=$ac_optarg ;;
1391
1392  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1393    ac_prev=dvidir ;;
1394  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1395    dvidir=$ac_optarg ;;
1396
1397  -enable-* | --enable-*)
1398    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1399    # Reject names that are not valid shell variable names.
1400    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1401      as_fn_error $? "invalid feature name: $ac_useropt"
1402    ac_useropt_orig=$ac_useropt
1403    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1404    case $ac_user_opts in
1405      *"
1406"enable_$ac_useropt"
1407"*) ;;
1408      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1409	 ac_unrecognized_sep=', ';;
1410    esac
1411    eval enable_$ac_useropt=\$ac_optarg ;;
1412
1413  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1414  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1415  | --exec | --exe | --ex)
1416    ac_prev=exec_prefix ;;
1417  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1418  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1419  | --exec=* | --exe=* | --ex=*)
1420    exec_prefix=$ac_optarg ;;
1421
1422  -gas | --gas | --ga | --g)
1423    # Obsolete; use --with-gas.
1424    with_gas=yes ;;
1425
1426  -help | --help | --hel | --he | -h)
1427    ac_init_help=long ;;
1428  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1429    ac_init_help=recursive ;;
1430  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1431    ac_init_help=short ;;
1432
1433  -host | --host | --hos | --ho)
1434    ac_prev=host_alias ;;
1435  -host=* | --host=* | --hos=* | --ho=*)
1436    host_alias=$ac_optarg ;;
1437
1438  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1439    ac_prev=htmldir ;;
1440  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1441  | --ht=*)
1442    htmldir=$ac_optarg ;;
1443
1444  -includedir | --includedir | --includedi | --included | --include \
1445  | --includ | --inclu | --incl | --inc)
1446    ac_prev=includedir ;;
1447  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1448  | --includ=* | --inclu=* | --incl=* | --inc=*)
1449    includedir=$ac_optarg ;;
1450
1451  -infodir | --infodir | --infodi | --infod | --info | --inf)
1452    ac_prev=infodir ;;
1453  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1454    infodir=$ac_optarg ;;
1455
1456  -libdir | --libdir | --libdi | --libd)
1457    ac_prev=libdir ;;
1458  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1459    libdir=$ac_optarg ;;
1460
1461  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1462  | --libexe | --libex | --libe)
1463    ac_prev=libexecdir ;;
1464  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1465  | --libexe=* | --libex=* | --libe=*)
1466    libexecdir=$ac_optarg ;;
1467
1468  -localedir | --localedir | --localedi | --localed | --locale)
1469    ac_prev=localedir ;;
1470  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1471    localedir=$ac_optarg ;;
1472
1473  -localstatedir | --localstatedir | --localstatedi | --localstated \
1474  | --localstate | --localstat | --localsta | --localst | --locals)
1475    ac_prev=localstatedir ;;
1476  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1477  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1478    localstatedir=$ac_optarg ;;
1479
1480  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1481    ac_prev=mandir ;;
1482  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1483    mandir=$ac_optarg ;;
1484
1485  -nfp | --nfp | --nf)
1486    # Obsolete; use --without-fp.
1487    with_fp=no ;;
1488
1489  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1490  | --no-cr | --no-c | -n)
1491    no_create=yes ;;
1492
1493  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1494  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1495    no_recursion=yes ;;
1496
1497  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1498  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1499  | --oldin | --oldi | --old | --ol | --o)
1500    ac_prev=oldincludedir ;;
1501  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1502  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1503  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1504    oldincludedir=$ac_optarg ;;
1505
1506  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1507    ac_prev=prefix ;;
1508  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1509    prefix=$ac_optarg ;;
1510
1511  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1512  | --program-pre | --program-pr | --program-p)
1513    ac_prev=program_prefix ;;
1514  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1515  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1516    program_prefix=$ac_optarg ;;
1517
1518  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1519  | --program-suf | --program-su | --program-s)
1520    ac_prev=program_suffix ;;
1521  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1522  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1523    program_suffix=$ac_optarg ;;
1524
1525  -program-transform-name | --program-transform-name \
1526  | --program-transform-nam | --program-transform-na \
1527  | --program-transform-n | --program-transform- \
1528  | --program-transform | --program-transfor \
1529  | --program-transfo | --program-transf \
1530  | --program-trans | --program-tran \
1531  | --progr-tra | --program-tr | --program-t)
1532    ac_prev=program_transform_name ;;
1533  -program-transform-name=* | --program-transform-name=* \
1534  | --program-transform-nam=* | --program-transform-na=* \
1535  | --program-transform-n=* | --program-transform-=* \
1536  | --program-transform=* | --program-transfor=* \
1537  | --program-transfo=* | --program-transf=* \
1538  | --program-trans=* | --program-tran=* \
1539  | --progr-tra=* | --program-tr=* | --program-t=*)
1540    program_transform_name=$ac_optarg ;;
1541
1542  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1543    ac_prev=pdfdir ;;
1544  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1545    pdfdir=$ac_optarg ;;
1546
1547  -psdir | --psdir | --psdi | --psd | --ps)
1548    ac_prev=psdir ;;
1549  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1550    psdir=$ac_optarg ;;
1551
1552  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1553  | -silent | --silent | --silen | --sile | --sil)
1554    silent=yes ;;
1555
1556  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1557    ac_prev=sbindir ;;
1558  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1559  | --sbi=* | --sb=*)
1560    sbindir=$ac_optarg ;;
1561
1562  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1563  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1564  | --sharedst | --shareds | --shared | --share | --shar \
1565  | --sha | --sh)
1566    ac_prev=sharedstatedir ;;
1567  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1568  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1569  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1570  | --sha=* | --sh=*)
1571    sharedstatedir=$ac_optarg ;;
1572
1573  -site | --site | --sit)
1574    ac_prev=site ;;
1575  -site=* | --site=* | --sit=*)
1576    site=$ac_optarg ;;
1577
1578  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1579    ac_prev=srcdir ;;
1580  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1581    srcdir=$ac_optarg ;;
1582
1583  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1584  | --syscon | --sysco | --sysc | --sys | --sy)
1585    ac_prev=sysconfdir ;;
1586  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1587  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1588    sysconfdir=$ac_optarg ;;
1589
1590  -target | --target | --targe | --targ | --tar | --ta | --t)
1591    ac_prev=target_alias ;;
1592  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1593    target_alias=$ac_optarg ;;
1594
1595  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1596    verbose=yes ;;
1597
1598  -version | --version | --versio | --versi | --vers | -V)
1599    ac_init_version=: ;;
1600
1601  -with-* | --with-*)
1602    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1603    # Reject names that are not valid shell variable names.
1604    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1605      as_fn_error $? "invalid package name: $ac_useropt"
1606    ac_useropt_orig=$ac_useropt
1607    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1608    case $ac_user_opts in
1609      *"
1610"with_$ac_useropt"
1611"*) ;;
1612      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1613	 ac_unrecognized_sep=', ';;
1614    esac
1615    eval with_$ac_useropt=\$ac_optarg ;;
1616
1617  -without-* | --without-*)
1618    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1619    # Reject names that are not valid shell variable names.
1620    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1621      as_fn_error $? "invalid package name: $ac_useropt"
1622    ac_useropt_orig=$ac_useropt
1623    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1624    case $ac_user_opts in
1625      *"
1626"with_$ac_useropt"
1627"*) ;;
1628      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1629	 ac_unrecognized_sep=', ';;
1630    esac
1631    eval with_$ac_useropt=no ;;
1632
1633  --x)
1634    # Obsolete; use --with-x.
1635    with_x=yes ;;
1636
1637  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1638  | --x-incl | --x-inc | --x-in | --x-i)
1639    ac_prev=x_includes ;;
1640  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1641  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1642    x_includes=$ac_optarg ;;
1643
1644  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1645  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1646    ac_prev=x_libraries ;;
1647  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1648  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1649    x_libraries=$ac_optarg ;;
1650
1651  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1652Try \`$0 --help' for more information"
1653    ;;
1654
1655  *=*)
1656    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1657    # Reject names that are not valid shell variable names.
1658    case $ac_envvar in #(
1659      '' | [0-9]* | *[!_$as_cr_alnum]* )
1660      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1661    esac
1662    eval $ac_envvar=\$ac_optarg
1663    export $ac_envvar ;;
1664
1665  *)
1666    # FIXME: should be removed in autoconf 3.0.
1667    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1668    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1669      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1670    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1671    ;;
1672
1673  esac
1674done
1675
1676if test -n "$ac_prev"; then
1677  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1678  as_fn_error $? "missing argument to $ac_option"
1679fi
1680
1681if test -n "$ac_unrecognized_opts"; then
1682  case $enable_option_checking in
1683    no) ;;
1684    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1685    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1686  esac
1687fi
1688
1689# Check all directory arguments for consistency.
1690for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1691		datadir sysconfdir sharedstatedir localstatedir includedir \
1692		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1693		libdir localedir mandir
1694do
1695  eval ac_val=\$$ac_var
1696  # Remove trailing slashes.
1697  case $ac_val in
1698    */ )
1699      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1700      eval $ac_var=\$ac_val;;
1701  esac
1702  # Be sure to have absolute directory names.
1703  case $ac_val in
1704    [\\/$]* | ?:[\\/]* )  continue;;
1705    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1706  esac
1707  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1708done
1709
1710# There might be people who depend on the old broken behavior: `$host'
1711# used to hold the argument of --host etc.
1712# FIXME: To remove some day.
1713build=$build_alias
1714host=$host_alias
1715target=$target_alias
1716
1717# FIXME: To remove some day.
1718if test "x$host_alias" != x; then
1719  if test "x$build_alias" = x; then
1720    cross_compiling=maybe
1721  elif test "x$build_alias" != "x$host_alias"; then
1722    cross_compiling=yes
1723  fi
1724fi
1725
1726ac_tool_prefix=
1727test -n "$host_alias" && ac_tool_prefix=$host_alias-
1728
1729test "$silent" = yes && exec 6>/dev/null
1730
1731
1732ac_pwd=`pwd` && test -n "$ac_pwd" &&
1733ac_ls_di=`ls -di .` &&
1734ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1735  as_fn_error $? "working directory cannot be determined"
1736test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1737  as_fn_error $? "pwd does not report name of working directory"
1738
1739
1740# Find the source files, if location was not specified.
1741if test -z "$srcdir"; then
1742  ac_srcdir_defaulted=yes
1743  # Try the directory containing this script, then the parent directory.
1744  ac_confdir=`$as_dirname -- "$as_myself" ||
1745$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1746	 X"$as_myself" : 'X\(//\)[^/]' \| \
1747	 X"$as_myself" : 'X\(//\)$' \| \
1748	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1749$as_echo X"$as_myself" |
1750    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1751	    s//\1/
1752	    q
1753	  }
1754	  /^X\(\/\/\)[^/].*/{
1755	    s//\1/
1756	    q
1757	  }
1758	  /^X\(\/\/\)$/{
1759	    s//\1/
1760	    q
1761	  }
1762	  /^X\(\/\).*/{
1763	    s//\1/
1764	    q
1765	  }
1766	  s/.*/./; q'`
1767  srcdir=$ac_confdir
1768  if test ! -r "$srcdir/$ac_unique_file"; then
1769    srcdir=..
1770  fi
1771else
1772  ac_srcdir_defaulted=no
1773fi
1774if test ! -r "$srcdir/$ac_unique_file"; then
1775  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1776  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1777fi
1778ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1779ac_abs_confdir=`(
1780	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1781	pwd)`
1782# When building in place, set srcdir=.
1783if test "$ac_abs_confdir" = "$ac_pwd"; then
1784  srcdir=.
1785fi
1786# Remove unnecessary trailing slashes from srcdir.
1787# Double slashes in file names in object file debugging info
1788# mess up M-x gdb in Emacs.
1789case $srcdir in
1790*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1791esac
1792for ac_var in $ac_precious_vars; do
1793  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1794  eval ac_env_${ac_var}_value=\$${ac_var}
1795  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1796  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1797done
1798
1799#
1800# Report the --help message.
1801#
1802if test "$ac_init_help" = "long"; then
1803  # Omit some internal or obsolete options to make the list less imposing.
1804  # This message is too long to be a string in the A/UX 3.1 sh.
1805  cat <<_ACEOF
1806\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1807
1808Usage: $0 [OPTION]... [VAR=VALUE]...
1809
1810To assign environment variables (e.g., CC, CFLAGS...), specify them as
1811VAR=VALUE.  See below for descriptions of some of the useful variables.
1812
1813Defaults for the options are specified in brackets.
1814
1815Configuration:
1816  -h, --help              display this help and exit
1817      --help=short        display options specific to this package
1818      --help=recursive    display the short help of all the included packages
1819  -V, --version           display version information and exit
1820  -q, --quiet, --silent   do not print \`checking ...' messages
1821      --cache-file=FILE   cache test results in FILE [disabled]
1822  -C, --config-cache      alias for \`--cache-file=config.cache'
1823  -n, --no-create         do not create output files
1824      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1825
1826Installation directories:
1827  --prefix=PREFIX         install architecture-independent files in PREFIX
1828                          [$ac_default_prefix]
1829  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1830                          [PREFIX]
1831
1832By default, \`make install' will install all the files in
1833\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1834an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1835for instance \`--prefix=\$HOME'.
1836
1837For better control, use the options below.
1838
1839Fine tuning of the installation directories:
1840  --bindir=DIR            user executables [EPREFIX/bin]
1841  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1842  --libexecdir=DIR        program executables [EPREFIX/libexec]
1843  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1844  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1845  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1846  --libdir=DIR            object code libraries [EPREFIX/lib]
1847  --includedir=DIR        C header files [PREFIX/include]
1848  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1849  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1850  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1851  --infodir=DIR           info documentation [DATAROOTDIR/info]
1852  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1853  --mandir=DIR            man documentation [DATAROOTDIR/man]
1854  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1855  --htmldir=DIR           html documentation [DOCDIR]
1856  --dvidir=DIR            dvi documentation [DOCDIR]
1857  --pdfdir=DIR            pdf documentation [DOCDIR]
1858  --psdir=DIR             ps documentation [DOCDIR]
1859_ACEOF
1860
1861  cat <<\_ACEOF
1862
1863X features:
1864  --x-includes=DIR    X include files are in DIR
1865  --x-libraries=DIR   X library files are in DIR
1866
1867System types:
1868  --build=BUILD     configure for building on BUILD [guessed]
1869  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1870  --target=TARGET   configure for building compilers for TARGET [HOST]
1871_ACEOF
1872fi
1873
1874if test -n "$ac_init_help"; then
1875  case $ac_init_help in
1876     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1877   esac
1878  cat <<\_ACEOF
1879
1880Optional Features:
1881  --disable-option-checking  ignore unrecognized --enable/--with options
1882  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1883  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1884  --enable-openjdk-only   suppress building custom source even if present
1885                          [disabled]
1886  --enable-debug          set the debug level to fastdebug (shorthand for
1887                          --with-debug-level=fastdebug) [disabled]
1888  --disable-headful       disable building headful support (graphical UI
1889                          support) [enabled]
1890  --enable-unlimited-crypto
1891                          Enable unlimited crypto policy [disabled]
1892  --enable-hotspot-test-in-build
1893                          run the Queens test after Hotspot build [disabled]
1894  --enable-static-build   enable static library build [disabled]
1895  --disable-warnings-as-errors
1896                          do not consider native warnings to be an error
1897                          [enabled]
1898  --enable-debug-symbols  Deprecated. Option is kept for backwards
1899                          compatibility and is ignored
1900  --enable-zip-debug-info Deprecated. Option is kept for backwards
1901                          compatibility and is ignored
1902  --enable-native-coverage
1903                          enable native compilation with code coverage
1904                          data[disabled]
1905  --disable-freetype-bundling
1906                          disable bundling of the freetype library with the
1907                          build result [enabled on Windows or when using
1908                          --with-freetype, disabled otherwise]
1909  --enable-sjavac         use sjavac to do fast incremental compiles
1910                          [disabled]
1911  --disable-javac-server  disable javac server [enabled]
1912  --enable-icecc          enable distribted compilation of native code using
1913                          icecc/icecream [disabled]
1914  --disable-precompiled-headers
1915                          disable using precompiled headers when compiling C++
1916                          [enabled]
1917  --enable-ccache         enable using ccache to speed up recompilations
1918                          [disabled]
1919
1920Optional Packages:
1921  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1922  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1923  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1924                          support it), e.g. --with-target-bits=32 [guessed]
1925  --with-custom-make-dir  Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-jdk-variant      JDK variant to build (normal) [normal]
1928  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1929  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1930                          client, minimal1, zero, zeroshark, core) [server]
1931  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1932                          optimized (HotSpot build only)) [release]
1933  --with-devkit           use this devkit for compilers, tools and resources
1934  --with-sys-root         alias for --with-sysroot for backwards compatability
1935  --with-sysroot          use this directory as sysroot
1936  --with-tools-dir        alias for --with-toolchain-path for backwards
1937                          compatibility
1938  --with-toolchain-path   prepend these directories when searching for
1939                          toolchain binaries (compilers etc)
1940  --with-extra-path       prepend these directories to the default path
1941  --with-sdk-name         use the platform SDK of the given name. [macosx]
1942  --with-conf-name        use this as the name of the configuration [generated
1943                          from important configuration options]
1944  --with-output-sync      set make output sync type if supported by make.
1945                          [recurse]
1946  --with-default-make-target
1947                          set the default make target [exploded-image]
1948  --with-cacerts-file     specify alternative cacerts file
1949  --with-copyright-year   Set copyright year value for build [current year]
1950  --with-milestone        Deprecated. Option is kept for backwards
1951                          compatibility and is ignored
1952  --with-update-version   Deprecated. Option is kept for backwards
1953                          compatibility and is ignored
1954  --with-user-release-suffix
1955                          Deprecated. Option is kept for backwards
1956                          compatibility and is ignored
1957  --with-build-number     Deprecated. Option is kept for backwards
1958                          compatibility and is ignored
1959  --with-version-string   Set version string [calculated]
1960  --with-version-pre      Set the base part of the version 'PRE' field
1961                          (pre-release identifier) ['internal']
1962  --with-version-opt      Set version 'OPT' field (build metadata)
1963                          [<timestamp>.<user>.<dirname>]
1964  --with-version-build    Set version 'BUILD' field (build number) [not
1965                          specified]
1966  --with-version-major    Set version 'MAJOR' field (first number) [current
1967                          source value]
1968  --with-version-minor    Set version 'MINOR' field (second number) [current
1969                          source value]
1970  --with-version-security Set version 'SECURITY' field (third number) [current
1971                          source value]
1972  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1973                          specified]
1974  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1975  --with-add-source-root  Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-override-source-root
1978                          Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --with-adds-and-overrides
1981                          Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --with-override-langtools
1984                          Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --with-override-corba   Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-override-jaxp    Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-override-jaxws   Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-override-hotspot Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-override-nashorn Deprecated. Option is kept for backwards
1995                          compatibility and is ignored
1996  --with-override-jdk     Deprecated. Option is kept for backwards
1997                          compatibility and is ignored
1998  --with-import-hotspot   import hotspot binaries from this jdk image or
1999                          hotspot build dist dir instead of building from
2000                          source
2001  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2002                          to show possible values [platform dependent]
2003  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2004  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2005  --with-extra-ldflags    extra flags to be used when linking jdk
2006  --with-toolchain-version
2007                          the version of the toolchain to look for, use
2008                          '--help' to show possible values [platform
2009                          dependent]
2010  --with-build-devkit     Devkit to use for the build platform toolchain
2011  --with-jtreg            Regression Test Harness [probed]
2012  --with-native-debug-symbols
2013                          set the native debug symbol configuration (none,
2014                          internal, external, zipped) [zipped]
2015  --with-stdc++lib=<static>,<dynamic>,<default>
2016                          force linking of the C++ runtime on Linux to either
2017                          static or dynamic, default is static with dynamic as
2018                          fallback
2019  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2020                          (Windows only) [probed]
2021  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2022                          (Windows only) [probed]
2023  --with-x                use the X Window System
2024  --with-cups             specify prefix directory for the cups package
2025                          (expecting the headers under PATH/include)
2026  --with-cups-include     specify directory for the cups include files
2027  --with-freetype         specify prefix directory for the freetype package
2028                          (expecting the libraries under PATH/lib and the
2029                          headers under PATH/include)
2030  --with-freetype-include specify directory for the freetype include files
2031  --with-freetype-lib     specify directory for the freetype library
2032  --with-freetype-src     specify directory with freetype sources to
2033                          automatically build the library (experimental,
2034                          Windows-only)
2035  --with-alsa             specify prefix directory for the alsa package
2036                          (expecting the libraries under PATH/lib and the
2037                          headers under PATH/include)
2038  --with-alsa-include     specify directory for the alsa include files
2039  --with-alsa-lib         specify directory for the alsa library
2040  --with-libffi           specify prefix directory for the libffi package
2041                          (expecting the libraries under PATH/lib and the
2042                          headers under PATH/include)
2043  --with-libffi-include   specify directory for the libffi include files
2044  --with-libffi-lib       specify directory for the libffi library
2045  --with-libjpeg          use libjpeg from build system or OpenJDK source
2046                          (system, bundled) [bundled]
2047  --with-giflib           use giflib from build system or OpenJDK source
2048                          (system, bundled) [bundled]
2049  --with-libpng           use libpng from build system or OpenJDK source
2050                          (system, bundled) [bundled]
2051  --with-zlib             use zlib from build system or OpenJDK source
2052                          (system, bundled) [bundled]
2053  --with-lcms             use lcms2 from build system or OpenJDK source
2054                          (system, bundled) [bundled]
2055  --with-dxsdk            Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-dxsdk-include    Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-num-cores        number of cores in the build system, e.g.
2062                          --with-num-cores=8 [probed]
2063  --with-memory-size      memory (in MB) available in the build system, e.g.
2064                          --with-memory-size=1024 [probed]
2065  --with-jobs             number of parallel jobs to let make run [calculated
2066                          based on cores and memory]
2067  --with-test-jobs        number of parallel tests jobs to run [based on build
2068                          jobs]
2069  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2070                          invocations of boot JDK, overriding the default
2071                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2072                          -enableassertions"
2073  --with-sjavac-server-java
2074                          use this java binary for running the sjavac
2075                          background server [Boot JDK java]
2076  --with-ccache-dir       where to store ccache files [~/.ccache]
2077
2078Some influential environment variables:
2079  BASENAME    Override default value for BASENAME
2080  BASH        Override default value for BASH
2081  CAT         Override default value for CAT
2082  CHMOD       Override default value for CHMOD
2083  CMP         Override default value for CMP
2084  COMM        Override default value for COMM
2085  CP          Override default value for CP
2086  CUT         Override default value for CUT
2087  DATE        Override default value for DATE
2088  DIFF        Override default value for DIFF
2089  DIRNAME     Override default value for DIRNAME
2090  ECHO        Override default value for ECHO
2091  EXPR        Override default value for EXPR
2092  FILE        Override default value for FILE
2093  FIND        Override default value for FIND
2094  HEAD        Override default value for HEAD
2095  LN          Override default value for LN
2096  LS          Override default value for LS
2097  MKDIR       Override default value for MKDIR
2098  MKTEMP      Override default value for MKTEMP
2099  MV          Override default value for MV
2100  NAWK        Override default value for NAWK
2101  PRINTF      Override default value for PRINTF
2102  RM          Override default value for RM
2103  RMDIR       Override default value for RMDIR
2104  SH          Override default value for SH
2105  SORT        Override default value for SORT
2106  TAIL        Override default value for TAIL
2107  TAR         Override default value for TAR
2108  TEE         Override default value for TEE
2109  TOUCH       Override default value for TOUCH
2110  TR          Override default value for TR
2111  UNAME       Override default value for UNAME
2112  UNIQ        Override default value for UNIQ
2113  WC          Override default value for WC
2114  WHICH       Override default value for WHICH
2115  XARGS       Override default value for XARGS
2116  AWK         Override default value for AWK
2117  GREP        Override default value for GREP
2118  EGREP       Override default value for EGREP
2119  FGREP       Override default value for FGREP
2120  SED         Override default value for SED
2121  CYGPATH     Override default value for CYGPATH
2122  READLINK    Override default value for READLINK
2123  DF          Override default value for DF
2124  CPIO        Override default value for CPIO
2125  NICE        Override default value for NICE
2126  MAKE        Override default value for MAKE
2127  UNZIP       Override default value for UNZIP
2128  ZIP         Override default value for ZIP
2129  LDD         Override default value for LDD
2130  OTOOL       Override default value for OTOOL
2131  READELF     Override default value for READELF
2132  HG          Override default value for HG
2133  STAT        Override default value for STAT
2134  TIME        Override default value for TIME
2135  PATCH       Override default value for PATCH
2136  DSYMUTIL    Override default value for DSYMUTIL
2137  XATTR       Override default value for XATTR
2138  CODESIGN    Override default value for CODESIGN
2139  SETFILE     Override default value for SETFILE
2140  PKG_CONFIG  path to pkg-config utility
2141  JAVA        Override default value for JAVA
2142  JAVAC       Override default value for JAVAC
2143  JAVAH       Override default value for JAVAH
2144  JAR         Override default value for JAR
2145  JARSIGNER   Override default value for JARSIGNER
2146  CC          C compiler command
2147  CFLAGS      C compiler flags
2148  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2149              nonstandard directory <lib dir>
2150  LIBS        libraries to pass to the linker, e.g. -l<library>
2151  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2152              you have headers in a nonstandard directory <include dir>
2153  CXX         C++ compiler command
2154  CXXFLAGS    C++ compiler flags
2155  CPP         C preprocessor
2156  CXXCPP      C++ preprocessor
2157  AS          Override default value for AS
2158  AR          Override default value for AR
2159  LIPO        Override default value for LIPO
2160  STRIP       Override default value for STRIP
2161  NM          Override default value for NM
2162  GNM         Override default value for GNM
2163  OBJCOPY     Override default value for OBJCOPY
2164  OBJDUMP     Override default value for OBJDUMP
2165  BUILD_CC    Override default value for BUILD_CC
2166  BUILD_CXX   Override default value for BUILD_CXX
2167  BUILD_NM    Override default value for BUILD_NM
2168  BUILD_AR    Override default value for BUILD_AR
2169  JTREGEXE    Override default value for JTREGEXE
2170  XMKMF       Path to xmkmf, Makefile generator for X Window System
2171  FREETYPE_CFLAGS
2172              C compiler flags for FREETYPE, overriding pkg-config
2173  FREETYPE_LIBS
2174              linker flags for FREETYPE, overriding pkg-config
2175  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2176  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2177  LIBFFI_CFLAGS
2178              C compiler flags for LIBFFI, overriding pkg-config
2179  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2180  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2181  PNG_LIBS    linker flags for PNG, overriding pkg-config
2182  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2183  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2184  ICECC_CMD   Override default value for ICECC_CMD
2185  ICECC_CREATE_ENV
2186              Override default value for ICECC_CREATE_ENV
2187  ICECC_WRAPPER
2188              Override default value for ICECC_WRAPPER
2189  CCACHE      Override default value for CCACHE
2190
2191Use these variables to override the choices made by `configure' or to help
2192it to find libraries and programs with nonstandard names/locations.
2193
2194Report bugs to <build-dev@openjdk.java.net>.
2195OpenJDK home page: <http://openjdk.java.net>.
2196_ACEOF
2197ac_status=$?
2198fi
2199
2200if test "$ac_init_help" = "recursive"; then
2201  # If there are subdirs, report their specific --help.
2202  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2203    test -d "$ac_dir" ||
2204      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2205      continue
2206    ac_builddir=.
2207
2208case "$ac_dir" in
2209.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2210*)
2211  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2212  # A ".." for each directory in $ac_dir_suffix.
2213  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2214  case $ac_top_builddir_sub in
2215  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2216  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2217  esac ;;
2218esac
2219ac_abs_top_builddir=$ac_pwd
2220ac_abs_builddir=$ac_pwd$ac_dir_suffix
2221# for backward compatibility:
2222ac_top_builddir=$ac_top_build_prefix
2223
2224case $srcdir in
2225  .)  # We are building in place.
2226    ac_srcdir=.
2227    ac_top_srcdir=$ac_top_builddir_sub
2228    ac_abs_top_srcdir=$ac_pwd ;;
2229  [\\/]* | ?:[\\/]* )  # Absolute name.
2230    ac_srcdir=$srcdir$ac_dir_suffix;
2231    ac_top_srcdir=$srcdir
2232    ac_abs_top_srcdir=$srcdir ;;
2233  *) # Relative name.
2234    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2235    ac_top_srcdir=$ac_top_build_prefix$srcdir
2236    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2237esac
2238ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2239
2240    cd "$ac_dir" || { ac_status=$?; continue; }
2241    # Check for guested configure.
2242    if test -f "$ac_srcdir/configure.gnu"; then
2243      echo &&
2244      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2245    elif test -f "$ac_srcdir/configure"; then
2246      echo &&
2247      $SHELL "$ac_srcdir/configure" --help=recursive
2248    else
2249      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2250    fi || ac_status=$?
2251    cd "$ac_pwd" || { ac_status=$?; break; }
2252  done
2253fi
2254
2255test -n "$ac_init_help" && exit $ac_status
2256if $ac_init_version; then
2257  cat <<\_ACEOF
2258OpenJDK configure jdk9
2259generated by GNU Autoconf 2.69
2260
2261Copyright (C) 2012 Free Software Foundation, Inc.
2262This configure script is free software; the Free Software Foundation
2263gives unlimited permission to copy, distribute and modify it.
2264_ACEOF
2265  exit
2266fi
2267
2268## ------------------------ ##
2269## Autoconf initialization. ##
2270## ------------------------ ##
2271
2272# ac_fn_c_try_compile LINENO
2273# --------------------------
2274# Try to compile conftest.$ac_ext, and return whether this succeeded.
2275ac_fn_c_try_compile ()
2276{
2277  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278  rm -f conftest.$ac_objext
2279  if { { ac_try="$ac_compile"
2280case "(($ac_try" in
2281  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2282  *) ac_try_echo=$ac_try;;
2283esac
2284eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2285$as_echo "$ac_try_echo"; } >&5
2286  (eval "$ac_compile") 2>conftest.err
2287  ac_status=$?
2288  if test -s conftest.err; then
2289    grep -v '^ *+' conftest.err >conftest.er1
2290    cat conftest.er1 >&5
2291    mv -f conftest.er1 conftest.err
2292  fi
2293  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2294  test $ac_status = 0; } && {
2295	 test -z "$ac_c_werror_flag" ||
2296	 test ! -s conftest.err
2297       } && test -s conftest.$ac_objext; then :
2298  ac_retval=0
2299else
2300  $as_echo "$as_me: failed program was:" >&5
2301sed 's/^/| /' conftest.$ac_ext >&5
2302
2303	ac_retval=1
2304fi
2305  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306  as_fn_set_status $ac_retval
2307
2308} # ac_fn_c_try_compile
2309
2310# ac_fn_cxx_try_compile LINENO
2311# ----------------------------
2312# Try to compile conftest.$ac_ext, and return whether this succeeded.
2313ac_fn_cxx_try_compile ()
2314{
2315  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316  rm -f conftest.$ac_objext
2317  if { { ac_try="$ac_compile"
2318case "(($ac_try" in
2319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2320  *) ac_try_echo=$ac_try;;
2321esac
2322eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2323$as_echo "$ac_try_echo"; } >&5
2324  (eval "$ac_compile") 2>conftest.err
2325  ac_status=$?
2326  if test -s conftest.err; then
2327    grep -v '^ *+' conftest.err >conftest.er1
2328    cat conftest.er1 >&5
2329    mv -f conftest.er1 conftest.err
2330  fi
2331  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2332  test $ac_status = 0; } && {
2333	 test -z "$ac_cxx_werror_flag" ||
2334	 test ! -s conftest.err
2335       } && test -s conftest.$ac_objext; then :
2336  ac_retval=0
2337else
2338  $as_echo "$as_me: failed program was:" >&5
2339sed 's/^/| /' conftest.$ac_ext >&5
2340
2341	ac_retval=1
2342fi
2343  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2344  as_fn_set_status $ac_retval
2345
2346} # ac_fn_cxx_try_compile
2347
2348# ac_fn_c_try_cpp LINENO
2349# ----------------------
2350# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2351ac_fn_c_try_cpp ()
2352{
2353  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2354  if { { ac_try="$ac_cpp conftest.$ac_ext"
2355case "(($ac_try" in
2356  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2357  *) ac_try_echo=$ac_try;;
2358esac
2359eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2360$as_echo "$ac_try_echo"; } >&5
2361  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2362  ac_status=$?
2363  if test -s conftest.err; then
2364    grep -v '^ *+' conftest.err >conftest.er1
2365    cat conftest.er1 >&5
2366    mv -f conftest.er1 conftest.err
2367  fi
2368  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2369  test $ac_status = 0; } > conftest.i && {
2370	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2371	 test ! -s conftest.err
2372       }; then :
2373  ac_retval=0
2374else
2375  $as_echo "$as_me: failed program was:" >&5
2376sed 's/^/| /' conftest.$ac_ext >&5
2377
2378    ac_retval=1
2379fi
2380  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381  as_fn_set_status $ac_retval
2382
2383} # ac_fn_c_try_cpp
2384
2385# ac_fn_cxx_try_cpp LINENO
2386# ------------------------
2387# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2388ac_fn_cxx_try_cpp ()
2389{
2390  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2391  if { { ac_try="$ac_cpp conftest.$ac_ext"
2392case "(($ac_try" in
2393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2394  *) ac_try_echo=$ac_try;;
2395esac
2396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2397$as_echo "$ac_try_echo"; } >&5
2398  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2399  ac_status=$?
2400  if test -s conftest.err; then
2401    grep -v '^ *+' conftest.err >conftest.er1
2402    cat conftest.er1 >&5
2403    mv -f conftest.er1 conftest.err
2404  fi
2405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2406  test $ac_status = 0; } > conftest.i && {
2407	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2408	 test ! -s conftest.err
2409       }; then :
2410  ac_retval=0
2411else
2412  $as_echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415    ac_retval=1
2416fi
2417  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2418  as_fn_set_status $ac_retval
2419
2420} # ac_fn_cxx_try_cpp
2421
2422# ac_fn_c_try_link LINENO
2423# -----------------------
2424# Try to link conftest.$ac_ext, and return whether this succeeded.
2425ac_fn_c_try_link ()
2426{
2427  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428  rm -f conftest.$ac_objext conftest$ac_exeext
2429  if { { ac_try="$ac_link"
2430case "(($ac_try" in
2431  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2432  *) ac_try_echo=$ac_try;;
2433esac
2434eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2435$as_echo "$ac_try_echo"; } >&5
2436  (eval "$ac_link") 2>conftest.err
2437  ac_status=$?
2438  if test -s conftest.err; then
2439    grep -v '^ *+' conftest.err >conftest.er1
2440    cat conftest.er1 >&5
2441    mv -f conftest.er1 conftest.err
2442  fi
2443  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2444  test $ac_status = 0; } && {
2445	 test -z "$ac_c_werror_flag" ||
2446	 test ! -s conftest.err
2447       } && test -s conftest$ac_exeext && {
2448	 test "$cross_compiling" = yes ||
2449	 test -x conftest$ac_exeext
2450       }; then :
2451  ac_retval=0
2452else
2453  $as_echo "$as_me: failed program was:" >&5
2454sed 's/^/| /' conftest.$ac_ext >&5
2455
2456	ac_retval=1
2457fi
2458  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2459  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2460  # interfere with the next link command; also delete a directory that is
2461  # left behind by Apple's compiler.  We do this before executing the actions.
2462  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2463  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2464  as_fn_set_status $ac_retval
2465
2466} # ac_fn_c_try_link
2467
2468# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2469# ---------------------------------------------------------
2470# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2471# the include files in INCLUDES and setting the cache variable VAR
2472# accordingly.
2473ac_fn_cxx_check_header_mongrel ()
2474{
2475  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2476  if eval \${$3+:} false; then :
2477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2478$as_echo_n "checking for $2... " >&6; }
2479if eval \${$3+:} false; then :
2480  $as_echo_n "(cached) " >&6
2481fi
2482eval ac_res=\$$3
2483	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2484$as_echo "$ac_res" >&6; }
2485else
2486  # Is the header compilable?
2487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2488$as_echo_n "checking $2 usability... " >&6; }
2489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2490/* end confdefs.h.  */
2491$4
2492#include <$2>
2493_ACEOF
2494if ac_fn_cxx_try_compile "$LINENO"; then :
2495  ac_header_compiler=yes
2496else
2497  ac_header_compiler=no
2498fi
2499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2501$as_echo "$ac_header_compiler" >&6; }
2502
2503# Is the header present?
2504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2505$as_echo_n "checking $2 presence... " >&6; }
2506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2507/* end confdefs.h.  */
2508#include <$2>
2509_ACEOF
2510if ac_fn_cxx_try_cpp "$LINENO"; then :
2511  ac_header_preproc=yes
2512else
2513  ac_header_preproc=no
2514fi
2515rm -f conftest.err conftest.i conftest.$ac_ext
2516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2517$as_echo "$ac_header_preproc" >&6; }
2518
2519# So?  What about this header?
2520case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2521  yes:no: )
2522    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2523$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2524    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2525$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2526    ;;
2527  no:yes:* )
2528    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2529$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2530    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2531$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2532    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2533$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2534    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2535$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2536    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2537$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2538( $as_echo "## ----------------------------------------- ##
2539## Report this to build-dev@openjdk.java.net ##
2540## ----------------------------------------- ##"
2541     ) | sed "s/^/$as_me: WARNING:     /" >&2
2542    ;;
2543esac
2544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2545$as_echo_n "checking for $2... " >&6; }
2546if eval \${$3+:} false; then :
2547  $as_echo_n "(cached) " >&6
2548else
2549  eval "$3=\$ac_header_compiler"
2550fi
2551eval ac_res=\$$3
2552	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2553$as_echo "$ac_res" >&6; }
2554fi
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556
2557} # ac_fn_cxx_check_header_mongrel
2558
2559# ac_fn_cxx_try_run LINENO
2560# ------------------------
2561# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2562# that executables *can* be run.
2563ac_fn_cxx_try_run ()
2564{
2565  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2566  if { { ac_try="$ac_link"
2567case "(($ac_try" in
2568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569  *) ac_try_echo=$ac_try;;
2570esac
2571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572$as_echo "$ac_try_echo"; } >&5
2573  (eval "$ac_link") 2>&5
2574  ac_status=$?
2575  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2576  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2577  { { case "(($ac_try" in
2578  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2579  *) ac_try_echo=$ac_try;;
2580esac
2581eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2582$as_echo "$ac_try_echo"; } >&5
2583  (eval "$ac_try") 2>&5
2584  ac_status=$?
2585  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2586  test $ac_status = 0; }; }; then :
2587  ac_retval=0
2588else
2589  $as_echo "$as_me: program exited with status $ac_status" >&5
2590       $as_echo "$as_me: failed program was:" >&5
2591sed 's/^/| /' conftest.$ac_ext >&5
2592
2593       ac_retval=$ac_status
2594fi
2595  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2596  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2597  as_fn_set_status $ac_retval
2598
2599} # ac_fn_cxx_try_run
2600
2601# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2602# ---------------------------------------------------------
2603# Tests whether HEADER exists and can be compiled using the include files in
2604# INCLUDES, setting the cache variable VAR accordingly.
2605ac_fn_cxx_check_header_compile ()
2606{
2607  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2609$as_echo_n "checking for $2... " >&6; }
2610if eval \${$3+:} false; then :
2611  $as_echo_n "(cached) " >&6
2612else
2613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2614/* end confdefs.h.  */
2615$4
2616#include <$2>
2617_ACEOF
2618if ac_fn_cxx_try_compile "$LINENO"; then :
2619  eval "$3=yes"
2620else
2621  eval "$3=no"
2622fi
2623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2624fi
2625eval ac_res=\$$3
2626	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2627$as_echo "$ac_res" >&6; }
2628  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2629
2630} # ac_fn_cxx_check_header_compile
2631
2632# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2633# ----------------------------------------------
2634# Tries to find the compile-time value of EXPR in a program that includes
2635# INCLUDES, setting VAR accordingly. Returns whether the value could be
2636# computed
2637ac_fn_cxx_compute_int ()
2638{
2639  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2640  if test "$cross_compiling" = yes; then
2641    # Depending upon the size, compute the lo and hi bounds.
2642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643/* end confdefs.h.  */
2644$4
2645int
2646main ()
2647{
2648static int test_array [1 - 2 * !(($2) >= 0)];
2649test_array [0] = 0;
2650return test_array [0];
2651
2652  ;
2653  return 0;
2654}
2655_ACEOF
2656if ac_fn_cxx_try_compile "$LINENO"; then :
2657  ac_lo=0 ac_mid=0
2658  while :; do
2659    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660/* end confdefs.h.  */
2661$4
2662int
2663main ()
2664{
2665static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2666test_array [0] = 0;
2667return test_array [0];
2668
2669  ;
2670  return 0;
2671}
2672_ACEOF
2673if ac_fn_cxx_try_compile "$LINENO"; then :
2674  ac_hi=$ac_mid; break
2675else
2676  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2677			if test $ac_lo -le $ac_mid; then
2678			  ac_lo= ac_hi=
2679			  break
2680			fi
2681			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2682fi
2683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2684  done
2685else
2686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687/* end confdefs.h.  */
2688$4
2689int
2690main ()
2691{
2692static int test_array [1 - 2 * !(($2) < 0)];
2693test_array [0] = 0;
2694return test_array [0];
2695
2696  ;
2697  return 0;
2698}
2699_ACEOF
2700if ac_fn_cxx_try_compile "$LINENO"; then :
2701  ac_hi=-1 ac_mid=-1
2702  while :; do
2703    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2704/* end confdefs.h.  */
2705$4
2706int
2707main ()
2708{
2709static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2710test_array [0] = 0;
2711return test_array [0];
2712
2713  ;
2714  return 0;
2715}
2716_ACEOF
2717if ac_fn_cxx_try_compile "$LINENO"; then :
2718  ac_lo=$ac_mid; break
2719else
2720  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2721			if test $ac_mid -le $ac_hi; then
2722			  ac_lo= ac_hi=
2723			  break
2724			fi
2725			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2726fi
2727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2728  done
2729else
2730  ac_lo= ac_hi=
2731fi
2732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2733fi
2734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2735# Binary search between lo and hi bounds.
2736while test "x$ac_lo" != "x$ac_hi"; do
2737  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2739/* end confdefs.h.  */
2740$4
2741int
2742main ()
2743{
2744static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2745test_array [0] = 0;
2746return test_array [0];
2747
2748  ;
2749  return 0;
2750}
2751_ACEOF
2752if ac_fn_cxx_try_compile "$LINENO"; then :
2753  ac_hi=$ac_mid
2754else
2755  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2756fi
2757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2758done
2759case $ac_lo in #((
2760?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2761'') ac_retval=1 ;;
2762esac
2763  else
2764    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2765/* end confdefs.h.  */
2766$4
2767static long int longval () { return $2; }
2768static unsigned long int ulongval () { return $2; }
2769#include <stdio.h>
2770#include <stdlib.h>
2771int
2772main ()
2773{
2774
2775  FILE *f = fopen ("conftest.val", "w");
2776  if (! f)
2777    return 1;
2778  if (($2) < 0)
2779    {
2780      long int i = longval ();
2781      if (i != ($2))
2782	return 1;
2783      fprintf (f, "%ld", i);
2784    }
2785  else
2786    {
2787      unsigned long int i = ulongval ();
2788      if (i != ($2))
2789	return 1;
2790      fprintf (f, "%lu", i);
2791    }
2792  /* Do not output a trailing newline, as this causes \r\n confusion
2793     on some platforms.  */
2794  return ferror (f) || fclose (f) != 0;
2795
2796  ;
2797  return 0;
2798}
2799_ACEOF
2800if ac_fn_cxx_try_run "$LINENO"; then :
2801  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2802else
2803  ac_retval=1
2804fi
2805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2806  conftest.$ac_objext conftest.beam conftest.$ac_ext
2807rm -f conftest.val
2808
2809  fi
2810  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2811  as_fn_set_status $ac_retval
2812
2813} # ac_fn_cxx_compute_int
2814
2815# ac_fn_cxx_try_link LINENO
2816# -------------------------
2817# Try to link conftest.$ac_ext, and return whether this succeeded.
2818ac_fn_cxx_try_link ()
2819{
2820  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2821  rm -f conftest.$ac_objext conftest$ac_exeext
2822  if { { ac_try="$ac_link"
2823case "(($ac_try" in
2824  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2825  *) ac_try_echo=$ac_try;;
2826esac
2827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2828$as_echo "$ac_try_echo"; } >&5
2829  (eval "$ac_link") 2>conftest.err
2830  ac_status=$?
2831  if test -s conftest.err; then
2832    grep -v '^ *+' conftest.err >conftest.er1
2833    cat conftest.er1 >&5
2834    mv -f conftest.er1 conftest.err
2835  fi
2836  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2837  test $ac_status = 0; } && {
2838	 test -z "$ac_cxx_werror_flag" ||
2839	 test ! -s conftest.err
2840       } && test -s conftest$ac_exeext && {
2841	 test "$cross_compiling" = yes ||
2842	 test -x conftest$ac_exeext
2843       }; then :
2844  ac_retval=0
2845else
2846  $as_echo "$as_me: failed program was:" >&5
2847sed 's/^/| /' conftest.$ac_ext >&5
2848
2849	ac_retval=1
2850fi
2851  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2852  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2853  # interfere with the next link command; also delete a directory that is
2854  # left behind by Apple's compiler.  We do this before executing the actions.
2855  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2856  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2857  as_fn_set_status $ac_retval
2858
2859} # ac_fn_cxx_try_link
2860
2861# ac_fn_cxx_check_func LINENO FUNC VAR
2862# ------------------------------------
2863# Tests whether FUNC exists, setting the cache variable VAR accordingly
2864ac_fn_cxx_check_func ()
2865{
2866  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2868$as_echo_n "checking for $2... " >&6; }
2869if eval \${$3+:} false; then :
2870  $as_echo_n "(cached) " >&6
2871else
2872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h.  */
2874/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2875   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2876#define $2 innocuous_$2
2877
2878/* System header to define __stub macros and hopefully few prototypes,
2879    which can conflict with char $2 (); below.
2880    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2881    <limits.h> exists even on freestanding compilers.  */
2882
2883#ifdef __STDC__
2884# include <limits.h>
2885#else
2886# include <assert.h>
2887#endif
2888
2889#undef $2
2890
2891/* Override any GCC internal prototype to avoid an error.
2892   Use char because int might match the return type of a GCC
2893   builtin and then its argument prototype would still apply.  */
2894#ifdef __cplusplus
2895extern "C"
2896#endif
2897char $2 ();
2898/* The GNU C library defines this for functions which it implements
2899    to always fail with ENOSYS.  Some functions are actually named
2900    something starting with __ and the normal name is an alias.  */
2901#if defined __stub_$2 || defined __stub___$2
2902choke me
2903#endif
2904
2905int
2906main ()
2907{
2908return $2 ();
2909  ;
2910  return 0;
2911}
2912_ACEOF
2913if ac_fn_cxx_try_link "$LINENO"; then :
2914  eval "$3=yes"
2915else
2916  eval "$3=no"
2917fi
2918rm -f core conftest.err conftest.$ac_objext \
2919    conftest$ac_exeext conftest.$ac_ext
2920fi
2921eval ac_res=\$$3
2922	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2923$as_echo "$ac_res" >&6; }
2924  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2925
2926} # ac_fn_cxx_check_func
2927
2928# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2929# -------------------------------------------------------
2930# Tests whether HEADER exists and can be compiled using the include files in
2931# INCLUDES, setting the cache variable VAR accordingly.
2932ac_fn_c_check_header_compile ()
2933{
2934  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2936$as_echo_n "checking for $2... " >&6; }
2937if eval \${$3+:} false; then :
2938  $as_echo_n "(cached) " >&6
2939else
2940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2941/* end confdefs.h.  */
2942$4
2943#include <$2>
2944_ACEOF
2945if ac_fn_c_try_compile "$LINENO"; then :
2946  eval "$3=yes"
2947else
2948  eval "$3=no"
2949fi
2950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2951fi
2952eval ac_res=\$$3
2953	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2954$as_echo "$ac_res" >&6; }
2955  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2956
2957} # ac_fn_c_check_header_compile
2958cat >config.log <<_ACEOF
2959This file contains any messages produced by compilers while
2960running configure, to aid debugging if configure makes a mistake.
2961
2962It was created by OpenJDK $as_me jdk9, which was
2963generated by GNU Autoconf 2.69.  Invocation command line was
2964
2965  $ $0 $@
2966
2967_ACEOF
2968exec 5>>config.log
2969{
2970cat <<_ASUNAME
2971## --------- ##
2972## Platform. ##
2973## --------- ##
2974
2975hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2976uname -m = `(uname -m) 2>/dev/null || echo unknown`
2977uname -r = `(uname -r) 2>/dev/null || echo unknown`
2978uname -s = `(uname -s) 2>/dev/null || echo unknown`
2979uname -v = `(uname -v) 2>/dev/null || echo unknown`
2980
2981/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2982/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2983
2984/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2985/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2986/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2987/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2988/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2989/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2990/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2991
2992_ASUNAME
2993
2994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2995for as_dir in $PATH
2996do
2997  IFS=$as_save_IFS
2998  test -z "$as_dir" && as_dir=.
2999    $as_echo "PATH: $as_dir"
3000  done
3001IFS=$as_save_IFS
3002
3003} >&5
3004
3005cat >&5 <<_ACEOF
3006
3007
3008## ----------- ##
3009## Core tests. ##
3010## ----------- ##
3011
3012_ACEOF
3013
3014
3015# Keep a trace of the command line.
3016# Strip out --no-create and --no-recursion so they do not pile up.
3017# Strip out --silent because we don't want to record it for future runs.
3018# Also quote any args containing shell meta-characters.
3019# Make two passes to allow for proper duplicate-argument suppression.
3020ac_configure_args=
3021ac_configure_args0=
3022ac_configure_args1=
3023ac_must_keep_next=false
3024for ac_pass in 1 2
3025do
3026  for ac_arg
3027  do
3028    case $ac_arg in
3029    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3030    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3031    | -silent | --silent | --silen | --sile | --sil)
3032      continue ;;
3033    *\'*)
3034      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3035    esac
3036    case $ac_pass in
3037    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3038    2)
3039      as_fn_append ac_configure_args1 " '$ac_arg'"
3040      if test $ac_must_keep_next = true; then
3041	ac_must_keep_next=false # Got value, back to normal.
3042      else
3043	case $ac_arg in
3044	  *=* | --config-cache | -C | -disable-* | --disable-* \
3045	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3046	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3047	  | -with-* | --with-* | -without-* | --without-* | --x)
3048	    case "$ac_configure_args0 " in
3049	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3050	    esac
3051	    ;;
3052	  -* ) ac_must_keep_next=true ;;
3053	esac
3054      fi
3055      as_fn_append ac_configure_args " '$ac_arg'"
3056      ;;
3057    esac
3058  done
3059done
3060{ ac_configure_args0=; unset ac_configure_args0;}
3061{ ac_configure_args1=; unset ac_configure_args1;}
3062
3063# When interrupted or exit'd, cleanup temporary files, and complete
3064# config.log.  We remove comments because anyway the quotes in there
3065# would cause problems or look ugly.
3066# WARNING: Use '\'' to represent an apostrophe within the trap.
3067# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3068trap 'exit_status=$?
3069  # Save into config.log some information that might help in debugging.
3070  {
3071    echo
3072
3073    $as_echo "## ---------------- ##
3074## Cache variables. ##
3075## ---------------- ##"
3076    echo
3077    # The following way of writing the cache mishandles newlines in values,
3078(
3079  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3080    eval ac_val=\$$ac_var
3081    case $ac_val in #(
3082    *${as_nl}*)
3083      case $ac_var in #(
3084      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3085$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3086      esac
3087      case $ac_var in #(
3088      _ | IFS | as_nl) ;; #(
3089      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3090      *) { eval $ac_var=; unset $ac_var;} ;;
3091      esac ;;
3092    esac
3093  done
3094  (set) 2>&1 |
3095    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3096    *${as_nl}ac_space=\ *)
3097      sed -n \
3098	"s/'\''/'\''\\\\'\'''\''/g;
3099	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3100      ;; #(
3101    *)
3102      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3103      ;;
3104    esac |
3105    sort
3106)
3107    echo
3108
3109    $as_echo "## ----------------- ##
3110## Output variables. ##
3111## ----------------- ##"
3112    echo
3113    for ac_var in $ac_subst_vars
3114    do
3115      eval ac_val=\$$ac_var
3116      case $ac_val in
3117      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3118      esac
3119      $as_echo "$ac_var='\''$ac_val'\''"
3120    done | sort
3121    echo
3122
3123    if test -n "$ac_subst_files"; then
3124      $as_echo "## ------------------- ##
3125## File substitutions. ##
3126## ------------------- ##"
3127      echo
3128      for ac_var in $ac_subst_files
3129      do
3130	eval ac_val=\$$ac_var
3131	case $ac_val in
3132	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3133	esac
3134	$as_echo "$ac_var='\''$ac_val'\''"
3135      done | sort
3136      echo
3137    fi
3138
3139    if test -s confdefs.h; then
3140      $as_echo "## ----------- ##
3141## confdefs.h. ##
3142## ----------- ##"
3143      echo
3144      cat confdefs.h
3145      echo
3146    fi
3147    test "$ac_signal" != 0 &&
3148      $as_echo "$as_me: caught signal $ac_signal"
3149    $as_echo "$as_me: exit $exit_status"
3150  } >&5
3151  rm -f core *.core core.conftest.* &&
3152    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3153    exit $exit_status
3154' 0
3155for ac_signal in 1 2 13 15; do
3156  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3157done
3158ac_signal=0
3159
3160# confdefs.h avoids OS command line length limits that DEFS can exceed.
3161rm -f -r conftest* confdefs.h
3162
3163$as_echo "/* confdefs.h */" > confdefs.h
3164
3165# Predefined preprocessor variables.
3166
3167cat >>confdefs.h <<_ACEOF
3168#define PACKAGE_NAME "$PACKAGE_NAME"
3169_ACEOF
3170
3171cat >>confdefs.h <<_ACEOF
3172#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3173_ACEOF
3174
3175cat >>confdefs.h <<_ACEOF
3176#define PACKAGE_VERSION "$PACKAGE_VERSION"
3177_ACEOF
3178
3179cat >>confdefs.h <<_ACEOF
3180#define PACKAGE_STRING "$PACKAGE_STRING"
3181_ACEOF
3182
3183cat >>confdefs.h <<_ACEOF
3184#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3185_ACEOF
3186
3187cat >>confdefs.h <<_ACEOF
3188#define PACKAGE_URL "$PACKAGE_URL"
3189_ACEOF
3190
3191
3192# Let the site file select an alternate cache file if it wants to.
3193# Prefer an explicitly selected file to automatically selected ones.
3194ac_site_file1=NONE
3195ac_site_file2=NONE
3196if test -n "$CONFIG_SITE"; then
3197  # We do not want a PATH search for config.site.
3198  case $CONFIG_SITE in #((
3199    -*)  ac_site_file1=./$CONFIG_SITE;;
3200    */*) ac_site_file1=$CONFIG_SITE;;
3201    *)   ac_site_file1=./$CONFIG_SITE;;
3202  esac
3203elif test "x$prefix" != xNONE; then
3204  ac_site_file1=$prefix/share/config.site
3205  ac_site_file2=$prefix/etc/config.site
3206else
3207  ac_site_file1=$ac_default_prefix/share/config.site
3208  ac_site_file2=$ac_default_prefix/etc/config.site
3209fi
3210for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3211do
3212  test "x$ac_site_file" = xNONE && continue
3213  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3214    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3215$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3216    sed 's/^/| /' "$ac_site_file" >&5
3217    . "$ac_site_file" \
3218      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3220as_fn_error $? "failed to load site script $ac_site_file
3221See \`config.log' for more details" "$LINENO" 5; }
3222  fi
3223done
3224
3225if test -r "$cache_file"; then
3226  # Some versions of bash will fail to source /dev/null (special files
3227  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3228  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3229    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3230$as_echo "$as_me: loading cache $cache_file" >&6;}
3231    case $cache_file in
3232      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3233      *)                      . "./$cache_file";;
3234    esac
3235  fi
3236else
3237  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3238$as_echo "$as_me: creating cache $cache_file" >&6;}
3239  >$cache_file
3240fi
3241
3242# Check that the precious variables saved in the cache have kept the same
3243# value.
3244ac_cache_corrupted=false
3245for ac_var in $ac_precious_vars; do
3246  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3247  eval ac_new_set=\$ac_env_${ac_var}_set
3248  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3249  eval ac_new_val=\$ac_env_${ac_var}_value
3250  case $ac_old_set,$ac_new_set in
3251    set,)
3252      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3253$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3254      ac_cache_corrupted=: ;;
3255    ,set)
3256      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3257$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3258      ac_cache_corrupted=: ;;
3259    ,);;
3260    *)
3261      if test "x$ac_old_val" != "x$ac_new_val"; then
3262	# differences in whitespace do not lead to failure.
3263	ac_old_val_w=`echo x $ac_old_val`
3264	ac_new_val_w=`echo x $ac_new_val`
3265	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3266	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3267$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3268	  ac_cache_corrupted=:
3269	else
3270	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3271$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3272	  eval $ac_var=\$ac_old_val
3273	fi
3274	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3275$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3276	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3277$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3278      fi;;
3279  esac
3280  # Pass precious variables to config.status.
3281  if test "$ac_new_set" = set; then
3282    case $ac_new_val in
3283    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3284    *) ac_arg=$ac_var=$ac_new_val ;;
3285    esac
3286    case " $ac_configure_args " in
3287      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3288      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3289    esac
3290  fi
3291done
3292if $ac_cache_corrupted; then
3293  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3295  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3296$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3297  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3298fi
3299## -------------------- ##
3300## Main body of script. ##
3301## -------------------- ##
3302
3303ac_ext=c
3304ac_cpp='$CPP $CPPFLAGS'
3305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3307ac_compiler_gnu=$ac_cv_c_compiler_gnu
3308
3309
3310
3311ac_aux_dir=
3312for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3313  if test -f "$ac_dir/install-sh"; then
3314    ac_aux_dir=$ac_dir
3315    ac_install_sh="$ac_aux_dir/install-sh -c"
3316    break
3317  elif test -f "$ac_dir/install.sh"; then
3318    ac_aux_dir=$ac_dir
3319    ac_install_sh="$ac_aux_dir/install.sh -c"
3320    break
3321  elif test -f "$ac_dir/shtool"; then
3322    ac_aux_dir=$ac_dir
3323    ac_install_sh="$ac_aux_dir/shtool install -c"
3324    break
3325  fi
3326done
3327if test -z "$ac_aux_dir"; then
3328  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
3329fi
3330
3331# These three variables are undocumented and unsupported,
3332# and are intended to be withdrawn in a future Autoconf release.
3333# They can cause serious problems if a builder's source tree is in a directory
3334# whose full name contains unusual characters.
3335ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3336ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3337ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3338
3339
3340# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3341
3342#
3343# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3344# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3345#
3346# This code is free software; you can redistribute it and/or modify it
3347# under the terms of the GNU General Public License version 2 only, as
3348# published by the Free Software Foundation.  Oracle designates this
3349# particular file as subject to the "Classpath" exception as provided
3350# by Oracle in the LICENSE file that accompanied this code.
3351#
3352# This code is distributed in the hope that it will be useful, but WITHOUT
3353# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3354# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3355# version 2 for more details (a copy is included in the LICENSE file that
3356# accompanied this code).
3357#
3358# You should have received a copy of the GNU General Public License version
3359# 2 along with this work; if not, write to the Free Software Foundation,
3360# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3361#
3362# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3363# or visit www.oracle.com if you need additional information or have any
3364# questions.
3365#
3366
3367#
3368# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3369#
3370# This program is free software; you can redistribute it and/or modify
3371# it under the terms of the GNU General Public License as published by
3372# the Free Software Foundation; either version 2 of the License, or
3373# (at your option) any later version.
3374#
3375# This program is distributed in the hope that it will be useful, but
3376# WITHOUT ANY WARRANTY; without even the implied warranty of
3377# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3378# General Public License for more details.
3379#
3380# You should have received a copy of the GNU General Public License
3381# along with this program; if not, write to the Free Software
3382# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3383#
3384# As a special exception to the GNU General Public License, if you
3385# distribute this file as part of a program that contains a
3386# configuration script generated by Autoconf, you may include it under
3387# the same distribution terms that you use for the rest of that program.
3388
3389# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3390# ----------------------------------
3391# PKG_PROG_PKG_CONFIG
3392
3393# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3394#
3395# Check to see whether a particular set of modules exists.  Similar
3396# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3397#
3398#
3399# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3400# this or PKG_CHECK_MODULES is called, or make sure to call
3401# PKG_CHECK_EXISTS manually
3402# --------------------------------------------------------------
3403
3404
3405
3406# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3407# ---------------------------------------------
3408# _PKG_CONFIG
3409
3410# _PKG_SHORT_ERRORS_SUPPORTED
3411# -----------------------------
3412# _PKG_SHORT_ERRORS_SUPPORTED
3413
3414
3415# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3416# [ACTION-IF-NOT-FOUND])
3417#
3418#
3419# Note that if there is a possibility the first call to
3420# PKG_CHECK_MODULES might not happen, you should be sure to include an
3421# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3422#
3423#
3424# --------------------------------------------------------------
3425# PKG_CHECK_MODULES
3426
3427
3428# Include these first...
3429#
3430# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3431# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3432#
3433# This code is free software; you can redistribute it and/or modify it
3434# under the terms of the GNU General Public License version 2 only, as
3435# published by the Free Software Foundation.  Oracle designates this
3436# particular file as subject to the "Classpath" exception as provided
3437# by Oracle in the LICENSE file that accompanied this code.
3438#
3439# This code is distributed in the hope that it will be useful, but WITHOUT
3440# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3441# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3442# version 2 for more details (a copy is included in the LICENSE file that
3443# accompanied this code).
3444#
3445# You should have received a copy of the GNU General Public License version
3446# 2 along with this work; if not, write to the Free Software Foundation,
3447# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3448#
3449# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3450# or visit www.oracle.com if you need additional information or have any
3451# questions.
3452#
3453
3454# Create a function/macro that takes a series of named arguments. The call is
3455# similar to AC_DEFUN, but the setup of the function looks like this:
3456# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3457# ... do something
3458#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3459# ])
3460# A star (*) in front of a named argument means that it is required and it's
3461# presence will be verified. To pass e.g. the first value as a normal indexed
3462# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3463# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3464# "ARG_FOO".
3465#
3466# The generated function can be called like this:
3467# MYFUNC(FOO: [foo-val], BAR:
3468#     [
3469#         $ECHO hello world
3470#     ])
3471#
3472#
3473# Argument 1: Name of the function to define
3474# Argument 2: List of legal named arguments, with a * prefix for required arguments
3475# Argument 3: Argument array to treat as named, typically $@
3476# Argument 4: The main function body
3477
3478
3479# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3480# If so, then append $1 to $2 \
3481# Also set JVM_ARG_OK to true/false depending on outcome.
3482
3483
3484# Appends a string to a path variable, only adding the : when needed.
3485
3486
3487# Prepends a string to a path variable, only adding the : when needed.
3488
3489
3490# This will make sure the given variable points to a full and proper
3491# path. This means:
3492# 1) There will be no spaces in the path. On unix platforms,
3493#    spaces in the path will result in an error. On Windows,
3494#    the path will be rewritten using short-style to be space-free.
3495# 2) The path will be absolute, and it will be in unix-style (on
3496#     cygwin).
3497# $1: The name of the variable to fix
3498
3499
3500# This will make sure the given variable points to a executable
3501# with a full and proper path. This means:
3502# 1) There will be no spaces in the path. On unix platforms,
3503#    spaces in the path will result in an error. On Windows,
3504#    the path will be rewritten using short-style to be space-free.
3505# 2) The path will be absolute, and it will be in unix-style (on
3506#     cygwin).
3507# Any arguments given to the executable is preserved.
3508# If the input variable does not have a directory specification, then
3509# it need to be in the PATH.
3510# $1: The name of the variable to fix
3511
3512
3513
3514
3515# Register a --with argument but mark it as deprecated
3516# $1: The name of the with argument to deprecate, not including --with-
3517
3518
3519# Register a --enable argument but mark it as deprecated
3520# $1: The name of the with argument to deprecate, not including --enable-
3521# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3522# $3: Messages to user.
3523
3524
3525
3526
3527# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3528# $1: variable to check
3529
3530
3531# Check that there are no unprocessed overridden variables left.
3532# If so, they are an incorrect argument and we will exit with an error.
3533
3534
3535# Setup a tool for the given variable. If correctly specified by the user,
3536# use that value, otherwise search for the tool using the supplied code snippet.
3537# $1: variable to set
3538# $2: code snippet to call to look for the tool
3539# $3: code snippet to call if variable was used to find tool
3540
3541
3542# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3543# $1: variable to set
3544# $2: executable name (or list of names) to look for
3545
3546
3547# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3548# $1: variable to set
3549# $2: executable name (or list of names) to look for
3550
3551
3552# Like BASIC_PATH_PROGS but fails if no tool was found.
3553# $1: variable to set
3554# $2: executable name (or list of names) to look for
3555
3556
3557# Like BASIC_SETUP_TOOL but fails if no tool was found.
3558# $1: variable to set
3559# $2: autoconf macro to call to look for the special tool
3560
3561
3562# Setup the most fundamental tools that relies on not much else to set up,
3563# but is used by much of the early bootstrap code.
3564
3565
3566# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3567
3568
3569# Evaluates platform specific overrides for devkit variables.
3570# $1: Name of variable
3571
3572
3573
3574
3575
3576
3577#%%% Simple tools %%%
3578
3579# Check if we have found a usable version of make
3580# $1: the path to a potential make binary (or empty)
3581# $2: the description on how we found this
3582
3583
3584
3585
3586# Goes looking for a usable version of GNU make.
3587
3588
3589
3590
3591
3592
3593# Check if build directory is on local disk. If not possible to determine,
3594# we prefer to claim it's local.
3595# Argument 1: directory to test
3596# Argument 2: what to do if it is on local disk
3597# Argument 3: what to do otherwise (remote disk or failure)
3598
3599
3600# Check that source files have basic read permissions set. This might
3601# not be the case in cygwin in certain conditions.
3602
3603
3604
3605
3606# Check for support for specific options in bash
3607
3608
3609################################################################################
3610#
3611# Default make target
3612#
3613
3614
3615# Code to run after AC_OUTPUT
3616
3617
3618#
3619# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3621#
3622# This code is free software; you can redistribute it and/or modify it
3623# under the terms of the GNU General Public License version 2 only, as
3624# published by the Free Software Foundation.  Oracle designates this
3625# particular file as subject to the "Classpath" exception as provided
3626# by Oracle in the LICENSE file that accompanied this code.
3627#
3628# This code is distributed in the hope that it will be useful, but WITHOUT
3629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3631# version 2 for more details (a copy is included in the LICENSE file that
3632# accompanied this code).
3633#
3634# You should have received a copy of the GNU General Public License version
3635# 2 along with this work; if not, write to the Free Software Foundation,
3636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3637#
3638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3639# or visit www.oracle.com if you need additional information or have any
3640# questions.
3641#
3642
3643
3644
3645
3646
3647# Helper function which possibly converts a path using DOS-style short mode.
3648# If so, the updated path is stored in $new_path.
3649# $1: The path to check
3650
3651
3652# Helper function which possibly converts a path using DOS-style short mode.
3653# If so, the updated path is stored in $new_path.
3654# $1: The path to check
3655
3656
3657# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3658# and could probably be heavily simplified. However, all changes in this
3659# area tend to need lot of testing in different scenarios, and in lack of
3660# proper unit testing, cleaning this up has not been deemed worth the effort
3661# at the moment.
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3672
3673
3674
3675
3676# ... then the rest
3677#
3678# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3679# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3680#
3681# This code is free software; you can redistribute it and/or modify it
3682# under the terms of the GNU General Public License version 2 only, as
3683# published by the Free Software Foundation.  Oracle designates this
3684# particular file as subject to the "Classpath" exception as provided
3685# by Oracle in the LICENSE file that accompanied this code.
3686#
3687# This code is distributed in the hope that it will be useful, but WITHOUT
3688# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3689# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3690# version 2 for more details (a copy is included in the LICENSE file that
3691# accompanied this code).
3692#
3693# You should have received a copy of the GNU General Public License version
3694# 2 along with this work; if not, write to the Free Software Foundation,
3695# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3696#
3697# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3698# or visit www.oracle.com if you need additional information or have any
3699# questions.
3700#
3701
3702########################################################################
3703# This file handles detection of the Boot JDK. The Boot JDK detection
3704# process has been developed as a response to solve a complex real-world
3705# problem. Initially, it was simple, but it has grown as platform after
3706# platform, idiosyncracy after idiosyncracy has been supported.
3707#
3708# The basic idea is this:
3709# 1) You need an acceptable *) JDK to use as a Boot JDK
3710# 2) There are several ways to locate a JDK, that are mostly platform
3711#    dependent **)
3712# 3) You can have multiple JDKs installed
3713# 4) If possible, configure should try to dig out an acceptable JDK
3714#    automatically, without having to resort to command-line options
3715#
3716# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3717#     javac) and not a JRE, etc.
3718#
3719# **) On Windows we typically use a well-known path.
3720#     On MacOSX we typically use the tool java_home.
3721#     On Linux we typically find javac in the $PATH, and then follow a
3722#     chain of symlinks that often ends up in a real JDK.
3723#
3724# This leads to the code where we check in different ways to locate a
3725# JDK, and if one is found, check if it is acceptable. If not, we print
3726# our reasons for rejecting it (useful when debugging non-working
3727# configure situations) and continue checking the next one.
3728########################################################################
3729
3730# Execute the check given as argument, and verify the result
3731# If the Boot JDK was previously found, do nothing
3732# $1 A command line (typically autoconf macro) to execute
3733
3734
3735# Test: Is bootjdk explicitely set by command line arguments?
3736
3737
3738# Test: Is $JAVA_HOME set?
3739
3740
3741# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3742
3743
3744# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3745# $1: Argument to the java_home binary (optional)
3746
3747
3748# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3749
3750
3751# Look for a jdk in the given path. If there are multiple, try to select the newest.
3752# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3753# $1 = Path to directory containing jdk installations.
3754# $2 = String to append to the found JDK directory to get the proper JDK home
3755
3756
3757# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3758# environmental variable as base for where to look.
3759# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3760
3761
3762# Test: Is there a JDK installed in default, well-known locations?
3763
3764
3765# Check that a command-line tool in the Boot JDK is correct
3766# $1 = name of variable to assign
3767# $2 = name of binary
3768
3769
3770###############################################################################
3771#
3772# We need a Boot JDK to bootstrap the build.
3773#
3774
3775
3776
3777
3778
3779#
3780# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3781# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3782#
3783# This code is free software; you can redistribute it and/or modify it
3784# under the terms of the GNU General Public License version 2 only, as
3785# published by the Free Software Foundation.  Oracle designates this
3786# particular file as subject to the "Classpath" exception as provided
3787# by Oracle in the LICENSE file that accompanied this code.
3788#
3789# This code is distributed in the hope that it will be useful, but WITHOUT
3790# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3791# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3792# version 2 for more details (a copy is included in the LICENSE file that
3793# accompanied this code).
3794#
3795# You should have received a copy of the GNU General Public License version
3796# 2 along with this work; if not, write to the Free Software Foundation,
3797# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3798#
3799# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3800# or visit www.oracle.com if you need additional information or have any
3801# questions.
3802#
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820################################################################################
3821#
3822# Runs icecc-create-env once and prints the error if it fails
3823#
3824# $1: arguments to icecc-create-env
3825# $2: log file
3826#
3827
3828
3829################################################################################
3830#
3831# Optionally enable distributed compilation of native code using icecc/icecream
3832#
3833
3834
3835
3836
3837
3838
3839
3840#
3841# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3842# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3843#
3844# This code is free software; you can redistribute it and/or modify it
3845# under the terms of the GNU General Public License version 2 only, as
3846# published by the Free Software Foundation.  Oracle designates this
3847# particular file as subject to the "Classpath" exception as provided
3848# by Oracle in the LICENSE file that accompanied this code.
3849#
3850# This code is distributed in the hope that it will be useful, but WITHOUT
3851# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3852# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3853# version 2 for more details (a copy is included in the LICENSE file that
3854# accompanied this code).
3855#
3856# You should have received a copy of the GNU General Public License version
3857# 2 along with this work; if not, write to the Free Software Foundation,
3858# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3859#
3860# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3861# or visit www.oracle.com if you need additional information or have any
3862# questions.
3863#
3864
3865# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3866# corresponding configure arguments instead
3867
3868
3869# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3870# that configure can use them while detecting compilers.
3871# TOOLCHAIN_TYPE is available here.
3872# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3873
3874
3875
3876
3877
3878
3879# Documentation on common flags used for solstudio in HIGHEST.
3880#
3881# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3882#          done with care, there are some assumptions below that need to
3883#          be understood about the use of pointers, and IEEE behavior.
3884#
3885# -fns: Use non-standard floating point mode (not IEEE 754)
3886# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3887# -fsingle: Use single precision floating point with 'float'
3888# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3889#   (Source with excessing pointer casting and data access with mixed
3890#    pointer types are not recommended)
3891# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3892#   (If you expect perfect errno behavior, do not use this)
3893# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3894# -xrestrict: Pointer parameters to functions do not overlap
3895#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3896#    If you pass in multiple pointers to the same data, do not use this)
3897# -xlibmil: Inline some library routines
3898#   (If you expect perfect errno behavior, do not use this)
3899# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3900#   (If you expect perfect errno behavior, do not use this)
3901#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3902
3903    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3904    # Bug?
3905    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3906    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3907    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3908    #fi
3909
3910
3911
3912
3913
3914# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3915#                                   IF_FALSE: [RUN-IF-FALSE])
3916# ------------------------------------------------------------
3917# Check that the c and c++ compilers support an argument
3918
3919
3920
3921
3922# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3923#                                   IF_FALSE: [RUN-IF-FALSE])
3924# ------------------------------------------------------------
3925# Check that the linker support an argument
3926
3927
3928
3929
3930
3931
3932#
3933# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3934# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3935#
3936# This code is free software; you can redistribute it and/or modify it
3937# under the terms of the GNU General Public License version 2 only, as
3938# published by the Free Software Foundation.  Oracle designates this
3939# particular file as subject to the "Classpath" exception as provided
3940# by Oracle in the LICENSE file that accompanied this code.
3941#
3942# This code is distributed in the hope that it will be useful, but WITHOUT
3943# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3944# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3945# version 2 for more details (a copy is included in the LICENSE file that
3946# accompanied this code).
3947#
3948# You should have received a copy of the GNU General Public License version
3949# 2 along with this work; if not, write to the Free Software Foundation,
3950# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3951#
3952# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3953# or visit www.oracle.com if you need additional information or have any
3954# questions.
3955#
3956
3957
3958
3959
3960
3961cygwin_help() {
3962  case $1 in
3963    unzip)
3964      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3965      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3966      ;;
3967    zip)
3968      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3969      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3970      ;;
3971    make)
3972      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3973      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3974      ;;
3975    freetype)
3976      HELP_MSG="
3977The freetype library can now be build during the configure process.
3978Download the freetype sources and unpack them into an arbitrary directory:
3979
3980wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3981tar -xzf freetype-2.5.3.tar.gz
3982
3983Then run configure with '--with-freetype-src=<freetype_src>'. This will
3984automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3985builds or into '<freetype_src>/lib32' for 32-bit builds.
3986Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3987and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
3988
3989Alternatively you can unpack the sources like this to use the default directory:
3990
3991tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
3992      ;;
3993  esac
3994}
3995
3996msys_help() {
3997  PKGHANDLER_COMMAND=""
3998}
3999
4000apt_help() {
4001  case $1 in
4002    reduced)
4003      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4004    devkit)
4005      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4006    openjdk)
4007      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
4008    alsa)
4009      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4010    cups)
4011      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4012    freetype)
4013      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4014    ffi)
4015      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4016    x11)
4017      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4018    ccache)
4019      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4020  esac
4021}
4022
4023yum_help() {
4024  case $1 in
4025    devkit)
4026      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4027    openjdk)
4028      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
4029    alsa)
4030      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4031    cups)
4032      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4033    freetype)
4034      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4035    x11)
4036      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4037    ccache)
4038      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4039  esac
4040}
4041
4042port_help() {
4043  PKGHANDLER_COMMAND=""
4044}
4045
4046pkgutil_help() {
4047  PKGHANDLER_COMMAND=""
4048}
4049
4050pkgadd_help() {
4051  PKGHANDLER_COMMAND=""
4052}
4053
4054# This function will check if we're called from the "configure" wrapper while
4055# printing --help. If so, we will print out additional information that can
4056# only be extracted within the autoconf script, and then exit. This must be
4057# called at the very beginning in configure.ac.
4058
4059
4060
4061
4062
4063
4064#
4065# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4066# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4067#
4068# This code is free software; you can redistribute it and/or modify it
4069# under the terms of the GNU General Public License version 2 only, as
4070# published by the Free Software Foundation.  Oracle designates this
4071# particular file as subject to the "Classpath" exception as provided
4072# by Oracle in the LICENSE file that accompanied this code.
4073#
4074# This code is distributed in the hope that it will be useful, but WITHOUT
4075# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4076# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4077# version 2 for more details (a copy is included in the LICENSE file that
4078# accompanied this code).
4079#
4080# You should have received a copy of the GNU General Public License version
4081# 2 along with this work; if not, write to the Free Software Foundation,
4082# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4083#
4084# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4085# or visit www.oracle.com if you need additional information or have any
4086# questions.
4087#
4088
4089###############################################################################
4090# Check which interpreter of the JVM we want to build.
4091# Currently we have:
4092#    template: Template interpreter (the default)
4093#    cpp     : C++ interpreter
4094
4095
4096###############################################################################
4097# Check which variants of the JVM that we want to build.
4098# Currently we have:
4099#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4100#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4101#    minimal1: reduced form of client with optional VM services and features stripped out
4102#    zero: no machine code interpreter, no compiler
4103#    zeroshark: zero interpreter and shark/llvm compiler backend
4104#    core: interpreter only, no compiler (only works on some platforms)
4105
4106
4107
4108###############################################################################
4109# Setup legacy vars/targets and new vars to deal with different debug levels.
4110#
4111#    release: no debug information, all optimizations, no asserts.
4112#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4113#    fastdebug: debug information (-g), all optimizations, all asserts
4114#    slowdebug: debug information (-g), no optimizations, all asserts
4115#
4116
4117
4118
4119
4120
4121
4122#
4123# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4124# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4125#
4126# This code is free software; you can redistribute it and/or modify it
4127# under the terms of the GNU General Public License version 2 only, as
4128# published by the Free Software Foundation.  Oracle designates this
4129# particular file as subject to the "Classpath" exception as provided
4130# by Oracle in the LICENSE file that accompanied this code.
4131#
4132# This code is distributed in the hope that it will be useful, but WITHOUT
4133# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4134# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4135# version 2 for more details (a copy is included in the LICENSE file that
4136# accompanied this code).
4137#
4138# You should have received a copy of the GNU General Public License version
4139# 2 along with this work; if not, write to the Free Software Foundation,
4140# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4141#
4142# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4143# or visit www.oracle.com if you need additional information or have any
4144# questions.
4145#
4146
4147###############################################################################
4148# Check which variant of the JDK that we want to build.
4149# Currently we have:
4150#    normal:   standard edition
4151# but the custom make system may add other variants
4152#
4153# Effectively the JDK variant gives a name to a specific set of
4154# modules to compile into the JDK.
4155
4156
4157###############################################################################
4158# Set the debug level
4159#    release: no debug information, all optimizations, no asserts.
4160#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4161#    fastdebug: debug information (-g), all optimizations, all asserts
4162#    slowdebug: debug information (-g), no optimizations, all asserts
4163
4164
4165###############################################################################
4166#
4167# Should we build only OpenJDK even if closed sources are present?
4168#
4169
4170
4171
4172
4173###############################################################################
4174#
4175# Enable or disable the elliptic curve crypto implementation
4176#
4177
4178
4179
4180
4181################################################################################
4182#
4183# Gcov coverage data for hotspot
4184#
4185
4186
4187################################################################################
4188#
4189# Static build support.  When enabled will generate static
4190# libraries instead of shared libraries for all JDK libs.
4191#
4192
4193
4194#
4195# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4196# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4197#
4198# This code is free software; you can redistribute it and/or modify it
4199# under the terms of the GNU General Public License version 2 only, as
4200# published by the Free Software Foundation.  Oracle designates this
4201# particular file as subject to the "Classpath" exception as provided
4202# by Oracle in the LICENSE file that accompanied this code.
4203#
4204# This code is distributed in the hope that it will be useful, but WITHOUT
4205# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4206# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4207# version 2 for more details (a copy is included in the LICENSE file that
4208# accompanied this code).
4209#
4210# You should have received a copy of the GNU General Public License version
4211# 2 along with this work; if not, write to the Free Software Foundation,
4212# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4213#
4214# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4215# or visit www.oracle.com if you need additional information or have any
4216# questions.
4217#
4218
4219###############################################################################
4220#
4221# Setup version numbers
4222#
4223
4224# Verify that a given string represents a valid version number, and assign it
4225# to a variable.
4226
4227# Argument 1: the variable to assign to
4228# Argument 2: the value given by the user
4229
4230
4231
4232
4233#
4234# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4235# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4236#
4237# This code is free software; you can redistribute it and/or modify it
4238# under the terms of the GNU General Public License version 2 only, as
4239# published by the Free Software Foundation.  Oracle designates this
4240# particular file as subject to the "Classpath" exception as provided
4241# by Oracle in the LICENSE file that accompanied this code.
4242#
4243# This code is distributed in the hope that it will be useful, but WITHOUT
4244# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4245# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4246# version 2 for more details (a copy is included in the LICENSE file that
4247# accompanied this code).
4248#
4249# You should have received a copy of the GNU General Public License version
4250# 2 along with this work; if not, write to the Free Software Foundation,
4251# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4252#
4253# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4254# or visit www.oracle.com if you need additional information or have any
4255# questions.
4256#
4257
4258# Major library component reside in separate files.
4259#
4260# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4261# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4262#
4263# This code is free software; you can redistribute it and/or modify it
4264# under the terms of the GNU General Public License version 2 only, as
4265# published by the Free Software Foundation.  Oracle designates this
4266# particular file as subject to the "Classpath" exception as provided
4267# by Oracle in the LICENSE file that accompanied this code.
4268#
4269# This code is distributed in the hope that it will be useful, but WITHOUT
4270# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4271# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4272# version 2 for more details (a copy is included in the LICENSE file that
4273# accompanied this code).
4274#
4275# You should have received a copy of the GNU General Public License version
4276# 2 along with this work; if not, write to the Free Software Foundation,
4277# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4278#
4279# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4280# or visit www.oracle.com if you need additional information or have any
4281# questions.
4282#
4283
4284################################################################################
4285# Setup alsa (Advanced Linux Sound Architecture)
4286################################################################################
4287
4288
4289#
4290# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4291# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4292#
4293# This code is free software; you can redistribute it and/or modify it
4294# under the terms of the GNU General Public License version 2 only, as
4295# published by the Free Software Foundation.  Oracle designates this
4296# particular file as subject to the "Classpath" exception as provided
4297# by Oracle in the LICENSE file that accompanied this code.
4298#
4299# This code is distributed in the hope that it will be useful, but WITHOUT
4300# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4301# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4302# version 2 for more details (a copy is included in the LICENSE file that
4303# accompanied this code).
4304#
4305# You should have received a copy of the GNU General Public License version
4306# 2 along with this work; if not, write to the Free Software Foundation,
4307# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4308#
4309# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4310# or visit www.oracle.com if you need additional information or have any
4311# questions.
4312#
4313
4314################################################################################
4315# Setup bundled libraries.
4316#
4317# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4318# OpenJDK repository. Default is to use these libraries as bundled, but they
4319# might be replaced by en external version by the user.
4320################################################################################
4321
4322
4323################################################################################
4324# Setup libjpeg
4325################################################################################
4326
4327
4328################################################################################
4329# Setup giflib
4330################################################################################
4331
4332
4333################################################################################
4334# Setup libpng
4335################################################################################
4336
4337
4338################################################################################
4339# Setup zlib
4340################################################################################
4341
4342
4343################################################################################
4344# Setup lcms (Little CMS)
4345################################################################################
4346
4347
4348#
4349# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4350# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4351#
4352# This code is free software; you can redistribute it and/or modify it
4353# under the terms of the GNU General Public License version 2 only, as
4354# published by the Free Software Foundation.  Oracle designates this
4355# particular file as subject to the "Classpath" exception as provided
4356# by Oracle in the LICENSE file that accompanied this code.
4357#
4358# This code is distributed in the hope that it will be useful, but WITHOUT
4359# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4360# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4361# version 2 for more details (a copy is included in the LICENSE file that
4362# accompanied this code).
4363#
4364# You should have received a copy of the GNU General Public License version
4365# 2 along with this work; if not, write to the Free Software Foundation,
4366# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4367#
4368# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4369# or visit www.oracle.com if you need additional information or have any
4370# questions.
4371#
4372
4373################################################################################
4374# Setup cups (Common Unix Printing System)
4375################################################################################
4376
4377
4378#
4379# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4380# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4381#
4382# This code is free software; you can redistribute it and/or modify it
4383# under the terms of the GNU General Public License version 2 only, as
4384# published by the Free Software Foundation.  Oracle designates this
4385# particular file as subject to the "Classpath" exception as provided
4386# by Oracle in the LICENSE file that accompanied this code.
4387#
4388# This code is distributed in the hope that it will be useful, but WITHOUT
4389# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4390# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4391# version 2 for more details (a copy is included in the LICENSE file that
4392# accompanied this code).
4393#
4394# You should have received a copy of the GNU General Public License version
4395# 2 along with this work; if not, write to the Free Software Foundation,
4396# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4397#
4398# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4399# or visit www.oracle.com if you need additional information or have any
4400# questions.
4401#
4402
4403################################################################################
4404# Setup libffi (Foreign Function Interface)
4405################################################################################
4406
4407
4408#
4409# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4410# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4411#
4412# This code is free software; you can redistribute it and/or modify it
4413# under the terms of the GNU General Public License version 2 only, as
4414# published by the Free Software Foundation.  Oracle designates this
4415# particular file as subject to the "Classpath" exception as provided
4416# by Oracle in the LICENSE file that accompanied this code.
4417#
4418# This code is distributed in the hope that it will be useful, but WITHOUT
4419# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4420# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4421# version 2 for more details (a copy is included in the LICENSE file that
4422# accompanied this code).
4423#
4424# You should have received a copy of the GNU General Public License version
4425# 2 along with this work; if not, write to the Free Software Foundation,
4426# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4427#
4428# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4429# or visit www.oracle.com if you need additional information or have any
4430# questions.
4431#
4432
4433################################################################################
4434# Build the freetype lib from source
4435################################################################################
4436
4437
4438################################################################################
4439# Check if a potential freeype library match is correct and usable
4440################################################################################
4441
4442
4443################################################################################
4444# Setup freetype (The FreeType2 font rendering library)
4445################################################################################
4446
4447
4448#
4449# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4450# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4451#
4452# This code is free software; you can redistribute it and/or modify it
4453# under the terms of the GNU General Public License version 2 only, as
4454# published by the Free Software Foundation.  Oracle designates this
4455# particular file as subject to the "Classpath" exception as provided
4456# by Oracle in the LICENSE file that accompanied this code.
4457#
4458# This code is distributed in the hope that it will be useful, but WITHOUT
4459# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4460# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4461# version 2 for more details (a copy is included in the LICENSE file that
4462# accompanied this code).
4463#
4464# You should have received a copy of the GNU General Public License version
4465# 2 along with this work; if not, write to the Free Software Foundation,
4466# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4467#
4468# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4469# or visit www.oracle.com if you need additional information or have any
4470# questions.
4471#
4472
4473################################################################################
4474# Setup the standard C/C++ runtime libraries.
4475#
4476# Most importantly, determine if stdc++ should be linked statically or
4477# dynamically.
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 X11 Windows system
4508################################################################################
4509
4510
4511
4512################################################################################
4513# Determine which libraries are needed for this configuration
4514################################################################################
4515
4516
4517################################################################################
4518# Parse library options, and setup needed libraries
4519################################################################################
4520
4521
4522################################################################################
4523# Setup llvm (Low-Level VM)
4524################################################################################
4525
4526
4527################################################################################
4528# Setup various libraries, typically small system libraries
4529################################################################################
4530
4531
4532#
4533# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4534# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4535#
4536# This code is free software; you can redistribute it and/or modify it
4537# under the terms of the GNU General Public License version 2 only, as
4538# published by the Free Software Foundation.  Oracle designates this
4539# particular file as subject to the "Classpath" exception as provided
4540# by Oracle in the LICENSE file that accompanied this code.
4541#
4542# This code is distributed in the hope that it will be useful, but WITHOUT
4543# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4544# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4545# version 2 for more details (a copy is included in the LICENSE file that
4546# accompanied this code).
4547#
4548# You should have received a copy of the GNU General Public License version
4549# 2 along with this work; if not, write to the Free Software Foundation,
4550# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4551#
4552# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4553# or visit www.oracle.com if you need additional information or have any
4554# questions.
4555#
4556
4557# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4558# Converts autoconf style CPU name to OpenJDK style, into
4559# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4560
4561
4562# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4563# Converts autoconf style OS name to OpenJDK style, into
4564# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4565
4566
4567# Expects $host_os $host_cpu $build_os and $build_cpu
4568# and $with_target_bits to have been setup!
4569#
4570# Translate the standard triplet(quadruplet) definition
4571# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4572# OPENJDK_BUILD_OS, etc.
4573
4574
4575# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4576# accordingly. Must be done after setting up build and target system, but before
4577# doing anything else with these values.
4578
4579
4580# Setup the legacy variables, for controlling the old makefiles.
4581#
4582
4583
4584
4585
4586#%%% Build and target systems %%%
4587
4588
4589
4590
4591# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4592# Add -mX to various FLAGS variables.
4593
4594
4595
4596
4597
4598
4599#
4600# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4601# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4602#
4603# This code is free software; you can redistribute it and/or modify it
4604# under the terms of the GNU General Public License version 2 only, as
4605# published by the Free Software Foundation.  Oracle designates this
4606# particular file as subject to the "Classpath" exception as provided
4607# by Oracle in the LICENSE file that accompanied this code.
4608#
4609# This code is distributed in the hope that it will be useful, but WITHOUT
4610# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4611# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4612# version 2 for more details (a copy is included in the LICENSE file that
4613# accompanied this code).
4614#
4615# You should have received a copy of the GNU General Public License version
4616# 2 along with this work; if not, write to the Free Software Foundation,
4617# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4618#
4619# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4620# or visit www.oracle.com if you need additional information or have any
4621# questions.
4622#
4623
4624
4625
4626
4627
4628
4629
4630#
4631# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4632# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4633#
4634# This code is free software; you can redistribute it and/or modify it
4635# under the terms of the GNU General Public License version 2 only, as
4636# published by the Free Software Foundation.  Oracle designates this
4637# particular file as subject to the "Classpath" exception as provided
4638# by Oracle in the LICENSE file that accompanied this code.
4639#
4640# This code is distributed in the hope that it will be useful, but WITHOUT
4641# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4642# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4643# version 2 for more details (a copy is included in the LICENSE file that
4644# accompanied this code).
4645#
4646# You should have received a copy of the GNU General Public License version
4647# 2 along with this work; if not, write to the Free Software Foundation,
4648# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4649#
4650# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4651# or visit www.oracle.com if you need additional information or have any
4652# questions.
4653#
4654
4655########################################################################
4656# This file is responsible for detecting, verifying and setting up the
4657# toolchain, i.e. the compiler, linker and related utilities. It will setup
4658# proper paths to the binaries, but it will not setup any flags.
4659#
4660# The binaries used is determined by the toolchain type, which is the family of
4661# compilers and related tools that are used.
4662########################################################################
4663
4664
4665# All valid toolchains, regardless of platform (used by help.m4)
4666VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4667
4668# These toolchains are valid on different platforms
4669VALID_TOOLCHAINS_linux="gcc clang"
4670VALID_TOOLCHAINS_solaris="solstudio"
4671VALID_TOOLCHAINS_macosx="gcc clang"
4672VALID_TOOLCHAINS_aix="xlc"
4673VALID_TOOLCHAINS_windows="microsoft"
4674
4675# Toolchain descriptions
4676TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4677TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4678TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4679TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4680TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4681
4682# Setup a number of variables describing how native output files are
4683# named on this platform/toolchain.
4684
4685
4686# Determine which toolchain type to use, and make sure it is valid for this
4687# platform. Setup various information about the selected toolchain.
4688
4689
4690# Before we start detecting the toolchain executables, we might need some
4691# special setup, e.g. additional paths etc.
4692
4693
4694# Restore path, etc
4695
4696
4697# Check if a compiler is of the toolchain type we expect, and save the version
4698# information from it. If the compiler does not match the expected type,
4699# this function will abort using AC_MSG_ERROR. If it matches, the version will
4700# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4701# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4702#
4703# $1 = compiler to test (CC or CXX)
4704# $2 = human readable name of compiler (C or C++)
4705
4706
4707# Try to locate the given C or C++ compiler in the path, or otherwise.
4708#
4709# $1 = compiler to test (CC or CXX)
4710# $2 = human readable name of compiler (C or C++)
4711# $3 = list of compiler names to search for
4712
4713
4714# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4715# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4716# archiver (AR). Verify that the compilers are correct according to the
4717# toolchain type.
4718
4719
4720# Setup additional tools that is considered a part of the toolchain, but not the
4721# core part. Many of these are highly platform-specific and do not exist,
4722# and/or are not needed on all platforms.
4723
4724
4725# Setup the build tools (i.e, the compiler and linker used to build programs
4726# that should be run on the build platform, not the target platform, as a build
4727# helper). Since the non-cross-compile case uses the normal, target compilers
4728# for this, we can only do this after these have been setup.
4729
4730
4731# Setup legacy variables that are still needed as alternative ways to refer to
4732# parts of the toolchain.
4733
4734
4735# Do some additional checks on the detected tools.
4736
4737
4738# Setup the JTReg Regression Test Harness.
4739
4740
4741#
4742# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4743# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4744#
4745# This code is free software; you can redistribute it and/or modify it
4746# under the terms of the GNU General Public License version 2 only, as
4747# published by the Free Software Foundation.  Oracle designates this
4748# particular file as subject to the "Classpath" exception as provided
4749# by Oracle in the LICENSE file that accompanied this code.
4750#
4751# This code is distributed in the hope that it will be useful, but WITHOUT
4752# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4753# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4754# version 2 for more details (a copy is included in the LICENSE file that
4755# accompanied this code).
4756#
4757# You should have received a copy of the GNU General Public License version
4758# 2 along with this work; if not, write to the Free Software Foundation,
4759# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4760#
4761# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4762# or visit www.oracle.com if you need additional information or have any
4763# questions.
4764#
4765
4766################################################################################
4767# The order of these defines the priority by which we try to find them.
4768VALID_VS_VERSIONS="2013 2012 2010"
4769
4770VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4771VS_VERSION_INTERNAL_2010=100
4772VS_MSVCR_2010=msvcr100.dll
4773# We don't use msvcp on Visual Studio 2010
4774#VS_MSVCP_2010=msvcp100.dll
4775VS_ENVVAR_2010="VS100COMNTOOLS"
4776VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4777VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4778VS_VS_PLATFORM_NAME_2010="v100"
4779VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4780
4781VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4782VS_VERSION_INTERNAL_2012=110
4783VS_MSVCR_2012=msvcr110.dll
4784VS_MSVCP_2012=msvcp110.dll
4785VS_ENVVAR_2012="VS110COMNTOOLS"
4786VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4787VS_SDK_INSTALLDIR_2012=
4788VS_VS_PLATFORM_NAME_2012="v110"
4789VS_SDK_PLATFORM_NAME_2012=
4790
4791VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4792VS_VERSION_INTERNAL_2013=120
4793VS_MSVCR_2013=msvcr120.dll
4794VS_MSVCP_2013=msvcp120.dll
4795VS_ENVVAR_2013="VS120COMNTOOLS"
4796VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4797VS_SDK_INSTALLDIR_2013=
4798VS_VS_PLATFORM_NAME_2013="v120"
4799VS_SDK_PLATFORM_NAME_2013=
4800
4801################################################################################
4802
4803
4804
4805################################################################################
4806
4807
4808
4809################################################################################
4810# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4811# build environment and assigns it to VS_ENV_CMD
4812
4813
4814################################################################################
4815
4816
4817
4818################################################################################
4819# Check if the VS env variables were setup prior to running configure.
4820# If not, then find vcvarsall.bat and run it automatically, and integrate
4821# the set env variables into the spec file.
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836# This line needs to be here, verbatim, after all includes and the dummy hook
4837# definitions. It is replaced with custom functionality when building
4838# custom sources.
4839#CUSTOM_AUTOCONF_INCLUDE
4840
4841# Do not change or remove the following line, it is needed for consistency checks:
4842DATE_WHEN_GENERATED=1452935762
4843
4844###############################################################################
4845#
4846# Initialization / Boot-strapping
4847#
4848# The bootstrapping process needs to solve the "chicken or the egg" problem,
4849# thus it jumps back and forth, each time gaining something needed later on.
4850#
4851###############################################################################
4852
4853# If we are requested to print additional help, do that and then exit.
4854# This must be the very first call.
4855
4856  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4857    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4858    $PRINTF "Which are valid to use depends on the build platform.\n"
4859    for toolchain in $VALID_TOOLCHAINS_all; do
4860      # Use indirect variable referencing
4861      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4862      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4863      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4864    done
4865
4866    # And now exit directly
4867    exit 0
4868  fi
4869
4870
4871# Basic initialization that must happen first of all in the normal process.
4872
4873  # Save the original command line. This is passed to us by the wrapper configure script.
4874
4875  # Save the path variable before it gets changed
4876  ORIGINAL_PATH="$PATH"
4877
4878  DATE_WHEN_CONFIGURED=`LANG=C date`
4879
4880  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4881$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4882  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4883$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4884
4885
4886  # Start with tools that do not need have cross compilation support
4887  # and can be expected to be found in the default PATH. These tools are
4888  # used by configure.
4889
4890  # First are all the simple required tools.
4891
4892
4893
4894  # Publish this variable in the help.
4895
4896
4897  if [ -z "${BASENAME+x}" ]; then
4898    # The variable is not set by user, try to locate tool using the code snippet
4899    for ac_prog in basename
4900do
4901  # Extract the first word of "$ac_prog", so it can be a program name with args.
4902set dummy $ac_prog; ac_word=$2
4903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4904$as_echo_n "checking for $ac_word... " >&6; }
4905if ${ac_cv_path_BASENAME+:} false; then :
4906  $as_echo_n "(cached) " >&6
4907else
4908  case $BASENAME in
4909  [\\/]* | ?:[\\/]*)
4910  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4911  ;;
4912  *)
4913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914for as_dir in $PATH
4915do
4916  IFS=$as_save_IFS
4917  test -z "$as_dir" && as_dir=.
4918    for ac_exec_ext in '' $ac_executable_extensions; do
4919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4920    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4922    break 2
4923  fi
4924done
4925  done
4926IFS=$as_save_IFS
4927
4928  ;;
4929esac
4930fi
4931BASENAME=$ac_cv_path_BASENAME
4932if test -n "$BASENAME"; then
4933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4934$as_echo "$BASENAME" >&6; }
4935else
4936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4937$as_echo "no" >&6; }
4938fi
4939
4940
4941  test -n "$BASENAME" && break
4942done
4943
4944  else
4945    # The variable is set, but is it from the command line or the environment?
4946
4947    # Try to remove the string !BASENAME! from our list.
4948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4950      # If it failed, the variable was not from the command line. Ignore it,
4951      # but warn the user (except for BASH, which is always set by the calling BASH).
4952      if test "xBASENAME" != xBASH; then
4953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4954$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4955      fi
4956      # Try to locate tool using the code snippet
4957      for ac_prog in basename
4958do
4959  # Extract the first word of "$ac_prog", so it can be a program name with args.
4960set dummy $ac_prog; ac_word=$2
4961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962$as_echo_n "checking for $ac_word... " >&6; }
4963if ${ac_cv_path_BASENAME+:} false; then :
4964  $as_echo_n "(cached) " >&6
4965else
4966  case $BASENAME in
4967  [\\/]* | ?:[\\/]*)
4968  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4969  ;;
4970  *)
4971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972for as_dir in $PATH
4973do
4974  IFS=$as_save_IFS
4975  test -z "$as_dir" && as_dir=.
4976    for ac_exec_ext in '' $ac_executable_extensions; do
4977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4978    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4980    break 2
4981  fi
4982done
4983  done
4984IFS=$as_save_IFS
4985
4986  ;;
4987esac
4988fi
4989BASENAME=$ac_cv_path_BASENAME
4990if test -n "$BASENAME"; then
4991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4992$as_echo "$BASENAME" >&6; }
4993else
4994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
4996fi
4997
4998
4999  test -n "$BASENAME" && break
5000done
5001
5002    else
5003      # If it succeeded, then it was overridden by the user. We will use it
5004      # for the tool.
5005
5006      # First remove it from the list of overridden variables, so we can test
5007      # for unknown variables in the end.
5008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5009
5010      # Check if we try to supply an empty value
5011      if test "x$BASENAME" = x; then
5012        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5013$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5015$as_echo_n "checking for BASENAME... " >&6; }
5016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5017$as_echo "disabled" >&6; }
5018      else
5019        # Check if the provided tool contains a complete path.
5020        tool_specified="$BASENAME"
5021        tool_basename="${tool_specified##*/}"
5022        if test "x$tool_basename" = "x$tool_specified"; then
5023          # A command without a complete path is provided, search $PATH.
5024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5025$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5026          # Extract the first word of "$tool_basename", so it can be a program name with args.
5027set dummy $tool_basename; ac_word=$2
5028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029$as_echo_n "checking for $ac_word... " >&6; }
5030if ${ac_cv_path_BASENAME+:} false; then :
5031  $as_echo_n "(cached) " >&6
5032else
5033  case $BASENAME in
5034  [\\/]* | ?:[\\/]*)
5035  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5036  ;;
5037  *)
5038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5039for as_dir in $PATH
5040do
5041  IFS=$as_save_IFS
5042  test -z "$as_dir" && as_dir=.
5043    for ac_exec_ext in '' $ac_executable_extensions; do
5044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5045    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5047    break 2
5048  fi
5049done
5050  done
5051IFS=$as_save_IFS
5052
5053  ;;
5054esac
5055fi
5056BASENAME=$ac_cv_path_BASENAME
5057if test -n "$BASENAME"; then
5058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5059$as_echo "$BASENAME" >&6; }
5060else
5061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062$as_echo "no" >&6; }
5063fi
5064
5065
5066          if test "x$BASENAME" = x; then
5067            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5068          fi
5069        else
5070          # Otherwise we believe it is a complete path. Use it as it is.
5071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5072$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5073          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5074$as_echo_n "checking for BASENAME... " >&6; }
5075          if test ! -x "$tool_specified"; then
5076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5077$as_echo "not found" >&6; }
5078            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5079          fi
5080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5081$as_echo "$tool_specified" >&6; }
5082        fi
5083      fi
5084    fi
5085
5086  fi
5087
5088
5089
5090  if test "x$BASENAME" = x; then
5091    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5092  fi
5093
5094
5095
5096
5097
5098  # Publish this variable in the help.
5099
5100
5101  if [ -z "${BASH+x}" ]; then
5102    # The variable is not set by user, try to locate tool using the code snippet
5103    for ac_prog in bash
5104do
5105  # Extract the first word of "$ac_prog", so it can be a program name with args.
5106set dummy $ac_prog; ac_word=$2
5107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5108$as_echo_n "checking for $ac_word... " >&6; }
5109if ${ac_cv_path_BASH+:} false; then :
5110  $as_echo_n "(cached) " >&6
5111else
5112  case $BASH in
5113  [\\/]* | ?:[\\/]*)
5114  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5115  ;;
5116  *)
5117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in $PATH
5119do
5120  IFS=$as_save_IFS
5121  test -z "$as_dir" && as_dir=.
5122    for ac_exec_ext in '' $ac_executable_extensions; do
5123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5124    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5126    break 2
5127  fi
5128done
5129  done
5130IFS=$as_save_IFS
5131
5132  ;;
5133esac
5134fi
5135BASH=$ac_cv_path_BASH
5136if test -n "$BASH"; then
5137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5138$as_echo "$BASH" >&6; }
5139else
5140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5141$as_echo "no" >&6; }
5142fi
5143
5144
5145  test -n "$BASH" && break
5146done
5147
5148  else
5149    # The variable is set, but is it from the command line or the environment?
5150
5151    # Try to remove the string !BASH! from our list.
5152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5154      # If it failed, the variable was not from the command line. Ignore it,
5155      # but warn the user (except for BASH, which is always set by the calling BASH).
5156      if test "xBASH" != xBASH; then
5157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5158$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5159      fi
5160      # Try to locate tool using the code snippet
5161      for ac_prog in bash
5162do
5163  # Extract the first word of "$ac_prog", so it can be a program name with args.
5164set dummy $ac_prog; ac_word=$2
5165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5166$as_echo_n "checking for $ac_word... " >&6; }
5167if ${ac_cv_path_BASH+:} false; then :
5168  $as_echo_n "(cached) " >&6
5169else
5170  case $BASH in
5171  [\\/]* | ?:[\\/]*)
5172  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5173  ;;
5174  *)
5175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5176for as_dir in $PATH
5177do
5178  IFS=$as_save_IFS
5179  test -z "$as_dir" && as_dir=.
5180    for ac_exec_ext in '' $ac_executable_extensions; do
5181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5182    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5184    break 2
5185  fi
5186done
5187  done
5188IFS=$as_save_IFS
5189
5190  ;;
5191esac
5192fi
5193BASH=$ac_cv_path_BASH
5194if test -n "$BASH"; then
5195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5196$as_echo "$BASH" >&6; }
5197else
5198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5199$as_echo "no" >&6; }
5200fi
5201
5202
5203  test -n "$BASH" && break
5204done
5205
5206    else
5207      # If it succeeded, then it was overridden by the user. We will use it
5208      # for the tool.
5209
5210      # First remove it from the list of overridden variables, so we can test
5211      # for unknown variables in the end.
5212      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5213
5214      # Check if we try to supply an empty value
5215      if test "x$BASH" = x; then
5216        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5217$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5219$as_echo_n "checking for BASH... " >&6; }
5220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5221$as_echo "disabled" >&6; }
5222      else
5223        # Check if the provided tool contains a complete path.
5224        tool_specified="$BASH"
5225        tool_basename="${tool_specified##*/}"
5226        if test "x$tool_basename" = "x$tool_specified"; then
5227          # A command without a complete path is provided, search $PATH.
5228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5229$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5230          # Extract the first word of "$tool_basename", so it can be a program name with args.
5231set dummy $tool_basename; ac_word=$2
5232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5233$as_echo_n "checking for $ac_word... " >&6; }
5234if ${ac_cv_path_BASH+:} false; then :
5235  $as_echo_n "(cached) " >&6
5236else
5237  case $BASH in
5238  [\\/]* | ?:[\\/]*)
5239  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5240  ;;
5241  *)
5242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5243for as_dir in $PATH
5244do
5245  IFS=$as_save_IFS
5246  test -z "$as_dir" && as_dir=.
5247    for ac_exec_ext in '' $ac_executable_extensions; do
5248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5249    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5251    break 2
5252  fi
5253done
5254  done
5255IFS=$as_save_IFS
5256
5257  ;;
5258esac
5259fi
5260BASH=$ac_cv_path_BASH
5261if test -n "$BASH"; then
5262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5263$as_echo "$BASH" >&6; }
5264else
5265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5266$as_echo "no" >&6; }
5267fi
5268
5269
5270          if test "x$BASH" = x; then
5271            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5272          fi
5273        else
5274          # Otherwise we believe it is a complete path. Use it as it is.
5275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5276$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5277          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5278$as_echo_n "checking for BASH... " >&6; }
5279          if test ! -x "$tool_specified"; then
5280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5281$as_echo "not found" >&6; }
5282            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5283          fi
5284          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5285$as_echo "$tool_specified" >&6; }
5286        fi
5287      fi
5288    fi
5289
5290  fi
5291
5292
5293
5294  if test "x$BASH" = x; then
5295    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5296  fi
5297
5298
5299
5300
5301
5302  # Publish this variable in the help.
5303
5304
5305  if [ -z "${CAT+x}" ]; then
5306    # The variable is not set by user, try to locate tool using the code snippet
5307    for ac_prog in cat
5308do
5309  # Extract the first word of "$ac_prog", so it can be a program name with args.
5310set dummy $ac_prog; ac_word=$2
5311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5312$as_echo_n "checking for $ac_word... " >&6; }
5313if ${ac_cv_path_CAT+:} false; then :
5314  $as_echo_n "(cached) " >&6
5315else
5316  case $CAT in
5317  [\\/]* | ?:[\\/]*)
5318  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5319  ;;
5320  *)
5321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322for as_dir in $PATH
5323do
5324  IFS=$as_save_IFS
5325  test -z "$as_dir" && as_dir=.
5326    for ac_exec_ext in '' $ac_executable_extensions; do
5327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5328    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5330    break 2
5331  fi
5332done
5333  done
5334IFS=$as_save_IFS
5335
5336  ;;
5337esac
5338fi
5339CAT=$ac_cv_path_CAT
5340if test -n "$CAT"; then
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5342$as_echo "$CAT" >&6; }
5343else
5344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345$as_echo "no" >&6; }
5346fi
5347
5348
5349  test -n "$CAT" && break
5350done
5351
5352  else
5353    # The variable is set, but is it from the command line or the environment?
5354
5355    # Try to remove the string !CAT! from our list.
5356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5358      # If it failed, the variable was not from the command line. Ignore it,
5359      # but warn the user (except for BASH, which is always set by the calling BASH).
5360      if test "xCAT" != xBASH; then
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5362$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5363      fi
5364      # Try to locate tool using the code snippet
5365      for ac_prog in cat
5366do
5367  # Extract the first word of "$ac_prog", so it can be a program name with args.
5368set dummy $ac_prog; ac_word=$2
5369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5370$as_echo_n "checking for $ac_word... " >&6; }
5371if ${ac_cv_path_CAT+:} false; then :
5372  $as_echo_n "(cached) " >&6
5373else
5374  case $CAT in
5375  [\\/]* | ?:[\\/]*)
5376  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5377  ;;
5378  *)
5379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5380for as_dir in $PATH
5381do
5382  IFS=$as_save_IFS
5383  test -z "$as_dir" && as_dir=.
5384    for ac_exec_ext in '' $ac_executable_extensions; do
5385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5386    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5388    break 2
5389  fi
5390done
5391  done
5392IFS=$as_save_IFS
5393
5394  ;;
5395esac
5396fi
5397CAT=$ac_cv_path_CAT
5398if test -n "$CAT"; then
5399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5400$as_echo "$CAT" >&6; }
5401else
5402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5403$as_echo "no" >&6; }
5404fi
5405
5406
5407  test -n "$CAT" && break
5408done
5409
5410    else
5411      # If it succeeded, then it was overridden by the user. We will use it
5412      # for the tool.
5413
5414      # First remove it from the list of overridden variables, so we can test
5415      # for unknown variables in the end.
5416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5417
5418      # Check if we try to supply an empty value
5419      if test "x$CAT" = x; then
5420        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5421$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5423$as_echo_n "checking for CAT... " >&6; }
5424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5425$as_echo "disabled" >&6; }
5426      else
5427        # Check if the provided tool contains a complete path.
5428        tool_specified="$CAT"
5429        tool_basename="${tool_specified##*/}"
5430        if test "x$tool_basename" = "x$tool_specified"; then
5431          # A command without a complete path is provided, search $PATH.
5432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5433$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5434          # Extract the first word of "$tool_basename", so it can be a program name with args.
5435set dummy $tool_basename; ac_word=$2
5436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5437$as_echo_n "checking for $ac_word... " >&6; }
5438if ${ac_cv_path_CAT+:} false; then :
5439  $as_echo_n "(cached) " >&6
5440else
5441  case $CAT in
5442  [\\/]* | ?:[\\/]*)
5443  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5444  ;;
5445  *)
5446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5447for as_dir in $PATH
5448do
5449  IFS=$as_save_IFS
5450  test -z "$as_dir" && as_dir=.
5451    for ac_exec_ext in '' $ac_executable_extensions; do
5452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5453    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5455    break 2
5456  fi
5457done
5458  done
5459IFS=$as_save_IFS
5460
5461  ;;
5462esac
5463fi
5464CAT=$ac_cv_path_CAT
5465if test -n "$CAT"; then
5466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5467$as_echo "$CAT" >&6; }
5468else
5469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5470$as_echo "no" >&6; }
5471fi
5472
5473
5474          if test "x$CAT" = x; then
5475            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5476          fi
5477        else
5478          # Otherwise we believe it is a complete path. Use it as it is.
5479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5480$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5481          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5482$as_echo_n "checking for CAT... " >&6; }
5483          if test ! -x "$tool_specified"; then
5484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5485$as_echo "not found" >&6; }
5486            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5487          fi
5488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5489$as_echo "$tool_specified" >&6; }
5490        fi
5491      fi
5492    fi
5493
5494  fi
5495
5496
5497
5498  if test "x$CAT" = x; then
5499    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5500  fi
5501
5502
5503
5504
5505
5506  # Publish this variable in the help.
5507
5508
5509  if [ -z "${CHMOD+x}" ]; then
5510    # The variable is not set by user, try to locate tool using the code snippet
5511    for ac_prog in chmod
5512do
5513  # Extract the first word of "$ac_prog", so it can be a program name with args.
5514set dummy $ac_prog; ac_word=$2
5515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5516$as_echo_n "checking for $ac_word... " >&6; }
5517if ${ac_cv_path_CHMOD+:} false; then :
5518  $as_echo_n "(cached) " >&6
5519else
5520  case $CHMOD in
5521  [\\/]* | ?:[\\/]*)
5522  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5523  ;;
5524  *)
5525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5526for as_dir in $PATH
5527do
5528  IFS=$as_save_IFS
5529  test -z "$as_dir" && as_dir=.
5530    for ac_exec_ext in '' $ac_executable_extensions; do
5531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5532    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5534    break 2
5535  fi
5536done
5537  done
5538IFS=$as_save_IFS
5539
5540  ;;
5541esac
5542fi
5543CHMOD=$ac_cv_path_CHMOD
5544if test -n "$CHMOD"; then
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5546$as_echo "$CHMOD" >&6; }
5547else
5548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5549$as_echo "no" >&6; }
5550fi
5551
5552
5553  test -n "$CHMOD" && break
5554done
5555
5556  else
5557    # The variable is set, but is it from the command line or the environment?
5558
5559    # Try to remove the string !CHMOD! from our list.
5560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5562      # If it failed, the variable was not from the command line. Ignore it,
5563      # but warn the user (except for BASH, which is always set by the calling BASH).
5564      if test "xCHMOD" != xBASH; then
5565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5566$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5567      fi
5568      # Try to locate tool using the code snippet
5569      for ac_prog in chmod
5570do
5571  # Extract the first word of "$ac_prog", so it can be a program name with args.
5572set dummy $ac_prog; ac_word=$2
5573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5574$as_echo_n "checking for $ac_word... " >&6; }
5575if ${ac_cv_path_CHMOD+:} false; then :
5576  $as_echo_n "(cached) " >&6
5577else
5578  case $CHMOD in
5579  [\\/]* | ?:[\\/]*)
5580  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5581  ;;
5582  *)
5583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5584for as_dir in $PATH
5585do
5586  IFS=$as_save_IFS
5587  test -z "$as_dir" && as_dir=.
5588    for ac_exec_ext in '' $ac_executable_extensions; do
5589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5590    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5592    break 2
5593  fi
5594done
5595  done
5596IFS=$as_save_IFS
5597
5598  ;;
5599esac
5600fi
5601CHMOD=$ac_cv_path_CHMOD
5602if test -n "$CHMOD"; then
5603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5604$as_echo "$CHMOD" >&6; }
5605else
5606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5607$as_echo "no" >&6; }
5608fi
5609
5610
5611  test -n "$CHMOD" && break
5612done
5613
5614    else
5615      # If it succeeded, then it was overridden by the user. We will use it
5616      # for the tool.
5617
5618      # First remove it from the list of overridden variables, so we can test
5619      # for unknown variables in the end.
5620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5621
5622      # Check if we try to supply an empty value
5623      if test "x$CHMOD" = x; then
5624        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5625$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5626        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5627$as_echo_n "checking for CHMOD... " >&6; }
5628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5629$as_echo "disabled" >&6; }
5630      else
5631        # Check if the provided tool contains a complete path.
5632        tool_specified="$CHMOD"
5633        tool_basename="${tool_specified##*/}"
5634        if test "x$tool_basename" = "x$tool_specified"; then
5635          # A command without a complete path is provided, search $PATH.
5636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5637$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5638          # Extract the first word of "$tool_basename", so it can be a program name with args.
5639set dummy $tool_basename; ac_word=$2
5640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5641$as_echo_n "checking for $ac_word... " >&6; }
5642if ${ac_cv_path_CHMOD+:} false; then :
5643  $as_echo_n "(cached) " >&6
5644else
5645  case $CHMOD in
5646  [\\/]* | ?:[\\/]*)
5647  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5648  ;;
5649  *)
5650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5651for as_dir in $PATH
5652do
5653  IFS=$as_save_IFS
5654  test -z "$as_dir" && as_dir=.
5655    for ac_exec_ext in '' $ac_executable_extensions; do
5656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5657    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5659    break 2
5660  fi
5661done
5662  done
5663IFS=$as_save_IFS
5664
5665  ;;
5666esac
5667fi
5668CHMOD=$ac_cv_path_CHMOD
5669if test -n "$CHMOD"; then
5670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5671$as_echo "$CHMOD" >&6; }
5672else
5673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5674$as_echo "no" >&6; }
5675fi
5676
5677
5678          if test "x$CHMOD" = x; then
5679            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5680          fi
5681        else
5682          # Otherwise we believe it is a complete path. Use it as it is.
5683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5684$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5685          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5686$as_echo_n "checking for CHMOD... " >&6; }
5687          if test ! -x "$tool_specified"; then
5688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5689$as_echo "not found" >&6; }
5690            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5691          fi
5692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5693$as_echo "$tool_specified" >&6; }
5694        fi
5695      fi
5696    fi
5697
5698  fi
5699
5700
5701
5702  if test "x$CHMOD" = x; then
5703    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5704  fi
5705
5706
5707
5708
5709
5710  # Publish this variable in the help.
5711
5712
5713  if [ -z "${CMP+x}" ]; then
5714    # The variable is not set by user, try to locate tool using the code snippet
5715    for ac_prog in cmp
5716do
5717  # Extract the first word of "$ac_prog", so it can be a program name with args.
5718set dummy $ac_prog; ac_word=$2
5719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720$as_echo_n "checking for $ac_word... " >&6; }
5721if ${ac_cv_path_CMP+:} false; then :
5722  $as_echo_n "(cached) " >&6
5723else
5724  case $CMP in
5725  [\\/]* | ?:[\\/]*)
5726  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5727  ;;
5728  *)
5729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5730for as_dir in $PATH
5731do
5732  IFS=$as_save_IFS
5733  test -z "$as_dir" && as_dir=.
5734    for ac_exec_ext in '' $ac_executable_extensions; do
5735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5736    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5738    break 2
5739  fi
5740done
5741  done
5742IFS=$as_save_IFS
5743
5744  ;;
5745esac
5746fi
5747CMP=$ac_cv_path_CMP
5748if test -n "$CMP"; then
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5750$as_echo "$CMP" >&6; }
5751else
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753$as_echo "no" >&6; }
5754fi
5755
5756
5757  test -n "$CMP" && break
5758done
5759
5760  else
5761    # The variable is set, but is it from the command line or the environment?
5762
5763    # Try to remove the string !CMP! from our list.
5764    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5765    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5766      # If it failed, the variable was not from the command line. Ignore it,
5767      # but warn the user (except for BASH, which is always set by the calling BASH).
5768      if test "xCMP" != xBASH; then
5769        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5770$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5771      fi
5772      # Try to locate tool using the code snippet
5773      for ac_prog in cmp
5774do
5775  # Extract the first word of "$ac_prog", so it can be a program name with args.
5776set dummy $ac_prog; ac_word=$2
5777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5778$as_echo_n "checking for $ac_word... " >&6; }
5779if ${ac_cv_path_CMP+:} false; then :
5780  $as_echo_n "(cached) " >&6
5781else
5782  case $CMP in
5783  [\\/]* | ?:[\\/]*)
5784  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5785  ;;
5786  *)
5787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5788for as_dir in $PATH
5789do
5790  IFS=$as_save_IFS
5791  test -z "$as_dir" && as_dir=.
5792    for ac_exec_ext in '' $ac_executable_extensions; do
5793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5794    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5796    break 2
5797  fi
5798done
5799  done
5800IFS=$as_save_IFS
5801
5802  ;;
5803esac
5804fi
5805CMP=$ac_cv_path_CMP
5806if test -n "$CMP"; then
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5808$as_echo "$CMP" >&6; }
5809else
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5811$as_echo "no" >&6; }
5812fi
5813
5814
5815  test -n "$CMP" && break
5816done
5817
5818    else
5819      # If it succeeded, then it was overridden by the user. We will use it
5820      # for the tool.
5821
5822      # First remove it from the list of overridden variables, so we can test
5823      # for unknown variables in the end.
5824      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5825
5826      # Check if we try to supply an empty value
5827      if test "x$CMP" = x; then
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5829$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5831$as_echo_n "checking for CMP... " >&6; }
5832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5833$as_echo "disabled" >&6; }
5834      else
5835        # Check if the provided tool contains a complete path.
5836        tool_specified="$CMP"
5837        tool_basename="${tool_specified##*/}"
5838        if test "x$tool_basename" = "x$tool_specified"; then
5839          # A command without a complete path is provided, search $PATH.
5840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5841$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5842          # Extract the first word of "$tool_basename", so it can be a program name with args.
5843set dummy $tool_basename; ac_word=$2
5844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5845$as_echo_n "checking for $ac_word... " >&6; }
5846if ${ac_cv_path_CMP+:} false; then :
5847  $as_echo_n "(cached) " >&6
5848else
5849  case $CMP in
5850  [\\/]* | ?:[\\/]*)
5851  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5852  ;;
5853  *)
5854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5855for as_dir in $PATH
5856do
5857  IFS=$as_save_IFS
5858  test -z "$as_dir" && as_dir=.
5859    for ac_exec_ext in '' $ac_executable_extensions; do
5860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5861    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5863    break 2
5864  fi
5865done
5866  done
5867IFS=$as_save_IFS
5868
5869  ;;
5870esac
5871fi
5872CMP=$ac_cv_path_CMP
5873if test -n "$CMP"; then
5874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5875$as_echo "$CMP" >&6; }
5876else
5877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5878$as_echo "no" >&6; }
5879fi
5880
5881
5882          if test "x$CMP" = x; then
5883            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5884          fi
5885        else
5886          # Otherwise we believe it is a complete path. Use it as it is.
5887          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5888$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5889          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5890$as_echo_n "checking for CMP... " >&6; }
5891          if test ! -x "$tool_specified"; then
5892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5893$as_echo "not found" >&6; }
5894            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5895          fi
5896          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5897$as_echo "$tool_specified" >&6; }
5898        fi
5899      fi
5900    fi
5901
5902  fi
5903
5904
5905
5906  if test "x$CMP" = x; then
5907    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5908  fi
5909
5910
5911
5912
5913
5914  # Publish this variable in the help.
5915
5916
5917  if [ -z "${COMM+x}" ]; then
5918    # The variable is not set by user, try to locate tool using the code snippet
5919    for ac_prog in comm
5920do
5921  # Extract the first word of "$ac_prog", so it can be a program name with args.
5922set dummy $ac_prog; ac_word=$2
5923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5924$as_echo_n "checking for $ac_word... " >&6; }
5925if ${ac_cv_path_COMM+:} false; then :
5926  $as_echo_n "(cached) " >&6
5927else
5928  case $COMM in
5929  [\\/]* | ?:[\\/]*)
5930  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5931  ;;
5932  *)
5933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5934for as_dir in $PATH
5935do
5936  IFS=$as_save_IFS
5937  test -z "$as_dir" && as_dir=.
5938    for ac_exec_ext in '' $ac_executable_extensions; do
5939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5940    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5942    break 2
5943  fi
5944done
5945  done
5946IFS=$as_save_IFS
5947
5948  ;;
5949esac
5950fi
5951COMM=$ac_cv_path_COMM
5952if test -n "$COMM"; then
5953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5954$as_echo "$COMM" >&6; }
5955else
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957$as_echo "no" >&6; }
5958fi
5959
5960
5961  test -n "$COMM" && break
5962done
5963
5964  else
5965    # The variable is set, but is it from the command line or the environment?
5966
5967    # Try to remove the string !COMM! from our list.
5968    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5969    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5970      # If it failed, the variable was not from the command line. Ignore it,
5971      # but warn the user (except for BASH, which is always set by the calling BASH).
5972      if test "xCOMM" != xBASH; then
5973        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5974$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5975      fi
5976      # Try to locate tool using the code snippet
5977      for ac_prog in comm
5978do
5979  # Extract the first word of "$ac_prog", so it can be a program name with args.
5980set dummy $ac_prog; ac_word=$2
5981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5982$as_echo_n "checking for $ac_word... " >&6; }
5983if ${ac_cv_path_COMM+:} false; then :
5984  $as_echo_n "(cached) " >&6
5985else
5986  case $COMM in
5987  [\\/]* | ?:[\\/]*)
5988  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5989  ;;
5990  *)
5991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992for as_dir in $PATH
5993do
5994  IFS=$as_save_IFS
5995  test -z "$as_dir" && as_dir=.
5996    for ac_exec_ext in '' $ac_executable_extensions; do
5997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5998    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6000    break 2
6001  fi
6002done
6003  done
6004IFS=$as_save_IFS
6005
6006  ;;
6007esac
6008fi
6009COMM=$ac_cv_path_COMM
6010if test -n "$COMM"; then
6011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6012$as_echo "$COMM" >&6; }
6013else
6014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6015$as_echo "no" >&6; }
6016fi
6017
6018
6019  test -n "$COMM" && break
6020done
6021
6022    else
6023      # If it succeeded, then it was overridden by the user. We will use it
6024      # for the tool.
6025
6026      # First remove it from the list of overridden variables, so we can test
6027      # for unknown variables in the end.
6028      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6029
6030      # Check if we try to supply an empty value
6031      if test "x$COMM" = x; then
6032        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6033$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6035$as_echo_n "checking for COMM... " >&6; }
6036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6037$as_echo "disabled" >&6; }
6038      else
6039        # Check if the provided tool contains a complete path.
6040        tool_specified="$COMM"
6041        tool_basename="${tool_specified##*/}"
6042        if test "x$tool_basename" = "x$tool_specified"; then
6043          # A command without a complete path is provided, search $PATH.
6044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6045$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6046          # Extract the first word of "$tool_basename", so it can be a program name with args.
6047set dummy $tool_basename; ac_word=$2
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6049$as_echo_n "checking for $ac_word... " >&6; }
6050if ${ac_cv_path_COMM+:} false; then :
6051  $as_echo_n "(cached) " >&6
6052else
6053  case $COMM in
6054  [\\/]* | ?:[\\/]*)
6055  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6056  ;;
6057  *)
6058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6059for as_dir in $PATH
6060do
6061  IFS=$as_save_IFS
6062  test -z "$as_dir" && as_dir=.
6063    for ac_exec_ext in '' $ac_executable_extensions; do
6064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6065    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6067    break 2
6068  fi
6069done
6070  done
6071IFS=$as_save_IFS
6072
6073  ;;
6074esac
6075fi
6076COMM=$ac_cv_path_COMM
6077if test -n "$COMM"; then
6078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6079$as_echo "$COMM" >&6; }
6080else
6081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
6083fi
6084
6085
6086          if test "x$COMM" = x; then
6087            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6088          fi
6089        else
6090          # Otherwise we believe it is a complete path. Use it as it is.
6091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6092$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6093          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6094$as_echo_n "checking for COMM... " >&6; }
6095          if test ! -x "$tool_specified"; then
6096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6097$as_echo "not found" >&6; }
6098            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6099          fi
6100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6101$as_echo "$tool_specified" >&6; }
6102        fi
6103      fi
6104    fi
6105
6106  fi
6107
6108
6109
6110  if test "x$COMM" = x; then
6111    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6112  fi
6113
6114
6115
6116
6117
6118  # Publish this variable in the help.
6119
6120
6121  if [ -z "${CP+x}" ]; then
6122    # The variable is not set by user, try to locate tool using the code snippet
6123    for ac_prog in cp
6124do
6125  # Extract the first word of "$ac_prog", so it can be a program name with args.
6126set dummy $ac_prog; ac_word=$2
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6128$as_echo_n "checking for $ac_word... " >&6; }
6129if ${ac_cv_path_CP+:} false; then :
6130  $as_echo_n "(cached) " >&6
6131else
6132  case $CP in
6133  [\\/]* | ?:[\\/]*)
6134  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6135  ;;
6136  *)
6137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140  IFS=$as_save_IFS
6141  test -z "$as_dir" && as_dir=.
6142    for ac_exec_ext in '' $ac_executable_extensions; do
6143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6144    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6146    break 2
6147  fi
6148done
6149  done
6150IFS=$as_save_IFS
6151
6152  ;;
6153esac
6154fi
6155CP=$ac_cv_path_CP
6156if test -n "$CP"; then
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6158$as_echo "$CP" >&6; }
6159else
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6161$as_echo "no" >&6; }
6162fi
6163
6164
6165  test -n "$CP" && break
6166done
6167
6168  else
6169    # The variable is set, but is it from the command line or the environment?
6170
6171    # Try to remove the string !CP! from our list.
6172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6174      # If it failed, the variable was not from the command line. Ignore it,
6175      # but warn the user (except for BASH, which is always set by the calling BASH).
6176      if test "xCP" != xBASH; then
6177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6178$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6179      fi
6180      # Try to locate tool using the code snippet
6181      for ac_prog in cp
6182do
6183  # Extract the first word of "$ac_prog", so it can be a program name with args.
6184set dummy $ac_prog; ac_word=$2
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6186$as_echo_n "checking for $ac_word... " >&6; }
6187if ${ac_cv_path_CP+:} false; then :
6188  $as_echo_n "(cached) " >&6
6189else
6190  case $CP in
6191  [\\/]* | ?:[\\/]*)
6192  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6193  ;;
6194  *)
6195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6196for as_dir in $PATH
6197do
6198  IFS=$as_save_IFS
6199  test -z "$as_dir" && as_dir=.
6200    for ac_exec_ext in '' $ac_executable_extensions; do
6201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6202    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6204    break 2
6205  fi
6206done
6207  done
6208IFS=$as_save_IFS
6209
6210  ;;
6211esac
6212fi
6213CP=$ac_cv_path_CP
6214if test -n "$CP"; then
6215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6216$as_echo "$CP" >&6; }
6217else
6218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6219$as_echo "no" >&6; }
6220fi
6221
6222
6223  test -n "$CP" && break
6224done
6225
6226    else
6227      # If it succeeded, then it was overridden by the user. We will use it
6228      # for the tool.
6229
6230      # First remove it from the list of overridden variables, so we can test
6231      # for unknown variables in the end.
6232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6233
6234      # Check if we try to supply an empty value
6235      if test "x$CP" = x; then
6236        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6237$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6238        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6239$as_echo_n "checking for CP... " >&6; }
6240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6241$as_echo "disabled" >&6; }
6242      else
6243        # Check if the provided tool contains a complete path.
6244        tool_specified="$CP"
6245        tool_basename="${tool_specified##*/}"
6246        if test "x$tool_basename" = "x$tool_specified"; then
6247          # A command without a complete path is provided, search $PATH.
6248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6249$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6250          # Extract the first word of "$tool_basename", so it can be a program name with args.
6251set dummy $tool_basename; ac_word=$2
6252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6253$as_echo_n "checking for $ac_word... " >&6; }
6254if ${ac_cv_path_CP+:} false; then :
6255  $as_echo_n "(cached) " >&6
6256else
6257  case $CP in
6258  [\\/]* | ?:[\\/]*)
6259  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6260  ;;
6261  *)
6262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6263for as_dir in $PATH
6264do
6265  IFS=$as_save_IFS
6266  test -z "$as_dir" && as_dir=.
6267    for ac_exec_ext in '' $ac_executable_extensions; do
6268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6269    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6271    break 2
6272  fi
6273done
6274  done
6275IFS=$as_save_IFS
6276
6277  ;;
6278esac
6279fi
6280CP=$ac_cv_path_CP
6281if test -n "$CP"; then
6282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6283$as_echo "$CP" >&6; }
6284else
6285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6286$as_echo "no" >&6; }
6287fi
6288
6289
6290          if test "x$CP" = x; then
6291            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6292          fi
6293        else
6294          # Otherwise we believe it is a complete path. Use it as it is.
6295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6296$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6297          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6298$as_echo_n "checking for CP... " >&6; }
6299          if test ! -x "$tool_specified"; then
6300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6301$as_echo "not found" >&6; }
6302            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6303          fi
6304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6305$as_echo "$tool_specified" >&6; }
6306        fi
6307      fi
6308    fi
6309
6310  fi
6311
6312
6313
6314  if test "x$CP" = x; then
6315    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6316  fi
6317
6318
6319
6320
6321
6322  # Publish this variable in the help.
6323
6324
6325  if [ -z "${CUT+x}" ]; then
6326    # The variable is not set by user, try to locate tool using the code snippet
6327    for ac_prog in cut
6328do
6329  # Extract the first word of "$ac_prog", so it can be a program name with args.
6330set dummy $ac_prog; ac_word=$2
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6332$as_echo_n "checking for $ac_word... " >&6; }
6333if ${ac_cv_path_CUT+:} false; then :
6334  $as_echo_n "(cached) " >&6
6335else
6336  case $CUT in
6337  [\\/]* | ?:[\\/]*)
6338  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6339  ;;
6340  *)
6341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6342for as_dir in $PATH
6343do
6344  IFS=$as_save_IFS
6345  test -z "$as_dir" && as_dir=.
6346    for ac_exec_ext in '' $ac_executable_extensions; do
6347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6348    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6350    break 2
6351  fi
6352done
6353  done
6354IFS=$as_save_IFS
6355
6356  ;;
6357esac
6358fi
6359CUT=$ac_cv_path_CUT
6360if test -n "$CUT"; then
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6362$as_echo "$CUT" >&6; }
6363else
6364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6365$as_echo "no" >&6; }
6366fi
6367
6368
6369  test -n "$CUT" && break
6370done
6371
6372  else
6373    # The variable is set, but is it from the command line or the environment?
6374
6375    # Try to remove the string !CUT! from our list.
6376    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6377    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6378      # If it failed, the variable was not from the command line. Ignore it,
6379      # but warn the user (except for BASH, which is always set by the calling BASH).
6380      if test "xCUT" != xBASH; then
6381        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6382$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6383      fi
6384      # Try to locate tool using the code snippet
6385      for ac_prog in cut
6386do
6387  # Extract the first word of "$ac_prog", so it can be a program name with args.
6388set dummy $ac_prog; ac_word=$2
6389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6390$as_echo_n "checking for $ac_word... " >&6; }
6391if ${ac_cv_path_CUT+:} false; then :
6392  $as_echo_n "(cached) " >&6
6393else
6394  case $CUT in
6395  [\\/]* | ?:[\\/]*)
6396  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6397  ;;
6398  *)
6399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6400for as_dir in $PATH
6401do
6402  IFS=$as_save_IFS
6403  test -z "$as_dir" && as_dir=.
6404    for ac_exec_ext in '' $ac_executable_extensions; do
6405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6406    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6408    break 2
6409  fi
6410done
6411  done
6412IFS=$as_save_IFS
6413
6414  ;;
6415esac
6416fi
6417CUT=$ac_cv_path_CUT
6418if test -n "$CUT"; then
6419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6420$as_echo "$CUT" >&6; }
6421else
6422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
6426
6427  test -n "$CUT" && break
6428done
6429
6430    else
6431      # If it succeeded, then it was overridden by the user. We will use it
6432      # for the tool.
6433
6434      # First remove it from the list of overridden variables, so we can test
6435      # for unknown variables in the end.
6436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6437
6438      # Check if we try to supply an empty value
6439      if test "x$CUT" = x; then
6440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6441$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6443$as_echo_n "checking for CUT... " >&6; }
6444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6445$as_echo "disabled" >&6; }
6446      else
6447        # Check if the provided tool contains a complete path.
6448        tool_specified="$CUT"
6449        tool_basename="${tool_specified##*/}"
6450        if test "x$tool_basename" = "x$tool_specified"; then
6451          # A command without a complete path is provided, search $PATH.
6452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6453$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6454          # Extract the first word of "$tool_basename", so it can be a program name with args.
6455set dummy $tool_basename; ac_word=$2
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6457$as_echo_n "checking for $ac_word... " >&6; }
6458if ${ac_cv_path_CUT+:} false; then :
6459  $as_echo_n "(cached) " >&6
6460else
6461  case $CUT in
6462  [\\/]* | ?:[\\/]*)
6463  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6464  ;;
6465  *)
6466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6467for as_dir in $PATH
6468do
6469  IFS=$as_save_IFS
6470  test -z "$as_dir" && as_dir=.
6471    for ac_exec_ext in '' $ac_executable_extensions; do
6472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6473    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6475    break 2
6476  fi
6477done
6478  done
6479IFS=$as_save_IFS
6480
6481  ;;
6482esac
6483fi
6484CUT=$ac_cv_path_CUT
6485if test -n "$CUT"; then
6486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6487$as_echo "$CUT" >&6; }
6488else
6489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6490$as_echo "no" >&6; }
6491fi
6492
6493
6494          if test "x$CUT" = x; then
6495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6496          fi
6497        else
6498          # Otherwise we believe it is a complete path. Use it as it is.
6499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6500$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6502$as_echo_n "checking for CUT... " >&6; }
6503          if test ! -x "$tool_specified"; then
6504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6505$as_echo "not found" >&6; }
6506            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6507          fi
6508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6509$as_echo "$tool_specified" >&6; }
6510        fi
6511      fi
6512    fi
6513
6514  fi
6515
6516
6517
6518  if test "x$CUT" = x; then
6519    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6520  fi
6521
6522
6523
6524
6525
6526  # Publish this variable in the help.
6527
6528
6529  if [ -z "${DATE+x}" ]; then
6530    # The variable is not set by user, try to locate tool using the code snippet
6531    for ac_prog in date
6532do
6533  # Extract the first word of "$ac_prog", so it can be a program name with args.
6534set dummy $ac_prog; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_DATE+:} false; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $DATE in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6552    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563DATE=$ac_cv_path_DATE
6564if test -n "$DATE"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6566$as_echo "$DATE" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573  test -n "$DATE" && break
6574done
6575
6576  else
6577    # The variable is set, but is it from the command line or the environment?
6578
6579    # Try to remove the string !DATE! from our list.
6580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6582      # If it failed, the variable was not from the command line. Ignore it,
6583      # but warn the user (except for BASH, which is always set by the calling BASH).
6584      if test "xDATE" != xBASH; then
6585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6586$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6587      fi
6588      # Try to locate tool using the code snippet
6589      for ac_prog in date
6590do
6591  # Extract the first word of "$ac_prog", so it can be a program name with args.
6592set dummy $ac_prog; ac_word=$2
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6594$as_echo_n "checking for $ac_word... " >&6; }
6595if ${ac_cv_path_DATE+:} false; then :
6596  $as_echo_n "(cached) " >&6
6597else
6598  case $DATE in
6599  [\\/]* | ?:[\\/]*)
6600  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6601  ;;
6602  *)
6603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6604for as_dir in $PATH
6605do
6606  IFS=$as_save_IFS
6607  test -z "$as_dir" && as_dir=.
6608    for ac_exec_ext in '' $ac_executable_extensions; do
6609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6610    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6612    break 2
6613  fi
6614done
6615  done
6616IFS=$as_save_IFS
6617
6618  ;;
6619esac
6620fi
6621DATE=$ac_cv_path_DATE
6622if test -n "$DATE"; then
6623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6624$as_echo "$DATE" >&6; }
6625else
6626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6627$as_echo "no" >&6; }
6628fi
6629
6630
6631  test -n "$DATE" && break
6632done
6633
6634    else
6635      # If it succeeded, then it was overridden by the user. We will use it
6636      # for the tool.
6637
6638      # First remove it from the list of overridden variables, so we can test
6639      # for unknown variables in the end.
6640      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6641
6642      # Check if we try to supply an empty value
6643      if test "x$DATE" = x; then
6644        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6645$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6647$as_echo_n "checking for DATE... " >&6; }
6648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6649$as_echo "disabled" >&6; }
6650      else
6651        # Check if the provided tool contains a complete path.
6652        tool_specified="$DATE"
6653        tool_basename="${tool_specified##*/}"
6654        if test "x$tool_basename" = "x$tool_specified"; then
6655          # A command without a complete path is provided, search $PATH.
6656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6657$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6658          # Extract the first word of "$tool_basename", so it can be a program name with args.
6659set dummy $tool_basename; ac_word=$2
6660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6661$as_echo_n "checking for $ac_word... " >&6; }
6662if ${ac_cv_path_DATE+:} false; then :
6663  $as_echo_n "(cached) " >&6
6664else
6665  case $DATE in
6666  [\\/]* | ?:[\\/]*)
6667  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6668  ;;
6669  *)
6670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6671for as_dir in $PATH
6672do
6673  IFS=$as_save_IFS
6674  test -z "$as_dir" && as_dir=.
6675    for ac_exec_ext in '' $ac_executable_extensions; do
6676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6677    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6679    break 2
6680  fi
6681done
6682  done
6683IFS=$as_save_IFS
6684
6685  ;;
6686esac
6687fi
6688DATE=$ac_cv_path_DATE
6689if test -n "$DATE"; then
6690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6691$as_echo "$DATE" >&6; }
6692else
6693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6694$as_echo "no" >&6; }
6695fi
6696
6697
6698          if test "x$DATE" = x; then
6699            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6700          fi
6701        else
6702          # Otherwise we believe it is a complete path. Use it as it is.
6703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6704$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6706$as_echo_n "checking for DATE... " >&6; }
6707          if test ! -x "$tool_specified"; then
6708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6709$as_echo "not found" >&6; }
6710            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6711          fi
6712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6713$as_echo "$tool_specified" >&6; }
6714        fi
6715      fi
6716    fi
6717
6718  fi
6719
6720
6721
6722  if test "x$DATE" = x; then
6723    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6724  fi
6725
6726
6727
6728
6729
6730  # Publish this variable in the help.
6731
6732
6733  if [ -z "${DIFF+x}" ]; then
6734    # The variable is not set by user, try to locate tool using the code snippet
6735    for ac_prog in gdiff diff
6736do
6737  # Extract the first word of "$ac_prog", so it can be a program name with args.
6738set dummy $ac_prog; ac_word=$2
6739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6740$as_echo_n "checking for $ac_word... " >&6; }
6741if ${ac_cv_path_DIFF+:} false; then :
6742  $as_echo_n "(cached) " >&6
6743else
6744  case $DIFF in
6745  [\\/]* | ?:[\\/]*)
6746  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6747  ;;
6748  *)
6749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6750for as_dir in $PATH
6751do
6752  IFS=$as_save_IFS
6753  test -z "$as_dir" && as_dir=.
6754    for ac_exec_ext in '' $ac_executable_extensions; do
6755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6756    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6758    break 2
6759  fi
6760done
6761  done
6762IFS=$as_save_IFS
6763
6764  ;;
6765esac
6766fi
6767DIFF=$ac_cv_path_DIFF
6768if test -n "$DIFF"; then
6769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6770$as_echo "$DIFF" >&6; }
6771else
6772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6773$as_echo "no" >&6; }
6774fi
6775
6776
6777  test -n "$DIFF" && break
6778done
6779
6780  else
6781    # The variable is set, but is it from the command line or the environment?
6782
6783    # Try to remove the string !DIFF! from our list.
6784    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6785    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6786      # If it failed, the variable was not from the command line. Ignore it,
6787      # but warn the user (except for BASH, which is always set by the calling BASH).
6788      if test "xDIFF" != xBASH; then
6789        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6790$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6791      fi
6792      # Try to locate tool using the code snippet
6793      for ac_prog in gdiff diff
6794do
6795  # Extract the first word of "$ac_prog", so it can be a program name with args.
6796set dummy $ac_prog; ac_word=$2
6797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6798$as_echo_n "checking for $ac_word... " >&6; }
6799if ${ac_cv_path_DIFF+:} false; then :
6800  $as_echo_n "(cached) " >&6
6801else
6802  case $DIFF in
6803  [\\/]* | ?:[\\/]*)
6804  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6805  ;;
6806  *)
6807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6808for as_dir in $PATH
6809do
6810  IFS=$as_save_IFS
6811  test -z "$as_dir" && as_dir=.
6812    for ac_exec_ext in '' $ac_executable_extensions; do
6813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6814    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6816    break 2
6817  fi
6818done
6819  done
6820IFS=$as_save_IFS
6821
6822  ;;
6823esac
6824fi
6825DIFF=$ac_cv_path_DIFF
6826if test -n "$DIFF"; then
6827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6828$as_echo "$DIFF" >&6; }
6829else
6830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6831$as_echo "no" >&6; }
6832fi
6833
6834
6835  test -n "$DIFF" && break
6836done
6837
6838    else
6839      # If it succeeded, then it was overridden by the user. We will use it
6840      # for the tool.
6841
6842      # First remove it from the list of overridden variables, so we can test
6843      # for unknown variables in the end.
6844      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6845
6846      # Check if we try to supply an empty value
6847      if test "x$DIFF" = x; then
6848        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6849$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6850        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6851$as_echo_n "checking for DIFF... " >&6; }
6852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6853$as_echo "disabled" >&6; }
6854      else
6855        # Check if the provided tool contains a complete path.
6856        tool_specified="$DIFF"
6857        tool_basename="${tool_specified##*/}"
6858        if test "x$tool_basename" = "x$tool_specified"; then
6859          # A command without a complete path is provided, search $PATH.
6860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6861$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6862          # Extract the first word of "$tool_basename", so it can be a program name with args.
6863set dummy $tool_basename; ac_word=$2
6864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6865$as_echo_n "checking for $ac_word... " >&6; }
6866if ${ac_cv_path_DIFF+:} false; then :
6867  $as_echo_n "(cached) " >&6
6868else
6869  case $DIFF in
6870  [\\/]* | ?:[\\/]*)
6871  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6872  ;;
6873  *)
6874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6875for as_dir in $PATH
6876do
6877  IFS=$as_save_IFS
6878  test -z "$as_dir" && as_dir=.
6879    for ac_exec_ext in '' $ac_executable_extensions; do
6880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6881    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6883    break 2
6884  fi
6885done
6886  done
6887IFS=$as_save_IFS
6888
6889  ;;
6890esac
6891fi
6892DIFF=$ac_cv_path_DIFF
6893if test -n "$DIFF"; then
6894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6895$as_echo "$DIFF" >&6; }
6896else
6897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6898$as_echo "no" >&6; }
6899fi
6900
6901
6902          if test "x$DIFF" = x; then
6903            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6904          fi
6905        else
6906          # Otherwise we believe it is a complete path. Use it as it is.
6907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6908$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6909          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6910$as_echo_n "checking for DIFF... " >&6; }
6911          if test ! -x "$tool_specified"; then
6912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6913$as_echo "not found" >&6; }
6914            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6915          fi
6916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6917$as_echo "$tool_specified" >&6; }
6918        fi
6919      fi
6920    fi
6921
6922  fi
6923
6924
6925
6926  if test "x$DIFF" = x; then
6927    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6928  fi
6929
6930
6931
6932
6933
6934  # Publish this variable in the help.
6935
6936
6937  if [ -z "${DIRNAME+x}" ]; then
6938    # The variable is not set by user, try to locate tool using the code snippet
6939    for ac_prog in dirname
6940do
6941  # Extract the first word of "$ac_prog", so it can be a program name with args.
6942set dummy $ac_prog; ac_word=$2
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6944$as_echo_n "checking for $ac_word... " >&6; }
6945if ${ac_cv_path_DIRNAME+:} false; then :
6946  $as_echo_n "(cached) " >&6
6947else
6948  case $DIRNAME in
6949  [\\/]* | ?:[\\/]*)
6950  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6951  ;;
6952  *)
6953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6954for as_dir in $PATH
6955do
6956  IFS=$as_save_IFS
6957  test -z "$as_dir" && as_dir=.
6958    for ac_exec_ext in '' $ac_executable_extensions; do
6959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6960    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6962    break 2
6963  fi
6964done
6965  done
6966IFS=$as_save_IFS
6967
6968  ;;
6969esac
6970fi
6971DIRNAME=$ac_cv_path_DIRNAME
6972if test -n "$DIRNAME"; then
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6974$as_echo "$DIRNAME" >&6; }
6975else
6976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6977$as_echo "no" >&6; }
6978fi
6979
6980
6981  test -n "$DIRNAME" && break
6982done
6983
6984  else
6985    # The variable is set, but is it from the command line or the environment?
6986
6987    # Try to remove the string !DIRNAME! from our list.
6988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6990      # If it failed, the variable was not from the command line. Ignore it,
6991      # but warn the user (except for BASH, which is always set by the calling BASH).
6992      if test "xDIRNAME" != xBASH; then
6993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6994$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6995      fi
6996      # Try to locate tool using the code snippet
6997      for ac_prog in dirname
6998do
6999  # Extract the first word of "$ac_prog", so it can be a program name with args.
7000set dummy $ac_prog; ac_word=$2
7001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7002$as_echo_n "checking for $ac_word... " >&6; }
7003if ${ac_cv_path_DIRNAME+:} false; then :
7004  $as_echo_n "(cached) " >&6
7005else
7006  case $DIRNAME in
7007  [\\/]* | ?:[\\/]*)
7008  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7009  ;;
7010  *)
7011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7012for as_dir in $PATH
7013do
7014  IFS=$as_save_IFS
7015  test -z "$as_dir" && as_dir=.
7016    for ac_exec_ext in '' $ac_executable_extensions; do
7017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7018    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7020    break 2
7021  fi
7022done
7023  done
7024IFS=$as_save_IFS
7025
7026  ;;
7027esac
7028fi
7029DIRNAME=$ac_cv_path_DIRNAME
7030if test -n "$DIRNAME"; then
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7032$as_echo "$DIRNAME" >&6; }
7033else
7034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7035$as_echo "no" >&6; }
7036fi
7037
7038
7039  test -n "$DIRNAME" && break
7040done
7041
7042    else
7043      # If it succeeded, then it was overridden by the user. We will use it
7044      # for the tool.
7045
7046      # First remove it from the list of overridden variables, so we can test
7047      # for unknown variables in the end.
7048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7049
7050      # Check if we try to supply an empty value
7051      if test "x$DIRNAME" = x; then
7052        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7053$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7055$as_echo_n "checking for DIRNAME... " >&6; }
7056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7057$as_echo "disabled" >&6; }
7058      else
7059        # Check if the provided tool contains a complete path.
7060        tool_specified="$DIRNAME"
7061        tool_basename="${tool_specified##*/}"
7062        if test "x$tool_basename" = "x$tool_specified"; then
7063          # A command without a complete path is provided, search $PATH.
7064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7065$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7066          # Extract the first word of "$tool_basename", so it can be a program name with args.
7067set dummy $tool_basename; ac_word=$2
7068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7069$as_echo_n "checking for $ac_word... " >&6; }
7070if ${ac_cv_path_DIRNAME+:} false; then :
7071  $as_echo_n "(cached) " >&6
7072else
7073  case $DIRNAME in
7074  [\\/]* | ?:[\\/]*)
7075  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7076  ;;
7077  *)
7078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7079for as_dir in $PATH
7080do
7081  IFS=$as_save_IFS
7082  test -z "$as_dir" && as_dir=.
7083    for ac_exec_ext in '' $ac_executable_extensions; do
7084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7085    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7087    break 2
7088  fi
7089done
7090  done
7091IFS=$as_save_IFS
7092
7093  ;;
7094esac
7095fi
7096DIRNAME=$ac_cv_path_DIRNAME
7097if test -n "$DIRNAME"; then
7098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7099$as_echo "$DIRNAME" >&6; }
7100else
7101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7102$as_echo "no" >&6; }
7103fi
7104
7105
7106          if test "x$DIRNAME" = x; then
7107            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7108          fi
7109        else
7110          # Otherwise we believe it is a complete path. Use it as it is.
7111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7112$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7113          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7114$as_echo_n "checking for DIRNAME... " >&6; }
7115          if test ! -x "$tool_specified"; then
7116            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7117$as_echo "not found" >&6; }
7118            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7119          fi
7120          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7121$as_echo "$tool_specified" >&6; }
7122        fi
7123      fi
7124    fi
7125
7126  fi
7127
7128
7129
7130  if test "x$DIRNAME" = x; then
7131    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7132  fi
7133
7134
7135
7136
7137
7138  # Publish this variable in the help.
7139
7140
7141  if [ -z "${ECHO+x}" ]; then
7142    # The variable is not set by user, try to locate tool using the code snippet
7143    for ac_prog in echo
7144do
7145  # Extract the first word of "$ac_prog", so it can be a program name with args.
7146set dummy $ac_prog; ac_word=$2
7147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7148$as_echo_n "checking for $ac_word... " >&6; }
7149if ${ac_cv_path_ECHO+:} false; then :
7150  $as_echo_n "(cached) " >&6
7151else
7152  case $ECHO in
7153  [\\/]* | ?:[\\/]*)
7154  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7155  ;;
7156  *)
7157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7158for as_dir in $PATH
7159do
7160  IFS=$as_save_IFS
7161  test -z "$as_dir" && as_dir=.
7162    for ac_exec_ext in '' $ac_executable_extensions; do
7163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7164    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7166    break 2
7167  fi
7168done
7169  done
7170IFS=$as_save_IFS
7171
7172  ;;
7173esac
7174fi
7175ECHO=$ac_cv_path_ECHO
7176if test -n "$ECHO"; then
7177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7178$as_echo "$ECHO" >&6; }
7179else
7180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7181$as_echo "no" >&6; }
7182fi
7183
7184
7185  test -n "$ECHO" && break
7186done
7187
7188  else
7189    # The variable is set, but is it from the command line or the environment?
7190
7191    # Try to remove the string !ECHO! from our list.
7192    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7193    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7194      # If it failed, the variable was not from the command line. Ignore it,
7195      # but warn the user (except for BASH, which is always set by the calling BASH).
7196      if test "xECHO" != xBASH; then
7197        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7198$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7199      fi
7200      # Try to locate tool using the code snippet
7201      for ac_prog in echo
7202do
7203  # Extract the first word of "$ac_prog", so it can be a program name with args.
7204set dummy $ac_prog; ac_word=$2
7205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7206$as_echo_n "checking for $ac_word... " >&6; }
7207if ${ac_cv_path_ECHO+:} false; then :
7208  $as_echo_n "(cached) " >&6
7209else
7210  case $ECHO in
7211  [\\/]* | ?:[\\/]*)
7212  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7213  ;;
7214  *)
7215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7216for as_dir in $PATH
7217do
7218  IFS=$as_save_IFS
7219  test -z "$as_dir" && as_dir=.
7220    for ac_exec_ext in '' $ac_executable_extensions; do
7221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7222    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7224    break 2
7225  fi
7226done
7227  done
7228IFS=$as_save_IFS
7229
7230  ;;
7231esac
7232fi
7233ECHO=$ac_cv_path_ECHO
7234if test -n "$ECHO"; then
7235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7236$as_echo "$ECHO" >&6; }
7237else
7238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7239$as_echo "no" >&6; }
7240fi
7241
7242
7243  test -n "$ECHO" && break
7244done
7245
7246    else
7247      # If it succeeded, then it was overridden by the user. We will use it
7248      # for the tool.
7249
7250      # First remove it from the list of overridden variables, so we can test
7251      # for unknown variables in the end.
7252      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7253
7254      # Check if we try to supply an empty value
7255      if test "x$ECHO" = x; then
7256        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7257$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7259$as_echo_n "checking for ECHO... " >&6; }
7260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7261$as_echo "disabled" >&6; }
7262      else
7263        # Check if the provided tool contains a complete path.
7264        tool_specified="$ECHO"
7265        tool_basename="${tool_specified##*/}"
7266        if test "x$tool_basename" = "x$tool_specified"; then
7267          # A command without a complete path is provided, search $PATH.
7268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7269$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7270          # Extract the first word of "$tool_basename", so it can be a program name with args.
7271set dummy $tool_basename; ac_word=$2
7272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7273$as_echo_n "checking for $ac_word... " >&6; }
7274if ${ac_cv_path_ECHO+:} false; then :
7275  $as_echo_n "(cached) " >&6
7276else
7277  case $ECHO in
7278  [\\/]* | ?:[\\/]*)
7279  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7280  ;;
7281  *)
7282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7283for as_dir in $PATH
7284do
7285  IFS=$as_save_IFS
7286  test -z "$as_dir" && as_dir=.
7287    for ac_exec_ext in '' $ac_executable_extensions; do
7288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7289    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7291    break 2
7292  fi
7293done
7294  done
7295IFS=$as_save_IFS
7296
7297  ;;
7298esac
7299fi
7300ECHO=$ac_cv_path_ECHO
7301if test -n "$ECHO"; then
7302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7303$as_echo "$ECHO" >&6; }
7304else
7305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7306$as_echo "no" >&6; }
7307fi
7308
7309
7310          if test "x$ECHO" = x; then
7311            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7312          fi
7313        else
7314          # Otherwise we believe it is a complete path. Use it as it is.
7315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7316$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7317          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7318$as_echo_n "checking for ECHO... " >&6; }
7319          if test ! -x "$tool_specified"; then
7320            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7321$as_echo "not found" >&6; }
7322            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7323          fi
7324          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7325$as_echo "$tool_specified" >&6; }
7326        fi
7327      fi
7328    fi
7329
7330  fi
7331
7332
7333
7334  if test "x$ECHO" = x; then
7335    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7336  fi
7337
7338
7339
7340
7341
7342  # Publish this variable in the help.
7343
7344
7345  if [ -z "${EXPR+x}" ]; then
7346    # The variable is not set by user, try to locate tool using the code snippet
7347    for ac_prog in expr
7348do
7349  # Extract the first word of "$ac_prog", so it can be a program name with args.
7350set dummy $ac_prog; ac_word=$2
7351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7352$as_echo_n "checking for $ac_word... " >&6; }
7353if ${ac_cv_path_EXPR+:} false; then :
7354  $as_echo_n "(cached) " >&6
7355else
7356  case $EXPR in
7357  [\\/]* | ?:[\\/]*)
7358  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7359  ;;
7360  *)
7361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7362for as_dir in $PATH
7363do
7364  IFS=$as_save_IFS
7365  test -z "$as_dir" && as_dir=.
7366    for ac_exec_ext in '' $ac_executable_extensions; do
7367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7368    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7370    break 2
7371  fi
7372done
7373  done
7374IFS=$as_save_IFS
7375
7376  ;;
7377esac
7378fi
7379EXPR=$ac_cv_path_EXPR
7380if test -n "$EXPR"; then
7381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7382$as_echo "$EXPR" >&6; }
7383else
7384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7385$as_echo "no" >&6; }
7386fi
7387
7388
7389  test -n "$EXPR" && break
7390done
7391
7392  else
7393    # The variable is set, but is it from the command line or the environment?
7394
7395    # Try to remove the string !EXPR! from our list.
7396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7398      # If it failed, the variable was not from the command line. Ignore it,
7399      # but warn the user (except for BASH, which is always set by the calling BASH).
7400      if test "xEXPR" != xBASH; then
7401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7402$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7403      fi
7404      # Try to locate tool using the code snippet
7405      for ac_prog in expr
7406do
7407  # Extract the first word of "$ac_prog", so it can be a program name with args.
7408set dummy $ac_prog; ac_word=$2
7409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7410$as_echo_n "checking for $ac_word... " >&6; }
7411if ${ac_cv_path_EXPR+:} false; then :
7412  $as_echo_n "(cached) " >&6
7413else
7414  case $EXPR in
7415  [\\/]* | ?:[\\/]*)
7416  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7417  ;;
7418  *)
7419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7420for as_dir in $PATH
7421do
7422  IFS=$as_save_IFS
7423  test -z "$as_dir" && as_dir=.
7424    for ac_exec_ext in '' $ac_executable_extensions; do
7425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7426    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7428    break 2
7429  fi
7430done
7431  done
7432IFS=$as_save_IFS
7433
7434  ;;
7435esac
7436fi
7437EXPR=$ac_cv_path_EXPR
7438if test -n "$EXPR"; then
7439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7440$as_echo "$EXPR" >&6; }
7441else
7442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7443$as_echo "no" >&6; }
7444fi
7445
7446
7447  test -n "$EXPR" && break
7448done
7449
7450    else
7451      # If it succeeded, then it was overridden by the user. We will use it
7452      # for the tool.
7453
7454      # First remove it from the list of overridden variables, so we can test
7455      # for unknown variables in the end.
7456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7457
7458      # Check if we try to supply an empty value
7459      if test "x$EXPR" = x; then
7460        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7461$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7463$as_echo_n "checking for EXPR... " >&6; }
7464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7465$as_echo "disabled" >&6; }
7466      else
7467        # Check if the provided tool contains a complete path.
7468        tool_specified="$EXPR"
7469        tool_basename="${tool_specified##*/}"
7470        if test "x$tool_basename" = "x$tool_specified"; then
7471          # A command without a complete path is provided, search $PATH.
7472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7473$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7474          # Extract the first word of "$tool_basename", so it can be a program name with args.
7475set dummy $tool_basename; ac_word=$2
7476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7477$as_echo_n "checking for $ac_word... " >&6; }
7478if ${ac_cv_path_EXPR+:} false; then :
7479  $as_echo_n "(cached) " >&6
7480else
7481  case $EXPR in
7482  [\\/]* | ?:[\\/]*)
7483  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7484  ;;
7485  *)
7486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7487for as_dir in $PATH
7488do
7489  IFS=$as_save_IFS
7490  test -z "$as_dir" && as_dir=.
7491    for ac_exec_ext in '' $ac_executable_extensions; do
7492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7493    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7495    break 2
7496  fi
7497done
7498  done
7499IFS=$as_save_IFS
7500
7501  ;;
7502esac
7503fi
7504EXPR=$ac_cv_path_EXPR
7505if test -n "$EXPR"; then
7506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7507$as_echo "$EXPR" >&6; }
7508else
7509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7510$as_echo "no" >&6; }
7511fi
7512
7513
7514          if test "x$EXPR" = x; then
7515            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7516          fi
7517        else
7518          # Otherwise we believe it is a complete path. Use it as it is.
7519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7520$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7522$as_echo_n "checking for EXPR... " >&6; }
7523          if test ! -x "$tool_specified"; then
7524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7525$as_echo "not found" >&6; }
7526            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7527          fi
7528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7529$as_echo "$tool_specified" >&6; }
7530        fi
7531      fi
7532    fi
7533
7534  fi
7535
7536
7537
7538  if test "x$EXPR" = x; then
7539    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7540  fi
7541
7542
7543
7544
7545
7546  # Publish this variable in the help.
7547
7548
7549  if [ -z "${FILE+x}" ]; then
7550    # The variable is not set by user, try to locate tool using the code snippet
7551    for ac_prog in file
7552do
7553  # Extract the first word of "$ac_prog", so it can be a program name with args.
7554set dummy $ac_prog; ac_word=$2
7555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7556$as_echo_n "checking for $ac_word... " >&6; }
7557if ${ac_cv_path_FILE+:} false; then :
7558  $as_echo_n "(cached) " >&6
7559else
7560  case $FILE in
7561  [\\/]* | ?:[\\/]*)
7562  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7563  ;;
7564  *)
7565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7566for as_dir in $PATH
7567do
7568  IFS=$as_save_IFS
7569  test -z "$as_dir" && as_dir=.
7570    for ac_exec_ext in '' $ac_executable_extensions; do
7571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7572    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7574    break 2
7575  fi
7576done
7577  done
7578IFS=$as_save_IFS
7579
7580  ;;
7581esac
7582fi
7583FILE=$ac_cv_path_FILE
7584if test -n "$FILE"; then
7585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7586$as_echo "$FILE" >&6; }
7587else
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7589$as_echo "no" >&6; }
7590fi
7591
7592
7593  test -n "$FILE" && break
7594done
7595
7596  else
7597    # The variable is set, but is it from the command line or the environment?
7598
7599    # Try to remove the string !FILE! from our list.
7600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7602      # If it failed, the variable was not from the command line. Ignore it,
7603      # but warn the user (except for BASH, which is always set by the calling BASH).
7604      if test "xFILE" != xBASH; then
7605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7606$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7607      fi
7608      # Try to locate tool using the code snippet
7609      for ac_prog in file
7610do
7611  # Extract the first word of "$ac_prog", so it can be a program name with args.
7612set dummy $ac_prog; ac_word=$2
7613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7614$as_echo_n "checking for $ac_word... " >&6; }
7615if ${ac_cv_path_FILE+:} false; then :
7616  $as_echo_n "(cached) " >&6
7617else
7618  case $FILE in
7619  [\\/]* | ?:[\\/]*)
7620  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7621  ;;
7622  *)
7623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7624for as_dir in $PATH
7625do
7626  IFS=$as_save_IFS
7627  test -z "$as_dir" && as_dir=.
7628    for ac_exec_ext in '' $ac_executable_extensions; do
7629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7630    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7632    break 2
7633  fi
7634done
7635  done
7636IFS=$as_save_IFS
7637
7638  ;;
7639esac
7640fi
7641FILE=$ac_cv_path_FILE
7642if test -n "$FILE"; then
7643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7644$as_echo "$FILE" >&6; }
7645else
7646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7647$as_echo "no" >&6; }
7648fi
7649
7650
7651  test -n "$FILE" && break
7652done
7653
7654    else
7655      # If it succeeded, then it was overridden by the user. We will use it
7656      # for the tool.
7657
7658      # First remove it from the list of overridden variables, so we can test
7659      # for unknown variables in the end.
7660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7661
7662      # Check if we try to supply an empty value
7663      if test "x$FILE" = x; then
7664        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7665$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7667$as_echo_n "checking for FILE... " >&6; }
7668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7669$as_echo "disabled" >&6; }
7670      else
7671        # Check if the provided tool contains a complete path.
7672        tool_specified="$FILE"
7673        tool_basename="${tool_specified##*/}"
7674        if test "x$tool_basename" = "x$tool_specified"; then
7675          # A command without a complete path is provided, search $PATH.
7676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7677$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7678          # Extract the first word of "$tool_basename", so it can be a program name with args.
7679set dummy $tool_basename; ac_word=$2
7680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7681$as_echo_n "checking for $ac_word... " >&6; }
7682if ${ac_cv_path_FILE+:} false; then :
7683  $as_echo_n "(cached) " >&6
7684else
7685  case $FILE in
7686  [\\/]* | ?:[\\/]*)
7687  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7688  ;;
7689  *)
7690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7691for as_dir in $PATH
7692do
7693  IFS=$as_save_IFS
7694  test -z "$as_dir" && as_dir=.
7695    for ac_exec_ext in '' $ac_executable_extensions; do
7696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7697    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7699    break 2
7700  fi
7701done
7702  done
7703IFS=$as_save_IFS
7704
7705  ;;
7706esac
7707fi
7708FILE=$ac_cv_path_FILE
7709if test -n "$FILE"; then
7710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7711$as_echo "$FILE" >&6; }
7712else
7713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7714$as_echo "no" >&6; }
7715fi
7716
7717
7718          if test "x$FILE" = x; then
7719            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7720          fi
7721        else
7722          # Otherwise we believe it is a complete path. Use it as it is.
7723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7724$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7725          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7726$as_echo_n "checking for FILE... " >&6; }
7727          if test ! -x "$tool_specified"; then
7728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7729$as_echo "not found" >&6; }
7730            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7731          fi
7732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7733$as_echo "$tool_specified" >&6; }
7734        fi
7735      fi
7736    fi
7737
7738  fi
7739
7740
7741
7742  if test "x$FILE" = x; then
7743    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7744  fi
7745
7746
7747
7748
7749
7750  # Publish this variable in the help.
7751
7752
7753  if [ -z "${FIND+x}" ]; then
7754    # The variable is not set by user, try to locate tool using the code snippet
7755    for ac_prog in find
7756do
7757  # Extract the first word of "$ac_prog", so it can be a program name with args.
7758set dummy $ac_prog; ac_word=$2
7759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7760$as_echo_n "checking for $ac_word... " >&6; }
7761if ${ac_cv_path_FIND+:} false; then :
7762  $as_echo_n "(cached) " >&6
7763else
7764  case $FIND in
7765  [\\/]* | ?:[\\/]*)
7766  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7767  ;;
7768  *)
7769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7770for as_dir in $PATH
7771do
7772  IFS=$as_save_IFS
7773  test -z "$as_dir" && as_dir=.
7774    for ac_exec_ext in '' $ac_executable_extensions; do
7775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7776    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7778    break 2
7779  fi
7780done
7781  done
7782IFS=$as_save_IFS
7783
7784  ;;
7785esac
7786fi
7787FIND=$ac_cv_path_FIND
7788if test -n "$FIND"; then
7789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7790$as_echo "$FIND" >&6; }
7791else
7792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7793$as_echo "no" >&6; }
7794fi
7795
7796
7797  test -n "$FIND" && break
7798done
7799
7800  else
7801    # The variable is set, but is it from the command line or the environment?
7802
7803    # Try to remove the string !FIND! from our list.
7804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7806      # If it failed, the variable was not from the command line. Ignore it,
7807      # but warn the user (except for BASH, which is always set by the calling BASH).
7808      if test "xFIND" != xBASH; then
7809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7810$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7811      fi
7812      # Try to locate tool using the code snippet
7813      for ac_prog in find
7814do
7815  # Extract the first word of "$ac_prog", so it can be a program name with args.
7816set dummy $ac_prog; ac_word=$2
7817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7818$as_echo_n "checking for $ac_word... " >&6; }
7819if ${ac_cv_path_FIND+:} false; then :
7820  $as_echo_n "(cached) " >&6
7821else
7822  case $FIND in
7823  [\\/]* | ?:[\\/]*)
7824  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7825  ;;
7826  *)
7827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7828for as_dir in $PATH
7829do
7830  IFS=$as_save_IFS
7831  test -z "$as_dir" && as_dir=.
7832    for ac_exec_ext in '' $ac_executable_extensions; do
7833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7834    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7836    break 2
7837  fi
7838done
7839  done
7840IFS=$as_save_IFS
7841
7842  ;;
7843esac
7844fi
7845FIND=$ac_cv_path_FIND
7846if test -n "$FIND"; then
7847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7848$as_echo "$FIND" >&6; }
7849else
7850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7851$as_echo "no" >&6; }
7852fi
7853
7854
7855  test -n "$FIND" && break
7856done
7857
7858    else
7859      # If it succeeded, then it was overridden by the user. We will use it
7860      # for the tool.
7861
7862      # First remove it from the list of overridden variables, so we can test
7863      # for unknown variables in the end.
7864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7865
7866      # Check if we try to supply an empty value
7867      if test "x$FIND" = x; then
7868        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7869$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7871$as_echo_n "checking for FIND... " >&6; }
7872        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7873$as_echo "disabled" >&6; }
7874      else
7875        # Check if the provided tool contains a complete path.
7876        tool_specified="$FIND"
7877        tool_basename="${tool_specified##*/}"
7878        if test "x$tool_basename" = "x$tool_specified"; then
7879          # A command without a complete path is provided, search $PATH.
7880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7881$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7882          # Extract the first word of "$tool_basename", so it can be a program name with args.
7883set dummy $tool_basename; ac_word=$2
7884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7885$as_echo_n "checking for $ac_word... " >&6; }
7886if ${ac_cv_path_FIND+:} false; then :
7887  $as_echo_n "(cached) " >&6
7888else
7889  case $FIND in
7890  [\\/]* | ?:[\\/]*)
7891  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7892  ;;
7893  *)
7894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7895for as_dir in $PATH
7896do
7897  IFS=$as_save_IFS
7898  test -z "$as_dir" && as_dir=.
7899    for ac_exec_ext in '' $ac_executable_extensions; do
7900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7901    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7903    break 2
7904  fi
7905done
7906  done
7907IFS=$as_save_IFS
7908
7909  ;;
7910esac
7911fi
7912FIND=$ac_cv_path_FIND
7913if test -n "$FIND"; then
7914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7915$as_echo "$FIND" >&6; }
7916else
7917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7918$as_echo "no" >&6; }
7919fi
7920
7921
7922          if test "x$FIND" = x; then
7923            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7924          fi
7925        else
7926          # Otherwise we believe it is a complete path. Use it as it is.
7927          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7928$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7929          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7930$as_echo_n "checking for FIND... " >&6; }
7931          if test ! -x "$tool_specified"; then
7932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7933$as_echo "not found" >&6; }
7934            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7935          fi
7936          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7937$as_echo "$tool_specified" >&6; }
7938        fi
7939      fi
7940    fi
7941
7942  fi
7943
7944
7945
7946  if test "x$FIND" = x; then
7947    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7948  fi
7949
7950
7951
7952
7953
7954  # Publish this variable in the help.
7955
7956
7957  if [ -z "${HEAD+x}" ]; then
7958    # The variable is not set by user, try to locate tool using the code snippet
7959    for ac_prog in head
7960do
7961  # Extract the first word of "$ac_prog", so it can be a program name with args.
7962set dummy $ac_prog; ac_word=$2
7963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7964$as_echo_n "checking for $ac_word... " >&6; }
7965if ${ac_cv_path_HEAD+:} false; then :
7966  $as_echo_n "(cached) " >&6
7967else
7968  case $HEAD in
7969  [\\/]* | ?:[\\/]*)
7970  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7971  ;;
7972  *)
7973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7974for as_dir in $PATH
7975do
7976  IFS=$as_save_IFS
7977  test -z "$as_dir" && as_dir=.
7978    for ac_exec_ext in '' $ac_executable_extensions; do
7979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7980    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7982    break 2
7983  fi
7984done
7985  done
7986IFS=$as_save_IFS
7987
7988  ;;
7989esac
7990fi
7991HEAD=$ac_cv_path_HEAD
7992if test -n "$HEAD"; then
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7994$as_echo "$HEAD" >&6; }
7995else
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7997$as_echo "no" >&6; }
7998fi
7999
8000
8001  test -n "$HEAD" && break
8002done
8003
8004  else
8005    # The variable is set, but is it from the command line or the environment?
8006
8007    # Try to remove the string !HEAD! from our list.
8008    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8009    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8010      # If it failed, the variable was not from the command line. Ignore it,
8011      # but warn the user (except for BASH, which is always set by the calling BASH).
8012      if test "xHEAD" != xBASH; then
8013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8014$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8015      fi
8016      # Try to locate tool using the code snippet
8017      for ac_prog in head
8018do
8019  # Extract the first word of "$ac_prog", so it can be a program name with args.
8020set dummy $ac_prog; ac_word=$2
8021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8022$as_echo_n "checking for $ac_word... " >&6; }
8023if ${ac_cv_path_HEAD+:} false; then :
8024  $as_echo_n "(cached) " >&6
8025else
8026  case $HEAD in
8027  [\\/]* | ?:[\\/]*)
8028  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8029  ;;
8030  *)
8031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8032for as_dir in $PATH
8033do
8034  IFS=$as_save_IFS
8035  test -z "$as_dir" && as_dir=.
8036    for ac_exec_ext in '' $ac_executable_extensions; do
8037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8038    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8040    break 2
8041  fi
8042done
8043  done
8044IFS=$as_save_IFS
8045
8046  ;;
8047esac
8048fi
8049HEAD=$ac_cv_path_HEAD
8050if test -n "$HEAD"; then
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8052$as_echo "$HEAD" >&6; }
8053else
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055$as_echo "no" >&6; }
8056fi
8057
8058
8059  test -n "$HEAD" && break
8060done
8061
8062    else
8063      # If it succeeded, then it was overridden by the user. We will use it
8064      # for the tool.
8065
8066      # First remove it from the list of overridden variables, so we can test
8067      # for unknown variables in the end.
8068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8069
8070      # Check if we try to supply an empty value
8071      if test "x$HEAD" = x; then
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8073$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8074        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8075$as_echo_n "checking for HEAD... " >&6; }
8076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8077$as_echo "disabled" >&6; }
8078      else
8079        # Check if the provided tool contains a complete path.
8080        tool_specified="$HEAD"
8081        tool_basename="${tool_specified##*/}"
8082        if test "x$tool_basename" = "x$tool_specified"; then
8083          # A command without a complete path is provided, search $PATH.
8084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8085$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8086          # Extract the first word of "$tool_basename", so it can be a program name with args.
8087set dummy $tool_basename; ac_word=$2
8088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8089$as_echo_n "checking for $ac_word... " >&6; }
8090if ${ac_cv_path_HEAD+:} false; then :
8091  $as_echo_n "(cached) " >&6
8092else
8093  case $HEAD in
8094  [\\/]* | ?:[\\/]*)
8095  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8096  ;;
8097  *)
8098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8099for as_dir in $PATH
8100do
8101  IFS=$as_save_IFS
8102  test -z "$as_dir" && as_dir=.
8103    for ac_exec_ext in '' $ac_executable_extensions; do
8104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8105    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8107    break 2
8108  fi
8109done
8110  done
8111IFS=$as_save_IFS
8112
8113  ;;
8114esac
8115fi
8116HEAD=$ac_cv_path_HEAD
8117if test -n "$HEAD"; then
8118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8119$as_echo "$HEAD" >&6; }
8120else
8121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8122$as_echo "no" >&6; }
8123fi
8124
8125
8126          if test "x$HEAD" = x; then
8127            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8128          fi
8129        else
8130          # Otherwise we believe it is a complete path. Use it as it is.
8131          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8132$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8133          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8134$as_echo_n "checking for HEAD... " >&6; }
8135          if test ! -x "$tool_specified"; then
8136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8137$as_echo "not found" >&6; }
8138            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8139          fi
8140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8141$as_echo "$tool_specified" >&6; }
8142        fi
8143      fi
8144    fi
8145
8146  fi
8147
8148
8149
8150  if test "x$HEAD" = x; then
8151    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8152  fi
8153
8154
8155
8156
8157
8158  # Publish this variable in the help.
8159
8160
8161  if [ -z "${LN+x}" ]; then
8162    # The variable is not set by user, try to locate tool using the code snippet
8163    for ac_prog in ln
8164do
8165  # Extract the first word of "$ac_prog", so it can be a program name with args.
8166set dummy $ac_prog; ac_word=$2
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8168$as_echo_n "checking for $ac_word... " >&6; }
8169if ${ac_cv_path_LN+:} false; then :
8170  $as_echo_n "(cached) " >&6
8171else
8172  case $LN in
8173  [\\/]* | ?:[\\/]*)
8174  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8175  ;;
8176  *)
8177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8178for as_dir in $PATH
8179do
8180  IFS=$as_save_IFS
8181  test -z "$as_dir" && as_dir=.
8182    for ac_exec_ext in '' $ac_executable_extensions; do
8183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8184    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8186    break 2
8187  fi
8188done
8189  done
8190IFS=$as_save_IFS
8191
8192  ;;
8193esac
8194fi
8195LN=$ac_cv_path_LN
8196if test -n "$LN"; then
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8198$as_echo "$LN" >&6; }
8199else
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8201$as_echo "no" >&6; }
8202fi
8203
8204
8205  test -n "$LN" && break
8206done
8207
8208  else
8209    # The variable is set, but is it from the command line or the environment?
8210
8211    # Try to remove the string !LN! from our list.
8212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8214      # If it failed, the variable was not from the command line. Ignore it,
8215      # but warn the user (except for BASH, which is always set by the calling BASH).
8216      if test "xLN" != xBASH; then
8217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8218$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8219      fi
8220      # Try to locate tool using the code snippet
8221      for ac_prog in ln
8222do
8223  # Extract the first word of "$ac_prog", so it can be a program name with args.
8224set dummy $ac_prog; ac_word=$2
8225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8226$as_echo_n "checking for $ac_word... " >&6; }
8227if ${ac_cv_path_LN+:} false; then :
8228  $as_echo_n "(cached) " >&6
8229else
8230  case $LN in
8231  [\\/]* | ?:[\\/]*)
8232  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8233  ;;
8234  *)
8235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8236for as_dir in $PATH
8237do
8238  IFS=$as_save_IFS
8239  test -z "$as_dir" && as_dir=.
8240    for ac_exec_ext in '' $ac_executable_extensions; do
8241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8242    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8244    break 2
8245  fi
8246done
8247  done
8248IFS=$as_save_IFS
8249
8250  ;;
8251esac
8252fi
8253LN=$ac_cv_path_LN
8254if test -n "$LN"; then
8255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8256$as_echo "$LN" >&6; }
8257else
8258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8259$as_echo "no" >&6; }
8260fi
8261
8262
8263  test -n "$LN" && break
8264done
8265
8266    else
8267      # If it succeeded, then it was overridden by the user. We will use it
8268      # for the tool.
8269
8270      # First remove it from the list of overridden variables, so we can test
8271      # for unknown variables in the end.
8272      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8273
8274      # Check if we try to supply an empty value
8275      if test "x$LN" = x; then
8276        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8277$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8278        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8279$as_echo_n "checking for LN... " >&6; }
8280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8281$as_echo "disabled" >&6; }
8282      else
8283        # Check if the provided tool contains a complete path.
8284        tool_specified="$LN"
8285        tool_basename="${tool_specified##*/}"
8286        if test "x$tool_basename" = "x$tool_specified"; then
8287          # A command without a complete path is provided, search $PATH.
8288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8289$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8290          # Extract the first word of "$tool_basename", so it can be a program name with args.
8291set dummy $tool_basename; ac_word=$2
8292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8293$as_echo_n "checking for $ac_word... " >&6; }
8294if ${ac_cv_path_LN+:} false; then :
8295  $as_echo_n "(cached) " >&6
8296else
8297  case $LN in
8298  [\\/]* | ?:[\\/]*)
8299  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8300  ;;
8301  *)
8302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8303for as_dir in $PATH
8304do
8305  IFS=$as_save_IFS
8306  test -z "$as_dir" && as_dir=.
8307    for ac_exec_ext in '' $ac_executable_extensions; do
8308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8309    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8311    break 2
8312  fi
8313done
8314  done
8315IFS=$as_save_IFS
8316
8317  ;;
8318esac
8319fi
8320LN=$ac_cv_path_LN
8321if test -n "$LN"; then
8322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8323$as_echo "$LN" >&6; }
8324else
8325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8326$as_echo "no" >&6; }
8327fi
8328
8329
8330          if test "x$LN" = x; then
8331            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8332          fi
8333        else
8334          # Otherwise we believe it is a complete path. Use it as it is.
8335          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8336$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8337          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8338$as_echo_n "checking for LN... " >&6; }
8339          if test ! -x "$tool_specified"; then
8340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8341$as_echo "not found" >&6; }
8342            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8343          fi
8344          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8345$as_echo "$tool_specified" >&6; }
8346        fi
8347      fi
8348    fi
8349
8350  fi
8351
8352
8353
8354  if test "x$LN" = x; then
8355    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8356  fi
8357
8358
8359
8360
8361
8362  # Publish this variable in the help.
8363
8364
8365  if [ -z "${LS+x}" ]; then
8366    # The variable is not set by user, try to locate tool using the code snippet
8367    for ac_prog in ls
8368do
8369  # Extract the first word of "$ac_prog", so it can be a program name with args.
8370set dummy $ac_prog; ac_word=$2
8371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8372$as_echo_n "checking for $ac_word... " >&6; }
8373if ${ac_cv_path_LS+:} false; then :
8374  $as_echo_n "(cached) " >&6
8375else
8376  case $LS in
8377  [\\/]* | ?:[\\/]*)
8378  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8379  ;;
8380  *)
8381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8382for as_dir in $PATH
8383do
8384  IFS=$as_save_IFS
8385  test -z "$as_dir" && as_dir=.
8386    for ac_exec_ext in '' $ac_executable_extensions; do
8387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8388    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8390    break 2
8391  fi
8392done
8393  done
8394IFS=$as_save_IFS
8395
8396  ;;
8397esac
8398fi
8399LS=$ac_cv_path_LS
8400if test -n "$LS"; then
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8402$as_echo "$LS" >&6; }
8403else
8404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8405$as_echo "no" >&6; }
8406fi
8407
8408
8409  test -n "$LS" && break
8410done
8411
8412  else
8413    # The variable is set, but is it from the command line or the environment?
8414
8415    # Try to remove the string !LS! from our list.
8416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8418      # If it failed, the variable was not from the command line. Ignore it,
8419      # but warn the user (except for BASH, which is always set by the calling BASH).
8420      if test "xLS" != xBASH; then
8421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8422$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8423      fi
8424      # Try to locate tool using the code snippet
8425      for ac_prog in ls
8426do
8427  # Extract the first word of "$ac_prog", so it can be a program name with args.
8428set dummy $ac_prog; ac_word=$2
8429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8430$as_echo_n "checking for $ac_word... " >&6; }
8431if ${ac_cv_path_LS+:} false; then :
8432  $as_echo_n "(cached) " >&6
8433else
8434  case $LS in
8435  [\\/]* | ?:[\\/]*)
8436  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8437  ;;
8438  *)
8439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8440for as_dir in $PATH
8441do
8442  IFS=$as_save_IFS
8443  test -z "$as_dir" && as_dir=.
8444    for ac_exec_ext in '' $ac_executable_extensions; do
8445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8446    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8448    break 2
8449  fi
8450done
8451  done
8452IFS=$as_save_IFS
8453
8454  ;;
8455esac
8456fi
8457LS=$ac_cv_path_LS
8458if test -n "$LS"; then
8459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8460$as_echo "$LS" >&6; }
8461else
8462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8463$as_echo "no" >&6; }
8464fi
8465
8466
8467  test -n "$LS" && break
8468done
8469
8470    else
8471      # If it succeeded, then it was overridden by the user. We will use it
8472      # for the tool.
8473
8474      # First remove it from the list of overridden variables, so we can test
8475      # for unknown variables in the end.
8476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8477
8478      # Check if we try to supply an empty value
8479      if test "x$LS" = x; then
8480        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8481$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8483$as_echo_n "checking for LS... " >&6; }
8484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8485$as_echo "disabled" >&6; }
8486      else
8487        # Check if the provided tool contains a complete path.
8488        tool_specified="$LS"
8489        tool_basename="${tool_specified##*/}"
8490        if test "x$tool_basename" = "x$tool_specified"; then
8491          # A command without a complete path is provided, search $PATH.
8492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8493$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8494          # Extract the first word of "$tool_basename", so it can be a program name with args.
8495set dummy $tool_basename; ac_word=$2
8496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8497$as_echo_n "checking for $ac_word... " >&6; }
8498if ${ac_cv_path_LS+:} false; then :
8499  $as_echo_n "(cached) " >&6
8500else
8501  case $LS in
8502  [\\/]* | ?:[\\/]*)
8503  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8504  ;;
8505  *)
8506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8507for as_dir in $PATH
8508do
8509  IFS=$as_save_IFS
8510  test -z "$as_dir" && as_dir=.
8511    for ac_exec_ext in '' $ac_executable_extensions; do
8512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8513    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8515    break 2
8516  fi
8517done
8518  done
8519IFS=$as_save_IFS
8520
8521  ;;
8522esac
8523fi
8524LS=$ac_cv_path_LS
8525if test -n "$LS"; then
8526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8527$as_echo "$LS" >&6; }
8528else
8529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8530$as_echo "no" >&6; }
8531fi
8532
8533
8534          if test "x$LS" = x; then
8535            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8536          fi
8537        else
8538          # Otherwise we believe it is a complete path. Use it as it is.
8539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8540$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8541          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8542$as_echo_n "checking for LS... " >&6; }
8543          if test ! -x "$tool_specified"; then
8544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8545$as_echo "not found" >&6; }
8546            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8547          fi
8548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8549$as_echo "$tool_specified" >&6; }
8550        fi
8551      fi
8552    fi
8553
8554  fi
8555
8556
8557
8558  if test "x$LS" = x; then
8559    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8560  fi
8561
8562
8563
8564
8565
8566  # Publish this variable in the help.
8567
8568
8569  if [ -z "${MKDIR+x}" ]; then
8570    # The variable is not set by user, try to locate tool using the code snippet
8571    for ac_prog in mkdir
8572do
8573  # Extract the first word of "$ac_prog", so it can be a program name with args.
8574set dummy $ac_prog; ac_word=$2
8575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8576$as_echo_n "checking for $ac_word... " >&6; }
8577if ${ac_cv_path_MKDIR+:} false; then :
8578  $as_echo_n "(cached) " >&6
8579else
8580  case $MKDIR in
8581  [\\/]* | ?:[\\/]*)
8582  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8583  ;;
8584  *)
8585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8586for as_dir in $PATH
8587do
8588  IFS=$as_save_IFS
8589  test -z "$as_dir" && as_dir=.
8590    for ac_exec_ext in '' $ac_executable_extensions; do
8591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8592    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8594    break 2
8595  fi
8596done
8597  done
8598IFS=$as_save_IFS
8599
8600  ;;
8601esac
8602fi
8603MKDIR=$ac_cv_path_MKDIR
8604if test -n "$MKDIR"; then
8605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8606$as_echo "$MKDIR" >&6; }
8607else
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8609$as_echo "no" >&6; }
8610fi
8611
8612
8613  test -n "$MKDIR" && break
8614done
8615
8616  else
8617    # The variable is set, but is it from the command line or the environment?
8618
8619    # Try to remove the string !MKDIR! from our list.
8620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8622      # If it failed, the variable was not from the command line. Ignore it,
8623      # but warn the user (except for BASH, which is always set by the calling BASH).
8624      if test "xMKDIR" != xBASH; then
8625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8626$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8627      fi
8628      # Try to locate tool using the code snippet
8629      for ac_prog in mkdir
8630do
8631  # Extract the first word of "$ac_prog", so it can be a program name with args.
8632set dummy $ac_prog; ac_word=$2
8633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8634$as_echo_n "checking for $ac_word... " >&6; }
8635if ${ac_cv_path_MKDIR+:} false; then :
8636  $as_echo_n "(cached) " >&6
8637else
8638  case $MKDIR in
8639  [\\/]* | ?:[\\/]*)
8640  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8641  ;;
8642  *)
8643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8644for as_dir in $PATH
8645do
8646  IFS=$as_save_IFS
8647  test -z "$as_dir" && as_dir=.
8648    for ac_exec_ext in '' $ac_executable_extensions; do
8649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8650    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8652    break 2
8653  fi
8654done
8655  done
8656IFS=$as_save_IFS
8657
8658  ;;
8659esac
8660fi
8661MKDIR=$ac_cv_path_MKDIR
8662if test -n "$MKDIR"; then
8663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8664$as_echo "$MKDIR" >&6; }
8665else
8666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8667$as_echo "no" >&6; }
8668fi
8669
8670
8671  test -n "$MKDIR" && break
8672done
8673
8674    else
8675      # If it succeeded, then it was overridden by the user. We will use it
8676      # for the tool.
8677
8678      # First remove it from the list of overridden variables, so we can test
8679      # for unknown variables in the end.
8680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8681
8682      # Check if we try to supply an empty value
8683      if test "x$MKDIR" = x; then
8684        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8685$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8686        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8687$as_echo_n "checking for MKDIR... " >&6; }
8688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8689$as_echo "disabled" >&6; }
8690      else
8691        # Check if the provided tool contains a complete path.
8692        tool_specified="$MKDIR"
8693        tool_basename="${tool_specified##*/}"
8694        if test "x$tool_basename" = "x$tool_specified"; then
8695          # A command without a complete path is provided, search $PATH.
8696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8697$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8698          # Extract the first word of "$tool_basename", so it can be a program name with args.
8699set dummy $tool_basename; ac_word=$2
8700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8701$as_echo_n "checking for $ac_word... " >&6; }
8702if ${ac_cv_path_MKDIR+:} false; then :
8703  $as_echo_n "(cached) " >&6
8704else
8705  case $MKDIR in
8706  [\\/]* | ?:[\\/]*)
8707  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8708  ;;
8709  *)
8710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8711for as_dir in $PATH
8712do
8713  IFS=$as_save_IFS
8714  test -z "$as_dir" && as_dir=.
8715    for ac_exec_ext in '' $ac_executable_extensions; do
8716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8717    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8719    break 2
8720  fi
8721done
8722  done
8723IFS=$as_save_IFS
8724
8725  ;;
8726esac
8727fi
8728MKDIR=$ac_cv_path_MKDIR
8729if test -n "$MKDIR"; then
8730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8731$as_echo "$MKDIR" >&6; }
8732else
8733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8734$as_echo "no" >&6; }
8735fi
8736
8737
8738          if test "x$MKDIR" = x; then
8739            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8740          fi
8741        else
8742          # Otherwise we believe it is a complete path. Use it as it is.
8743          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8744$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8745          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8746$as_echo_n "checking for MKDIR... " >&6; }
8747          if test ! -x "$tool_specified"; then
8748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8749$as_echo "not found" >&6; }
8750            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8751          fi
8752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8753$as_echo "$tool_specified" >&6; }
8754        fi
8755      fi
8756    fi
8757
8758  fi
8759
8760
8761
8762  if test "x$MKDIR" = x; then
8763    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8764  fi
8765
8766
8767
8768
8769
8770  # Publish this variable in the help.
8771
8772
8773  if [ -z "${MKTEMP+x}" ]; then
8774    # The variable is not set by user, try to locate tool using the code snippet
8775    for ac_prog in mktemp
8776do
8777  # Extract the first word of "$ac_prog", so it can be a program name with args.
8778set dummy $ac_prog; ac_word=$2
8779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8780$as_echo_n "checking for $ac_word... " >&6; }
8781if ${ac_cv_path_MKTEMP+:} false; then :
8782  $as_echo_n "(cached) " >&6
8783else
8784  case $MKTEMP in
8785  [\\/]* | ?:[\\/]*)
8786  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8787  ;;
8788  *)
8789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8790for as_dir in $PATH
8791do
8792  IFS=$as_save_IFS
8793  test -z "$as_dir" && as_dir=.
8794    for ac_exec_ext in '' $ac_executable_extensions; do
8795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8796    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8798    break 2
8799  fi
8800done
8801  done
8802IFS=$as_save_IFS
8803
8804  ;;
8805esac
8806fi
8807MKTEMP=$ac_cv_path_MKTEMP
8808if test -n "$MKTEMP"; then
8809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8810$as_echo "$MKTEMP" >&6; }
8811else
8812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8813$as_echo "no" >&6; }
8814fi
8815
8816
8817  test -n "$MKTEMP" && break
8818done
8819
8820  else
8821    # The variable is set, but is it from the command line or the environment?
8822
8823    # Try to remove the string !MKTEMP! from our list.
8824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8826      # If it failed, the variable was not from the command line. Ignore it,
8827      # but warn the user (except for BASH, which is always set by the calling BASH).
8828      if test "xMKTEMP" != xBASH; then
8829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8830$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8831      fi
8832      # Try to locate tool using the code snippet
8833      for ac_prog in mktemp
8834do
8835  # Extract the first word of "$ac_prog", so it can be a program name with args.
8836set dummy $ac_prog; ac_word=$2
8837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8838$as_echo_n "checking for $ac_word... " >&6; }
8839if ${ac_cv_path_MKTEMP+:} false; then :
8840  $as_echo_n "(cached) " >&6
8841else
8842  case $MKTEMP in
8843  [\\/]* | ?:[\\/]*)
8844  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8845  ;;
8846  *)
8847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8848for as_dir in $PATH
8849do
8850  IFS=$as_save_IFS
8851  test -z "$as_dir" && as_dir=.
8852    for ac_exec_ext in '' $ac_executable_extensions; do
8853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8854    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8856    break 2
8857  fi
8858done
8859  done
8860IFS=$as_save_IFS
8861
8862  ;;
8863esac
8864fi
8865MKTEMP=$ac_cv_path_MKTEMP
8866if test -n "$MKTEMP"; then
8867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8868$as_echo "$MKTEMP" >&6; }
8869else
8870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8871$as_echo "no" >&6; }
8872fi
8873
8874
8875  test -n "$MKTEMP" && break
8876done
8877
8878    else
8879      # If it succeeded, then it was overridden by the user. We will use it
8880      # for the tool.
8881
8882      # First remove it from the list of overridden variables, so we can test
8883      # for unknown variables in the end.
8884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8885
8886      # Check if we try to supply an empty value
8887      if test "x$MKTEMP" = x; then
8888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8889$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8891$as_echo_n "checking for MKTEMP... " >&6; }
8892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8893$as_echo "disabled" >&6; }
8894      else
8895        # Check if the provided tool contains a complete path.
8896        tool_specified="$MKTEMP"
8897        tool_basename="${tool_specified##*/}"
8898        if test "x$tool_basename" = "x$tool_specified"; then
8899          # A command without a complete path is provided, search $PATH.
8900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8901$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8902          # Extract the first word of "$tool_basename", so it can be a program name with args.
8903set dummy $tool_basename; ac_word=$2
8904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8905$as_echo_n "checking for $ac_word... " >&6; }
8906if ${ac_cv_path_MKTEMP+:} false; then :
8907  $as_echo_n "(cached) " >&6
8908else
8909  case $MKTEMP in
8910  [\\/]* | ?:[\\/]*)
8911  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8912  ;;
8913  *)
8914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8915for as_dir in $PATH
8916do
8917  IFS=$as_save_IFS
8918  test -z "$as_dir" && as_dir=.
8919    for ac_exec_ext in '' $ac_executable_extensions; do
8920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8921    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8923    break 2
8924  fi
8925done
8926  done
8927IFS=$as_save_IFS
8928
8929  ;;
8930esac
8931fi
8932MKTEMP=$ac_cv_path_MKTEMP
8933if test -n "$MKTEMP"; then
8934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8935$as_echo "$MKTEMP" >&6; }
8936else
8937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8938$as_echo "no" >&6; }
8939fi
8940
8941
8942          if test "x$MKTEMP" = x; then
8943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8944          fi
8945        else
8946          # Otherwise we believe it is a complete path. Use it as it is.
8947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8948$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8950$as_echo_n "checking for MKTEMP... " >&6; }
8951          if test ! -x "$tool_specified"; then
8952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8953$as_echo "not found" >&6; }
8954            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8955          fi
8956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8957$as_echo "$tool_specified" >&6; }
8958        fi
8959      fi
8960    fi
8961
8962  fi
8963
8964
8965
8966  if test "x$MKTEMP" = x; then
8967    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8968  fi
8969
8970
8971
8972
8973
8974  # Publish this variable in the help.
8975
8976
8977  if [ -z "${MV+x}" ]; then
8978    # The variable is not set by user, try to locate tool using the code snippet
8979    for ac_prog in mv
8980do
8981  # Extract the first word of "$ac_prog", so it can be a program name with args.
8982set dummy $ac_prog; ac_word=$2
8983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984$as_echo_n "checking for $ac_word... " >&6; }
8985if ${ac_cv_path_MV+:} false; then :
8986  $as_echo_n "(cached) " >&6
8987else
8988  case $MV in
8989  [\\/]* | ?:[\\/]*)
8990  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8991  ;;
8992  *)
8993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994for as_dir in $PATH
8995do
8996  IFS=$as_save_IFS
8997  test -z "$as_dir" && as_dir=.
8998    for ac_exec_ext in '' $ac_executable_extensions; do
8999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9000    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9002    break 2
9003  fi
9004done
9005  done
9006IFS=$as_save_IFS
9007
9008  ;;
9009esac
9010fi
9011MV=$ac_cv_path_MV
9012if test -n "$MV"; then
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9014$as_echo "$MV" >&6; }
9015else
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
9018fi
9019
9020
9021  test -n "$MV" && break
9022done
9023
9024  else
9025    # The variable is set, but is it from the command line or the environment?
9026
9027    # Try to remove the string !MV! from our list.
9028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9030      # If it failed, the variable was not from the command line. Ignore it,
9031      # but warn the user (except for BASH, which is always set by the calling BASH).
9032      if test "xMV" != xBASH; then
9033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9034$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9035      fi
9036      # Try to locate tool using the code snippet
9037      for ac_prog in mv
9038do
9039  # Extract the first word of "$ac_prog", so it can be a program name with args.
9040set dummy $ac_prog; ac_word=$2
9041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9042$as_echo_n "checking for $ac_word... " >&6; }
9043if ${ac_cv_path_MV+:} false; then :
9044  $as_echo_n "(cached) " >&6
9045else
9046  case $MV in
9047  [\\/]* | ?:[\\/]*)
9048  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9049  ;;
9050  *)
9051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9052for as_dir in $PATH
9053do
9054  IFS=$as_save_IFS
9055  test -z "$as_dir" && as_dir=.
9056    for ac_exec_ext in '' $ac_executable_extensions; do
9057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9058    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9060    break 2
9061  fi
9062done
9063  done
9064IFS=$as_save_IFS
9065
9066  ;;
9067esac
9068fi
9069MV=$ac_cv_path_MV
9070if test -n "$MV"; then
9071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9072$as_echo "$MV" >&6; }
9073else
9074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075$as_echo "no" >&6; }
9076fi
9077
9078
9079  test -n "$MV" && break
9080done
9081
9082    else
9083      # If it succeeded, then it was overridden by the user. We will use it
9084      # for the tool.
9085
9086      # First remove it from the list of overridden variables, so we can test
9087      # for unknown variables in the end.
9088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9089
9090      # Check if we try to supply an empty value
9091      if test "x$MV" = x; then
9092        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9093$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9095$as_echo_n "checking for MV... " >&6; }
9096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9097$as_echo "disabled" >&6; }
9098      else
9099        # Check if the provided tool contains a complete path.
9100        tool_specified="$MV"
9101        tool_basename="${tool_specified##*/}"
9102        if test "x$tool_basename" = "x$tool_specified"; then
9103          # A command without a complete path is provided, search $PATH.
9104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9105$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9106          # Extract the first word of "$tool_basename", so it can be a program name with args.
9107set dummy $tool_basename; ac_word=$2
9108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9109$as_echo_n "checking for $ac_word... " >&6; }
9110if ${ac_cv_path_MV+:} false; then :
9111  $as_echo_n "(cached) " >&6
9112else
9113  case $MV in
9114  [\\/]* | ?:[\\/]*)
9115  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9116  ;;
9117  *)
9118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9119for as_dir in $PATH
9120do
9121  IFS=$as_save_IFS
9122  test -z "$as_dir" && as_dir=.
9123    for ac_exec_ext in '' $ac_executable_extensions; do
9124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9125    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9127    break 2
9128  fi
9129done
9130  done
9131IFS=$as_save_IFS
9132
9133  ;;
9134esac
9135fi
9136MV=$ac_cv_path_MV
9137if test -n "$MV"; then
9138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9139$as_echo "$MV" >&6; }
9140else
9141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9142$as_echo "no" >&6; }
9143fi
9144
9145
9146          if test "x$MV" = x; then
9147            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9148          fi
9149        else
9150          # Otherwise we believe it is a complete path. Use it as it is.
9151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9152$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9153          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9154$as_echo_n "checking for MV... " >&6; }
9155          if test ! -x "$tool_specified"; then
9156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9157$as_echo "not found" >&6; }
9158            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9159          fi
9160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9161$as_echo "$tool_specified" >&6; }
9162        fi
9163      fi
9164    fi
9165
9166  fi
9167
9168
9169
9170  if test "x$MV" = x; then
9171    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9172  fi
9173
9174
9175
9176
9177
9178  # Publish this variable in the help.
9179
9180
9181  if [ -z "${NAWK+x}" ]; then
9182    # The variable is not set by user, try to locate tool using the code snippet
9183    for ac_prog in nawk gawk awk
9184do
9185  # Extract the first word of "$ac_prog", so it can be a program name with args.
9186set dummy $ac_prog; ac_word=$2
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9188$as_echo_n "checking for $ac_word... " >&6; }
9189if ${ac_cv_path_NAWK+:} false; then :
9190  $as_echo_n "(cached) " >&6
9191else
9192  case $NAWK in
9193  [\\/]* | ?:[\\/]*)
9194  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9195  ;;
9196  *)
9197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9198for as_dir in $PATH
9199do
9200  IFS=$as_save_IFS
9201  test -z "$as_dir" && as_dir=.
9202    for ac_exec_ext in '' $ac_executable_extensions; do
9203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9204    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9206    break 2
9207  fi
9208done
9209  done
9210IFS=$as_save_IFS
9211
9212  ;;
9213esac
9214fi
9215NAWK=$ac_cv_path_NAWK
9216if test -n "$NAWK"; then
9217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9218$as_echo "$NAWK" >&6; }
9219else
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9221$as_echo "no" >&6; }
9222fi
9223
9224
9225  test -n "$NAWK" && break
9226done
9227
9228  else
9229    # The variable is set, but is it from the command line or the environment?
9230
9231    # Try to remove the string !NAWK! from our list.
9232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9234      # If it failed, the variable was not from the command line. Ignore it,
9235      # but warn the user (except for BASH, which is always set by the calling BASH).
9236      if test "xNAWK" != xBASH; then
9237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9238$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9239      fi
9240      # Try to locate tool using the code snippet
9241      for ac_prog in nawk gawk awk
9242do
9243  # Extract the first word of "$ac_prog", so it can be a program name with args.
9244set dummy $ac_prog; ac_word=$2
9245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9246$as_echo_n "checking for $ac_word... " >&6; }
9247if ${ac_cv_path_NAWK+:} false; then :
9248  $as_echo_n "(cached) " >&6
9249else
9250  case $NAWK in
9251  [\\/]* | ?:[\\/]*)
9252  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9253  ;;
9254  *)
9255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9256for as_dir in $PATH
9257do
9258  IFS=$as_save_IFS
9259  test -z "$as_dir" && as_dir=.
9260    for ac_exec_ext in '' $ac_executable_extensions; do
9261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9262    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9264    break 2
9265  fi
9266done
9267  done
9268IFS=$as_save_IFS
9269
9270  ;;
9271esac
9272fi
9273NAWK=$ac_cv_path_NAWK
9274if test -n "$NAWK"; then
9275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9276$as_echo "$NAWK" >&6; }
9277else
9278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9279$as_echo "no" >&6; }
9280fi
9281
9282
9283  test -n "$NAWK" && break
9284done
9285
9286    else
9287      # If it succeeded, then it was overridden by the user. We will use it
9288      # for the tool.
9289
9290      # First remove it from the list of overridden variables, so we can test
9291      # for unknown variables in the end.
9292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9293
9294      # Check if we try to supply an empty value
9295      if test "x$NAWK" = x; then
9296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9297$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9299$as_echo_n "checking for NAWK... " >&6; }
9300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9301$as_echo "disabled" >&6; }
9302      else
9303        # Check if the provided tool contains a complete path.
9304        tool_specified="$NAWK"
9305        tool_basename="${tool_specified##*/}"
9306        if test "x$tool_basename" = "x$tool_specified"; then
9307          # A command without a complete path is provided, search $PATH.
9308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9309$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9310          # Extract the first word of "$tool_basename", so it can be a program name with args.
9311set dummy $tool_basename; ac_word=$2
9312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9313$as_echo_n "checking for $ac_word... " >&6; }
9314if ${ac_cv_path_NAWK+:} false; then :
9315  $as_echo_n "(cached) " >&6
9316else
9317  case $NAWK in
9318  [\\/]* | ?:[\\/]*)
9319  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9320  ;;
9321  *)
9322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9323for as_dir in $PATH
9324do
9325  IFS=$as_save_IFS
9326  test -z "$as_dir" && as_dir=.
9327    for ac_exec_ext in '' $ac_executable_extensions; do
9328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9329    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9331    break 2
9332  fi
9333done
9334  done
9335IFS=$as_save_IFS
9336
9337  ;;
9338esac
9339fi
9340NAWK=$ac_cv_path_NAWK
9341if test -n "$NAWK"; then
9342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9343$as_echo "$NAWK" >&6; }
9344else
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9346$as_echo "no" >&6; }
9347fi
9348
9349
9350          if test "x$NAWK" = x; then
9351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9352          fi
9353        else
9354          # Otherwise we believe it is a complete path. Use it as it is.
9355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9356$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9358$as_echo_n "checking for NAWK... " >&6; }
9359          if test ! -x "$tool_specified"; then
9360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9361$as_echo "not found" >&6; }
9362            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9363          fi
9364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9365$as_echo "$tool_specified" >&6; }
9366        fi
9367      fi
9368    fi
9369
9370  fi
9371
9372
9373
9374  if test "x$NAWK" = x; then
9375    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9376  fi
9377
9378
9379
9380
9381
9382  # Publish this variable in the help.
9383
9384
9385  if [ -z "${PRINTF+x}" ]; then
9386    # The variable is not set by user, try to locate tool using the code snippet
9387    for ac_prog in printf
9388do
9389  # Extract the first word of "$ac_prog", so it can be a program name with args.
9390set dummy $ac_prog; ac_word=$2
9391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9392$as_echo_n "checking for $ac_word... " >&6; }
9393if ${ac_cv_path_PRINTF+:} false; then :
9394  $as_echo_n "(cached) " >&6
9395else
9396  case $PRINTF in
9397  [\\/]* | ?:[\\/]*)
9398  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9399  ;;
9400  *)
9401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9402for as_dir in $PATH
9403do
9404  IFS=$as_save_IFS
9405  test -z "$as_dir" && as_dir=.
9406    for ac_exec_ext in '' $ac_executable_extensions; do
9407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9408    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9410    break 2
9411  fi
9412done
9413  done
9414IFS=$as_save_IFS
9415
9416  ;;
9417esac
9418fi
9419PRINTF=$ac_cv_path_PRINTF
9420if test -n "$PRINTF"; then
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9422$as_echo "$PRINTF" >&6; }
9423else
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425$as_echo "no" >&6; }
9426fi
9427
9428
9429  test -n "$PRINTF" && break
9430done
9431
9432  else
9433    # The variable is set, but is it from the command line or the environment?
9434
9435    # Try to remove the string !PRINTF! from our list.
9436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9438      # If it failed, the variable was not from the command line. Ignore it,
9439      # but warn the user (except for BASH, which is always set by the calling BASH).
9440      if test "xPRINTF" != xBASH; then
9441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9442$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9443      fi
9444      # Try to locate tool using the code snippet
9445      for ac_prog in printf
9446do
9447  # Extract the first word of "$ac_prog", so it can be a program name with args.
9448set dummy $ac_prog; ac_word=$2
9449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9450$as_echo_n "checking for $ac_word... " >&6; }
9451if ${ac_cv_path_PRINTF+:} false; then :
9452  $as_echo_n "(cached) " >&6
9453else
9454  case $PRINTF in
9455  [\\/]* | ?:[\\/]*)
9456  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9457  ;;
9458  *)
9459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9460for as_dir in $PATH
9461do
9462  IFS=$as_save_IFS
9463  test -z "$as_dir" && as_dir=.
9464    for ac_exec_ext in '' $ac_executable_extensions; do
9465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9466    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9468    break 2
9469  fi
9470done
9471  done
9472IFS=$as_save_IFS
9473
9474  ;;
9475esac
9476fi
9477PRINTF=$ac_cv_path_PRINTF
9478if test -n "$PRINTF"; then
9479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9480$as_echo "$PRINTF" >&6; }
9481else
9482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483$as_echo "no" >&6; }
9484fi
9485
9486
9487  test -n "$PRINTF" && break
9488done
9489
9490    else
9491      # If it succeeded, then it was overridden by the user. We will use it
9492      # for the tool.
9493
9494      # First remove it from the list of overridden variables, so we can test
9495      # for unknown variables in the end.
9496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9497
9498      # Check if we try to supply an empty value
9499      if test "x$PRINTF" = x; then
9500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9501$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9503$as_echo_n "checking for PRINTF... " >&6; }
9504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9505$as_echo "disabled" >&6; }
9506      else
9507        # Check if the provided tool contains a complete path.
9508        tool_specified="$PRINTF"
9509        tool_basename="${tool_specified##*/}"
9510        if test "x$tool_basename" = "x$tool_specified"; then
9511          # A command without a complete path is provided, search $PATH.
9512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9513$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9514          # Extract the first word of "$tool_basename", so it can be a program name with args.
9515set dummy $tool_basename; ac_word=$2
9516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9517$as_echo_n "checking for $ac_word... " >&6; }
9518if ${ac_cv_path_PRINTF+:} false; then :
9519  $as_echo_n "(cached) " >&6
9520else
9521  case $PRINTF in
9522  [\\/]* | ?:[\\/]*)
9523  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9524  ;;
9525  *)
9526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9527for as_dir in $PATH
9528do
9529  IFS=$as_save_IFS
9530  test -z "$as_dir" && as_dir=.
9531    for ac_exec_ext in '' $ac_executable_extensions; do
9532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9533    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9535    break 2
9536  fi
9537done
9538  done
9539IFS=$as_save_IFS
9540
9541  ;;
9542esac
9543fi
9544PRINTF=$ac_cv_path_PRINTF
9545if test -n "$PRINTF"; then
9546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9547$as_echo "$PRINTF" >&6; }
9548else
9549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9550$as_echo "no" >&6; }
9551fi
9552
9553
9554          if test "x$PRINTF" = x; then
9555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9556          fi
9557        else
9558          # Otherwise we believe it is a complete path. Use it as it is.
9559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9560$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9562$as_echo_n "checking for PRINTF... " >&6; }
9563          if test ! -x "$tool_specified"; then
9564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9565$as_echo "not found" >&6; }
9566            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9567          fi
9568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9569$as_echo "$tool_specified" >&6; }
9570        fi
9571      fi
9572    fi
9573
9574  fi
9575
9576
9577
9578  if test "x$PRINTF" = x; then
9579    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9580  fi
9581
9582
9583
9584
9585
9586  # Publish this variable in the help.
9587
9588
9589  if [ -z "${RM+x}" ]; then
9590    # The variable is not set by user, try to locate tool using the code snippet
9591    for ac_prog in rm
9592do
9593  # Extract the first word of "$ac_prog", so it can be a program name with args.
9594set dummy $ac_prog; ac_word=$2
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9596$as_echo_n "checking for $ac_word... " >&6; }
9597if ${ac_cv_path_RM+:} false; then :
9598  $as_echo_n "(cached) " >&6
9599else
9600  case $RM in
9601  [\\/]* | ?:[\\/]*)
9602  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9603  ;;
9604  *)
9605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9606for as_dir in $PATH
9607do
9608  IFS=$as_save_IFS
9609  test -z "$as_dir" && as_dir=.
9610    for ac_exec_ext in '' $ac_executable_extensions; do
9611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9612    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9614    break 2
9615  fi
9616done
9617  done
9618IFS=$as_save_IFS
9619
9620  ;;
9621esac
9622fi
9623RM=$ac_cv_path_RM
9624if test -n "$RM"; then
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9626$as_echo "$RM" >&6; }
9627else
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
9630fi
9631
9632
9633  test -n "$RM" && break
9634done
9635
9636  else
9637    # The variable is set, but is it from the command line or the environment?
9638
9639    # Try to remove the string !RM! from our list.
9640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9642      # If it failed, the variable was not from the command line. Ignore it,
9643      # but warn the user (except for BASH, which is always set by the calling BASH).
9644      if test "xRM" != xBASH; then
9645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9646$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9647      fi
9648      # Try to locate tool using the code snippet
9649      for ac_prog in rm
9650do
9651  # Extract the first word of "$ac_prog", so it can be a program name with args.
9652set dummy $ac_prog; ac_word=$2
9653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9654$as_echo_n "checking for $ac_word... " >&6; }
9655if ${ac_cv_path_RM+:} false; then :
9656  $as_echo_n "(cached) " >&6
9657else
9658  case $RM in
9659  [\\/]* | ?:[\\/]*)
9660  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9661  ;;
9662  *)
9663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9664for as_dir in $PATH
9665do
9666  IFS=$as_save_IFS
9667  test -z "$as_dir" && as_dir=.
9668    for ac_exec_ext in '' $ac_executable_extensions; do
9669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9670    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9672    break 2
9673  fi
9674done
9675  done
9676IFS=$as_save_IFS
9677
9678  ;;
9679esac
9680fi
9681RM=$ac_cv_path_RM
9682if test -n "$RM"; then
9683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9684$as_echo "$RM" >&6; }
9685else
9686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9687$as_echo "no" >&6; }
9688fi
9689
9690
9691  test -n "$RM" && break
9692done
9693
9694    else
9695      # If it succeeded, then it was overridden by the user. We will use it
9696      # for the tool.
9697
9698      # First remove it from the list of overridden variables, so we can test
9699      # for unknown variables in the end.
9700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9701
9702      # Check if we try to supply an empty value
9703      if test "x$RM" = x; then
9704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9705$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9707$as_echo_n "checking for RM... " >&6; }
9708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9709$as_echo "disabled" >&6; }
9710      else
9711        # Check if the provided tool contains a complete path.
9712        tool_specified="$RM"
9713        tool_basename="${tool_specified##*/}"
9714        if test "x$tool_basename" = "x$tool_specified"; then
9715          # A command without a complete path is provided, search $PATH.
9716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9717$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9718          # Extract the first word of "$tool_basename", so it can be a program name with args.
9719set dummy $tool_basename; ac_word=$2
9720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9721$as_echo_n "checking for $ac_word... " >&6; }
9722if ${ac_cv_path_RM+:} false; then :
9723  $as_echo_n "(cached) " >&6
9724else
9725  case $RM in
9726  [\\/]* | ?:[\\/]*)
9727  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9728  ;;
9729  *)
9730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9731for as_dir in $PATH
9732do
9733  IFS=$as_save_IFS
9734  test -z "$as_dir" && as_dir=.
9735    for ac_exec_ext in '' $ac_executable_extensions; do
9736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9737    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9739    break 2
9740  fi
9741done
9742  done
9743IFS=$as_save_IFS
9744
9745  ;;
9746esac
9747fi
9748RM=$ac_cv_path_RM
9749if test -n "$RM"; then
9750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9751$as_echo "$RM" >&6; }
9752else
9753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9754$as_echo "no" >&6; }
9755fi
9756
9757
9758          if test "x$RM" = x; then
9759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9760          fi
9761        else
9762          # Otherwise we believe it is a complete path. Use it as it is.
9763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9764$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9766$as_echo_n "checking for RM... " >&6; }
9767          if test ! -x "$tool_specified"; then
9768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9769$as_echo "not found" >&6; }
9770            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9771          fi
9772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9773$as_echo "$tool_specified" >&6; }
9774        fi
9775      fi
9776    fi
9777
9778  fi
9779
9780
9781
9782  if test "x$RM" = x; then
9783    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9784  fi
9785
9786
9787
9788
9789
9790  # Publish this variable in the help.
9791
9792
9793  if [ -z "${RMDIR+x}" ]; then
9794    # The variable is not set by user, try to locate tool using the code snippet
9795    for ac_prog in rmdir
9796do
9797  # Extract the first word of "$ac_prog", so it can be a program name with args.
9798set dummy $ac_prog; ac_word=$2
9799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9800$as_echo_n "checking for $ac_word... " >&6; }
9801if ${ac_cv_path_RMDIR+:} false; then :
9802  $as_echo_n "(cached) " >&6
9803else
9804  case $RMDIR in
9805  [\\/]* | ?:[\\/]*)
9806  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9807  ;;
9808  *)
9809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9810for as_dir in $PATH
9811do
9812  IFS=$as_save_IFS
9813  test -z "$as_dir" && as_dir=.
9814    for ac_exec_ext in '' $ac_executable_extensions; do
9815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9816    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9818    break 2
9819  fi
9820done
9821  done
9822IFS=$as_save_IFS
9823
9824  ;;
9825esac
9826fi
9827RMDIR=$ac_cv_path_RMDIR
9828if test -n "$RMDIR"; then
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9830$as_echo "$RMDIR" >&6; }
9831else
9832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9833$as_echo "no" >&6; }
9834fi
9835
9836
9837  test -n "$RMDIR" && break
9838done
9839
9840  else
9841    # The variable is set, but is it from the command line or the environment?
9842
9843    # Try to remove the string !RMDIR! from our list.
9844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9846      # If it failed, the variable was not from the command line. Ignore it,
9847      # but warn the user (except for BASH, which is always set by the calling BASH).
9848      if test "xRMDIR" != xBASH; then
9849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9850$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9851      fi
9852      # Try to locate tool using the code snippet
9853      for ac_prog in rmdir
9854do
9855  # Extract the first word of "$ac_prog", so it can be a program name with args.
9856set dummy $ac_prog; ac_word=$2
9857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9858$as_echo_n "checking for $ac_word... " >&6; }
9859if ${ac_cv_path_RMDIR+:} false; then :
9860  $as_echo_n "(cached) " >&6
9861else
9862  case $RMDIR in
9863  [\\/]* | ?:[\\/]*)
9864  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9865  ;;
9866  *)
9867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9868for as_dir in $PATH
9869do
9870  IFS=$as_save_IFS
9871  test -z "$as_dir" && as_dir=.
9872    for ac_exec_ext in '' $ac_executable_extensions; do
9873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9874    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9876    break 2
9877  fi
9878done
9879  done
9880IFS=$as_save_IFS
9881
9882  ;;
9883esac
9884fi
9885RMDIR=$ac_cv_path_RMDIR
9886if test -n "$RMDIR"; then
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9888$as_echo "$RMDIR" >&6; }
9889else
9890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9891$as_echo "no" >&6; }
9892fi
9893
9894
9895  test -n "$RMDIR" && break
9896done
9897
9898    else
9899      # If it succeeded, then it was overridden by the user. We will use it
9900      # for the tool.
9901
9902      # First remove it from the list of overridden variables, so we can test
9903      # for unknown variables in the end.
9904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9905
9906      # Check if we try to supply an empty value
9907      if test "x$RMDIR" = x; then
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9909$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9911$as_echo_n "checking for RMDIR... " >&6; }
9912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9913$as_echo "disabled" >&6; }
9914      else
9915        # Check if the provided tool contains a complete path.
9916        tool_specified="$RMDIR"
9917        tool_basename="${tool_specified##*/}"
9918        if test "x$tool_basename" = "x$tool_specified"; then
9919          # A command without a complete path is provided, search $PATH.
9920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9921$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9922          # Extract the first word of "$tool_basename", so it can be a program name with args.
9923set dummy $tool_basename; ac_word=$2
9924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9925$as_echo_n "checking for $ac_word... " >&6; }
9926if ${ac_cv_path_RMDIR+:} false; then :
9927  $as_echo_n "(cached) " >&6
9928else
9929  case $RMDIR in
9930  [\\/]* | ?:[\\/]*)
9931  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9932  ;;
9933  *)
9934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9935for as_dir in $PATH
9936do
9937  IFS=$as_save_IFS
9938  test -z "$as_dir" && as_dir=.
9939    for ac_exec_ext in '' $ac_executable_extensions; do
9940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9941    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9943    break 2
9944  fi
9945done
9946  done
9947IFS=$as_save_IFS
9948
9949  ;;
9950esac
9951fi
9952RMDIR=$ac_cv_path_RMDIR
9953if test -n "$RMDIR"; then
9954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9955$as_echo "$RMDIR" >&6; }
9956else
9957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9958$as_echo "no" >&6; }
9959fi
9960
9961
9962          if test "x$RMDIR" = x; then
9963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9964          fi
9965        else
9966          # Otherwise we believe it is a complete path. Use it as it is.
9967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9968$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9970$as_echo_n "checking for RMDIR... " >&6; }
9971          if test ! -x "$tool_specified"; then
9972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9973$as_echo "not found" >&6; }
9974            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9975          fi
9976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9977$as_echo "$tool_specified" >&6; }
9978        fi
9979      fi
9980    fi
9981
9982  fi
9983
9984
9985
9986  if test "x$RMDIR" = x; then
9987    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9988  fi
9989
9990
9991
9992
9993
9994  # Publish this variable in the help.
9995
9996
9997  if [ -z "${SH+x}" ]; then
9998    # The variable is not set by user, try to locate tool using the code snippet
9999    for ac_prog in sh
10000do
10001  # Extract the first word of "$ac_prog", so it can be a program name with args.
10002set dummy $ac_prog; ac_word=$2
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10004$as_echo_n "checking for $ac_word... " >&6; }
10005if ${ac_cv_path_SH+:} false; then :
10006  $as_echo_n "(cached) " >&6
10007else
10008  case $SH in
10009  [\\/]* | ?:[\\/]*)
10010  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10011  ;;
10012  *)
10013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10014for as_dir in $PATH
10015do
10016  IFS=$as_save_IFS
10017  test -z "$as_dir" && as_dir=.
10018    for ac_exec_ext in '' $ac_executable_extensions; do
10019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10020    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10022    break 2
10023  fi
10024done
10025  done
10026IFS=$as_save_IFS
10027
10028  ;;
10029esac
10030fi
10031SH=$ac_cv_path_SH
10032if test -n "$SH"; then
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10034$as_echo "$SH" >&6; }
10035else
10036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10037$as_echo "no" >&6; }
10038fi
10039
10040
10041  test -n "$SH" && break
10042done
10043
10044  else
10045    # The variable is set, but is it from the command line or the environment?
10046
10047    # Try to remove the string !SH! from our list.
10048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10050      # If it failed, the variable was not from the command line. Ignore it,
10051      # but warn the user (except for BASH, which is always set by the calling BASH).
10052      if test "xSH" != xBASH; then
10053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10054$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10055      fi
10056      # Try to locate tool using the code snippet
10057      for ac_prog in sh
10058do
10059  # Extract the first word of "$ac_prog", so it can be a program name with args.
10060set dummy $ac_prog; ac_word=$2
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10062$as_echo_n "checking for $ac_word... " >&6; }
10063if ${ac_cv_path_SH+:} false; then :
10064  $as_echo_n "(cached) " >&6
10065else
10066  case $SH in
10067  [\\/]* | ?:[\\/]*)
10068  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10069  ;;
10070  *)
10071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10072for as_dir in $PATH
10073do
10074  IFS=$as_save_IFS
10075  test -z "$as_dir" && as_dir=.
10076    for ac_exec_ext in '' $ac_executable_extensions; do
10077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10078    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10080    break 2
10081  fi
10082done
10083  done
10084IFS=$as_save_IFS
10085
10086  ;;
10087esac
10088fi
10089SH=$ac_cv_path_SH
10090if test -n "$SH"; then
10091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10092$as_echo "$SH" >&6; }
10093else
10094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095$as_echo "no" >&6; }
10096fi
10097
10098
10099  test -n "$SH" && break
10100done
10101
10102    else
10103      # If it succeeded, then it was overridden by the user. We will use it
10104      # for the tool.
10105
10106      # First remove it from the list of overridden variables, so we can test
10107      # for unknown variables in the end.
10108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10109
10110      # Check if we try to supply an empty value
10111      if test "x$SH" = x; then
10112        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10113$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10115$as_echo_n "checking for SH... " >&6; }
10116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10117$as_echo "disabled" >&6; }
10118      else
10119        # Check if the provided tool contains a complete path.
10120        tool_specified="$SH"
10121        tool_basename="${tool_specified##*/}"
10122        if test "x$tool_basename" = "x$tool_specified"; then
10123          # A command without a complete path is provided, search $PATH.
10124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10125$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10126          # Extract the first word of "$tool_basename", so it can be a program name with args.
10127set dummy $tool_basename; ac_word=$2
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10129$as_echo_n "checking for $ac_word... " >&6; }
10130if ${ac_cv_path_SH+:} false; then :
10131  $as_echo_n "(cached) " >&6
10132else
10133  case $SH in
10134  [\\/]* | ?:[\\/]*)
10135  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10136  ;;
10137  *)
10138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10139for as_dir in $PATH
10140do
10141  IFS=$as_save_IFS
10142  test -z "$as_dir" && as_dir=.
10143    for ac_exec_ext in '' $ac_executable_extensions; do
10144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10145    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10147    break 2
10148  fi
10149done
10150  done
10151IFS=$as_save_IFS
10152
10153  ;;
10154esac
10155fi
10156SH=$ac_cv_path_SH
10157if test -n "$SH"; then
10158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10159$as_echo "$SH" >&6; }
10160else
10161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10162$as_echo "no" >&6; }
10163fi
10164
10165
10166          if test "x$SH" = x; then
10167            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10168          fi
10169        else
10170          # Otherwise we believe it is a complete path. Use it as it is.
10171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10172$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10173          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10174$as_echo_n "checking for SH... " >&6; }
10175          if test ! -x "$tool_specified"; then
10176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10177$as_echo "not found" >&6; }
10178            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10179          fi
10180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10181$as_echo "$tool_specified" >&6; }
10182        fi
10183      fi
10184    fi
10185
10186  fi
10187
10188
10189
10190  if test "x$SH" = x; then
10191    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10192  fi
10193
10194
10195
10196
10197
10198  # Publish this variable in the help.
10199
10200
10201  if [ -z "${SORT+x}" ]; then
10202    # The variable is not set by user, try to locate tool using the code snippet
10203    for ac_prog in sort
10204do
10205  # Extract the first word of "$ac_prog", so it can be a program name with args.
10206set dummy $ac_prog; ac_word=$2
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10208$as_echo_n "checking for $ac_word... " >&6; }
10209if ${ac_cv_path_SORT+:} false; then :
10210  $as_echo_n "(cached) " >&6
10211else
10212  case $SORT in
10213  [\\/]* | ?:[\\/]*)
10214  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10215  ;;
10216  *)
10217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10218for as_dir in $PATH
10219do
10220  IFS=$as_save_IFS
10221  test -z "$as_dir" && as_dir=.
10222    for ac_exec_ext in '' $ac_executable_extensions; do
10223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10224    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10226    break 2
10227  fi
10228done
10229  done
10230IFS=$as_save_IFS
10231
10232  ;;
10233esac
10234fi
10235SORT=$ac_cv_path_SORT
10236if test -n "$SORT"; then
10237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10238$as_echo "$SORT" >&6; }
10239else
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10241$as_echo "no" >&6; }
10242fi
10243
10244
10245  test -n "$SORT" && break
10246done
10247
10248  else
10249    # The variable is set, but is it from the command line or the environment?
10250
10251    # Try to remove the string !SORT! from our list.
10252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10254      # If it failed, the variable was not from the command line. Ignore it,
10255      # but warn the user (except for BASH, which is always set by the calling BASH).
10256      if test "xSORT" != xBASH; then
10257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10258$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10259      fi
10260      # Try to locate tool using the code snippet
10261      for ac_prog in sort
10262do
10263  # Extract the first word of "$ac_prog", so it can be a program name with args.
10264set dummy $ac_prog; ac_word=$2
10265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10266$as_echo_n "checking for $ac_word... " >&6; }
10267if ${ac_cv_path_SORT+:} false; then :
10268  $as_echo_n "(cached) " >&6
10269else
10270  case $SORT in
10271  [\\/]* | ?:[\\/]*)
10272  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10273  ;;
10274  *)
10275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10276for as_dir in $PATH
10277do
10278  IFS=$as_save_IFS
10279  test -z "$as_dir" && as_dir=.
10280    for ac_exec_ext in '' $ac_executable_extensions; do
10281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10282    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10284    break 2
10285  fi
10286done
10287  done
10288IFS=$as_save_IFS
10289
10290  ;;
10291esac
10292fi
10293SORT=$ac_cv_path_SORT
10294if test -n "$SORT"; then
10295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10296$as_echo "$SORT" >&6; }
10297else
10298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10299$as_echo "no" >&6; }
10300fi
10301
10302
10303  test -n "$SORT" && break
10304done
10305
10306    else
10307      # If it succeeded, then it was overridden by the user. We will use it
10308      # for the tool.
10309
10310      # First remove it from the list of overridden variables, so we can test
10311      # for unknown variables in the end.
10312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10313
10314      # Check if we try to supply an empty value
10315      if test "x$SORT" = x; then
10316        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10317$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10319$as_echo_n "checking for SORT... " >&6; }
10320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10321$as_echo "disabled" >&6; }
10322      else
10323        # Check if the provided tool contains a complete path.
10324        tool_specified="$SORT"
10325        tool_basename="${tool_specified##*/}"
10326        if test "x$tool_basename" = "x$tool_specified"; then
10327          # A command without a complete path is provided, search $PATH.
10328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10329$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10330          # Extract the first word of "$tool_basename", so it can be a program name with args.
10331set dummy $tool_basename; ac_word=$2
10332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10333$as_echo_n "checking for $ac_word... " >&6; }
10334if ${ac_cv_path_SORT+:} false; then :
10335  $as_echo_n "(cached) " >&6
10336else
10337  case $SORT in
10338  [\\/]* | ?:[\\/]*)
10339  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10340  ;;
10341  *)
10342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10343for as_dir in $PATH
10344do
10345  IFS=$as_save_IFS
10346  test -z "$as_dir" && as_dir=.
10347    for ac_exec_ext in '' $ac_executable_extensions; do
10348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10349    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10351    break 2
10352  fi
10353done
10354  done
10355IFS=$as_save_IFS
10356
10357  ;;
10358esac
10359fi
10360SORT=$ac_cv_path_SORT
10361if test -n "$SORT"; then
10362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10363$as_echo "$SORT" >&6; }
10364else
10365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366$as_echo "no" >&6; }
10367fi
10368
10369
10370          if test "x$SORT" = x; then
10371            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10372          fi
10373        else
10374          # Otherwise we believe it is a complete path. Use it as it is.
10375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10376$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10378$as_echo_n "checking for SORT... " >&6; }
10379          if test ! -x "$tool_specified"; then
10380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10381$as_echo "not found" >&6; }
10382            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10383          fi
10384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10385$as_echo "$tool_specified" >&6; }
10386        fi
10387      fi
10388    fi
10389
10390  fi
10391
10392
10393
10394  if test "x$SORT" = x; then
10395    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10396  fi
10397
10398
10399
10400
10401
10402  # Publish this variable in the help.
10403
10404
10405  if [ -z "${TAIL+x}" ]; then
10406    # The variable is not set by user, try to locate tool using the code snippet
10407    for ac_prog in tail
10408do
10409  # Extract the first word of "$ac_prog", so it can be a program name with args.
10410set dummy $ac_prog; ac_word=$2
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10412$as_echo_n "checking for $ac_word... " >&6; }
10413if ${ac_cv_path_TAIL+:} false; then :
10414  $as_echo_n "(cached) " >&6
10415else
10416  case $TAIL in
10417  [\\/]* | ?:[\\/]*)
10418  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10419  ;;
10420  *)
10421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10422for as_dir in $PATH
10423do
10424  IFS=$as_save_IFS
10425  test -z "$as_dir" && as_dir=.
10426    for ac_exec_ext in '' $ac_executable_extensions; do
10427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10428    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10430    break 2
10431  fi
10432done
10433  done
10434IFS=$as_save_IFS
10435
10436  ;;
10437esac
10438fi
10439TAIL=$ac_cv_path_TAIL
10440if test -n "$TAIL"; then
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10442$as_echo "$TAIL" >&6; }
10443else
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
10446fi
10447
10448
10449  test -n "$TAIL" && break
10450done
10451
10452  else
10453    # The variable is set, but is it from the command line or the environment?
10454
10455    # Try to remove the string !TAIL! from our list.
10456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10458      # If it failed, the variable was not from the command line. Ignore it,
10459      # but warn the user (except for BASH, which is always set by the calling BASH).
10460      if test "xTAIL" != xBASH; then
10461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10462$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10463      fi
10464      # Try to locate tool using the code snippet
10465      for ac_prog in tail
10466do
10467  # Extract the first word of "$ac_prog", so it can be a program name with args.
10468set dummy $ac_prog; ac_word=$2
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10470$as_echo_n "checking for $ac_word... " >&6; }
10471if ${ac_cv_path_TAIL+:} false; then :
10472  $as_echo_n "(cached) " >&6
10473else
10474  case $TAIL in
10475  [\\/]* | ?:[\\/]*)
10476  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10477  ;;
10478  *)
10479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10480for as_dir in $PATH
10481do
10482  IFS=$as_save_IFS
10483  test -z "$as_dir" && as_dir=.
10484    for ac_exec_ext in '' $ac_executable_extensions; do
10485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10486    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10488    break 2
10489  fi
10490done
10491  done
10492IFS=$as_save_IFS
10493
10494  ;;
10495esac
10496fi
10497TAIL=$ac_cv_path_TAIL
10498if test -n "$TAIL"; then
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10500$as_echo "$TAIL" >&6; }
10501else
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10503$as_echo "no" >&6; }
10504fi
10505
10506
10507  test -n "$TAIL" && break
10508done
10509
10510    else
10511      # If it succeeded, then it was overridden by the user. We will use it
10512      # for the tool.
10513
10514      # First remove it from the list of overridden variables, so we can test
10515      # for unknown variables in the end.
10516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10517
10518      # Check if we try to supply an empty value
10519      if test "x$TAIL" = x; then
10520        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10521$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10523$as_echo_n "checking for TAIL... " >&6; }
10524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10525$as_echo "disabled" >&6; }
10526      else
10527        # Check if the provided tool contains a complete path.
10528        tool_specified="$TAIL"
10529        tool_basename="${tool_specified##*/}"
10530        if test "x$tool_basename" = "x$tool_specified"; then
10531          # A command without a complete path is provided, search $PATH.
10532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10533$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10534          # Extract the first word of "$tool_basename", so it can be a program name with args.
10535set dummy $tool_basename; ac_word=$2
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10537$as_echo_n "checking for $ac_word... " >&6; }
10538if ${ac_cv_path_TAIL+:} false; then :
10539  $as_echo_n "(cached) " >&6
10540else
10541  case $TAIL in
10542  [\\/]* | ?:[\\/]*)
10543  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10544  ;;
10545  *)
10546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10547for as_dir in $PATH
10548do
10549  IFS=$as_save_IFS
10550  test -z "$as_dir" && as_dir=.
10551    for ac_exec_ext in '' $ac_executable_extensions; do
10552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10553    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10555    break 2
10556  fi
10557done
10558  done
10559IFS=$as_save_IFS
10560
10561  ;;
10562esac
10563fi
10564TAIL=$ac_cv_path_TAIL
10565if test -n "$TAIL"; then
10566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10567$as_echo "$TAIL" >&6; }
10568else
10569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10570$as_echo "no" >&6; }
10571fi
10572
10573
10574          if test "x$TAIL" = x; then
10575            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10576          fi
10577        else
10578          # Otherwise we believe it is a complete path. Use it as it is.
10579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10580$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10581          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10582$as_echo_n "checking for TAIL... " >&6; }
10583          if test ! -x "$tool_specified"; then
10584            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10585$as_echo "not found" >&6; }
10586            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10587          fi
10588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10589$as_echo "$tool_specified" >&6; }
10590        fi
10591      fi
10592    fi
10593
10594  fi
10595
10596
10597
10598  if test "x$TAIL" = x; then
10599    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10600  fi
10601
10602
10603
10604
10605
10606  # Publish this variable in the help.
10607
10608
10609  if [ -z "${TAR+x}" ]; then
10610    # The variable is not set by user, try to locate tool using the code snippet
10611    for ac_prog in tar
10612do
10613  # Extract the first word of "$ac_prog", so it can be a program name with args.
10614set dummy $ac_prog; ac_word=$2
10615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10616$as_echo_n "checking for $ac_word... " >&6; }
10617if ${ac_cv_path_TAR+:} false; then :
10618  $as_echo_n "(cached) " >&6
10619else
10620  case $TAR in
10621  [\\/]* | ?:[\\/]*)
10622  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10623  ;;
10624  *)
10625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10626for as_dir in $PATH
10627do
10628  IFS=$as_save_IFS
10629  test -z "$as_dir" && as_dir=.
10630    for ac_exec_ext in '' $ac_executable_extensions; do
10631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10632    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10634    break 2
10635  fi
10636done
10637  done
10638IFS=$as_save_IFS
10639
10640  ;;
10641esac
10642fi
10643TAR=$ac_cv_path_TAR
10644if test -n "$TAR"; then
10645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10646$as_echo "$TAR" >&6; }
10647else
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10649$as_echo "no" >&6; }
10650fi
10651
10652
10653  test -n "$TAR" && break
10654done
10655
10656  else
10657    # The variable is set, but is it from the command line or the environment?
10658
10659    # Try to remove the string !TAR! from our list.
10660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10662      # If it failed, the variable was not from the command line. Ignore it,
10663      # but warn the user (except for BASH, which is always set by the calling BASH).
10664      if test "xTAR" != xBASH; then
10665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10666$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10667      fi
10668      # Try to locate tool using the code snippet
10669      for ac_prog in tar
10670do
10671  # Extract the first word of "$ac_prog", so it can be a program name with args.
10672set dummy $ac_prog; ac_word=$2
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10674$as_echo_n "checking for $ac_word... " >&6; }
10675if ${ac_cv_path_TAR+:} false; then :
10676  $as_echo_n "(cached) " >&6
10677else
10678  case $TAR in
10679  [\\/]* | ?:[\\/]*)
10680  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10681  ;;
10682  *)
10683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10684for as_dir in $PATH
10685do
10686  IFS=$as_save_IFS
10687  test -z "$as_dir" && as_dir=.
10688    for ac_exec_ext in '' $ac_executable_extensions; do
10689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10690    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10692    break 2
10693  fi
10694done
10695  done
10696IFS=$as_save_IFS
10697
10698  ;;
10699esac
10700fi
10701TAR=$ac_cv_path_TAR
10702if test -n "$TAR"; then
10703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10704$as_echo "$TAR" >&6; }
10705else
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10707$as_echo "no" >&6; }
10708fi
10709
10710
10711  test -n "$TAR" && break
10712done
10713
10714    else
10715      # If it succeeded, then it was overridden by the user. We will use it
10716      # for the tool.
10717
10718      # First remove it from the list of overridden variables, so we can test
10719      # for unknown variables in the end.
10720      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10721
10722      # Check if we try to supply an empty value
10723      if test "x$TAR" = x; then
10724        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10725$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10727$as_echo_n "checking for TAR... " >&6; }
10728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10729$as_echo "disabled" >&6; }
10730      else
10731        # Check if the provided tool contains a complete path.
10732        tool_specified="$TAR"
10733        tool_basename="${tool_specified##*/}"
10734        if test "x$tool_basename" = "x$tool_specified"; then
10735          # A command without a complete path is provided, search $PATH.
10736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10737$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10738          # Extract the first word of "$tool_basename", so it can be a program name with args.
10739set dummy $tool_basename; ac_word=$2
10740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10741$as_echo_n "checking for $ac_word... " >&6; }
10742if ${ac_cv_path_TAR+:} false; then :
10743  $as_echo_n "(cached) " >&6
10744else
10745  case $TAR in
10746  [\\/]* | ?:[\\/]*)
10747  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10748  ;;
10749  *)
10750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10751for as_dir in $PATH
10752do
10753  IFS=$as_save_IFS
10754  test -z "$as_dir" && as_dir=.
10755    for ac_exec_ext in '' $ac_executable_extensions; do
10756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10757    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10759    break 2
10760  fi
10761done
10762  done
10763IFS=$as_save_IFS
10764
10765  ;;
10766esac
10767fi
10768TAR=$ac_cv_path_TAR
10769if test -n "$TAR"; then
10770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10771$as_echo "$TAR" >&6; }
10772else
10773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10774$as_echo "no" >&6; }
10775fi
10776
10777
10778          if test "x$TAR" = x; then
10779            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10780          fi
10781        else
10782          # Otherwise we believe it is a complete path. Use it as it is.
10783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10784$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10785          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10786$as_echo_n "checking for TAR... " >&6; }
10787          if test ! -x "$tool_specified"; then
10788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10789$as_echo "not found" >&6; }
10790            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10791          fi
10792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10793$as_echo "$tool_specified" >&6; }
10794        fi
10795      fi
10796    fi
10797
10798  fi
10799
10800
10801
10802  if test "x$TAR" = x; then
10803    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10804  fi
10805
10806
10807
10808
10809
10810  # Publish this variable in the help.
10811
10812
10813  if [ -z "${TEE+x}" ]; then
10814    # The variable is not set by user, try to locate tool using the code snippet
10815    for ac_prog in tee
10816do
10817  # Extract the first word of "$ac_prog", so it can be a program name with args.
10818set dummy $ac_prog; ac_word=$2
10819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10820$as_echo_n "checking for $ac_word... " >&6; }
10821if ${ac_cv_path_TEE+:} false; then :
10822  $as_echo_n "(cached) " >&6
10823else
10824  case $TEE in
10825  [\\/]* | ?:[\\/]*)
10826  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10827  ;;
10828  *)
10829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830for as_dir in $PATH
10831do
10832  IFS=$as_save_IFS
10833  test -z "$as_dir" && as_dir=.
10834    for ac_exec_ext in '' $ac_executable_extensions; do
10835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838    break 2
10839  fi
10840done
10841  done
10842IFS=$as_save_IFS
10843
10844  ;;
10845esac
10846fi
10847TEE=$ac_cv_path_TEE
10848if test -n "$TEE"; then
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10850$as_echo "$TEE" >&6; }
10851else
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
10854fi
10855
10856
10857  test -n "$TEE" && break
10858done
10859
10860  else
10861    # The variable is set, but is it from the command line or the environment?
10862
10863    # Try to remove the string !TEE! from our list.
10864    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10865    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10866      # If it failed, the variable was not from the command line. Ignore it,
10867      # but warn the user (except for BASH, which is always set by the calling BASH).
10868      if test "xTEE" != xBASH; then
10869        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10870$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10871      fi
10872      # Try to locate tool using the code snippet
10873      for ac_prog in tee
10874do
10875  # Extract the first word of "$ac_prog", so it can be a program name with args.
10876set dummy $ac_prog; ac_word=$2
10877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10878$as_echo_n "checking for $ac_word... " >&6; }
10879if ${ac_cv_path_TEE+:} false; then :
10880  $as_echo_n "(cached) " >&6
10881else
10882  case $TEE in
10883  [\\/]* | ?:[\\/]*)
10884  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10885  ;;
10886  *)
10887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10888for as_dir in $PATH
10889do
10890  IFS=$as_save_IFS
10891  test -z "$as_dir" && as_dir=.
10892    for ac_exec_ext in '' $ac_executable_extensions; do
10893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10894    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10896    break 2
10897  fi
10898done
10899  done
10900IFS=$as_save_IFS
10901
10902  ;;
10903esac
10904fi
10905TEE=$ac_cv_path_TEE
10906if test -n "$TEE"; then
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10908$as_echo "$TEE" >&6; }
10909else
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911$as_echo "no" >&6; }
10912fi
10913
10914
10915  test -n "$TEE" && break
10916done
10917
10918    else
10919      # If it succeeded, then it was overridden by the user. We will use it
10920      # for the tool.
10921
10922      # First remove it from the list of overridden variables, so we can test
10923      # for unknown variables in the end.
10924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10925
10926      # Check if we try to supply an empty value
10927      if test "x$TEE" = x; then
10928        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10929$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10931$as_echo_n "checking for TEE... " >&6; }
10932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10933$as_echo "disabled" >&6; }
10934      else
10935        # Check if the provided tool contains a complete path.
10936        tool_specified="$TEE"
10937        tool_basename="${tool_specified##*/}"
10938        if test "x$tool_basename" = "x$tool_specified"; then
10939          # A command without a complete path is provided, search $PATH.
10940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10941$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10942          # Extract the first word of "$tool_basename", so it can be a program name with args.
10943set dummy $tool_basename; ac_word=$2
10944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10945$as_echo_n "checking for $ac_word... " >&6; }
10946if ${ac_cv_path_TEE+:} false; then :
10947  $as_echo_n "(cached) " >&6
10948else
10949  case $TEE in
10950  [\\/]* | ?:[\\/]*)
10951  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10952  ;;
10953  *)
10954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10955for as_dir in $PATH
10956do
10957  IFS=$as_save_IFS
10958  test -z "$as_dir" && as_dir=.
10959    for ac_exec_ext in '' $ac_executable_extensions; do
10960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10961    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10963    break 2
10964  fi
10965done
10966  done
10967IFS=$as_save_IFS
10968
10969  ;;
10970esac
10971fi
10972TEE=$ac_cv_path_TEE
10973if test -n "$TEE"; then
10974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10975$as_echo "$TEE" >&6; }
10976else
10977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978$as_echo "no" >&6; }
10979fi
10980
10981
10982          if test "x$TEE" = x; then
10983            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10984          fi
10985        else
10986          # Otherwise we believe it is a complete path. Use it as it is.
10987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10988$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10989          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10990$as_echo_n "checking for TEE... " >&6; }
10991          if test ! -x "$tool_specified"; then
10992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10993$as_echo "not found" >&6; }
10994            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10995          fi
10996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10997$as_echo "$tool_specified" >&6; }
10998        fi
10999      fi
11000    fi
11001
11002  fi
11003
11004
11005
11006  if test "x$TEE" = x; then
11007    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11008  fi
11009
11010
11011
11012
11013
11014  # Publish this variable in the help.
11015
11016
11017  if [ -z "${TOUCH+x}" ]; then
11018    # The variable is not set by user, try to locate tool using the code snippet
11019    for ac_prog in touch
11020do
11021  # Extract the first word of "$ac_prog", so it can be a program name with args.
11022set dummy $ac_prog; ac_word=$2
11023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11024$as_echo_n "checking for $ac_word... " >&6; }
11025if ${ac_cv_path_TOUCH+:} false; then :
11026  $as_echo_n "(cached) " >&6
11027else
11028  case $TOUCH in
11029  [\\/]* | ?:[\\/]*)
11030  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11031  ;;
11032  *)
11033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11034for as_dir in $PATH
11035do
11036  IFS=$as_save_IFS
11037  test -z "$as_dir" && as_dir=.
11038    for ac_exec_ext in '' $ac_executable_extensions; do
11039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11040    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11042    break 2
11043  fi
11044done
11045  done
11046IFS=$as_save_IFS
11047
11048  ;;
11049esac
11050fi
11051TOUCH=$ac_cv_path_TOUCH
11052if test -n "$TOUCH"; then
11053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11054$as_echo "$TOUCH" >&6; }
11055else
11056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11057$as_echo "no" >&6; }
11058fi
11059
11060
11061  test -n "$TOUCH" && break
11062done
11063
11064  else
11065    # The variable is set, but is it from the command line or the environment?
11066
11067    # Try to remove the string !TOUCH! from our list.
11068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11070      # If it failed, the variable was not from the command line. Ignore it,
11071      # but warn the user (except for BASH, which is always set by the calling BASH).
11072      if test "xTOUCH" != xBASH; then
11073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11074$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11075      fi
11076      # Try to locate tool using the code snippet
11077      for ac_prog in touch
11078do
11079  # Extract the first word of "$ac_prog", so it can be a program name with args.
11080set dummy $ac_prog; ac_word=$2
11081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11082$as_echo_n "checking for $ac_word... " >&6; }
11083if ${ac_cv_path_TOUCH+:} false; then :
11084  $as_echo_n "(cached) " >&6
11085else
11086  case $TOUCH in
11087  [\\/]* | ?:[\\/]*)
11088  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11089  ;;
11090  *)
11091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11092for as_dir in $PATH
11093do
11094  IFS=$as_save_IFS
11095  test -z "$as_dir" && as_dir=.
11096    for ac_exec_ext in '' $ac_executable_extensions; do
11097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11098    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11100    break 2
11101  fi
11102done
11103  done
11104IFS=$as_save_IFS
11105
11106  ;;
11107esac
11108fi
11109TOUCH=$ac_cv_path_TOUCH
11110if test -n "$TOUCH"; then
11111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11112$as_echo "$TOUCH" >&6; }
11113else
11114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11115$as_echo "no" >&6; }
11116fi
11117
11118
11119  test -n "$TOUCH" && break
11120done
11121
11122    else
11123      # If it succeeded, then it was overridden by the user. We will use it
11124      # for the tool.
11125
11126      # First remove it from the list of overridden variables, so we can test
11127      # for unknown variables in the end.
11128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11129
11130      # Check if we try to supply an empty value
11131      if test "x$TOUCH" = x; then
11132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11133$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11135$as_echo_n "checking for TOUCH... " >&6; }
11136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11137$as_echo "disabled" >&6; }
11138      else
11139        # Check if the provided tool contains a complete path.
11140        tool_specified="$TOUCH"
11141        tool_basename="${tool_specified##*/}"
11142        if test "x$tool_basename" = "x$tool_specified"; then
11143          # A command without a complete path is provided, search $PATH.
11144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11145$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11146          # Extract the first word of "$tool_basename", so it can be a program name with args.
11147set dummy $tool_basename; ac_word=$2
11148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11149$as_echo_n "checking for $ac_word... " >&6; }
11150if ${ac_cv_path_TOUCH+:} false; then :
11151  $as_echo_n "(cached) " >&6
11152else
11153  case $TOUCH in
11154  [\\/]* | ?:[\\/]*)
11155  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11156  ;;
11157  *)
11158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11159for as_dir in $PATH
11160do
11161  IFS=$as_save_IFS
11162  test -z "$as_dir" && as_dir=.
11163    for ac_exec_ext in '' $ac_executable_extensions; do
11164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11165    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11167    break 2
11168  fi
11169done
11170  done
11171IFS=$as_save_IFS
11172
11173  ;;
11174esac
11175fi
11176TOUCH=$ac_cv_path_TOUCH
11177if test -n "$TOUCH"; then
11178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11179$as_echo "$TOUCH" >&6; }
11180else
11181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11182$as_echo "no" >&6; }
11183fi
11184
11185
11186          if test "x$TOUCH" = x; then
11187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11188          fi
11189        else
11190          # Otherwise we believe it is a complete path. Use it as it is.
11191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11192$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11194$as_echo_n "checking for TOUCH... " >&6; }
11195          if test ! -x "$tool_specified"; then
11196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11197$as_echo "not found" >&6; }
11198            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11199          fi
11200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11201$as_echo "$tool_specified" >&6; }
11202        fi
11203      fi
11204    fi
11205
11206  fi
11207
11208
11209
11210  if test "x$TOUCH" = x; then
11211    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11212  fi
11213
11214
11215
11216
11217
11218  # Publish this variable in the help.
11219
11220
11221  if [ -z "${TR+x}" ]; then
11222    # The variable is not set by user, try to locate tool using the code snippet
11223    for ac_prog in tr
11224do
11225  # Extract the first word of "$ac_prog", so it can be a program name with args.
11226set dummy $ac_prog; ac_word=$2
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11228$as_echo_n "checking for $ac_word... " >&6; }
11229if ${ac_cv_path_TR+:} false; then :
11230  $as_echo_n "(cached) " >&6
11231else
11232  case $TR in
11233  [\\/]* | ?:[\\/]*)
11234  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11235  ;;
11236  *)
11237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11238for as_dir in $PATH
11239do
11240  IFS=$as_save_IFS
11241  test -z "$as_dir" && as_dir=.
11242    for ac_exec_ext in '' $ac_executable_extensions; do
11243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11244    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11246    break 2
11247  fi
11248done
11249  done
11250IFS=$as_save_IFS
11251
11252  ;;
11253esac
11254fi
11255TR=$ac_cv_path_TR
11256if test -n "$TR"; then
11257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11258$as_echo "$TR" >&6; }
11259else
11260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11261$as_echo "no" >&6; }
11262fi
11263
11264
11265  test -n "$TR" && break
11266done
11267
11268  else
11269    # The variable is set, but is it from the command line or the environment?
11270
11271    # Try to remove the string !TR! from our list.
11272    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11273    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11274      # If it failed, the variable was not from the command line. Ignore it,
11275      # but warn the user (except for BASH, which is always set by the calling BASH).
11276      if test "xTR" != xBASH; then
11277        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11278$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11279      fi
11280      # Try to locate tool using the code snippet
11281      for ac_prog in tr
11282do
11283  # Extract the first word of "$ac_prog", so it can be a program name with args.
11284set dummy $ac_prog; ac_word=$2
11285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11286$as_echo_n "checking for $ac_word... " >&6; }
11287if ${ac_cv_path_TR+:} false; then :
11288  $as_echo_n "(cached) " >&6
11289else
11290  case $TR in
11291  [\\/]* | ?:[\\/]*)
11292  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11293  ;;
11294  *)
11295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11296for as_dir in $PATH
11297do
11298  IFS=$as_save_IFS
11299  test -z "$as_dir" && as_dir=.
11300    for ac_exec_ext in '' $ac_executable_extensions; do
11301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11302    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11304    break 2
11305  fi
11306done
11307  done
11308IFS=$as_save_IFS
11309
11310  ;;
11311esac
11312fi
11313TR=$ac_cv_path_TR
11314if test -n "$TR"; then
11315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11316$as_echo "$TR" >&6; }
11317else
11318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11319$as_echo "no" >&6; }
11320fi
11321
11322
11323  test -n "$TR" && break
11324done
11325
11326    else
11327      # If it succeeded, then it was overridden by the user. We will use it
11328      # for the tool.
11329
11330      # First remove it from the list of overridden variables, so we can test
11331      # for unknown variables in the end.
11332      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11333
11334      # Check if we try to supply an empty value
11335      if test "x$TR" = x; then
11336        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11337$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11338        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11339$as_echo_n "checking for TR... " >&6; }
11340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11341$as_echo "disabled" >&6; }
11342      else
11343        # Check if the provided tool contains a complete path.
11344        tool_specified="$TR"
11345        tool_basename="${tool_specified##*/}"
11346        if test "x$tool_basename" = "x$tool_specified"; then
11347          # A command without a complete path is provided, search $PATH.
11348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11349$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11350          # Extract the first word of "$tool_basename", so it can be a program name with args.
11351set dummy $tool_basename; ac_word=$2
11352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11353$as_echo_n "checking for $ac_word... " >&6; }
11354if ${ac_cv_path_TR+:} false; then :
11355  $as_echo_n "(cached) " >&6
11356else
11357  case $TR in
11358  [\\/]* | ?:[\\/]*)
11359  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11360  ;;
11361  *)
11362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11363for as_dir in $PATH
11364do
11365  IFS=$as_save_IFS
11366  test -z "$as_dir" && as_dir=.
11367    for ac_exec_ext in '' $ac_executable_extensions; do
11368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11369    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11371    break 2
11372  fi
11373done
11374  done
11375IFS=$as_save_IFS
11376
11377  ;;
11378esac
11379fi
11380TR=$ac_cv_path_TR
11381if test -n "$TR"; then
11382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11383$as_echo "$TR" >&6; }
11384else
11385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11386$as_echo "no" >&6; }
11387fi
11388
11389
11390          if test "x$TR" = x; then
11391            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11392          fi
11393        else
11394          # Otherwise we believe it is a complete path. Use it as it is.
11395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11396$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11397          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11398$as_echo_n "checking for TR... " >&6; }
11399          if test ! -x "$tool_specified"; then
11400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11401$as_echo "not found" >&6; }
11402            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11403          fi
11404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11405$as_echo "$tool_specified" >&6; }
11406        fi
11407      fi
11408    fi
11409
11410  fi
11411
11412
11413
11414  if test "x$TR" = x; then
11415    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11416  fi
11417
11418
11419
11420
11421
11422  # Publish this variable in the help.
11423
11424
11425  if [ -z "${UNAME+x}" ]; then
11426    # The variable is not set by user, try to locate tool using the code snippet
11427    for ac_prog in uname
11428do
11429  # Extract the first word of "$ac_prog", so it can be a program name with args.
11430set dummy $ac_prog; ac_word=$2
11431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11432$as_echo_n "checking for $ac_word... " >&6; }
11433if ${ac_cv_path_UNAME+:} false; then :
11434  $as_echo_n "(cached) " >&6
11435else
11436  case $UNAME in
11437  [\\/]* | ?:[\\/]*)
11438  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11439  ;;
11440  *)
11441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11442for as_dir in $PATH
11443do
11444  IFS=$as_save_IFS
11445  test -z "$as_dir" && as_dir=.
11446    for ac_exec_ext in '' $ac_executable_extensions; do
11447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11448    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11450    break 2
11451  fi
11452done
11453  done
11454IFS=$as_save_IFS
11455
11456  ;;
11457esac
11458fi
11459UNAME=$ac_cv_path_UNAME
11460if test -n "$UNAME"; then
11461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11462$as_echo "$UNAME" >&6; }
11463else
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11465$as_echo "no" >&6; }
11466fi
11467
11468
11469  test -n "$UNAME" && break
11470done
11471
11472  else
11473    # The variable is set, but is it from the command line or the environment?
11474
11475    # Try to remove the string !UNAME! from our list.
11476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11478      # If it failed, the variable was not from the command line. Ignore it,
11479      # but warn the user (except for BASH, which is always set by the calling BASH).
11480      if test "xUNAME" != xBASH; then
11481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11482$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11483      fi
11484      # Try to locate tool using the code snippet
11485      for ac_prog in uname
11486do
11487  # Extract the first word of "$ac_prog", so it can be a program name with args.
11488set dummy $ac_prog; ac_word=$2
11489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11490$as_echo_n "checking for $ac_word... " >&6; }
11491if ${ac_cv_path_UNAME+:} false; then :
11492  $as_echo_n "(cached) " >&6
11493else
11494  case $UNAME in
11495  [\\/]* | ?:[\\/]*)
11496  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11497  ;;
11498  *)
11499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11500for as_dir in $PATH
11501do
11502  IFS=$as_save_IFS
11503  test -z "$as_dir" && as_dir=.
11504    for ac_exec_ext in '' $ac_executable_extensions; do
11505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11506    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11508    break 2
11509  fi
11510done
11511  done
11512IFS=$as_save_IFS
11513
11514  ;;
11515esac
11516fi
11517UNAME=$ac_cv_path_UNAME
11518if test -n "$UNAME"; then
11519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11520$as_echo "$UNAME" >&6; }
11521else
11522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11523$as_echo "no" >&6; }
11524fi
11525
11526
11527  test -n "$UNAME" && break
11528done
11529
11530    else
11531      # If it succeeded, then it was overridden by the user. We will use it
11532      # for the tool.
11533
11534      # First remove it from the list of overridden variables, so we can test
11535      # for unknown variables in the end.
11536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11537
11538      # Check if we try to supply an empty value
11539      if test "x$UNAME" = x; then
11540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11541$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11543$as_echo_n "checking for UNAME... " >&6; }
11544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11545$as_echo "disabled" >&6; }
11546      else
11547        # Check if the provided tool contains a complete path.
11548        tool_specified="$UNAME"
11549        tool_basename="${tool_specified##*/}"
11550        if test "x$tool_basename" = "x$tool_specified"; then
11551          # A command without a complete path is provided, search $PATH.
11552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11553$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11554          # Extract the first word of "$tool_basename", so it can be a program name with args.
11555set dummy $tool_basename; ac_word=$2
11556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11557$as_echo_n "checking for $ac_word... " >&6; }
11558if ${ac_cv_path_UNAME+:} false; then :
11559  $as_echo_n "(cached) " >&6
11560else
11561  case $UNAME in
11562  [\\/]* | ?:[\\/]*)
11563  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11564  ;;
11565  *)
11566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11567for as_dir in $PATH
11568do
11569  IFS=$as_save_IFS
11570  test -z "$as_dir" && as_dir=.
11571    for ac_exec_ext in '' $ac_executable_extensions; do
11572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11573    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11575    break 2
11576  fi
11577done
11578  done
11579IFS=$as_save_IFS
11580
11581  ;;
11582esac
11583fi
11584UNAME=$ac_cv_path_UNAME
11585if test -n "$UNAME"; then
11586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11587$as_echo "$UNAME" >&6; }
11588else
11589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11590$as_echo "no" >&6; }
11591fi
11592
11593
11594          if test "x$UNAME" = x; then
11595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11596          fi
11597        else
11598          # Otherwise we believe it is a complete path. Use it as it is.
11599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11600$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11602$as_echo_n "checking for UNAME... " >&6; }
11603          if test ! -x "$tool_specified"; then
11604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11605$as_echo "not found" >&6; }
11606            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11607          fi
11608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11609$as_echo "$tool_specified" >&6; }
11610        fi
11611      fi
11612    fi
11613
11614  fi
11615
11616
11617
11618  if test "x$UNAME" = x; then
11619    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11620  fi
11621
11622
11623
11624
11625
11626  # Publish this variable in the help.
11627
11628
11629  if [ -z "${UNIQ+x}" ]; then
11630    # The variable is not set by user, try to locate tool using the code snippet
11631    for ac_prog in uniq
11632do
11633  # Extract the first word of "$ac_prog", so it can be a program name with args.
11634set dummy $ac_prog; ac_word=$2
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11636$as_echo_n "checking for $ac_word... " >&6; }
11637if ${ac_cv_path_UNIQ+:} false; then :
11638  $as_echo_n "(cached) " >&6
11639else
11640  case $UNIQ in
11641  [\\/]* | ?:[\\/]*)
11642  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11643  ;;
11644  *)
11645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11646for as_dir in $PATH
11647do
11648  IFS=$as_save_IFS
11649  test -z "$as_dir" && as_dir=.
11650    for ac_exec_ext in '' $ac_executable_extensions; do
11651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11652    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11654    break 2
11655  fi
11656done
11657  done
11658IFS=$as_save_IFS
11659
11660  ;;
11661esac
11662fi
11663UNIQ=$ac_cv_path_UNIQ
11664if test -n "$UNIQ"; then
11665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11666$as_echo "$UNIQ" >&6; }
11667else
11668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11669$as_echo "no" >&6; }
11670fi
11671
11672
11673  test -n "$UNIQ" && break
11674done
11675
11676  else
11677    # The variable is set, but is it from the command line or the environment?
11678
11679    # Try to remove the string !UNIQ! from our list.
11680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11682      # If it failed, the variable was not from the command line. Ignore it,
11683      # but warn the user (except for BASH, which is always set by the calling BASH).
11684      if test "xUNIQ" != xBASH; then
11685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11686$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11687      fi
11688      # Try to locate tool using the code snippet
11689      for ac_prog in uniq
11690do
11691  # Extract the first word of "$ac_prog", so it can be a program name with args.
11692set dummy $ac_prog; ac_word=$2
11693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11694$as_echo_n "checking for $ac_word... " >&6; }
11695if ${ac_cv_path_UNIQ+:} false; then :
11696  $as_echo_n "(cached) " >&6
11697else
11698  case $UNIQ in
11699  [\\/]* | ?:[\\/]*)
11700  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11701  ;;
11702  *)
11703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11704for as_dir in $PATH
11705do
11706  IFS=$as_save_IFS
11707  test -z "$as_dir" && as_dir=.
11708    for ac_exec_ext in '' $ac_executable_extensions; do
11709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11710    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11712    break 2
11713  fi
11714done
11715  done
11716IFS=$as_save_IFS
11717
11718  ;;
11719esac
11720fi
11721UNIQ=$ac_cv_path_UNIQ
11722if test -n "$UNIQ"; then
11723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11724$as_echo "$UNIQ" >&6; }
11725else
11726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11727$as_echo "no" >&6; }
11728fi
11729
11730
11731  test -n "$UNIQ" && break
11732done
11733
11734    else
11735      # If it succeeded, then it was overridden by the user. We will use it
11736      # for the tool.
11737
11738      # First remove it from the list of overridden variables, so we can test
11739      # for unknown variables in the end.
11740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11741
11742      # Check if we try to supply an empty value
11743      if test "x$UNIQ" = x; then
11744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11745$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11747$as_echo_n "checking for UNIQ... " >&6; }
11748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11749$as_echo "disabled" >&6; }
11750      else
11751        # Check if the provided tool contains a complete path.
11752        tool_specified="$UNIQ"
11753        tool_basename="${tool_specified##*/}"
11754        if test "x$tool_basename" = "x$tool_specified"; then
11755          # A command without a complete path is provided, search $PATH.
11756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11757$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11758          # Extract the first word of "$tool_basename", so it can be a program name with args.
11759set dummy $tool_basename; ac_word=$2
11760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11761$as_echo_n "checking for $ac_word... " >&6; }
11762if ${ac_cv_path_UNIQ+:} false; then :
11763  $as_echo_n "(cached) " >&6
11764else
11765  case $UNIQ in
11766  [\\/]* | ?:[\\/]*)
11767  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11768  ;;
11769  *)
11770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11771for as_dir in $PATH
11772do
11773  IFS=$as_save_IFS
11774  test -z "$as_dir" && as_dir=.
11775    for ac_exec_ext in '' $ac_executable_extensions; do
11776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11777    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11779    break 2
11780  fi
11781done
11782  done
11783IFS=$as_save_IFS
11784
11785  ;;
11786esac
11787fi
11788UNIQ=$ac_cv_path_UNIQ
11789if test -n "$UNIQ"; then
11790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11791$as_echo "$UNIQ" >&6; }
11792else
11793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11794$as_echo "no" >&6; }
11795fi
11796
11797
11798          if test "x$UNIQ" = x; then
11799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11800          fi
11801        else
11802          # Otherwise we believe it is a complete path. Use it as it is.
11803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11804$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11806$as_echo_n "checking for UNIQ... " >&6; }
11807          if test ! -x "$tool_specified"; then
11808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11809$as_echo "not found" >&6; }
11810            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11811          fi
11812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11813$as_echo "$tool_specified" >&6; }
11814        fi
11815      fi
11816    fi
11817
11818  fi
11819
11820
11821
11822  if test "x$UNIQ" = x; then
11823    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11824  fi
11825
11826
11827
11828
11829
11830  # Publish this variable in the help.
11831
11832
11833  if [ -z "${WC+x}" ]; then
11834    # The variable is not set by user, try to locate tool using the code snippet
11835    for ac_prog in wc
11836do
11837  # Extract the first word of "$ac_prog", so it can be a program name with args.
11838set dummy $ac_prog; ac_word=$2
11839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11840$as_echo_n "checking for $ac_word... " >&6; }
11841if ${ac_cv_path_WC+:} false; then :
11842  $as_echo_n "(cached) " >&6
11843else
11844  case $WC in
11845  [\\/]* | ?:[\\/]*)
11846  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11847  ;;
11848  *)
11849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11850for as_dir in $PATH
11851do
11852  IFS=$as_save_IFS
11853  test -z "$as_dir" && as_dir=.
11854    for ac_exec_ext in '' $ac_executable_extensions; do
11855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11856    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11858    break 2
11859  fi
11860done
11861  done
11862IFS=$as_save_IFS
11863
11864  ;;
11865esac
11866fi
11867WC=$ac_cv_path_WC
11868if test -n "$WC"; then
11869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11870$as_echo "$WC" >&6; }
11871else
11872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11873$as_echo "no" >&6; }
11874fi
11875
11876
11877  test -n "$WC" && break
11878done
11879
11880  else
11881    # The variable is set, but is it from the command line or the environment?
11882
11883    # Try to remove the string !WC! from our list.
11884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11886      # If it failed, the variable was not from the command line. Ignore it,
11887      # but warn the user (except for BASH, which is always set by the calling BASH).
11888      if test "xWC" != xBASH; then
11889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11890$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11891      fi
11892      # Try to locate tool using the code snippet
11893      for ac_prog in wc
11894do
11895  # Extract the first word of "$ac_prog", so it can be a program name with args.
11896set dummy $ac_prog; ac_word=$2
11897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11898$as_echo_n "checking for $ac_word... " >&6; }
11899if ${ac_cv_path_WC+:} false; then :
11900  $as_echo_n "(cached) " >&6
11901else
11902  case $WC in
11903  [\\/]* | ?:[\\/]*)
11904  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11905  ;;
11906  *)
11907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11908for as_dir in $PATH
11909do
11910  IFS=$as_save_IFS
11911  test -z "$as_dir" && as_dir=.
11912    for ac_exec_ext in '' $ac_executable_extensions; do
11913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11914    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11916    break 2
11917  fi
11918done
11919  done
11920IFS=$as_save_IFS
11921
11922  ;;
11923esac
11924fi
11925WC=$ac_cv_path_WC
11926if test -n "$WC"; then
11927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11928$as_echo "$WC" >&6; }
11929else
11930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11931$as_echo "no" >&6; }
11932fi
11933
11934
11935  test -n "$WC" && break
11936done
11937
11938    else
11939      # If it succeeded, then it was overridden by the user. We will use it
11940      # for the tool.
11941
11942      # First remove it from the list of overridden variables, so we can test
11943      # for unknown variables in the end.
11944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11945
11946      # Check if we try to supply an empty value
11947      if test "x$WC" = x; then
11948        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11949$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11950        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11951$as_echo_n "checking for WC... " >&6; }
11952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11953$as_echo "disabled" >&6; }
11954      else
11955        # Check if the provided tool contains a complete path.
11956        tool_specified="$WC"
11957        tool_basename="${tool_specified##*/}"
11958        if test "x$tool_basename" = "x$tool_specified"; then
11959          # A command without a complete path is provided, search $PATH.
11960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11961$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11962          # Extract the first word of "$tool_basename", so it can be a program name with args.
11963set dummy $tool_basename; ac_word=$2
11964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11965$as_echo_n "checking for $ac_word... " >&6; }
11966if ${ac_cv_path_WC+:} false; then :
11967  $as_echo_n "(cached) " >&6
11968else
11969  case $WC in
11970  [\\/]* | ?:[\\/]*)
11971  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11972  ;;
11973  *)
11974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11975for as_dir in $PATH
11976do
11977  IFS=$as_save_IFS
11978  test -z "$as_dir" && as_dir=.
11979    for ac_exec_ext in '' $ac_executable_extensions; do
11980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11981    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11983    break 2
11984  fi
11985done
11986  done
11987IFS=$as_save_IFS
11988
11989  ;;
11990esac
11991fi
11992WC=$ac_cv_path_WC
11993if test -n "$WC"; then
11994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11995$as_echo "$WC" >&6; }
11996else
11997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11998$as_echo "no" >&6; }
11999fi
12000
12001
12002          if test "x$WC" = x; then
12003            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12004          fi
12005        else
12006          # Otherwise we believe it is a complete path. Use it as it is.
12007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12008$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12009          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12010$as_echo_n "checking for WC... " >&6; }
12011          if test ! -x "$tool_specified"; then
12012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12013$as_echo "not found" >&6; }
12014            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12015          fi
12016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12017$as_echo "$tool_specified" >&6; }
12018        fi
12019      fi
12020    fi
12021
12022  fi
12023
12024
12025
12026  if test "x$WC" = x; then
12027    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12028  fi
12029
12030
12031
12032
12033
12034  # Publish this variable in the help.
12035
12036
12037  if [ -z "${WHICH+x}" ]; then
12038    # The variable is not set by user, try to locate tool using the code snippet
12039    for ac_prog in which
12040do
12041  # Extract the first word of "$ac_prog", so it can be a program name with args.
12042set dummy $ac_prog; ac_word=$2
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12044$as_echo_n "checking for $ac_word... " >&6; }
12045if ${ac_cv_path_WHICH+:} false; then :
12046  $as_echo_n "(cached) " >&6
12047else
12048  case $WHICH in
12049  [\\/]* | ?:[\\/]*)
12050  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12051  ;;
12052  *)
12053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12054for as_dir in $PATH
12055do
12056  IFS=$as_save_IFS
12057  test -z "$as_dir" && as_dir=.
12058    for ac_exec_ext in '' $ac_executable_extensions; do
12059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12060    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12062    break 2
12063  fi
12064done
12065  done
12066IFS=$as_save_IFS
12067
12068  ;;
12069esac
12070fi
12071WHICH=$ac_cv_path_WHICH
12072if test -n "$WHICH"; then
12073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12074$as_echo "$WHICH" >&6; }
12075else
12076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12077$as_echo "no" >&6; }
12078fi
12079
12080
12081  test -n "$WHICH" && break
12082done
12083
12084  else
12085    # The variable is set, but is it from the command line or the environment?
12086
12087    # Try to remove the string !WHICH! from our list.
12088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12090      # If it failed, the variable was not from the command line. Ignore it,
12091      # but warn the user (except for BASH, which is always set by the calling BASH).
12092      if test "xWHICH" != xBASH; then
12093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12094$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12095      fi
12096      # Try to locate tool using the code snippet
12097      for ac_prog in which
12098do
12099  # Extract the first word of "$ac_prog", so it can be a program name with args.
12100set dummy $ac_prog; ac_word=$2
12101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12102$as_echo_n "checking for $ac_word... " >&6; }
12103if ${ac_cv_path_WHICH+:} false; then :
12104  $as_echo_n "(cached) " >&6
12105else
12106  case $WHICH in
12107  [\\/]* | ?:[\\/]*)
12108  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12109  ;;
12110  *)
12111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12112for as_dir in $PATH
12113do
12114  IFS=$as_save_IFS
12115  test -z "$as_dir" && as_dir=.
12116    for ac_exec_ext in '' $ac_executable_extensions; do
12117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12118    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12120    break 2
12121  fi
12122done
12123  done
12124IFS=$as_save_IFS
12125
12126  ;;
12127esac
12128fi
12129WHICH=$ac_cv_path_WHICH
12130if test -n "$WHICH"; then
12131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12132$as_echo "$WHICH" >&6; }
12133else
12134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12135$as_echo "no" >&6; }
12136fi
12137
12138
12139  test -n "$WHICH" && break
12140done
12141
12142    else
12143      # If it succeeded, then it was overridden by the user. We will use it
12144      # for the tool.
12145
12146      # First remove it from the list of overridden variables, so we can test
12147      # for unknown variables in the end.
12148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12149
12150      # Check if we try to supply an empty value
12151      if test "x$WHICH" = x; then
12152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12153$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12155$as_echo_n "checking for WHICH... " >&6; }
12156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12157$as_echo "disabled" >&6; }
12158      else
12159        # Check if the provided tool contains a complete path.
12160        tool_specified="$WHICH"
12161        tool_basename="${tool_specified##*/}"
12162        if test "x$tool_basename" = "x$tool_specified"; then
12163          # A command without a complete path is provided, search $PATH.
12164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12165$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12166          # Extract the first word of "$tool_basename", so it can be a program name with args.
12167set dummy $tool_basename; ac_word=$2
12168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12169$as_echo_n "checking for $ac_word... " >&6; }
12170if ${ac_cv_path_WHICH+:} false; then :
12171  $as_echo_n "(cached) " >&6
12172else
12173  case $WHICH in
12174  [\\/]* | ?:[\\/]*)
12175  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12176  ;;
12177  *)
12178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12179for as_dir in $PATH
12180do
12181  IFS=$as_save_IFS
12182  test -z "$as_dir" && as_dir=.
12183    for ac_exec_ext in '' $ac_executable_extensions; do
12184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12185    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12187    break 2
12188  fi
12189done
12190  done
12191IFS=$as_save_IFS
12192
12193  ;;
12194esac
12195fi
12196WHICH=$ac_cv_path_WHICH
12197if test -n "$WHICH"; then
12198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12199$as_echo "$WHICH" >&6; }
12200else
12201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12202$as_echo "no" >&6; }
12203fi
12204
12205
12206          if test "x$WHICH" = x; then
12207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12208          fi
12209        else
12210          # Otherwise we believe it is a complete path. Use it as it is.
12211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12212$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12214$as_echo_n "checking for WHICH... " >&6; }
12215          if test ! -x "$tool_specified"; then
12216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12217$as_echo "not found" >&6; }
12218            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12219          fi
12220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12221$as_echo "$tool_specified" >&6; }
12222        fi
12223      fi
12224    fi
12225
12226  fi
12227
12228
12229
12230  if test "x$WHICH" = x; then
12231    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12232  fi
12233
12234
12235
12236
12237
12238  # Publish this variable in the help.
12239
12240
12241  if [ -z "${XARGS+x}" ]; then
12242    # The variable is not set by user, try to locate tool using the code snippet
12243    for ac_prog in xargs
12244do
12245  # Extract the first word of "$ac_prog", so it can be a program name with args.
12246set dummy $ac_prog; ac_word=$2
12247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12248$as_echo_n "checking for $ac_word... " >&6; }
12249if ${ac_cv_path_XARGS+:} false; then :
12250  $as_echo_n "(cached) " >&6
12251else
12252  case $XARGS in
12253  [\\/]* | ?:[\\/]*)
12254  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12255  ;;
12256  *)
12257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12258for as_dir in $PATH
12259do
12260  IFS=$as_save_IFS
12261  test -z "$as_dir" && as_dir=.
12262    for ac_exec_ext in '' $ac_executable_extensions; do
12263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12264    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12266    break 2
12267  fi
12268done
12269  done
12270IFS=$as_save_IFS
12271
12272  ;;
12273esac
12274fi
12275XARGS=$ac_cv_path_XARGS
12276if test -n "$XARGS"; then
12277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12278$as_echo "$XARGS" >&6; }
12279else
12280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12281$as_echo "no" >&6; }
12282fi
12283
12284
12285  test -n "$XARGS" && break
12286done
12287
12288  else
12289    # The variable is set, but is it from the command line or the environment?
12290
12291    # Try to remove the string !XARGS! from our list.
12292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12294      # If it failed, the variable was not from the command line. Ignore it,
12295      # but warn the user (except for BASH, which is always set by the calling BASH).
12296      if test "xXARGS" != xBASH; then
12297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12298$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12299      fi
12300      # Try to locate tool using the code snippet
12301      for ac_prog in xargs
12302do
12303  # Extract the first word of "$ac_prog", so it can be a program name with args.
12304set dummy $ac_prog; ac_word=$2
12305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12306$as_echo_n "checking for $ac_word... " >&6; }
12307if ${ac_cv_path_XARGS+:} false; then :
12308  $as_echo_n "(cached) " >&6
12309else
12310  case $XARGS in
12311  [\\/]* | ?:[\\/]*)
12312  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12313  ;;
12314  *)
12315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12316for as_dir in $PATH
12317do
12318  IFS=$as_save_IFS
12319  test -z "$as_dir" && as_dir=.
12320    for ac_exec_ext in '' $ac_executable_extensions; do
12321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12322    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12324    break 2
12325  fi
12326done
12327  done
12328IFS=$as_save_IFS
12329
12330  ;;
12331esac
12332fi
12333XARGS=$ac_cv_path_XARGS
12334if test -n "$XARGS"; then
12335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12336$as_echo "$XARGS" >&6; }
12337else
12338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12339$as_echo "no" >&6; }
12340fi
12341
12342
12343  test -n "$XARGS" && break
12344done
12345
12346    else
12347      # If it succeeded, then it was overridden by the user. We will use it
12348      # for the tool.
12349
12350      # First remove it from the list of overridden variables, so we can test
12351      # for unknown variables in the end.
12352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12353
12354      # Check if we try to supply an empty value
12355      if test "x$XARGS" = x; then
12356        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12357$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12359$as_echo_n "checking for XARGS... " >&6; }
12360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12361$as_echo "disabled" >&6; }
12362      else
12363        # Check if the provided tool contains a complete path.
12364        tool_specified="$XARGS"
12365        tool_basename="${tool_specified##*/}"
12366        if test "x$tool_basename" = "x$tool_specified"; then
12367          # A command without a complete path is provided, search $PATH.
12368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12369$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12370          # Extract the first word of "$tool_basename", so it can be a program name with args.
12371set dummy $tool_basename; ac_word=$2
12372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12373$as_echo_n "checking for $ac_word... " >&6; }
12374if ${ac_cv_path_XARGS+:} false; then :
12375  $as_echo_n "(cached) " >&6
12376else
12377  case $XARGS in
12378  [\\/]* | ?:[\\/]*)
12379  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12380  ;;
12381  *)
12382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12383for as_dir in $PATH
12384do
12385  IFS=$as_save_IFS
12386  test -z "$as_dir" && as_dir=.
12387    for ac_exec_ext in '' $ac_executable_extensions; do
12388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12389    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12391    break 2
12392  fi
12393done
12394  done
12395IFS=$as_save_IFS
12396
12397  ;;
12398esac
12399fi
12400XARGS=$ac_cv_path_XARGS
12401if test -n "$XARGS"; then
12402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12403$as_echo "$XARGS" >&6; }
12404else
12405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12406$as_echo "no" >&6; }
12407fi
12408
12409
12410          if test "x$XARGS" = x; then
12411            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12412          fi
12413        else
12414          # Otherwise we believe it is a complete path. Use it as it is.
12415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12416$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12417          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12418$as_echo_n "checking for XARGS... " >&6; }
12419          if test ! -x "$tool_specified"; then
12420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12421$as_echo "not found" >&6; }
12422            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12423          fi
12424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12425$as_echo "$tool_specified" >&6; }
12426        fi
12427      fi
12428    fi
12429
12430  fi
12431
12432
12433
12434  if test "x$XARGS" = x; then
12435    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12436  fi
12437
12438
12439
12440  # Then required tools that require some special treatment.
12441
12442
12443  # Publish this variable in the help.
12444
12445
12446  if [ -z "${AWK+x}" ]; then
12447    # The variable is not set by user, try to locate tool using the code snippet
12448    for ac_prog in gawk mawk nawk awk
12449do
12450  # Extract the first word of "$ac_prog", so it can be a program name with args.
12451set dummy $ac_prog; ac_word=$2
12452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12453$as_echo_n "checking for $ac_word... " >&6; }
12454if ${ac_cv_prog_AWK+:} false; then :
12455  $as_echo_n "(cached) " >&6
12456else
12457  if test -n "$AWK"; then
12458  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12459else
12460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12461for as_dir in $PATH
12462do
12463  IFS=$as_save_IFS
12464  test -z "$as_dir" && as_dir=.
12465    for ac_exec_ext in '' $ac_executable_extensions; do
12466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12467    ac_cv_prog_AWK="$ac_prog"
12468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12469    break 2
12470  fi
12471done
12472  done
12473IFS=$as_save_IFS
12474
12475fi
12476fi
12477AWK=$ac_cv_prog_AWK
12478if test -n "$AWK"; then
12479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12480$as_echo "$AWK" >&6; }
12481else
12482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12483$as_echo "no" >&6; }
12484fi
12485
12486
12487  test -n "$AWK" && break
12488done
12489
12490  else
12491    # The variable is set, but is it from the command line or the environment?
12492
12493    # Try to remove the string !AWK! from our list.
12494    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12495    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12496      # If it failed, the variable was not from the command line. Ignore it,
12497      # but warn the user (except for BASH, which is always set by the calling BASH).
12498      if test "xAWK" != xBASH; then
12499        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12500$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12501      fi
12502      # Try to locate tool using the code snippet
12503      for ac_prog in gawk mawk nawk awk
12504do
12505  # Extract the first word of "$ac_prog", so it can be a program name with args.
12506set dummy $ac_prog; ac_word=$2
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12508$as_echo_n "checking for $ac_word... " >&6; }
12509if ${ac_cv_prog_AWK+:} false; then :
12510  $as_echo_n "(cached) " >&6
12511else
12512  if test -n "$AWK"; then
12513  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12514else
12515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12516for as_dir in $PATH
12517do
12518  IFS=$as_save_IFS
12519  test -z "$as_dir" && as_dir=.
12520    for ac_exec_ext in '' $ac_executable_extensions; do
12521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12522    ac_cv_prog_AWK="$ac_prog"
12523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12524    break 2
12525  fi
12526done
12527  done
12528IFS=$as_save_IFS
12529
12530fi
12531fi
12532AWK=$ac_cv_prog_AWK
12533if test -n "$AWK"; then
12534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12535$as_echo "$AWK" >&6; }
12536else
12537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12538$as_echo "no" >&6; }
12539fi
12540
12541
12542  test -n "$AWK" && break
12543done
12544
12545    else
12546      # If it succeeded, then it was overridden by the user. We will use it
12547      # for the tool.
12548
12549      # First remove it from the list of overridden variables, so we can test
12550      # for unknown variables in the end.
12551      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12552
12553      # Check if we try to supply an empty value
12554      if test "x$AWK" = x; then
12555        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12556$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12557        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12558$as_echo_n "checking for AWK... " >&6; }
12559        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12560$as_echo "disabled" >&6; }
12561      else
12562        # Check if the provided tool contains a complete path.
12563        tool_specified="$AWK"
12564        tool_basename="${tool_specified##*/}"
12565        if test "x$tool_basename" = "x$tool_specified"; then
12566          # A command without a complete path is provided, search $PATH.
12567          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12568$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12569          # Extract the first word of "$tool_basename", so it can be a program name with args.
12570set dummy $tool_basename; ac_word=$2
12571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12572$as_echo_n "checking for $ac_word... " >&6; }
12573if ${ac_cv_path_AWK+:} false; then :
12574  $as_echo_n "(cached) " >&6
12575else
12576  case $AWK in
12577  [\\/]* | ?:[\\/]*)
12578  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12579  ;;
12580  *)
12581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12582for as_dir in $PATH
12583do
12584  IFS=$as_save_IFS
12585  test -z "$as_dir" && as_dir=.
12586    for ac_exec_ext in '' $ac_executable_extensions; do
12587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12588    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12590    break 2
12591  fi
12592done
12593  done
12594IFS=$as_save_IFS
12595
12596  ;;
12597esac
12598fi
12599AWK=$ac_cv_path_AWK
12600if test -n "$AWK"; then
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12602$as_echo "$AWK" >&6; }
12603else
12604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12605$as_echo "no" >&6; }
12606fi
12607
12608
12609          if test "x$AWK" = x; then
12610            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12611          fi
12612        else
12613          # Otherwise we believe it is a complete path. Use it as it is.
12614          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12615$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12616          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12617$as_echo_n "checking for AWK... " >&6; }
12618          if test ! -x "$tool_specified"; then
12619            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12620$as_echo "not found" >&6; }
12621            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12622          fi
12623          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12624$as_echo "$tool_specified" >&6; }
12625        fi
12626      fi
12627    fi
12628
12629  fi
12630
12631
12632  if test "x$AWK" = x; then
12633    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12634  fi
12635
12636
12637
12638
12639  # Publish this variable in the help.
12640
12641
12642  if [ -z "${GREP+x}" ]; then
12643    # The variable is not set by user, try to locate tool using the code snippet
12644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12645$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12646if ${ac_cv_path_GREP+:} false; then :
12647  $as_echo_n "(cached) " >&6
12648else
12649  if test -z "$GREP"; then
12650  ac_path_GREP_found=false
12651  # Loop through the user's path and test for each of PROGNAME-LIST
12652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12653for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12654do
12655  IFS=$as_save_IFS
12656  test -z "$as_dir" && as_dir=.
12657    for ac_prog in grep ggrep; do
12658    for ac_exec_ext in '' $ac_executable_extensions; do
12659      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12660      as_fn_executable_p "$ac_path_GREP" || continue
12661# Check for GNU ac_path_GREP and select it if it is found.
12662  # Check for GNU $ac_path_GREP
12663case `"$ac_path_GREP" --version 2>&1` in
12664*GNU*)
12665  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12666*)
12667  ac_count=0
12668  $as_echo_n 0123456789 >"conftest.in"
12669  while :
12670  do
12671    cat "conftest.in" "conftest.in" >"conftest.tmp"
12672    mv "conftest.tmp" "conftest.in"
12673    cp "conftest.in" "conftest.nl"
12674    $as_echo 'GREP' >> "conftest.nl"
12675    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12676    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12677    as_fn_arith $ac_count + 1 && ac_count=$as_val
12678    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12679      # Best one so far, save it but keep looking for a better one
12680      ac_cv_path_GREP="$ac_path_GREP"
12681      ac_path_GREP_max=$ac_count
12682    fi
12683    # 10*(2^10) chars as input seems more than enough
12684    test $ac_count -gt 10 && break
12685  done
12686  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12687esac
12688
12689      $ac_path_GREP_found && break 3
12690    done
12691  done
12692  done
12693IFS=$as_save_IFS
12694  if test -z "$ac_cv_path_GREP"; then
12695    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12696  fi
12697else
12698  ac_cv_path_GREP=$GREP
12699fi
12700
12701fi
12702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12703$as_echo "$ac_cv_path_GREP" >&6; }
12704 GREP="$ac_cv_path_GREP"
12705
12706
12707  else
12708    # The variable is set, but is it from the command line or the environment?
12709
12710    # Try to remove the string !GREP! from our list.
12711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12713      # If it failed, the variable was not from the command line. Ignore it,
12714      # but warn the user (except for BASH, which is always set by the calling BASH).
12715      if test "xGREP" != xBASH; then
12716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12717$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12718      fi
12719      # Try to locate tool using the code snippet
12720      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12721$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12722if ${ac_cv_path_GREP+:} false; then :
12723  $as_echo_n "(cached) " >&6
12724else
12725  if test -z "$GREP"; then
12726  ac_path_GREP_found=false
12727  # Loop through the user's path and test for each of PROGNAME-LIST
12728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12729for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12730do
12731  IFS=$as_save_IFS
12732  test -z "$as_dir" && as_dir=.
12733    for ac_prog in grep ggrep; do
12734    for ac_exec_ext in '' $ac_executable_extensions; do
12735      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12736      as_fn_executable_p "$ac_path_GREP" || continue
12737# Check for GNU ac_path_GREP and select it if it is found.
12738  # Check for GNU $ac_path_GREP
12739case `"$ac_path_GREP" --version 2>&1` in
12740*GNU*)
12741  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12742*)
12743  ac_count=0
12744  $as_echo_n 0123456789 >"conftest.in"
12745  while :
12746  do
12747    cat "conftest.in" "conftest.in" >"conftest.tmp"
12748    mv "conftest.tmp" "conftest.in"
12749    cp "conftest.in" "conftest.nl"
12750    $as_echo 'GREP' >> "conftest.nl"
12751    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12752    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12753    as_fn_arith $ac_count + 1 && ac_count=$as_val
12754    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12755      # Best one so far, save it but keep looking for a better one
12756      ac_cv_path_GREP="$ac_path_GREP"
12757      ac_path_GREP_max=$ac_count
12758    fi
12759    # 10*(2^10) chars as input seems more than enough
12760    test $ac_count -gt 10 && break
12761  done
12762  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12763esac
12764
12765      $ac_path_GREP_found && break 3
12766    done
12767  done
12768  done
12769IFS=$as_save_IFS
12770  if test -z "$ac_cv_path_GREP"; then
12771    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12772  fi
12773else
12774  ac_cv_path_GREP=$GREP
12775fi
12776
12777fi
12778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12779$as_echo "$ac_cv_path_GREP" >&6; }
12780 GREP="$ac_cv_path_GREP"
12781
12782
12783    else
12784      # If it succeeded, then it was overridden by the user. We will use it
12785      # for the tool.
12786
12787      # First remove it from the list of overridden variables, so we can test
12788      # for unknown variables in the end.
12789      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12790
12791      # Check if we try to supply an empty value
12792      if test "x$GREP" = x; then
12793        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12794$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12796$as_echo_n "checking for GREP... " >&6; }
12797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12798$as_echo "disabled" >&6; }
12799      else
12800        # Check if the provided tool contains a complete path.
12801        tool_specified="$GREP"
12802        tool_basename="${tool_specified##*/}"
12803        if test "x$tool_basename" = "x$tool_specified"; then
12804          # A command without a complete path is provided, search $PATH.
12805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12806$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12807          # Extract the first word of "$tool_basename", so it can be a program name with args.
12808set dummy $tool_basename; ac_word=$2
12809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12810$as_echo_n "checking for $ac_word... " >&6; }
12811if ${ac_cv_path_GREP+:} false; then :
12812  $as_echo_n "(cached) " >&6
12813else
12814  case $GREP in
12815  [\\/]* | ?:[\\/]*)
12816  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12817  ;;
12818  *)
12819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12820for as_dir in $PATH
12821do
12822  IFS=$as_save_IFS
12823  test -z "$as_dir" && as_dir=.
12824    for ac_exec_ext in '' $ac_executable_extensions; do
12825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12826    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12828    break 2
12829  fi
12830done
12831  done
12832IFS=$as_save_IFS
12833
12834  ;;
12835esac
12836fi
12837GREP=$ac_cv_path_GREP
12838if test -n "$GREP"; then
12839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12840$as_echo "$GREP" >&6; }
12841else
12842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12843$as_echo "no" >&6; }
12844fi
12845
12846
12847          if test "x$GREP" = x; then
12848            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12849          fi
12850        else
12851          # Otherwise we believe it is a complete path. Use it as it is.
12852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12853$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12854          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12855$as_echo_n "checking for GREP... " >&6; }
12856          if test ! -x "$tool_specified"; then
12857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12858$as_echo "not found" >&6; }
12859            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12860          fi
12861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12862$as_echo "$tool_specified" >&6; }
12863        fi
12864      fi
12865    fi
12866
12867  fi
12868
12869
12870  if test "x$GREP" = x; then
12871    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12872  fi
12873
12874
12875
12876
12877  # Publish this variable in the help.
12878
12879
12880  if [ -z "${EGREP+x}" ]; then
12881    # The variable is not set by user, try to locate tool using the code snippet
12882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12883$as_echo_n "checking for egrep... " >&6; }
12884if ${ac_cv_path_EGREP+:} false; then :
12885  $as_echo_n "(cached) " >&6
12886else
12887  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12888   then ac_cv_path_EGREP="$GREP -E"
12889   else
12890     if test -z "$EGREP"; then
12891  ac_path_EGREP_found=false
12892  # Loop through the user's path and test for each of PROGNAME-LIST
12893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12894for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12895do
12896  IFS=$as_save_IFS
12897  test -z "$as_dir" && as_dir=.
12898    for ac_prog in egrep; do
12899    for ac_exec_ext in '' $ac_executable_extensions; do
12900      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12901      as_fn_executable_p "$ac_path_EGREP" || continue
12902# Check for GNU ac_path_EGREP and select it if it is found.
12903  # Check for GNU $ac_path_EGREP
12904case `"$ac_path_EGREP" --version 2>&1` in
12905*GNU*)
12906  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12907*)
12908  ac_count=0
12909  $as_echo_n 0123456789 >"conftest.in"
12910  while :
12911  do
12912    cat "conftest.in" "conftest.in" >"conftest.tmp"
12913    mv "conftest.tmp" "conftest.in"
12914    cp "conftest.in" "conftest.nl"
12915    $as_echo 'EGREP' >> "conftest.nl"
12916    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12917    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12918    as_fn_arith $ac_count + 1 && ac_count=$as_val
12919    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12920      # Best one so far, save it but keep looking for a better one
12921      ac_cv_path_EGREP="$ac_path_EGREP"
12922      ac_path_EGREP_max=$ac_count
12923    fi
12924    # 10*(2^10) chars as input seems more than enough
12925    test $ac_count -gt 10 && break
12926  done
12927  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12928esac
12929
12930      $ac_path_EGREP_found && break 3
12931    done
12932  done
12933  done
12934IFS=$as_save_IFS
12935  if test -z "$ac_cv_path_EGREP"; then
12936    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12937  fi
12938else
12939  ac_cv_path_EGREP=$EGREP
12940fi
12941
12942   fi
12943fi
12944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12945$as_echo "$ac_cv_path_EGREP" >&6; }
12946 EGREP="$ac_cv_path_EGREP"
12947
12948
12949  else
12950    # The variable is set, but is it from the command line or the environment?
12951
12952    # Try to remove the string !EGREP! from our list.
12953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12955      # If it failed, the variable was not from the command line. Ignore it,
12956      # but warn the user (except for BASH, which is always set by the calling BASH).
12957      if test "xEGREP" != xBASH; then
12958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12959$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12960      fi
12961      # Try to locate tool using the code snippet
12962      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12963$as_echo_n "checking for egrep... " >&6; }
12964if ${ac_cv_path_EGREP+:} false; then :
12965  $as_echo_n "(cached) " >&6
12966else
12967  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12968   then ac_cv_path_EGREP="$GREP -E"
12969   else
12970     if test -z "$EGREP"; then
12971  ac_path_EGREP_found=false
12972  # Loop through the user's path and test for each of PROGNAME-LIST
12973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12974for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12975do
12976  IFS=$as_save_IFS
12977  test -z "$as_dir" && as_dir=.
12978    for ac_prog in egrep; do
12979    for ac_exec_ext in '' $ac_executable_extensions; do
12980      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12981      as_fn_executable_p "$ac_path_EGREP" || continue
12982# Check for GNU ac_path_EGREP and select it if it is found.
12983  # Check for GNU $ac_path_EGREP
12984case `"$ac_path_EGREP" --version 2>&1` in
12985*GNU*)
12986  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12987*)
12988  ac_count=0
12989  $as_echo_n 0123456789 >"conftest.in"
12990  while :
12991  do
12992    cat "conftest.in" "conftest.in" >"conftest.tmp"
12993    mv "conftest.tmp" "conftest.in"
12994    cp "conftest.in" "conftest.nl"
12995    $as_echo 'EGREP' >> "conftest.nl"
12996    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12997    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12998    as_fn_arith $ac_count + 1 && ac_count=$as_val
12999    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13000      # Best one so far, save it but keep looking for a better one
13001      ac_cv_path_EGREP="$ac_path_EGREP"
13002      ac_path_EGREP_max=$ac_count
13003    fi
13004    # 10*(2^10) chars as input seems more than enough
13005    test $ac_count -gt 10 && break
13006  done
13007  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13008esac
13009
13010      $ac_path_EGREP_found && break 3
13011    done
13012  done
13013  done
13014IFS=$as_save_IFS
13015  if test -z "$ac_cv_path_EGREP"; then
13016    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13017  fi
13018else
13019  ac_cv_path_EGREP=$EGREP
13020fi
13021
13022   fi
13023fi
13024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13025$as_echo "$ac_cv_path_EGREP" >&6; }
13026 EGREP="$ac_cv_path_EGREP"
13027
13028
13029    else
13030      # If it succeeded, then it was overridden by the user. We will use it
13031      # for the tool.
13032
13033      # First remove it from the list of overridden variables, so we can test
13034      # for unknown variables in the end.
13035      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13036
13037      # Check if we try to supply an empty value
13038      if test "x$EGREP" = x; then
13039        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13040$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13042$as_echo_n "checking for EGREP... " >&6; }
13043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13044$as_echo "disabled" >&6; }
13045      else
13046        # Check if the provided tool contains a complete path.
13047        tool_specified="$EGREP"
13048        tool_basename="${tool_specified##*/}"
13049        if test "x$tool_basename" = "x$tool_specified"; then
13050          # A command without a complete path is provided, search $PATH.
13051          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13052$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13053          # Extract the first word of "$tool_basename", so it can be a program name with args.
13054set dummy $tool_basename; ac_word=$2
13055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13056$as_echo_n "checking for $ac_word... " >&6; }
13057if ${ac_cv_path_EGREP+:} false; then :
13058  $as_echo_n "(cached) " >&6
13059else
13060  case $EGREP in
13061  [\\/]* | ?:[\\/]*)
13062  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13063  ;;
13064  *)
13065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13066for as_dir in $PATH
13067do
13068  IFS=$as_save_IFS
13069  test -z "$as_dir" && as_dir=.
13070    for ac_exec_ext in '' $ac_executable_extensions; do
13071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13072    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13074    break 2
13075  fi
13076done
13077  done
13078IFS=$as_save_IFS
13079
13080  ;;
13081esac
13082fi
13083EGREP=$ac_cv_path_EGREP
13084if test -n "$EGREP"; then
13085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13086$as_echo "$EGREP" >&6; }
13087else
13088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13089$as_echo "no" >&6; }
13090fi
13091
13092
13093          if test "x$EGREP" = x; then
13094            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13095          fi
13096        else
13097          # Otherwise we believe it is a complete path. Use it as it is.
13098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13099$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13100          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13101$as_echo_n "checking for EGREP... " >&6; }
13102          if test ! -x "$tool_specified"; then
13103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13104$as_echo "not found" >&6; }
13105            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13106          fi
13107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13108$as_echo "$tool_specified" >&6; }
13109        fi
13110      fi
13111    fi
13112
13113  fi
13114
13115
13116  if test "x$EGREP" = x; then
13117    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13118  fi
13119
13120
13121
13122
13123  # Publish this variable in the help.
13124
13125
13126  if [ -z "${FGREP+x}" ]; then
13127    # The variable is not set by user, try to locate tool using the code snippet
13128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13129$as_echo_n "checking for fgrep... " >&6; }
13130if ${ac_cv_path_FGREP+:} false; then :
13131  $as_echo_n "(cached) " >&6
13132else
13133  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13134   then ac_cv_path_FGREP="$GREP -F"
13135   else
13136     if test -z "$FGREP"; then
13137  ac_path_FGREP_found=false
13138  # Loop through the user's path and test for each of PROGNAME-LIST
13139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13140for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13141do
13142  IFS=$as_save_IFS
13143  test -z "$as_dir" && as_dir=.
13144    for ac_prog in fgrep; do
13145    for ac_exec_ext in '' $ac_executable_extensions; do
13146      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13147      as_fn_executable_p "$ac_path_FGREP" || continue
13148# Check for GNU ac_path_FGREP and select it if it is found.
13149  # Check for GNU $ac_path_FGREP
13150case `"$ac_path_FGREP" --version 2>&1` in
13151*GNU*)
13152  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13153*)
13154  ac_count=0
13155  $as_echo_n 0123456789 >"conftest.in"
13156  while :
13157  do
13158    cat "conftest.in" "conftest.in" >"conftest.tmp"
13159    mv "conftest.tmp" "conftest.in"
13160    cp "conftest.in" "conftest.nl"
13161    $as_echo 'FGREP' >> "conftest.nl"
13162    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13163    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13164    as_fn_arith $ac_count + 1 && ac_count=$as_val
13165    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13166      # Best one so far, save it but keep looking for a better one
13167      ac_cv_path_FGREP="$ac_path_FGREP"
13168      ac_path_FGREP_max=$ac_count
13169    fi
13170    # 10*(2^10) chars as input seems more than enough
13171    test $ac_count -gt 10 && break
13172  done
13173  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13174esac
13175
13176      $ac_path_FGREP_found && break 3
13177    done
13178  done
13179  done
13180IFS=$as_save_IFS
13181  if test -z "$ac_cv_path_FGREP"; then
13182    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13183  fi
13184else
13185  ac_cv_path_FGREP=$FGREP
13186fi
13187
13188   fi
13189fi
13190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13191$as_echo "$ac_cv_path_FGREP" >&6; }
13192 FGREP="$ac_cv_path_FGREP"
13193
13194
13195  else
13196    # The variable is set, but is it from the command line or the environment?
13197
13198    # Try to remove the string !FGREP! from our list.
13199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13201      # If it failed, the variable was not from the command line. Ignore it,
13202      # but warn the user (except for BASH, which is always set by the calling BASH).
13203      if test "xFGREP" != xBASH; then
13204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13205$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13206      fi
13207      # Try to locate tool using the code snippet
13208      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13209$as_echo_n "checking for fgrep... " >&6; }
13210if ${ac_cv_path_FGREP+:} false; then :
13211  $as_echo_n "(cached) " >&6
13212else
13213  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13214   then ac_cv_path_FGREP="$GREP -F"
13215   else
13216     if test -z "$FGREP"; then
13217  ac_path_FGREP_found=false
13218  # Loop through the user's path and test for each of PROGNAME-LIST
13219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13220for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13221do
13222  IFS=$as_save_IFS
13223  test -z "$as_dir" && as_dir=.
13224    for ac_prog in fgrep; do
13225    for ac_exec_ext in '' $ac_executable_extensions; do
13226      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13227      as_fn_executable_p "$ac_path_FGREP" || continue
13228# Check for GNU ac_path_FGREP and select it if it is found.
13229  # Check for GNU $ac_path_FGREP
13230case `"$ac_path_FGREP" --version 2>&1` in
13231*GNU*)
13232  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13233*)
13234  ac_count=0
13235  $as_echo_n 0123456789 >"conftest.in"
13236  while :
13237  do
13238    cat "conftest.in" "conftest.in" >"conftest.tmp"
13239    mv "conftest.tmp" "conftest.in"
13240    cp "conftest.in" "conftest.nl"
13241    $as_echo 'FGREP' >> "conftest.nl"
13242    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13243    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13244    as_fn_arith $ac_count + 1 && ac_count=$as_val
13245    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13246      # Best one so far, save it but keep looking for a better one
13247      ac_cv_path_FGREP="$ac_path_FGREP"
13248      ac_path_FGREP_max=$ac_count
13249    fi
13250    # 10*(2^10) chars as input seems more than enough
13251    test $ac_count -gt 10 && break
13252  done
13253  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13254esac
13255
13256      $ac_path_FGREP_found && break 3
13257    done
13258  done
13259  done
13260IFS=$as_save_IFS
13261  if test -z "$ac_cv_path_FGREP"; then
13262    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13263  fi
13264else
13265  ac_cv_path_FGREP=$FGREP
13266fi
13267
13268   fi
13269fi
13270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13271$as_echo "$ac_cv_path_FGREP" >&6; }
13272 FGREP="$ac_cv_path_FGREP"
13273
13274
13275    else
13276      # If it succeeded, then it was overridden by the user. We will use it
13277      # for the tool.
13278
13279      # First remove it from the list of overridden variables, so we can test
13280      # for unknown variables in the end.
13281      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13282
13283      # Check if we try to supply an empty value
13284      if test "x$FGREP" = x; then
13285        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13286$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13288$as_echo_n "checking for FGREP... " >&6; }
13289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13290$as_echo "disabled" >&6; }
13291      else
13292        # Check if the provided tool contains a complete path.
13293        tool_specified="$FGREP"
13294        tool_basename="${tool_specified##*/}"
13295        if test "x$tool_basename" = "x$tool_specified"; then
13296          # A command without a complete path is provided, search $PATH.
13297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13298$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13299          # Extract the first word of "$tool_basename", so it can be a program name with args.
13300set dummy $tool_basename; ac_word=$2
13301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13302$as_echo_n "checking for $ac_word... " >&6; }
13303if ${ac_cv_path_FGREP+:} false; then :
13304  $as_echo_n "(cached) " >&6
13305else
13306  case $FGREP in
13307  [\\/]* | ?:[\\/]*)
13308  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13309  ;;
13310  *)
13311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13312for as_dir in $PATH
13313do
13314  IFS=$as_save_IFS
13315  test -z "$as_dir" && as_dir=.
13316    for ac_exec_ext in '' $ac_executable_extensions; do
13317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13318    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13320    break 2
13321  fi
13322done
13323  done
13324IFS=$as_save_IFS
13325
13326  ;;
13327esac
13328fi
13329FGREP=$ac_cv_path_FGREP
13330if test -n "$FGREP"; then
13331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13332$as_echo "$FGREP" >&6; }
13333else
13334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13335$as_echo "no" >&6; }
13336fi
13337
13338
13339          if test "x$FGREP" = x; then
13340            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13341          fi
13342        else
13343          # Otherwise we believe it is a complete path. Use it as it is.
13344          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13345$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13346          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13347$as_echo_n "checking for FGREP... " >&6; }
13348          if test ! -x "$tool_specified"; then
13349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13350$as_echo "not found" >&6; }
13351            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13352          fi
13353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13354$as_echo "$tool_specified" >&6; }
13355        fi
13356      fi
13357    fi
13358
13359  fi
13360
13361
13362  if test "x$FGREP" = x; then
13363    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13364  fi
13365
13366
13367
13368
13369  # Publish this variable in the help.
13370
13371
13372  if [ -z "${SED+x}" ]; then
13373    # The variable is not set by user, try to locate tool using the code snippet
13374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13375$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13376if ${ac_cv_path_SED+:} false; then :
13377  $as_echo_n "(cached) " >&6
13378else
13379            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13380     for ac_i in 1 2 3 4 5 6 7; do
13381       ac_script="$ac_script$as_nl$ac_script"
13382     done
13383     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13384     { ac_script=; unset ac_script;}
13385     if test -z "$SED"; then
13386  ac_path_SED_found=false
13387  # Loop through the user's path and test for each of PROGNAME-LIST
13388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13389for as_dir in $PATH
13390do
13391  IFS=$as_save_IFS
13392  test -z "$as_dir" && as_dir=.
13393    for ac_prog in sed gsed; do
13394    for ac_exec_ext in '' $ac_executable_extensions; do
13395      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13396      as_fn_executable_p "$ac_path_SED" || continue
13397# Check for GNU ac_path_SED and select it if it is found.
13398  # Check for GNU $ac_path_SED
13399case `"$ac_path_SED" --version 2>&1` in
13400*GNU*)
13401  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13402*)
13403  ac_count=0
13404  $as_echo_n 0123456789 >"conftest.in"
13405  while :
13406  do
13407    cat "conftest.in" "conftest.in" >"conftest.tmp"
13408    mv "conftest.tmp" "conftest.in"
13409    cp "conftest.in" "conftest.nl"
13410    $as_echo '' >> "conftest.nl"
13411    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13412    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13413    as_fn_arith $ac_count + 1 && ac_count=$as_val
13414    if test $ac_count -gt ${ac_path_SED_max-0}; then
13415      # Best one so far, save it but keep looking for a better one
13416      ac_cv_path_SED="$ac_path_SED"
13417      ac_path_SED_max=$ac_count
13418    fi
13419    # 10*(2^10) chars as input seems more than enough
13420    test $ac_count -gt 10 && break
13421  done
13422  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13423esac
13424
13425      $ac_path_SED_found && break 3
13426    done
13427  done
13428  done
13429IFS=$as_save_IFS
13430  if test -z "$ac_cv_path_SED"; then
13431    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13432  fi
13433else
13434  ac_cv_path_SED=$SED
13435fi
13436
13437fi
13438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13439$as_echo "$ac_cv_path_SED" >&6; }
13440 SED="$ac_cv_path_SED"
13441  rm -f conftest.sed
13442
13443  else
13444    # The variable is set, but is it from the command line or the environment?
13445
13446    # Try to remove the string !SED! from our list.
13447    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13448    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13449      # If it failed, the variable was not from the command line. Ignore it,
13450      # but warn the user (except for BASH, which is always set by the calling BASH).
13451      if test "xSED" != xBASH; then
13452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13453$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13454      fi
13455      # Try to locate tool using the code snippet
13456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13457$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13458if ${ac_cv_path_SED+:} false; then :
13459  $as_echo_n "(cached) " >&6
13460else
13461            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13462     for ac_i in 1 2 3 4 5 6 7; do
13463       ac_script="$ac_script$as_nl$ac_script"
13464     done
13465     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13466     { ac_script=; unset ac_script;}
13467     if test -z "$SED"; then
13468  ac_path_SED_found=false
13469  # Loop through the user's path and test for each of PROGNAME-LIST
13470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13471for as_dir in $PATH
13472do
13473  IFS=$as_save_IFS
13474  test -z "$as_dir" && as_dir=.
13475    for ac_prog in sed gsed; do
13476    for ac_exec_ext in '' $ac_executable_extensions; do
13477      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13478      as_fn_executable_p "$ac_path_SED" || continue
13479# Check for GNU ac_path_SED and select it if it is found.
13480  # Check for GNU $ac_path_SED
13481case `"$ac_path_SED" --version 2>&1` in
13482*GNU*)
13483  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13484*)
13485  ac_count=0
13486  $as_echo_n 0123456789 >"conftest.in"
13487  while :
13488  do
13489    cat "conftest.in" "conftest.in" >"conftest.tmp"
13490    mv "conftest.tmp" "conftest.in"
13491    cp "conftest.in" "conftest.nl"
13492    $as_echo '' >> "conftest.nl"
13493    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13494    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13495    as_fn_arith $ac_count + 1 && ac_count=$as_val
13496    if test $ac_count -gt ${ac_path_SED_max-0}; then
13497      # Best one so far, save it but keep looking for a better one
13498      ac_cv_path_SED="$ac_path_SED"
13499      ac_path_SED_max=$ac_count
13500    fi
13501    # 10*(2^10) chars as input seems more than enough
13502    test $ac_count -gt 10 && break
13503  done
13504  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13505esac
13506
13507      $ac_path_SED_found && break 3
13508    done
13509  done
13510  done
13511IFS=$as_save_IFS
13512  if test -z "$ac_cv_path_SED"; then
13513    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13514  fi
13515else
13516  ac_cv_path_SED=$SED
13517fi
13518
13519fi
13520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13521$as_echo "$ac_cv_path_SED" >&6; }
13522 SED="$ac_cv_path_SED"
13523  rm -f conftest.sed
13524
13525    else
13526      # If it succeeded, then it was overridden by the user. We will use it
13527      # for the tool.
13528
13529      # First remove it from the list of overridden variables, so we can test
13530      # for unknown variables in the end.
13531      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13532
13533      # Check if we try to supply an empty value
13534      if test "x$SED" = x; then
13535        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13536$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13537        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13538$as_echo_n "checking for SED... " >&6; }
13539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13540$as_echo "disabled" >&6; }
13541      else
13542        # Check if the provided tool contains a complete path.
13543        tool_specified="$SED"
13544        tool_basename="${tool_specified##*/}"
13545        if test "x$tool_basename" = "x$tool_specified"; then
13546          # A command without a complete path is provided, search $PATH.
13547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13548$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13549          # Extract the first word of "$tool_basename", so it can be a program name with args.
13550set dummy $tool_basename; ac_word=$2
13551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13552$as_echo_n "checking for $ac_word... " >&6; }
13553if ${ac_cv_path_SED+:} false; then :
13554  $as_echo_n "(cached) " >&6
13555else
13556  case $SED in
13557  [\\/]* | ?:[\\/]*)
13558  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13559  ;;
13560  *)
13561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13562for as_dir in $PATH
13563do
13564  IFS=$as_save_IFS
13565  test -z "$as_dir" && as_dir=.
13566    for ac_exec_ext in '' $ac_executable_extensions; do
13567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13568    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13570    break 2
13571  fi
13572done
13573  done
13574IFS=$as_save_IFS
13575
13576  ;;
13577esac
13578fi
13579SED=$ac_cv_path_SED
13580if test -n "$SED"; then
13581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13582$as_echo "$SED" >&6; }
13583else
13584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13585$as_echo "no" >&6; }
13586fi
13587
13588
13589          if test "x$SED" = x; then
13590            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13591          fi
13592        else
13593          # Otherwise we believe it is a complete path. Use it as it is.
13594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13595$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13596          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13597$as_echo_n "checking for SED... " >&6; }
13598          if test ! -x "$tool_specified"; then
13599            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13600$as_echo "not found" >&6; }
13601            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13602          fi
13603          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13604$as_echo "$tool_specified" >&6; }
13605        fi
13606      fi
13607    fi
13608
13609  fi
13610
13611
13612  if test "x$SED" = x; then
13613    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13614  fi
13615
13616
13617
13618  # Always force rm.
13619  RM="$RM -f"
13620
13621  # pwd behaves differently on various platforms and some don't support the -L flag.
13622  # Always use the bash builtin pwd to get uniform behavior.
13623  THEPWDCMD=pwd
13624
13625  # These are not required on all platforms
13626
13627
13628  # Publish this variable in the help.
13629
13630
13631  if [ -z "${CYGPATH+x}" ]; then
13632    # The variable is not set by user, try to locate tool using the code snippet
13633    for ac_prog in cygpath
13634do
13635  # Extract the first word of "$ac_prog", so it can be a program name with args.
13636set dummy $ac_prog; ac_word=$2
13637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13638$as_echo_n "checking for $ac_word... " >&6; }
13639if ${ac_cv_path_CYGPATH+:} false; then :
13640  $as_echo_n "(cached) " >&6
13641else
13642  case $CYGPATH in
13643  [\\/]* | ?:[\\/]*)
13644  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13645  ;;
13646  *)
13647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13648for as_dir in $PATH
13649do
13650  IFS=$as_save_IFS
13651  test -z "$as_dir" && as_dir=.
13652    for ac_exec_ext in '' $ac_executable_extensions; do
13653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13654    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13656    break 2
13657  fi
13658done
13659  done
13660IFS=$as_save_IFS
13661
13662  ;;
13663esac
13664fi
13665CYGPATH=$ac_cv_path_CYGPATH
13666if test -n "$CYGPATH"; then
13667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13668$as_echo "$CYGPATH" >&6; }
13669else
13670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13671$as_echo "no" >&6; }
13672fi
13673
13674
13675  test -n "$CYGPATH" && break
13676done
13677
13678  else
13679    # The variable is set, but is it from the command line or the environment?
13680
13681    # Try to remove the string !CYGPATH! from our list.
13682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13684      # If it failed, the variable was not from the command line. Ignore it,
13685      # but warn the user (except for BASH, which is always set by the calling BASH).
13686      if test "xCYGPATH" != xBASH; then
13687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13688$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13689      fi
13690      # Try to locate tool using the code snippet
13691      for ac_prog in cygpath
13692do
13693  # Extract the first word of "$ac_prog", so it can be a program name with args.
13694set dummy $ac_prog; ac_word=$2
13695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13696$as_echo_n "checking for $ac_word... " >&6; }
13697if ${ac_cv_path_CYGPATH+:} false; then :
13698  $as_echo_n "(cached) " >&6
13699else
13700  case $CYGPATH in
13701  [\\/]* | ?:[\\/]*)
13702  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13703  ;;
13704  *)
13705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13706for as_dir in $PATH
13707do
13708  IFS=$as_save_IFS
13709  test -z "$as_dir" && as_dir=.
13710    for ac_exec_ext in '' $ac_executable_extensions; do
13711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13712    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13714    break 2
13715  fi
13716done
13717  done
13718IFS=$as_save_IFS
13719
13720  ;;
13721esac
13722fi
13723CYGPATH=$ac_cv_path_CYGPATH
13724if test -n "$CYGPATH"; then
13725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13726$as_echo "$CYGPATH" >&6; }
13727else
13728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13729$as_echo "no" >&6; }
13730fi
13731
13732
13733  test -n "$CYGPATH" && break
13734done
13735
13736    else
13737      # If it succeeded, then it was overridden by the user. We will use it
13738      # for the tool.
13739
13740      # First remove it from the list of overridden variables, so we can test
13741      # for unknown variables in the end.
13742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13743
13744      # Check if we try to supply an empty value
13745      if test "x$CYGPATH" = x; then
13746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13747$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13749$as_echo_n "checking for CYGPATH... " >&6; }
13750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13751$as_echo "disabled" >&6; }
13752      else
13753        # Check if the provided tool contains a complete path.
13754        tool_specified="$CYGPATH"
13755        tool_basename="${tool_specified##*/}"
13756        if test "x$tool_basename" = "x$tool_specified"; then
13757          # A command without a complete path is provided, search $PATH.
13758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13759$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13760          # Extract the first word of "$tool_basename", so it can be a program name with args.
13761set dummy $tool_basename; ac_word=$2
13762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13763$as_echo_n "checking for $ac_word... " >&6; }
13764if ${ac_cv_path_CYGPATH+:} false; then :
13765  $as_echo_n "(cached) " >&6
13766else
13767  case $CYGPATH in
13768  [\\/]* | ?:[\\/]*)
13769  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13770  ;;
13771  *)
13772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13773for as_dir in $PATH
13774do
13775  IFS=$as_save_IFS
13776  test -z "$as_dir" && as_dir=.
13777    for ac_exec_ext in '' $ac_executable_extensions; do
13778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13779    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13781    break 2
13782  fi
13783done
13784  done
13785IFS=$as_save_IFS
13786
13787  ;;
13788esac
13789fi
13790CYGPATH=$ac_cv_path_CYGPATH
13791if test -n "$CYGPATH"; then
13792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13793$as_echo "$CYGPATH" >&6; }
13794else
13795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13796$as_echo "no" >&6; }
13797fi
13798
13799
13800          if test "x$CYGPATH" = x; then
13801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13802          fi
13803        else
13804          # Otherwise we believe it is a complete path. Use it as it is.
13805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13806$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13808$as_echo_n "checking for CYGPATH... " >&6; }
13809          if test ! -x "$tool_specified"; then
13810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13811$as_echo "not found" >&6; }
13812            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13813          fi
13814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13815$as_echo "$tool_specified" >&6; }
13816        fi
13817      fi
13818    fi
13819
13820  fi
13821
13822
13823
13824
13825  # Publish this variable in the help.
13826
13827
13828  if [ -z "${READLINK+x}" ]; then
13829    # The variable is not set by user, try to locate tool using the code snippet
13830    for ac_prog in greadlink readlink
13831do
13832  # Extract the first word of "$ac_prog", so it can be a program name with args.
13833set dummy $ac_prog; ac_word=$2
13834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13835$as_echo_n "checking for $ac_word... " >&6; }
13836if ${ac_cv_path_READLINK+:} false; then :
13837  $as_echo_n "(cached) " >&6
13838else
13839  case $READLINK in
13840  [\\/]* | ?:[\\/]*)
13841  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13842  ;;
13843  *)
13844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13845for as_dir in $PATH
13846do
13847  IFS=$as_save_IFS
13848  test -z "$as_dir" && as_dir=.
13849    for ac_exec_ext in '' $ac_executable_extensions; do
13850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13851    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13853    break 2
13854  fi
13855done
13856  done
13857IFS=$as_save_IFS
13858
13859  ;;
13860esac
13861fi
13862READLINK=$ac_cv_path_READLINK
13863if test -n "$READLINK"; then
13864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13865$as_echo "$READLINK" >&6; }
13866else
13867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13868$as_echo "no" >&6; }
13869fi
13870
13871
13872  test -n "$READLINK" && break
13873done
13874
13875  else
13876    # The variable is set, but is it from the command line or the environment?
13877
13878    # Try to remove the string !READLINK! from our list.
13879    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13880    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13881      # If it failed, the variable was not from the command line. Ignore it,
13882      # but warn the user (except for BASH, which is always set by the calling BASH).
13883      if test "xREADLINK" != xBASH; then
13884        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13885$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13886      fi
13887      # Try to locate tool using the code snippet
13888      for ac_prog in greadlink readlink
13889do
13890  # Extract the first word of "$ac_prog", so it can be a program name with args.
13891set dummy $ac_prog; ac_word=$2
13892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13893$as_echo_n "checking for $ac_word... " >&6; }
13894if ${ac_cv_path_READLINK+:} false; then :
13895  $as_echo_n "(cached) " >&6
13896else
13897  case $READLINK in
13898  [\\/]* | ?:[\\/]*)
13899  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13900  ;;
13901  *)
13902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13903for as_dir in $PATH
13904do
13905  IFS=$as_save_IFS
13906  test -z "$as_dir" && as_dir=.
13907    for ac_exec_ext in '' $ac_executable_extensions; do
13908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13909    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13911    break 2
13912  fi
13913done
13914  done
13915IFS=$as_save_IFS
13916
13917  ;;
13918esac
13919fi
13920READLINK=$ac_cv_path_READLINK
13921if test -n "$READLINK"; then
13922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13923$as_echo "$READLINK" >&6; }
13924else
13925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13926$as_echo "no" >&6; }
13927fi
13928
13929
13930  test -n "$READLINK" && break
13931done
13932
13933    else
13934      # If it succeeded, then it was overridden by the user. We will use it
13935      # for the tool.
13936
13937      # First remove it from the list of overridden variables, so we can test
13938      # for unknown variables in the end.
13939      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13940
13941      # Check if we try to supply an empty value
13942      if test "x$READLINK" = x; then
13943        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13944$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13945        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13946$as_echo_n "checking for READLINK... " >&6; }
13947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13948$as_echo "disabled" >&6; }
13949      else
13950        # Check if the provided tool contains a complete path.
13951        tool_specified="$READLINK"
13952        tool_basename="${tool_specified##*/}"
13953        if test "x$tool_basename" = "x$tool_specified"; then
13954          # A command without a complete path is provided, search $PATH.
13955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13956$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13957          # Extract the first word of "$tool_basename", so it can be a program name with args.
13958set dummy $tool_basename; ac_word=$2
13959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13960$as_echo_n "checking for $ac_word... " >&6; }
13961if ${ac_cv_path_READLINK+:} false; then :
13962  $as_echo_n "(cached) " >&6
13963else
13964  case $READLINK in
13965  [\\/]* | ?:[\\/]*)
13966  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13967  ;;
13968  *)
13969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13970for as_dir in $PATH
13971do
13972  IFS=$as_save_IFS
13973  test -z "$as_dir" && as_dir=.
13974    for ac_exec_ext in '' $ac_executable_extensions; do
13975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13976    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13978    break 2
13979  fi
13980done
13981  done
13982IFS=$as_save_IFS
13983
13984  ;;
13985esac
13986fi
13987READLINK=$ac_cv_path_READLINK
13988if test -n "$READLINK"; then
13989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13990$as_echo "$READLINK" >&6; }
13991else
13992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13993$as_echo "no" >&6; }
13994fi
13995
13996
13997          if test "x$READLINK" = x; then
13998            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13999          fi
14000        else
14001          # Otherwise we believe it is a complete path. Use it as it is.
14002          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14003$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14004          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14005$as_echo_n "checking for READLINK... " >&6; }
14006          if test ! -x "$tool_specified"; then
14007            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14008$as_echo "not found" >&6; }
14009            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14010          fi
14011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14012$as_echo "$tool_specified" >&6; }
14013        fi
14014      fi
14015    fi
14016
14017  fi
14018
14019
14020
14021
14022  # Publish this variable in the help.
14023
14024
14025  if [ -z "${DF+x}" ]; then
14026    # The variable is not set by user, try to locate tool using the code snippet
14027    for ac_prog in df
14028do
14029  # Extract the first word of "$ac_prog", so it can be a program name with args.
14030set dummy $ac_prog; ac_word=$2
14031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14032$as_echo_n "checking for $ac_word... " >&6; }
14033if ${ac_cv_path_DF+:} false; then :
14034  $as_echo_n "(cached) " >&6
14035else
14036  case $DF in
14037  [\\/]* | ?:[\\/]*)
14038  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14039  ;;
14040  *)
14041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14042for as_dir in $PATH
14043do
14044  IFS=$as_save_IFS
14045  test -z "$as_dir" && as_dir=.
14046    for ac_exec_ext in '' $ac_executable_extensions; do
14047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14048    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14050    break 2
14051  fi
14052done
14053  done
14054IFS=$as_save_IFS
14055
14056  ;;
14057esac
14058fi
14059DF=$ac_cv_path_DF
14060if test -n "$DF"; then
14061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14062$as_echo "$DF" >&6; }
14063else
14064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14065$as_echo "no" >&6; }
14066fi
14067
14068
14069  test -n "$DF" && break
14070done
14071
14072  else
14073    # The variable is set, but is it from the command line or the environment?
14074
14075    # Try to remove the string !DF! from our list.
14076    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14077    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14078      # If it failed, the variable was not from the command line. Ignore it,
14079      # but warn the user (except for BASH, which is always set by the calling BASH).
14080      if test "xDF" != xBASH; then
14081        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14082$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14083      fi
14084      # Try to locate tool using the code snippet
14085      for ac_prog in df
14086do
14087  # Extract the first word of "$ac_prog", so it can be a program name with args.
14088set dummy $ac_prog; ac_word=$2
14089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14090$as_echo_n "checking for $ac_word... " >&6; }
14091if ${ac_cv_path_DF+:} false; then :
14092  $as_echo_n "(cached) " >&6
14093else
14094  case $DF in
14095  [\\/]* | ?:[\\/]*)
14096  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14097  ;;
14098  *)
14099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14100for as_dir in $PATH
14101do
14102  IFS=$as_save_IFS
14103  test -z "$as_dir" && as_dir=.
14104    for ac_exec_ext in '' $ac_executable_extensions; do
14105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14106    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14108    break 2
14109  fi
14110done
14111  done
14112IFS=$as_save_IFS
14113
14114  ;;
14115esac
14116fi
14117DF=$ac_cv_path_DF
14118if test -n "$DF"; then
14119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14120$as_echo "$DF" >&6; }
14121else
14122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14123$as_echo "no" >&6; }
14124fi
14125
14126
14127  test -n "$DF" && break
14128done
14129
14130    else
14131      # If it succeeded, then it was overridden by the user. We will use it
14132      # for the tool.
14133
14134      # First remove it from the list of overridden variables, so we can test
14135      # for unknown variables in the end.
14136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14137
14138      # Check if we try to supply an empty value
14139      if test "x$DF" = x; then
14140        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14141$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14142        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14143$as_echo_n "checking for DF... " >&6; }
14144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14145$as_echo "disabled" >&6; }
14146      else
14147        # Check if the provided tool contains a complete path.
14148        tool_specified="$DF"
14149        tool_basename="${tool_specified##*/}"
14150        if test "x$tool_basename" = "x$tool_specified"; then
14151          # A command without a complete path is provided, search $PATH.
14152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14153$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14154          # Extract the first word of "$tool_basename", so it can be a program name with args.
14155set dummy $tool_basename; ac_word=$2
14156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14157$as_echo_n "checking for $ac_word... " >&6; }
14158if ${ac_cv_path_DF+:} false; then :
14159  $as_echo_n "(cached) " >&6
14160else
14161  case $DF in
14162  [\\/]* | ?:[\\/]*)
14163  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14164  ;;
14165  *)
14166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14167for as_dir in $PATH
14168do
14169  IFS=$as_save_IFS
14170  test -z "$as_dir" && as_dir=.
14171    for ac_exec_ext in '' $ac_executable_extensions; do
14172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14173    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14175    break 2
14176  fi
14177done
14178  done
14179IFS=$as_save_IFS
14180
14181  ;;
14182esac
14183fi
14184DF=$ac_cv_path_DF
14185if test -n "$DF"; then
14186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14187$as_echo "$DF" >&6; }
14188else
14189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14190$as_echo "no" >&6; }
14191fi
14192
14193
14194          if test "x$DF" = x; then
14195            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14196          fi
14197        else
14198          # Otherwise we believe it is a complete path. Use it as it is.
14199          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14200$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14201          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14202$as_echo_n "checking for DF... " >&6; }
14203          if test ! -x "$tool_specified"; then
14204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14205$as_echo "not found" >&6; }
14206            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14207          fi
14208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14209$as_echo "$tool_specified" >&6; }
14210        fi
14211      fi
14212    fi
14213
14214  fi
14215
14216
14217
14218
14219  # Publish this variable in the help.
14220
14221
14222  if [ -z "${CPIO+x}" ]; then
14223    # The variable is not set by user, try to locate tool using the code snippet
14224    for ac_prog in cpio bsdcpio
14225do
14226  # Extract the first word of "$ac_prog", so it can be a program name with args.
14227set dummy $ac_prog; ac_word=$2
14228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14229$as_echo_n "checking for $ac_word... " >&6; }
14230if ${ac_cv_path_CPIO+:} false; then :
14231  $as_echo_n "(cached) " >&6
14232else
14233  case $CPIO in
14234  [\\/]* | ?:[\\/]*)
14235  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14236  ;;
14237  *)
14238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14239for as_dir in $PATH
14240do
14241  IFS=$as_save_IFS
14242  test -z "$as_dir" && as_dir=.
14243    for ac_exec_ext in '' $ac_executable_extensions; do
14244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14245    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14247    break 2
14248  fi
14249done
14250  done
14251IFS=$as_save_IFS
14252
14253  ;;
14254esac
14255fi
14256CPIO=$ac_cv_path_CPIO
14257if test -n "$CPIO"; then
14258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14259$as_echo "$CPIO" >&6; }
14260else
14261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14262$as_echo "no" >&6; }
14263fi
14264
14265
14266  test -n "$CPIO" && break
14267done
14268
14269  else
14270    # The variable is set, but is it from the command line or the environment?
14271
14272    # Try to remove the string !CPIO! from our list.
14273    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14274    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14275      # If it failed, the variable was not from the command line. Ignore it,
14276      # but warn the user (except for BASH, which is always set by the calling BASH).
14277      if test "xCPIO" != xBASH; then
14278        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14279$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14280      fi
14281      # Try to locate tool using the code snippet
14282      for ac_prog in cpio bsdcpio
14283do
14284  # Extract the first word of "$ac_prog", so it can be a program name with args.
14285set dummy $ac_prog; ac_word=$2
14286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14287$as_echo_n "checking for $ac_word... " >&6; }
14288if ${ac_cv_path_CPIO+:} false; then :
14289  $as_echo_n "(cached) " >&6
14290else
14291  case $CPIO in
14292  [\\/]* | ?:[\\/]*)
14293  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14294  ;;
14295  *)
14296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14297for as_dir in $PATH
14298do
14299  IFS=$as_save_IFS
14300  test -z "$as_dir" && as_dir=.
14301    for ac_exec_ext in '' $ac_executable_extensions; do
14302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14303    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14305    break 2
14306  fi
14307done
14308  done
14309IFS=$as_save_IFS
14310
14311  ;;
14312esac
14313fi
14314CPIO=$ac_cv_path_CPIO
14315if test -n "$CPIO"; then
14316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14317$as_echo "$CPIO" >&6; }
14318else
14319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14320$as_echo "no" >&6; }
14321fi
14322
14323
14324  test -n "$CPIO" && break
14325done
14326
14327    else
14328      # If it succeeded, then it was overridden by the user. We will use it
14329      # for the tool.
14330
14331      # First remove it from the list of overridden variables, so we can test
14332      # for unknown variables in the end.
14333      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14334
14335      # Check if we try to supply an empty value
14336      if test "x$CPIO" = x; then
14337        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14338$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14340$as_echo_n "checking for CPIO... " >&6; }
14341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14342$as_echo "disabled" >&6; }
14343      else
14344        # Check if the provided tool contains a complete path.
14345        tool_specified="$CPIO"
14346        tool_basename="${tool_specified##*/}"
14347        if test "x$tool_basename" = "x$tool_specified"; then
14348          # A command without a complete path is provided, search $PATH.
14349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14350$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14351          # Extract the first word of "$tool_basename", so it can be a program name with args.
14352set dummy $tool_basename; ac_word=$2
14353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14354$as_echo_n "checking for $ac_word... " >&6; }
14355if ${ac_cv_path_CPIO+:} false; then :
14356  $as_echo_n "(cached) " >&6
14357else
14358  case $CPIO in
14359  [\\/]* | ?:[\\/]*)
14360  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14361  ;;
14362  *)
14363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14364for as_dir in $PATH
14365do
14366  IFS=$as_save_IFS
14367  test -z "$as_dir" && as_dir=.
14368    for ac_exec_ext in '' $ac_executable_extensions; do
14369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14370    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14372    break 2
14373  fi
14374done
14375  done
14376IFS=$as_save_IFS
14377
14378  ;;
14379esac
14380fi
14381CPIO=$ac_cv_path_CPIO
14382if test -n "$CPIO"; then
14383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14384$as_echo "$CPIO" >&6; }
14385else
14386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14387$as_echo "no" >&6; }
14388fi
14389
14390
14391          if test "x$CPIO" = x; then
14392            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14393          fi
14394        else
14395          # Otherwise we believe it is a complete path. Use it as it is.
14396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14397$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14398          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14399$as_echo_n "checking for CPIO... " >&6; }
14400          if test ! -x "$tool_specified"; then
14401            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14402$as_echo "not found" >&6; }
14403            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14404          fi
14405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14406$as_echo "$tool_specified" >&6; }
14407        fi
14408      fi
14409    fi
14410
14411  fi
14412
14413
14414
14415
14416  # Publish this variable in the help.
14417
14418
14419  if [ -z "${NICE+x}" ]; then
14420    # The variable is not set by user, try to locate tool using the code snippet
14421    for ac_prog in nice
14422do
14423  # Extract the first word of "$ac_prog", so it can be a program name with args.
14424set dummy $ac_prog; ac_word=$2
14425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14426$as_echo_n "checking for $ac_word... " >&6; }
14427if ${ac_cv_path_NICE+:} false; then :
14428  $as_echo_n "(cached) " >&6
14429else
14430  case $NICE in
14431  [\\/]* | ?:[\\/]*)
14432  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14433  ;;
14434  *)
14435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14436for as_dir in $PATH
14437do
14438  IFS=$as_save_IFS
14439  test -z "$as_dir" && as_dir=.
14440    for ac_exec_ext in '' $ac_executable_extensions; do
14441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14442    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14444    break 2
14445  fi
14446done
14447  done
14448IFS=$as_save_IFS
14449
14450  ;;
14451esac
14452fi
14453NICE=$ac_cv_path_NICE
14454if test -n "$NICE"; then
14455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14456$as_echo "$NICE" >&6; }
14457else
14458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14459$as_echo "no" >&6; }
14460fi
14461
14462
14463  test -n "$NICE" && break
14464done
14465
14466  else
14467    # The variable is set, but is it from the command line or the environment?
14468
14469    # Try to remove the string !NICE! from our list.
14470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14472      # If it failed, the variable was not from the command line. Ignore it,
14473      # but warn the user (except for BASH, which is always set by the calling BASH).
14474      if test "xNICE" != xBASH; then
14475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14476$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14477      fi
14478      # Try to locate tool using the code snippet
14479      for ac_prog in nice
14480do
14481  # Extract the first word of "$ac_prog", so it can be a program name with args.
14482set dummy $ac_prog; ac_word=$2
14483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14484$as_echo_n "checking for $ac_word... " >&6; }
14485if ${ac_cv_path_NICE+:} false; then :
14486  $as_echo_n "(cached) " >&6
14487else
14488  case $NICE in
14489  [\\/]* | ?:[\\/]*)
14490  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14491  ;;
14492  *)
14493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14494for as_dir in $PATH
14495do
14496  IFS=$as_save_IFS
14497  test -z "$as_dir" && as_dir=.
14498    for ac_exec_ext in '' $ac_executable_extensions; do
14499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14500    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14502    break 2
14503  fi
14504done
14505  done
14506IFS=$as_save_IFS
14507
14508  ;;
14509esac
14510fi
14511NICE=$ac_cv_path_NICE
14512if test -n "$NICE"; then
14513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14514$as_echo "$NICE" >&6; }
14515else
14516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14517$as_echo "no" >&6; }
14518fi
14519
14520
14521  test -n "$NICE" && break
14522done
14523
14524    else
14525      # If it succeeded, then it was overridden by the user. We will use it
14526      # for the tool.
14527
14528      # First remove it from the list of overridden variables, so we can test
14529      # for unknown variables in the end.
14530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14531
14532      # Check if we try to supply an empty value
14533      if test "x$NICE" = x; then
14534        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14535$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14537$as_echo_n "checking for NICE... " >&6; }
14538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14539$as_echo "disabled" >&6; }
14540      else
14541        # Check if the provided tool contains a complete path.
14542        tool_specified="$NICE"
14543        tool_basename="${tool_specified##*/}"
14544        if test "x$tool_basename" = "x$tool_specified"; then
14545          # A command without a complete path is provided, search $PATH.
14546          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14547$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14548          # Extract the first word of "$tool_basename", so it can be a program name with args.
14549set dummy $tool_basename; ac_word=$2
14550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14551$as_echo_n "checking for $ac_word... " >&6; }
14552if ${ac_cv_path_NICE+:} false; then :
14553  $as_echo_n "(cached) " >&6
14554else
14555  case $NICE in
14556  [\\/]* | ?:[\\/]*)
14557  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14558  ;;
14559  *)
14560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14561for as_dir in $PATH
14562do
14563  IFS=$as_save_IFS
14564  test -z "$as_dir" && as_dir=.
14565    for ac_exec_ext in '' $ac_executable_extensions; do
14566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14567    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14569    break 2
14570  fi
14571done
14572  done
14573IFS=$as_save_IFS
14574
14575  ;;
14576esac
14577fi
14578NICE=$ac_cv_path_NICE
14579if test -n "$NICE"; then
14580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14581$as_echo "$NICE" >&6; }
14582else
14583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14584$as_echo "no" >&6; }
14585fi
14586
14587
14588          if test "x$NICE" = x; then
14589            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14590          fi
14591        else
14592          # Otherwise we believe it is a complete path. Use it as it is.
14593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14594$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14595          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14596$as_echo_n "checking for NICE... " >&6; }
14597          if test ! -x "$tool_specified"; then
14598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14599$as_echo "not found" >&6; }
14600            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14601          fi
14602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14603$as_echo "$tool_specified" >&6; }
14604        fi
14605      fi
14606    fi
14607
14608  fi
14609
14610
14611
14612
14613# Now we can determine OpenJDK build and target platforms. This is required to
14614# have early on.
14615# Make sure we can run config.sub.
14616$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14617  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14618
14619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14620$as_echo_n "checking build system type... " >&6; }
14621if ${ac_cv_build+:} false; then :
14622  $as_echo_n "(cached) " >&6
14623else
14624  ac_build_alias=$build_alias
14625test "x$ac_build_alias" = x &&
14626  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14627test "x$ac_build_alias" = x &&
14628  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14629ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14630  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14631
14632fi
14633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14634$as_echo "$ac_cv_build" >&6; }
14635case $ac_cv_build in
14636*-*-*) ;;
14637*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14638esac
14639build=$ac_cv_build
14640ac_save_IFS=$IFS; IFS='-'
14641set x $ac_cv_build
14642shift
14643build_cpu=$1
14644build_vendor=$2
14645shift; shift
14646# Remember, the first character of IFS is used to create $*,
14647# except with old shells:
14648build_os=$*
14649IFS=$ac_save_IFS
14650case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14651
14652
14653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14654$as_echo_n "checking host system type... " >&6; }
14655if ${ac_cv_host+:} false; then :
14656  $as_echo_n "(cached) " >&6
14657else
14658  if test "x$host_alias" = x; then
14659  ac_cv_host=$ac_cv_build
14660else
14661  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14662    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14663fi
14664
14665fi
14666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14667$as_echo "$ac_cv_host" >&6; }
14668case $ac_cv_host in
14669*-*-*) ;;
14670*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14671esac
14672host=$ac_cv_host
14673ac_save_IFS=$IFS; IFS='-'
14674set x $ac_cv_host
14675shift
14676host_cpu=$1
14677host_vendor=$2
14678shift; shift
14679# Remember, the first character of IFS is used to create $*,
14680# except with old shells:
14681host_os=$*
14682IFS=$ac_save_IFS
14683case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14684
14685
14686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14687$as_echo_n "checking target system type... " >&6; }
14688if ${ac_cv_target+:} false; then :
14689  $as_echo_n "(cached) " >&6
14690else
14691  if test "x$target_alias" = x; then
14692  ac_cv_target=$ac_cv_host
14693else
14694  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14695    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14696fi
14697
14698fi
14699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14700$as_echo "$ac_cv_target" >&6; }
14701case $ac_cv_target in
14702*-*-*) ;;
14703*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14704esac
14705target=$ac_cv_target
14706ac_save_IFS=$IFS; IFS='-'
14707set x $ac_cv_target
14708shift
14709target_cpu=$1
14710target_vendor=$2
14711shift; shift
14712# Remember, the first character of IFS is used to create $*,
14713# except with old shells:
14714target_os=$*
14715IFS=$ac_save_IFS
14716case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14717
14718
14719# The aliases save the names the user supplied, while $host etc.
14720# will get canonicalized.
14721test -n "$target_alias" &&
14722  test "$program_prefix$program_suffix$program_transform_name" = \
14723    NONENONEs,x,x, &&
14724  program_prefix=${target_alias}-
14725
14726  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14727  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14728  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14729  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14730  # to use the configure naming style.
14731
14732
14733
14734
14735
14736  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14737  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14738  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14739  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14740  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14741  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14742
14743
14744
14745  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14746
14747  case "$build_os" in
14748    *linux*)
14749      VAR_OS=linux
14750      VAR_OS_TYPE=unix
14751      ;;
14752    *solaris*)
14753      VAR_OS=solaris
14754      VAR_OS_TYPE=unix
14755      ;;
14756    *darwin*)
14757      VAR_OS=macosx
14758      VAR_OS_TYPE=unix
14759      ;;
14760    *bsd*)
14761      VAR_OS=bsd
14762      VAR_OS_TYPE=unix
14763      ;;
14764    *cygwin*)
14765      VAR_OS=windows
14766      VAR_OS_ENV=windows.cygwin
14767      ;;
14768    *mingw*)
14769      VAR_OS=windows
14770      VAR_OS_ENV=windows.msys
14771      ;;
14772    *aix*)
14773      VAR_OS=aix
14774      VAR_OS_TYPE=unix
14775      ;;
14776    *)
14777      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14778      ;;
14779  esac
14780
14781
14782  # First argument is the cpu name from the trip/quad
14783  case "$build_cpu" in
14784    x86_64)
14785      VAR_CPU=x86_64
14786      VAR_CPU_ARCH=x86
14787      VAR_CPU_BITS=64
14788      VAR_CPU_ENDIAN=little
14789      ;;
14790    i?86)
14791      VAR_CPU=x86
14792      VAR_CPU_ARCH=x86
14793      VAR_CPU_BITS=32
14794      VAR_CPU_ENDIAN=little
14795      ;;
14796    arm*)
14797      VAR_CPU=arm
14798      VAR_CPU_ARCH=arm
14799      VAR_CPU_BITS=32
14800      VAR_CPU_ENDIAN=little
14801      ;;
14802    aarch64)
14803      VAR_CPU=aarch64
14804      VAR_CPU_ARCH=aarch64
14805      VAR_CPU_BITS=64
14806      VAR_CPU_ENDIAN=little
14807      ;;
14808    powerpc)
14809      VAR_CPU=ppc
14810      VAR_CPU_ARCH=ppc
14811      VAR_CPU_BITS=32
14812      VAR_CPU_ENDIAN=big
14813      ;;
14814    powerpc64)
14815      VAR_CPU=ppc64
14816      VAR_CPU_ARCH=ppc
14817      VAR_CPU_BITS=64
14818      VAR_CPU_ENDIAN=big
14819      ;;
14820    powerpc64le)
14821      VAR_CPU=ppc64le
14822      VAR_CPU_ARCH=ppc
14823      VAR_CPU_BITS=64
14824      VAR_CPU_ENDIAN=little
14825      ;;
14826    s390)
14827      VAR_CPU=s390
14828      VAR_CPU_ARCH=s390
14829      VAR_CPU_BITS=32
14830      VAR_CPU_ENDIAN=big
14831      ;;
14832    s390x)
14833      VAR_CPU=s390x
14834      VAR_CPU_ARCH=s390
14835      VAR_CPU_BITS=64
14836      VAR_CPU_ENDIAN=big
14837      ;;
14838    sparc)
14839      VAR_CPU=sparc
14840      VAR_CPU_ARCH=sparc
14841      VAR_CPU_BITS=32
14842      VAR_CPU_ENDIAN=big
14843      ;;
14844    sparcv9|sparc64)
14845      VAR_CPU=sparcv9
14846      VAR_CPU_ARCH=sparc
14847      VAR_CPU_BITS=64
14848      VAR_CPU_ENDIAN=big
14849      ;;
14850    *)
14851      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14852      ;;
14853  esac
14854
14855  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14856  OPENJDK_BUILD_OS="$VAR_OS"
14857  if test "x$VAR_OS_TYPE" != x; then
14858    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14859  else
14860    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14861  fi
14862  if test "x$VAR_OS_ENV" != x; then
14863    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14864  else
14865    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14866  fi
14867  OPENJDK_BUILD_CPU="$VAR_CPU"
14868  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14869  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14870  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14871
14872
14873
14874
14875
14876
14877
14878
14879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14880$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14882$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14883
14884  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14885
14886  case "$host_os" in
14887    *linux*)
14888      VAR_OS=linux
14889      VAR_OS_TYPE=unix
14890      ;;
14891    *solaris*)
14892      VAR_OS=solaris
14893      VAR_OS_TYPE=unix
14894      ;;
14895    *darwin*)
14896      VAR_OS=macosx
14897      VAR_OS_TYPE=unix
14898      ;;
14899    *bsd*)
14900      VAR_OS=bsd
14901      VAR_OS_TYPE=unix
14902      ;;
14903    *cygwin*)
14904      VAR_OS=windows
14905      VAR_OS_ENV=windows.cygwin
14906      ;;
14907    *mingw*)
14908      VAR_OS=windows
14909      VAR_OS_ENV=windows.msys
14910      ;;
14911    *aix*)
14912      VAR_OS=aix
14913      VAR_OS_TYPE=unix
14914      ;;
14915    *)
14916      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14917      ;;
14918  esac
14919
14920
14921  # First argument is the cpu name from the trip/quad
14922  case "$host_cpu" in
14923    x86_64)
14924      VAR_CPU=x86_64
14925      VAR_CPU_ARCH=x86
14926      VAR_CPU_BITS=64
14927      VAR_CPU_ENDIAN=little
14928      ;;
14929    i?86)
14930      VAR_CPU=x86
14931      VAR_CPU_ARCH=x86
14932      VAR_CPU_BITS=32
14933      VAR_CPU_ENDIAN=little
14934      ;;
14935    arm*)
14936      VAR_CPU=arm
14937      VAR_CPU_ARCH=arm
14938      VAR_CPU_BITS=32
14939      VAR_CPU_ENDIAN=little
14940      ;;
14941    aarch64)
14942      VAR_CPU=aarch64
14943      VAR_CPU_ARCH=aarch64
14944      VAR_CPU_BITS=64
14945      VAR_CPU_ENDIAN=little
14946      ;;
14947    powerpc)
14948      VAR_CPU=ppc
14949      VAR_CPU_ARCH=ppc
14950      VAR_CPU_BITS=32
14951      VAR_CPU_ENDIAN=big
14952      ;;
14953    powerpc64)
14954      VAR_CPU=ppc64
14955      VAR_CPU_ARCH=ppc
14956      VAR_CPU_BITS=64
14957      VAR_CPU_ENDIAN=big
14958      ;;
14959    powerpc64le)
14960      VAR_CPU=ppc64le
14961      VAR_CPU_ARCH=ppc
14962      VAR_CPU_BITS=64
14963      VAR_CPU_ENDIAN=little
14964      ;;
14965    s390)
14966      VAR_CPU=s390
14967      VAR_CPU_ARCH=s390
14968      VAR_CPU_BITS=32
14969      VAR_CPU_ENDIAN=big
14970      ;;
14971    s390x)
14972      VAR_CPU=s390x
14973      VAR_CPU_ARCH=s390
14974      VAR_CPU_BITS=64
14975      VAR_CPU_ENDIAN=big
14976      ;;
14977    sparc)
14978      VAR_CPU=sparc
14979      VAR_CPU_ARCH=sparc
14980      VAR_CPU_BITS=32
14981      VAR_CPU_ENDIAN=big
14982      ;;
14983    sparcv9|sparc64)
14984      VAR_CPU=sparcv9
14985      VAR_CPU_ARCH=sparc
14986      VAR_CPU_BITS=64
14987      VAR_CPU_ENDIAN=big
14988      ;;
14989    *)
14990      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14991      ;;
14992  esac
14993
14994  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14995  OPENJDK_TARGET_OS="$VAR_OS"
14996  if test "x$VAR_OS_TYPE" != x; then
14997    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14998  else
14999    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15000  fi
15001  if test "x$VAR_OS_ENV" != x; then
15002    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15003  else
15004    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15005  fi
15006  OPENJDK_TARGET_CPU="$VAR_CPU"
15007  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15008  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15009  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15010
15011
15012
15013
15014
15015
15016
15017
15018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15019$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15021$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15022
15023
15024
15025# Check whether --with-target-bits was given.
15026if test "${with_target_bits+set}" = set; then :
15027  withval=$with_target_bits;
15028fi
15029
15030
15031  # We have three types of compiles:
15032  # native  == normal compilation, target system == build system
15033  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15034  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15035  #
15036  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15037    # We're doing a proper cross-compilation
15038    COMPILE_TYPE="cross"
15039  else
15040    COMPILE_TYPE="native"
15041  fi
15042
15043  if test "x$with_target_bits" != x; then
15044    if test "x$COMPILE_TYPE" = "xcross"; then
15045      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15046    fi
15047
15048    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15049      # A reduced build is requested
15050      COMPILE_TYPE="reduced"
15051      OPENJDK_TARGET_CPU_BITS=32
15052      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15053        OPENJDK_TARGET_CPU=x86
15054      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15055        OPENJDK_TARGET_CPU=sparc
15056      else
15057        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15058      fi
15059    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15060      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
15061    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15062      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15063$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15064    else
15065      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15066    fi
15067  fi
15068
15069
15070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15071$as_echo_n "checking compilation type... " >&6; }
15072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15073$as_echo "$COMPILE_TYPE" >&6; }
15074
15075
15076  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15077    REQUIRED_OS_NAME=SunOS
15078    REQUIRED_OS_VERSION=5.10
15079  fi
15080  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15081    REQUIRED_OS_NAME=Linux
15082    REQUIRED_OS_VERSION=2.6
15083  fi
15084  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15085    REQUIRED_OS_NAME=Windows
15086    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15087      REQUIRED_OS_VERSION=5.2
15088    else
15089      REQUIRED_OS_VERSION=5.1
15090    fi
15091  fi
15092  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15093    REQUIRED_OS_NAME=Darwin
15094    REQUIRED_OS_VERSION=11.2
15095  fi
15096
15097
15098
15099
15100
15101  # Also store the legacy naming of the cpu.
15102  # Ie i586 and amd64 instead of x86 and x86_64
15103  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15104  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15105    OPENJDK_TARGET_CPU_LEGACY="i586"
15106  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15107    # On all platforms except MacOSX replace x86_64 with amd64.
15108    OPENJDK_TARGET_CPU_LEGACY="amd64"
15109  fi
15110
15111
15112  # And the second legacy naming of the cpu.
15113  # Ie i386 and amd64 instead of x86 and x86_64.
15114  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15115  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15116    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15117  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15118    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15119  fi
15120
15121
15122  # This is the name of the cpu (but using i386 and amd64 instead of
15123  # x86 and x86_64, respectively), preceeded by a /, to be used when
15124  # locating libraries. On macosx, it's empty, though.
15125  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15126  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15127    OPENJDK_TARGET_CPU_LIBDIR=""
15128  fi
15129
15130
15131  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15132  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15133  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15134  OPENJDK_TARGET_CPU_ISADIR=""
15135  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15136    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15137      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15138    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15139      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15140    fi
15141  fi
15142
15143
15144  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15145  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15146  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15147    # On linux only, we replace x86 with i386.
15148    OPENJDK_TARGET_CPU_OSARCH="i386"
15149  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15150    # On all platforms except macosx, we replace x86_64 with amd64.
15151    OPENJDK_TARGET_CPU_OSARCH="amd64"
15152  fi
15153
15154
15155  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15156  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15157    OPENJDK_TARGET_CPU_JLI="i386"
15158  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15159    # On all platforms except macosx, we replace x86_64 with amd64.
15160    OPENJDK_TARGET_CPU_JLI="amd64"
15161  fi
15162  # Now setup the -D flags for building libjli.
15163  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15164  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15165    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15166      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15167    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15168      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15169    fi
15170  fi
15171
15172
15173  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15174      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15175  else
15176      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15177  fi
15178
15179
15180  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15181    A_LP64="LP64:="
15182    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15183    # unpack200.exe
15184    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15185      ADD_LP64="-D_LP64=1"
15186    fi
15187  fi
15188  LP64=$A_LP64
15189
15190
15191  if test "x$COMPILE_TYPE" = "xcross"; then
15192    # FIXME: ... or should this include reduced builds..?
15193    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15194  else
15195    DEFINE_CROSS_COMPILE_ARCH=""
15196  fi
15197
15198
15199  # ZERO_ARCHDEF is used to enable architecture-specific code
15200  case "${OPENJDK_TARGET_CPU}" in
15201    ppc)     ZERO_ARCHDEF=PPC32 ;;
15202    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15203    s390*)   ZERO_ARCHDEF=S390  ;;
15204    sparc*)  ZERO_ARCHDEF=SPARC ;;
15205    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15206    x86)     ZERO_ARCHDEF=IA32  ;;
15207    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15208  esac
15209
15210
15211
15212
15213# Continue setting up basic stuff. Most remaining code require fundamental tools.
15214
15215  # Save the current directory this script was started from
15216  CURDIR="$PWD"
15217
15218  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15219  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15220  # was not available at that time.
15221  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15222  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15223    ORIGINAL_PATH="$REWRITTEN_PATH"
15224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15225$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15226  fi
15227
15228  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15229    PATH_SEP=";"
15230
15231  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15232  if test $SRC_ROOT_LENGTH -gt 100; then
15233    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15234  fi
15235
15236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15238$as_echo_n "checking cygwin release... " >&6; }
15239    CYGWIN_VERSION=`$UNAME -r`
15240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15241$as_echo "$CYGWIN_VERSION" >&6; }
15242    WINDOWS_ENV_VENDOR='cygwin'
15243    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15244
15245    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15246    if test "x$CYGWIN_VERSION_OLD" != x; then
15247      { $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
15248$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;}
15249      as_fn_error $? "Cannot continue" "$LINENO" 5
15250    fi
15251    if test "x$CYGPATH" = x; then
15252      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15253    fi
15254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15255$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15256    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15257    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15258    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15259    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15261$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15262    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15263    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15264    if test "x$test_cygdrive_prefix" = x; then
15265      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15266    fi
15267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15269$as_echo_n "checking msys release... " >&6; }
15270    MSYS_VERSION=`$UNAME -r`
15271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15272$as_echo "$MSYS_VERSION" >&6; }
15273
15274    WINDOWS_ENV_VENDOR='msys'
15275    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15276
15277    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15278$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15279    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15280    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15281
15282  windows_path="$MSYS_ROOT_PATH"
15283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15284    unix_path=`$CYGPATH -u "$windows_path"`
15285    MSYS_ROOT_PATH="$unix_path"
15286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15288    MSYS_ROOT_PATH="$unix_path"
15289  fi
15290
15291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15292$as_echo "$MSYS_ROOT_PATH" >&6; }
15293    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15294  else
15295    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15296  fi
15297
15298  # Test if windows or unix (cygwin/msys) find is first in path.
15299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15300$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15301  FIND_BINARY_OUTPUT=`find --version 2>&1`
15302  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15304$as_echo "unix style" >&6; }
15305  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15307$as_echo "Windows" >&6; }
15308    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15309$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15310    { $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
15311$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15312    as_fn_error $? "Cannot continue" "$LINENO" 5
15313  else
15314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15315$as_echo "unknown" >&6; }
15316    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15317$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15318  fi
15319
15320  else
15321    PATH_SEP=":"
15322  fi
15323
15324
15325  # We get the top-level directory from the supporting wrappers.
15326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15327$as_echo_n "checking for top-level directory... " >&6; }
15328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15329$as_echo "$TOPDIR" >&6; }
15330
15331
15332  # Save the original version of TOPDIR for string comparisons
15333  ORIGINAL_TOPDIR="$TOPDIR"
15334
15335
15336  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15337
15338  # Only process if variable expands to non-empty
15339
15340  if test "x$CURDIR" != x; then
15341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15342
15343  # Input might be given as Windows format, start by converting to
15344  # unix format.
15345  path="$CURDIR"
15346  new_path=`$CYGPATH -u "$path"`
15347
15348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15351  # "foo.exe" is OK but "foo" is an error.
15352  #
15353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15354  # It is also a way to make sure we got the proper file name for the real test later on.
15355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15356  if test "x$test_shortpath" = x; then
15357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15358$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15359    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15360  fi
15361
15362  # Call helper function which possibly converts this using DOS-style short mode.
15363  # If so, the updated path is stored in $new_path.
15364
15365  input_path="$new_path"
15366  # Check if we need to convert this using DOS-style short mode. If the path
15367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15368  # take no chances and rewrite it.
15369  # Note: m4 eats our [], so we need to use [ and ] instead.
15370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15371  if test "x$has_forbidden_chars" != x; then
15372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15376      # Going to short mode and back again did indeed matter. Since short mode is
15377      # case insensitive, let's make it lowercase to improve readability.
15378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15379      # Now convert it back to Unix-style (cygpath)
15380      input_path=`$CYGPATH -u "$shortmode_path"`
15381      new_path="$input_path"
15382    fi
15383  fi
15384
15385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15386  if test "x$test_cygdrive_prefix" = x; then
15387    # As a simple fix, exclude /usr/bin since it's not a real path.
15388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15390      # a path prefixed by /cygdrive for fixpath to work.
15391      new_path="$CYGWIN_ROOT_PATH$input_path"
15392    fi
15393  fi
15394
15395
15396  if test "x$path" != "x$new_path"; then
15397    CURDIR="$new_path"
15398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15399$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15400  fi
15401
15402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15403
15404  path="$CURDIR"
15405  has_colon=`$ECHO $path | $GREP ^.:`
15406  new_path="$path"
15407  if test "x$has_colon" = x; then
15408    # Not in mixed or Windows style, start by that.
15409    new_path=`cmd //c echo $path`
15410  fi
15411
15412
15413  input_path="$new_path"
15414  # Check if we need to convert this using DOS-style short mode. If the path
15415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15416  # take no chances and rewrite it.
15417  # Note: m4 eats our [], so we need to use [ and ] instead.
15418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15419  if test "x$has_forbidden_chars" != x; then
15420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15422  fi
15423
15424
15425  windows_path="$new_path"
15426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15427    unix_path=`$CYGPATH -u "$windows_path"`
15428    new_path="$unix_path"
15429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15431    new_path="$unix_path"
15432  fi
15433
15434  if test "x$path" != "x$new_path"; then
15435    CURDIR="$new_path"
15436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15437$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15438  fi
15439
15440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15442
15443    else
15444      # We're on a unix platform. Hooray! :)
15445      path="$CURDIR"
15446      has_space=`$ECHO "$path" | $GREP " "`
15447      if test "x$has_space" != x; then
15448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15449$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15450        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15451      fi
15452
15453      # Use eval to expand a potential ~
15454      eval path="$path"
15455      if test ! -f "$path" && test ! -d "$path"; then
15456        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15457      fi
15458
15459      if test -d "$path"; then
15460        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15461      else
15462        dir="`$DIRNAME "$path"`"
15463        base="`$BASENAME "$path"`"
15464        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15465      fi
15466    fi
15467  fi
15468
15469
15470  # Only process if variable expands to non-empty
15471
15472  if test "x$TOPDIR" != x; then
15473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15474
15475  # Input might be given as Windows format, start by converting to
15476  # unix format.
15477  path="$TOPDIR"
15478  new_path=`$CYGPATH -u "$path"`
15479
15480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15483  # "foo.exe" is OK but "foo" is an error.
15484  #
15485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15486  # It is also a way to make sure we got the proper file name for the real test later on.
15487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15488  if test "x$test_shortpath" = x; then
15489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15490$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15491    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15492  fi
15493
15494  # Call helper function which possibly converts this using DOS-style short mode.
15495  # If so, the updated path is stored in $new_path.
15496
15497  input_path="$new_path"
15498  # Check if we need to convert this using DOS-style short mode. If the path
15499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15500  # take no chances and rewrite it.
15501  # Note: m4 eats our [], so we need to use [ and ] instead.
15502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15503  if test "x$has_forbidden_chars" != x; then
15504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15508      # Going to short mode and back again did indeed matter. Since short mode is
15509      # case insensitive, let's make it lowercase to improve readability.
15510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15511      # Now convert it back to Unix-style (cygpath)
15512      input_path=`$CYGPATH -u "$shortmode_path"`
15513      new_path="$input_path"
15514    fi
15515  fi
15516
15517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15518  if test "x$test_cygdrive_prefix" = x; then
15519    # As a simple fix, exclude /usr/bin since it's not a real path.
15520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15522      # a path prefixed by /cygdrive for fixpath to work.
15523      new_path="$CYGWIN_ROOT_PATH$input_path"
15524    fi
15525  fi
15526
15527
15528  if test "x$path" != "x$new_path"; then
15529    TOPDIR="$new_path"
15530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15531$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15532  fi
15533
15534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15535
15536  path="$TOPDIR"
15537  has_colon=`$ECHO $path | $GREP ^.:`
15538  new_path="$path"
15539  if test "x$has_colon" = x; then
15540    # Not in mixed or Windows style, start by that.
15541    new_path=`cmd //c echo $path`
15542  fi
15543
15544
15545  input_path="$new_path"
15546  # Check if we need to convert this using DOS-style short mode. If the path
15547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15548  # take no chances and rewrite it.
15549  # Note: m4 eats our [], so we need to use [ and ] instead.
15550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15551  if test "x$has_forbidden_chars" != x; then
15552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15554  fi
15555
15556
15557  windows_path="$new_path"
15558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15559    unix_path=`$CYGPATH -u "$windows_path"`
15560    new_path="$unix_path"
15561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15563    new_path="$unix_path"
15564  fi
15565
15566  if test "x$path" != "x$new_path"; then
15567    TOPDIR="$new_path"
15568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15569$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15570  fi
15571
15572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15574
15575    else
15576      # We're on a unix platform. Hooray! :)
15577      path="$TOPDIR"
15578      has_space=`$ECHO "$path" | $GREP " "`
15579      if test "x$has_space" != x; then
15580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15581$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15582        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15583      fi
15584
15585      # Use eval to expand a potential ~
15586      eval path="$path"
15587      if test ! -f "$path" && test ! -d "$path"; then
15588        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15589      fi
15590
15591      if test -d "$path"; then
15592        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15593      else
15594        dir="`$DIRNAME "$path"`"
15595        base="`$BASENAME "$path"`"
15596        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15597      fi
15598    fi
15599  fi
15600
15601  # SRC_ROOT is a traditional alias for TOPDIR.
15602  SRC_ROOT=$TOPDIR
15603
15604  # Calculate a canonical version of TOPDIR for string comparisons
15605  CANONICAL_TOPDIR=$TOPDIR
15606
15607  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15608    # Follow a chain of symbolic links. Use readlink
15609    # where it exists, else fall back to horribly
15610    # complicated shell code.
15611    if test "x$READLINK_TESTED" != yes; then
15612      # On MacOSX there is a readlink tool with a different
15613      # purpose than the GNU readlink tool. Check the found readlink.
15614      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15615      if test "x$ISGNU" = x; then
15616        # A readlink that we do not know how to use.
15617        # Are there other non-GNU readlinks out there?
15618        READLINK_TESTED=yes
15619        READLINK=
15620      fi
15621    fi
15622
15623    if test "x$READLINK" != x; then
15624      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15625    else
15626      # Save the current directory for restoring afterwards
15627      STARTDIR=$PWD
15628      COUNTER=0
15629      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15630      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15631      cd $sym_link_dir
15632      # Use -P flag to resolve symlinks in directories.
15633      cd `$THEPWDCMD -P`
15634      sym_link_dir=`$THEPWDCMD -P`
15635      # Resolve file symlinks
15636      while test $COUNTER -lt 20; do
15637        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15638        if test "x$ISLINK" == x; then
15639          # This is not a symbolic link! We are done!
15640          break
15641        fi
15642        # Again resolve directory symlinks since the target of the just found
15643        # link could be in a different directory
15644        cd `$DIRNAME $ISLINK`
15645        sym_link_dir=`$THEPWDCMD -P`
15646        sym_link_file=`$BASENAME $ISLINK`
15647        let COUNTER=COUNTER+1
15648      done
15649      cd $STARTDIR
15650      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15651    fi
15652  fi
15653
15654
15655
15656  # Locate the directory of this script.
15657  AUTOCONF_DIR=$TOPDIR/common/autoconf
15658
15659
15660# Check if it's a pure open build or if custom sources are to be used.
15661
15662  # Check whether --enable-openjdk-only was given.
15663if test "${enable_openjdk_only+set}" = set; then :
15664  enableval=$enable_openjdk_only;
15665else
15666  enable_openjdk_only="no"
15667fi
15668
15669
15670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15671$as_echo_n "checking for presence of closed sources... " >&6; }
15672  if test -d "$SRC_ROOT/jdk/src/closed"; then
15673    CLOSED_SOURCE_PRESENT=yes
15674  else
15675    CLOSED_SOURCE_PRESENT=no
15676  fi
15677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15678$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15679
15680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15681$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15682  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15684$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15685
15686  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15687    OPENJDK=true
15688    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15689      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15690$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15691    fi
15692  else
15693    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15694      OPENJDK=true
15695    else
15696      OPENJDK=false
15697    fi
15698  fi
15699
15700  if test "x$OPENJDK" = "xtrue"; then
15701    SET_OPENJDK="OPENJDK=true"
15702  fi
15703
15704
15705
15706  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15707  # the IncludeCustomExtension macro.
15708
15709
15710# Check whether --with-custom-make-dir was given.
15711if test "${with_custom_make_dir+set}" = set; then :
15712  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
15713$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15714fi
15715
15716
15717
15718
15719# These are needed to be able to create a configuration name (and thus the output directory)
15720
15721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15722$as_echo_n "checking which variant of the JDK to build... " >&6; }
15723
15724# Check whether --with-jdk-variant was given.
15725if test "${with_jdk_variant+set}" = set; then :
15726  withval=$with_jdk_variant;
15727fi
15728
15729
15730  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15731    JDK_VARIANT="normal"
15732  else
15733    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15734  fi
15735
15736
15737
15738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15739$as_echo "$JDK_VARIANT" >&6; }
15740
15741
15742
15743# Check whether --with-jvm-interpreter was given.
15744if test "${with_jvm_interpreter+set}" = set; then :
15745  withval=$with_jvm_interpreter;
15746fi
15747
15748
15749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15750$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15751  if test "x$with_jvm_interpreter" = x; then
15752    JVM_INTERPRETER="template"
15753  else
15754    JVM_INTERPRETER="$with_jvm_interpreter"
15755  fi
15756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15757$as_echo "$JVM_INTERPRETER" >&6; }
15758
15759  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15760    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15761  fi
15762
15763
15764
15765
15766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15767$as_echo_n "checking which variants of the JVM to build... " >&6; }
15768
15769# Check whether --with-jvm-variants was given.
15770if test "${with_jvm_variants+set}" = set; then :
15771  withval=$with_jvm_variants;
15772fi
15773
15774
15775  if test "x$with_jvm_variants" = x; then
15776    with_jvm_variants="server"
15777  fi
15778
15779  JVM_VARIANTS=",$with_jvm_variants,"
15780  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15781
15782  if test "x$TEST_VARIANTS" != "x,"; then
15783    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15784  fi
15785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15786$as_echo "$with_jvm_variants" >&6; }
15787
15788  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15789  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15790  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15791  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15792  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15793  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15794
15795  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15796    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15797      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15798    fi
15799  fi
15800  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15801    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15802      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15803    fi
15804  fi
15805
15806  # Replace the commas with AND for use in the build directory name.
15807  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15808  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
15809  if test "x$COUNT_VARIANTS" != "x,1"; then
15810    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15811  else
15812    BUILDING_MULTIPLE_JVM_VARIANTS=no
15813  fi
15814
15815  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15816    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15817  fi
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827  INCLUDE_SA=true
15828  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15829    INCLUDE_SA=false
15830  fi
15831  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15832    INCLUDE_SA=false
15833  fi
15834  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15835    INCLUDE_SA=false
15836  fi
15837  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15838    INCLUDE_SA=false
15839  fi
15840
15841
15842  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15843    MACOSX_UNIVERSAL="true"
15844  fi
15845
15846
15847
15848
15849  DEBUG_LEVEL="release"
15850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15851$as_echo_n "checking which debug level to use... " >&6; }
15852  # Check whether --enable-debug was given.
15853if test "${enable_debug+set}" = set; then :
15854  enableval=$enable_debug;
15855        ENABLE_DEBUG="${enableval}"
15856        DEBUG_LEVEL="fastdebug"
15857
15858else
15859  ENABLE_DEBUG="no"
15860fi
15861
15862
15863
15864# Check whether --with-debug-level was given.
15865if test "${with_debug_level+set}" = set; then :
15866  withval=$with_debug_level;
15867        DEBUG_LEVEL="${withval}"
15868        if test "x$ENABLE_DEBUG" = xyes; then
15869          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15870        fi
15871
15872fi
15873
15874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15875$as_echo "$DEBUG_LEVEL" >&6; }
15876
15877  if test "x$DEBUG_LEVEL" != xrelease && \
15878      test "x$DEBUG_LEVEL" != xoptimized && \
15879      test "x$DEBUG_LEVEL" != xfastdebug && \
15880      test "x$DEBUG_LEVEL" != xslowdebug; then
15881    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15882  fi
15883
15884
15885  case $DEBUG_LEVEL in
15886    release )
15887      VARIANT="OPT"
15888      FASTDEBUG="false"
15889      DEBUG_CLASSFILES="false"
15890      BUILD_VARIANT_RELEASE=""
15891      HOTSPOT_DEBUG_LEVEL="product"
15892      HOTSPOT_EXPORT="product"
15893      ;;
15894    fastdebug )
15895      VARIANT="DBG"
15896      FASTDEBUG="true"
15897      DEBUG_CLASSFILES="true"
15898      BUILD_VARIANT_RELEASE="-fastdebug"
15899      HOTSPOT_DEBUG_LEVEL="fastdebug"
15900      HOTSPOT_EXPORT="fastdebug"
15901      ;;
15902    slowdebug )
15903      VARIANT="DBG"
15904      FASTDEBUG="false"
15905      DEBUG_CLASSFILES="true"
15906      BUILD_VARIANT_RELEASE="-debug"
15907      HOTSPOT_DEBUG_LEVEL="debug"
15908      HOTSPOT_EXPORT="debug"
15909      ;;
15910    optimized )
15911      VARIANT="OPT"
15912      FASTDEBUG="false"
15913      DEBUG_CLASSFILES="false"
15914      BUILD_VARIANT_RELEASE="-optimized"
15915      HOTSPOT_DEBUG_LEVEL="optimized"
15916      HOTSPOT_EXPORT="optimized"
15917      ;;
15918  esac
15919
15920  # The debug level 'optimized' is a little special because it is currently only
15921  # applicable to the HotSpot build where it means to build a completely
15922  # optimized version of the VM without any debugging code (like for the
15923  # 'release' debug level which is called 'product' in the HotSpot build) but
15924  # with the exception that it can contain additional code which is otherwise
15925  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15926  # test new and/or experimental features which are not intended for customer
15927  # shipment. Because these new features need to be tested and benchmarked in
15928  # real world scenarios, we want to build the containing JDK at the 'release'
15929  # debug level.
15930  if test "x$DEBUG_LEVEL" = xoptimized; then
15931    DEBUG_LEVEL="release"
15932  fi
15933
15934  #####
15935  # Generate the legacy makefile targets for hotspot.
15936  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15937  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15938  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15939  # But until then ...
15940  HOTSPOT_TARGET=""
15941
15942  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15943    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15944  fi
15945
15946  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15947    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15948  fi
15949
15950  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15951    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15952  fi
15953
15954  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15955    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15956  fi
15957
15958  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15959    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15960  fi
15961
15962  if test "x$JVM_VARIANT_CORE" = xtrue; then
15963    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15964  fi
15965
15966  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15967
15968  # On Macosx universal binaries are produced, but they only contain
15969  # 64 bit intel. This invalidates control of which jvms are built
15970  # from configure, but only server is valid anyway. Fix this
15971  # when hotspot makefiles are rewritten.
15972  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15973    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15974  fi
15975
15976  #####
15977
15978
15979
15980
15981
15982
15983
15984
15985# With basic setup done, call the custom early hook.
15986
15987
15988# Check if we have devkits, extra paths or sysroot set.
15989
15990
15991# Check whether --with-devkit was given.
15992if test "${with_devkit+set}" = set; then :
15993  withval=$with_devkit;
15994
15995  # Only process if variable expands to non-empty
15996
15997  if test "x$with_devkit" != x; then
15998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15999
16000  # Input might be given as Windows format, start by converting to
16001  # unix format.
16002  path="$with_devkit"
16003  new_path=`$CYGPATH -u "$path"`
16004
16005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16008  # "foo.exe" is OK but "foo" is an error.
16009  #
16010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16011  # It is also a way to make sure we got the proper file name for the real test later on.
16012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16013  if test "x$test_shortpath" = x; then
16014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16015$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16016    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16017  fi
16018
16019  # Call helper function which possibly converts this using DOS-style short mode.
16020  # If so, the updated path is stored in $new_path.
16021
16022  input_path="$new_path"
16023  # Check if we need to convert this using DOS-style short mode. If the path
16024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16025  # take no chances and rewrite it.
16026  # Note: m4 eats our [], so we need to use [ and ] instead.
16027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16028  if test "x$has_forbidden_chars" != x; then
16029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16033      # Going to short mode and back again did indeed matter. Since short mode is
16034      # case insensitive, let's make it lowercase to improve readability.
16035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16036      # Now convert it back to Unix-style (cygpath)
16037      input_path=`$CYGPATH -u "$shortmode_path"`
16038      new_path="$input_path"
16039    fi
16040  fi
16041
16042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16043  if test "x$test_cygdrive_prefix" = x; then
16044    # As a simple fix, exclude /usr/bin since it's not a real path.
16045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16047      # a path prefixed by /cygdrive for fixpath to work.
16048      new_path="$CYGWIN_ROOT_PATH$input_path"
16049    fi
16050  fi
16051
16052
16053  if test "x$path" != "x$new_path"; then
16054    with_devkit="$new_path"
16055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16056$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16057  fi
16058
16059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16060
16061  path="$with_devkit"
16062  has_colon=`$ECHO $path | $GREP ^.:`
16063  new_path="$path"
16064  if test "x$has_colon" = x; then
16065    # Not in mixed or Windows style, start by that.
16066    new_path=`cmd //c echo $path`
16067  fi
16068
16069
16070  input_path="$new_path"
16071  # Check if we need to convert this using DOS-style short mode. If the path
16072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16073  # take no chances and rewrite it.
16074  # Note: m4 eats our [], so we need to use [ and ] instead.
16075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16076  if test "x$has_forbidden_chars" != x; then
16077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16079  fi
16080
16081
16082  windows_path="$new_path"
16083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16084    unix_path=`$CYGPATH -u "$windows_path"`
16085    new_path="$unix_path"
16086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16088    new_path="$unix_path"
16089  fi
16090
16091  if test "x$path" != "x$new_path"; then
16092    with_devkit="$new_path"
16093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16094$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16095  fi
16096
16097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16099
16100    else
16101      # We're on a unix platform. Hooray! :)
16102      path="$with_devkit"
16103      has_space=`$ECHO "$path" | $GREP " "`
16104      if test "x$has_space" != x; then
16105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16106$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16107        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16108      fi
16109
16110      # Use eval to expand a potential ~
16111      eval path="$path"
16112      if test ! -f "$path" && test ! -d "$path"; then
16113        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16114      fi
16115
16116      if test -d "$path"; then
16117        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16118      else
16119        dir="`$DIRNAME "$path"`"
16120        base="`$BASENAME "$path"`"
16121        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16122      fi
16123    fi
16124  fi
16125
16126        DEVKIT_ROOT="$with_devkit"
16127        # Check for a meta data info file in the root of the devkit
16128        if test -f "$DEVKIT_ROOT/devkit.info"; then
16129          . $DEVKIT_ROOT/devkit.info
16130          # This potentially sets the following:
16131          # A descriptive name of the devkit
16132
16133  if test "x$DEVKIT_NAME" = x; then
16134    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16135  fi
16136
16137          # Corresponds to --with-extra-path
16138
16139  if test "x$DEVKIT_EXTRA_PATH" = x; then
16140    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16141  fi
16142
16143          # Corresponds to --with-toolchain-path
16144
16145  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16146    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16147  fi
16148
16149          # Corresponds to --with-sysroot
16150
16151  if test "x$DEVKIT_SYSROOT" = x; then
16152    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16153  fi
16154
16155
16156          # Identifies the Visual Studio version in the devkit
16157
16158  if test "x$DEVKIT_VS_VERSION" = x; then
16159    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16160  fi
16161
16162          # The Visual Studio include environment variable
16163
16164  if test "x$DEVKIT_VS_INCLUDE" = x; then
16165    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16166  fi
16167
16168          # The Visual Studio lib environment variable
16169
16170  if test "x$DEVKIT_VS_LIB" = x; then
16171    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16172  fi
16173
16174          # Corresponds to --with-msvcr-dll
16175
16176  if test "x$DEVKIT_MSVCR_DLL" = x; then
16177    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16178  fi
16179
16180          # Corresponds to --with-msvcp-dll
16181
16182  if test "x$DEVKIT_MSVCP_DLL" = x; then
16183    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16184  fi
16185
16186        fi
16187
16188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16189$as_echo_n "checking for devkit... " >&6; }
16190        if test "x$DEVKIT_NAME" != x; then
16191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16192$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16193        else
16194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16195$as_echo "$DEVKIT_ROOT" >&6; }
16196        fi
16197
16198
16199  if test "x$DEVKIT_EXTRA_PATH" != x; then
16200    if test "x$EXTRA_PATH" = x; then
16201      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16202    else
16203      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16204    fi
16205  fi
16206
16207
16208        # Fallback default of just /bin if DEVKIT_PATH is not defined
16209        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16210          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16211        fi
16212
16213  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16214    if test "x$TOOLCHAIN_PATH" = x; then
16215      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16216    else
16217      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16218    fi
16219  fi
16220
16221
16222        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16223        # places for backwards compatiblity.
16224        if test "x$DEVKIT_SYSROOT" != x; then
16225          SYSROOT="$DEVKIT_SYSROOT"
16226        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16227          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16228        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16229          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16230        fi
16231
16232
16233fi
16234
16235
16236  # You can force the sysroot if the sysroot encoded into the compiler tools
16237  # is not correct.
16238
16239# Check whether --with-sys-root was given.
16240if test "${with_sys_root+set}" = set; then :
16241  withval=$with_sys_root; SYSROOT=$with_sys_root
16242
16243fi
16244
16245
16246
16247# Check whether --with-sysroot was given.
16248if test "${with_sysroot+set}" = set; then :
16249  withval=$with_sysroot; SYSROOT=$with_sysroot
16250
16251fi
16252
16253
16254
16255# Check whether --with-tools-dir was given.
16256if test "${with_tools_dir+set}" = set; then :
16257  withval=$with_tools_dir;
16258  if test "x$with_tools_dir" != x; then
16259    if test "x$TOOLCHAIN_PATH" = x; then
16260      TOOLCHAIN_PATH="$with_tools_dir"
16261    else
16262      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16263    fi
16264  fi
16265
16266
16267fi
16268
16269
16270
16271# Check whether --with-toolchain-path was given.
16272if test "${with_toolchain_path+set}" = set; then :
16273  withval=$with_toolchain_path;
16274  if test "x$with_toolchain_path" != x; then
16275    if test "x$TOOLCHAIN_PATH" = x; then
16276      TOOLCHAIN_PATH="$with_toolchain_path"
16277    else
16278      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16279    fi
16280  fi
16281
16282
16283fi
16284
16285
16286
16287# Check whether --with-extra-path was given.
16288if test "${with_extra_path+set}" = set; then :
16289  withval=$with_extra_path;
16290  if test "x$with_extra_path" != x; then
16291    if test "x$EXTRA_PATH" = x; then
16292      EXTRA_PATH="$with_extra_path"
16293    else
16294      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16295    fi
16296  fi
16297
16298
16299fi
16300
16301
16302  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16303    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16304    # If not, detect if Xcode is installed by running xcodebuild -version
16305    # if no Xcode installed, xcodebuild exits with 1
16306    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16307    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16308      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16309      # fall back on the stub binary in /usr/bin/xcodebuild
16310      # Extract the first word of "xcodebuild", so it can be a program name with args.
16311set dummy xcodebuild; ac_word=$2
16312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16313$as_echo_n "checking for $ac_word... " >&6; }
16314if ${ac_cv_path_XCODEBUILD+:} false; then :
16315  $as_echo_n "(cached) " >&6
16316else
16317  case $XCODEBUILD in
16318  [\\/]* | ?:[\\/]*)
16319  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16320  ;;
16321  *)
16322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16323for as_dir in $TOOLCHAIN_PATH
16324do
16325  IFS=$as_save_IFS
16326  test -z "$as_dir" && as_dir=.
16327    for ac_exec_ext in '' $ac_executable_extensions; do
16328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16329    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16331    break 2
16332  fi
16333done
16334  done
16335IFS=$as_save_IFS
16336
16337  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16338  ;;
16339esac
16340fi
16341XCODEBUILD=$ac_cv_path_XCODEBUILD
16342if test -n "$XCODEBUILD"; then
16343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16344$as_echo "$XCODEBUILD" >&6; }
16345else
16346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16347$as_echo "no" >&6; }
16348fi
16349
16350
16351    else
16352      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16353      # when only the command line tools are installed there are no SDKs, so headers
16354      # are copied into the system frameworks
16355      XCODEBUILD=
16356
16357    fi
16358
16359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16360$as_echo_n "checking for sdk name... " >&6; }
16361
16362# Check whether --with-sdk-name was given.
16363if test "${with_sdk_name+set}" = set; then :
16364  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16365
16366fi
16367
16368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16369$as_echo "$SDKNAME" >&6; }
16370
16371    # if toolchain path is specified then don't rely on system headers, they may not compile
16372    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16373    test -z "$TOOLCHAIN_PATH" && \
16374      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16375
16376    if test -z "$SYSROOT"; then
16377      if test -n "$XCODEBUILD"; then
16378        # if we don't have system headers, use default SDK name (last resort)
16379        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16380          SDKNAME=${SDKNAME:-macosx}
16381        fi
16382
16383        if test -n "$SDKNAME"; then
16384          # Call xcodebuild to determine SYSROOT
16385          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16386        fi
16387      else
16388        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16389          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
16390        fi
16391      fi
16392    else
16393      # warn user if --with-sdk-name was also set
16394      if test -n "$with_sdk_name"; then
16395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16396$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16397      fi
16398    fi
16399
16400    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16401      # If no system framework headers, then SYSROOT must be set, or we won't build
16402      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
16403    fi
16404
16405    # Perform a basic sanity test
16406    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16407      if test -z "$SYSROOT"; then
16408        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
16409      else
16410        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16411      fi
16412    fi
16413
16414    # set SDKROOT too, Xcode tools will pick it up
16415    SDKROOT=$SYSROOT
16416
16417  fi
16418
16419  # Prepend the extra path to the global path
16420
16421  if test "x$EXTRA_PATH" != x; then
16422    if test "x$PATH" = x; then
16423      PATH="$EXTRA_PATH"
16424    else
16425      PATH="$EXTRA_PATH:$PATH"
16426    fi
16427  fi
16428
16429
16430  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16431    # Add extra search paths on solaris for utilities like ar and as etc...
16432    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16433  fi
16434
16435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16436$as_echo_n "checking for sysroot... " >&6; }
16437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16438$as_echo "$SYSROOT" >&6; }
16439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16440$as_echo_n "checking for toolchain path... " >&6; }
16441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16442$as_echo "$TOOLCHAIN_PATH" >&6; }
16443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16444$as_echo_n "checking for extra path... " >&6; }
16445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16446$as_echo "$EXTRA_PATH" >&6; }
16447
16448
16449# To properly create a configuration name, we need to have the OpenJDK target
16450# and options (variants and debug level) parsed.
16451
16452
16453
16454# Check whether --with-conf-name was given.
16455if test "${with_conf_name+set}" = set; then :
16456  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16457fi
16458
16459
16460  # Test from where we are running configure, in or outside of src root.
16461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16462$as_echo_n "checking where to store configuration... " >&6; }
16463  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16464      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16465      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16466    # We are running configure from the src root.
16467    # Create a default ./build/target-variant-debuglevel output root.
16468    if test "x${CONF_NAME}" = x; then
16469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16470$as_echo "in default location" >&6; }
16471      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16472    else
16473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16474$as_echo "in build directory with custom name" >&6; }
16475    fi
16476    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16477    $MKDIR -p "$OUTPUT_ROOT"
16478    if test ! -d "$OUTPUT_ROOT"; then
16479      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16480    fi
16481  else
16482    # We are running configure from outside of the src dir.
16483    # Then use the current directory as output dir!
16484    # If configuration is situated in normal build directory, just use the build
16485    # directory name as configuration name, otherwise use the complete path.
16486    if test "x${CONF_NAME}" = x; then
16487      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16488    fi
16489    OUTPUT_ROOT="$CURDIR"
16490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16491$as_echo "in current directory" >&6; }
16492
16493    # WARNING: This might be a bad thing to do. You need to be sure you want to
16494    # have a configuration in this directory. Do some sanity checks!
16495
16496    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16497      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16498      # other files
16499      files_present=`$LS $OUTPUT_ROOT`
16500      # Configure has already touched config.log and confdefs.h in the current dir when this check
16501      # is performed.
16502      filtered_files=`$ECHO "$files_present" \
16503          | $SED -e 's/config.log//g' \
16504              -e 's/configure.log//g' \
16505              -e 's/confdefs.h//g' \
16506              -e 's/ //g' \
16507          | $TR -d '\n'`
16508      if test "x$filtered_files" != x; then
16509        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16510$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16511        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16512$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16513        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16514$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16515        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16516$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16517        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16518$as_echo "$as_me: seriously mess up just about everything." >&6;}
16519        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16520$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16521        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16522$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16523        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16524      fi
16525    fi
16526  fi
16527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16528$as_echo_n "checking what configuration name to use... " >&6; }
16529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16530$as_echo "$CONF_NAME" >&6; }
16531
16532
16533  # Only process if variable expands to non-empty
16534
16535  if test "x$OUTPUT_ROOT" != x; then
16536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16537
16538  # Input might be given as Windows format, start by converting to
16539  # unix format.
16540  path="$OUTPUT_ROOT"
16541  new_path=`$CYGPATH -u "$path"`
16542
16543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16546  # "foo.exe" is OK but "foo" is an error.
16547  #
16548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16549  # It is also a way to make sure we got the proper file name for the real test later on.
16550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16551  if test "x$test_shortpath" = x; then
16552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16553$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16554    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16555  fi
16556
16557  # Call helper function which possibly converts this using DOS-style short mode.
16558  # If so, the updated path is stored in $new_path.
16559
16560  input_path="$new_path"
16561  # Check if we need to convert this using DOS-style short mode. If the path
16562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16563  # take no chances and rewrite it.
16564  # Note: m4 eats our [], so we need to use [ and ] instead.
16565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16566  if test "x$has_forbidden_chars" != x; then
16567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16571      # Going to short mode and back again did indeed matter. Since short mode is
16572      # case insensitive, let's make it lowercase to improve readability.
16573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16574      # Now convert it back to Unix-style (cygpath)
16575      input_path=`$CYGPATH -u "$shortmode_path"`
16576      new_path="$input_path"
16577    fi
16578  fi
16579
16580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16581  if test "x$test_cygdrive_prefix" = x; then
16582    # As a simple fix, exclude /usr/bin since it's not a real path.
16583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16585      # a path prefixed by /cygdrive for fixpath to work.
16586      new_path="$CYGWIN_ROOT_PATH$input_path"
16587    fi
16588  fi
16589
16590
16591  if test "x$path" != "x$new_path"; then
16592    OUTPUT_ROOT="$new_path"
16593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16594$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16595  fi
16596
16597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16598
16599  path="$OUTPUT_ROOT"
16600  has_colon=`$ECHO $path | $GREP ^.:`
16601  new_path="$path"
16602  if test "x$has_colon" = x; then
16603    # Not in mixed or Windows style, start by that.
16604    new_path=`cmd //c echo $path`
16605  fi
16606
16607
16608  input_path="$new_path"
16609  # Check if we need to convert this using DOS-style short mode. If the path
16610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16611  # take no chances and rewrite it.
16612  # Note: m4 eats our [], so we need to use [ and ] instead.
16613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16614  if test "x$has_forbidden_chars" != x; then
16615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16617  fi
16618
16619
16620  windows_path="$new_path"
16621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16622    unix_path=`$CYGPATH -u "$windows_path"`
16623    new_path="$unix_path"
16624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16626    new_path="$unix_path"
16627  fi
16628
16629  if test "x$path" != "x$new_path"; then
16630    OUTPUT_ROOT="$new_path"
16631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16632$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16633  fi
16634
16635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16637
16638    else
16639      # We're on a unix platform. Hooray! :)
16640      path="$OUTPUT_ROOT"
16641      has_space=`$ECHO "$path" | $GREP " "`
16642      if test "x$has_space" != x; then
16643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16644$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16646      fi
16647
16648      # Use eval to expand a potential ~
16649      eval path="$path"
16650      if test ! -f "$path" && test ! -d "$path"; then
16651        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16652      fi
16653
16654      if test -d "$path"; then
16655        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16656      else
16657        dir="`$DIRNAME "$path"`"
16658        base="`$BASENAME "$path"`"
16659        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16660      fi
16661    fi
16662  fi
16663
16664
16665  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16666  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16667
16668  SPEC=$OUTPUT_ROOT/spec.gmk
16669
16670  CONF_NAME=$CONF_NAME
16671
16672  OUTPUT_ROOT=$OUTPUT_ROOT
16673
16674
16675
16676  # The spec.gmk file contains all variables for the make system.
16677  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16678
16679  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16680  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16681
16682  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16683  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16684
16685  # The compare.sh is used to compare the build output to other builds.
16686  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16687
16688  # The generated Makefile knows where the spec.gmk is and where the source is.
16689  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16690  # which will look for generated configurations
16691  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16692
16693
16694
16695# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16696
16697  for ac_prog in apt-get yum port pkgutil pkgadd
16698do
16699  # Extract the first word of "$ac_prog", so it can be a program name with args.
16700set dummy $ac_prog; ac_word=$2
16701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16702$as_echo_n "checking for $ac_word... " >&6; }
16703if ${ac_cv_prog_PKGHANDLER+:} false; then :
16704  $as_echo_n "(cached) " >&6
16705else
16706  if test -n "$PKGHANDLER"; then
16707  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16708else
16709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16710for as_dir in $PATH
16711do
16712  IFS=$as_save_IFS
16713  test -z "$as_dir" && as_dir=.
16714    for ac_exec_ext in '' $ac_executable_extensions; do
16715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16716    ac_cv_prog_PKGHANDLER="$ac_prog"
16717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16718    break 2
16719  fi
16720done
16721  done
16722IFS=$as_save_IFS
16723
16724fi
16725fi
16726PKGHANDLER=$ac_cv_prog_PKGHANDLER
16727if test -n "$PKGHANDLER"; then
16728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16729$as_echo "$PKGHANDLER" >&6; }
16730else
16731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16732$as_echo "no" >&6; }
16733fi
16734
16735
16736  test -n "$PKGHANDLER" && break
16737done
16738
16739
16740
16741# Setup tools that requires more complex handling, or that is not needed by the configure script.
16742
16743
16744
16745  # Publish this variable in the help.
16746
16747
16748  if [ -z "${MAKE+x}" ]; then
16749    # The variable is not set by user, try to locate tool using the code snippet
16750
16751    # Try our hardest to locate a correct version of GNU make
16752    for ac_prog in gmake
16753do
16754  # Extract the first word of "$ac_prog", so it can be a program name with args.
16755set dummy $ac_prog; ac_word=$2
16756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16757$as_echo_n "checking for $ac_word... " >&6; }
16758if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16759  $as_echo_n "(cached) " >&6
16760else
16761  case $CHECK_GMAKE in
16762  [\\/]* | ?:[\\/]*)
16763  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16764  ;;
16765  *)
16766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16767for as_dir in $PATH
16768do
16769  IFS=$as_save_IFS
16770  test -z "$as_dir" && as_dir=.
16771    for ac_exec_ext in '' $ac_executable_extensions; do
16772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16773    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16775    break 2
16776  fi
16777done
16778  done
16779IFS=$as_save_IFS
16780
16781  ;;
16782esac
16783fi
16784CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16785if test -n "$CHECK_GMAKE"; then
16786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16787$as_echo "$CHECK_GMAKE" >&6; }
16788else
16789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16790$as_echo "no" >&6; }
16791fi
16792
16793
16794  test -n "$CHECK_GMAKE" && break
16795done
16796
16797
16798  MAKE_CANDIDATE=""$CHECK_GMAKE""
16799  DESCRIPTION="gmake in PATH"
16800
16801  # On Cygwin, we require a newer version of make than on other platforms
16802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16803    MAKE_VERSION_EXPR="-e 4\."
16804    MAKE_REQUIRED_VERSION="4.0"
16805   else
16806    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16807    MAKE_REQUIRED_VERSION="3.81"
16808  fi
16809
16810  if test "x$MAKE_CANDIDATE" != x; then
16811    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16812$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16813    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16814    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16815    if test "x$IS_GNU_MAKE" = x; then
16816      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16817$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16818    else
16819      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16820      if test "x$IS_MODERN_MAKE" = x; then
16821        { $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
16822$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;}
16823      else
16824        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16825          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16826            MAKE_EXPECTED_ENV='cygwin'
16827          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16828            MAKE_EXPECTED_ENV='msys'
16829          else
16830            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16831          fi
16832          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16833          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16834        else
16835          # Not relevant for non-Windows
16836          IS_MAKE_CORRECT_ENV=true
16837        fi
16838        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16839          { $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
16840$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;}
16841        else
16842          FOUND_MAKE=$MAKE_CANDIDATE
16843
16844  # Only process if variable expands to non-empty
16845
16846  if test "x$FOUND_MAKE" != x; then
16847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16848
16849  # First separate the path from the arguments. This will split at the first
16850  # space.
16851  complete="$FOUND_MAKE"
16852  path="${complete%% *}"
16853  tmp="$complete EOL"
16854  arguments="${tmp#* }"
16855
16856  # Input might be given as Windows format, start by converting to
16857  # unix format.
16858  new_path=`$CYGPATH -u "$path"`
16859
16860  # Now try to locate executable using which
16861  new_path=`$WHICH "$new_path" 2> /dev/null`
16862  # bat and cmd files are not always considered executable in cygwin causing which
16863  # to not find them
16864  if test "x$new_path" = x \
16865      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16866      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16867    new_path=`$CYGPATH -u "$path"`
16868  fi
16869  if test "x$new_path" = x; then
16870    # Oops. Which didn't find the executable.
16871    # The splitting of arguments from the executable at a space might have been incorrect,
16872    # since paths with space are more likely in Windows. Give it another try with the whole
16873    # argument.
16874    path="$complete"
16875    arguments="EOL"
16876    new_path=`$CYGPATH -u "$path"`
16877    new_path=`$WHICH "$new_path" 2> /dev/null`
16878    # bat and cmd files are not always considered executable in cygwin causing which
16879    # to not find them
16880    if test "x$new_path" = x \
16881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16883      new_path=`$CYGPATH -u "$path"`
16884    fi
16885    if test "x$new_path" = x; then
16886      # It's still not found. Now this is an unrecoverable error.
16887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16888$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16889      has_space=`$ECHO "$complete" | $GREP " "`
16890      if test "x$has_space" != x; then
16891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16893      fi
16894      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16895    fi
16896  fi
16897
16898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16901  # "foo.exe" is OK but "foo" is an error.
16902  #
16903  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16904  # It is also a way to make sure we got the proper file name for the real test later on.
16905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16906  if test "x$test_shortpath" = x; then
16907    # Short path failed, file does not exist as specified.
16908    # Try adding .exe or .cmd
16909    if test -f "${new_path}.exe"; then
16910      input_to_shortpath="${new_path}.exe"
16911    elif test -f "${new_path}.cmd"; then
16912      input_to_shortpath="${new_path}.cmd"
16913    else
16914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16915$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16916      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16917$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16918      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16919    fi
16920  else
16921    input_to_shortpath="$new_path"
16922  fi
16923
16924  # Call helper function which possibly converts this using DOS-style short mode.
16925  # If so, the updated path is stored in $new_path.
16926  new_path="$input_to_shortpath"
16927
16928  input_path="$input_to_shortpath"
16929  # Check if we need to convert this using DOS-style short mode. If the path
16930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16931  # take no chances and rewrite it.
16932  # Note: m4 eats our [], so we need to use [ and ] instead.
16933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16934  if test "x$has_forbidden_chars" != x; then
16935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16939      # Going to short mode and back again did indeed matter. Since short mode is
16940      # case insensitive, let's make it lowercase to improve readability.
16941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16942      # Now convert it back to Unix-style (cygpath)
16943      input_path=`$CYGPATH -u "$shortmode_path"`
16944      new_path="$input_path"
16945    fi
16946  fi
16947
16948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16949  if test "x$test_cygdrive_prefix" = x; then
16950    # As a simple fix, exclude /usr/bin since it's not a real path.
16951    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16953      # a path prefixed by /cygdrive for fixpath to work.
16954      new_path="$CYGWIN_ROOT_PATH$input_path"
16955    fi
16956  fi
16957
16958  # remove trailing .exe if any
16959  new_path="${new_path/%.exe/}"
16960
16961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16962
16963  # First separate the path from the arguments. This will split at the first
16964  # space.
16965  complete="$FOUND_MAKE"
16966  path="${complete%% *}"
16967  tmp="$complete EOL"
16968  arguments="${tmp#* }"
16969
16970  # Input might be given as Windows format, start by converting to
16971  # unix format.
16972  new_path="$path"
16973
16974  windows_path="$new_path"
16975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16976    unix_path=`$CYGPATH -u "$windows_path"`
16977    new_path="$unix_path"
16978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16980    new_path="$unix_path"
16981  fi
16982
16983
16984  # Now try to locate executable using which
16985  new_path=`$WHICH "$new_path" 2> /dev/null`
16986
16987  if test "x$new_path" = x; then
16988    # Oops. Which didn't find the executable.
16989    # The splitting of arguments from the executable at a space might have been incorrect,
16990    # since paths with space are more likely in Windows. Give it another try with the whole
16991    # argument.
16992    path="$complete"
16993    arguments="EOL"
16994    new_path="$path"
16995
16996  windows_path="$new_path"
16997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16998    unix_path=`$CYGPATH -u "$windows_path"`
16999    new_path="$unix_path"
17000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17002    new_path="$unix_path"
17003  fi
17004
17005
17006    new_path=`$WHICH "$new_path" 2> /dev/null`
17007    # bat and cmd files are not always considered executable in MSYS causing which
17008    # to not find them
17009    if test "x$new_path" = x \
17010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17012      new_path="$path"
17013
17014  windows_path="$new_path"
17015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17016    unix_path=`$CYGPATH -u "$windows_path"`
17017    new_path="$unix_path"
17018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17020    new_path="$unix_path"
17021  fi
17022
17023    fi
17024
17025    if test "x$new_path" = x; then
17026      # It's still not found. Now this is an unrecoverable error.
17027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17028$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17029      has_space=`$ECHO "$complete" | $GREP " "`
17030      if test "x$has_space" != x; then
17031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17033      fi
17034      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17035    fi
17036  fi
17037
17038  # Now new_path has a complete unix path to the binary
17039  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17040    # Keep paths in /bin as-is, but remove trailing .exe if any
17041    new_path="${new_path/%.exe/}"
17042    # Do not save /bin paths to all_fixpath_prefixes!
17043  else
17044    # Not in mixed or Windows style, start by that.
17045    new_path=`cmd //c echo $new_path`
17046
17047  input_path="$new_path"
17048  # Check if we need to convert this using DOS-style short mode. If the path
17049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17050  # take no chances and rewrite it.
17051  # Note: m4 eats our [], so we need to use [ and ] instead.
17052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17053  if test "x$has_forbidden_chars" != x; then
17054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17056  fi
17057
17058    # Output is in $new_path
17059
17060  windows_path="$new_path"
17061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17062    unix_path=`$CYGPATH -u "$windows_path"`
17063    new_path="$unix_path"
17064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17066    new_path="$unix_path"
17067  fi
17068
17069    # remove trailing .exe if any
17070    new_path="${new_path/%.exe/}"
17071
17072    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17073    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17074  fi
17075
17076    else
17077      # We're on a unix platform. Hooray! :)
17078      # First separate the path from the arguments. This will split at the first
17079      # space.
17080      complete="$FOUND_MAKE"
17081      path="${complete%% *}"
17082      tmp="$complete EOL"
17083      arguments="${tmp#* }"
17084
17085      # Cannot rely on the command "which" here since it doesn't always work.
17086      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17087      if test -z "$is_absolute_path"; then
17088        # Path to executable is not absolute. Find it.
17089        IFS_save="$IFS"
17090        IFS=:
17091        for p in $PATH; do
17092          if test -f "$p/$path" && test -x "$p/$path"; then
17093            new_path="$p/$path"
17094            break
17095          fi
17096        done
17097        IFS="$IFS_save"
17098      else
17099        # This is an absolute path, we can use it without further modifications.
17100        new_path="$path"
17101      fi
17102
17103      if test "x$new_path" = x; then
17104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17105$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17106        has_space=`$ECHO "$complete" | $GREP " "`
17107        if test "x$has_space" != x; then
17108          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17109$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17110        fi
17111        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17112      fi
17113    fi
17114
17115    # Now join together the path and the arguments once again
17116    if test "x$arguments" != xEOL; then
17117      new_complete="$new_path ${arguments% *}"
17118    else
17119      new_complete="$new_path"
17120    fi
17121
17122    if test "x$complete" != "x$new_complete"; then
17123      FOUND_MAKE="$new_complete"
17124      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17125$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17126    fi
17127  fi
17128
17129        fi
17130      fi
17131    fi
17132  fi
17133
17134
17135    if test "x$FOUND_MAKE" = x; then
17136      for ac_prog in make
17137do
17138  # Extract the first word of "$ac_prog", so it can be a program name with args.
17139set dummy $ac_prog; ac_word=$2
17140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17141$as_echo_n "checking for $ac_word... " >&6; }
17142if ${ac_cv_path_CHECK_MAKE+:} false; then :
17143  $as_echo_n "(cached) " >&6
17144else
17145  case $CHECK_MAKE in
17146  [\\/]* | ?:[\\/]*)
17147  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17148  ;;
17149  *)
17150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17151for as_dir in $PATH
17152do
17153  IFS=$as_save_IFS
17154  test -z "$as_dir" && as_dir=.
17155    for ac_exec_ext in '' $ac_executable_extensions; do
17156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17157    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17159    break 2
17160  fi
17161done
17162  done
17163IFS=$as_save_IFS
17164
17165  ;;
17166esac
17167fi
17168CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17169if test -n "$CHECK_MAKE"; then
17170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17171$as_echo "$CHECK_MAKE" >&6; }
17172else
17173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17174$as_echo "no" >&6; }
17175fi
17176
17177
17178  test -n "$CHECK_MAKE" && break
17179done
17180
17181
17182  MAKE_CANDIDATE=""$CHECK_MAKE""
17183  DESCRIPTION="make in PATH"
17184
17185  # On Cygwin, we require a newer version of make than on other platforms
17186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17187    MAKE_VERSION_EXPR="-e 4\."
17188    MAKE_REQUIRED_VERSION="4.0"
17189   else
17190    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17191    MAKE_REQUIRED_VERSION="3.81"
17192  fi
17193
17194  if test "x$MAKE_CANDIDATE" != x; then
17195    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17196$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17197    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17198    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17199    if test "x$IS_GNU_MAKE" = x; then
17200      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17201$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17202    else
17203      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17204      if test "x$IS_MODERN_MAKE" = x; then
17205        { $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
17206$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;}
17207      else
17208        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17209          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17210            MAKE_EXPECTED_ENV='cygwin'
17211          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17212            MAKE_EXPECTED_ENV='msys'
17213          else
17214            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17215          fi
17216          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17217          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17218        else
17219          # Not relevant for non-Windows
17220          IS_MAKE_CORRECT_ENV=true
17221        fi
17222        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17223          { $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
17224$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;}
17225        else
17226          FOUND_MAKE=$MAKE_CANDIDATE
17227
17228  # Only process if variable expands to non-empty
17229
17230  if test "x$FOUND_MAKE" != x; then
17231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17232
17233  # First separate the path from the arguments. This will split at the first
17234  # space.
17235  complete="$FOUND_MAKE"
17236  path="${complete%% *}"
17237  tmp="$complete EOL"
17238  arguments="${tmp#* }"
17239
17240  # Input might be given as Windows format, start by converting to
17241  # unix format.
17242  new_path=`$CYGPATH -u "$path"`
17243
17244  # Now try to locate executable using which
17245  new_path=`$WHICH "$new_path" 2> /dev/null`
17246  # bat and cmd files are not always considered executable in cygwin causing which
17247  # to not find them
17248  if test "x$new_path" = x \
17249      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17250      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17251    new_path=`$CYGPATH -u "$path"`
17252  fi
17253  if test "x$new_path" = x; then
17254    # Oops. Which didn't find the executable.
17255    # The splitting of arguments from the executable at a space might have been incorrect,
17256    # since paths with space are more likely in Windows. Give it another try with the whole
17257    # argument.
17258    path="$complete"
17259    arguments="EOL"
17260    new_path=`$CYGPATH -u "$path"`
17261    new_path=`$WHICH "$new_path" 2> /dev/null`
17262    # bat and cmd files are not always considered executable in cygwin causing which
17263    # to not find them
17264    if test "x$new_path" = x \
17265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17267      new_path=`$CYGPATH -u "$path"`
17268    fi
17269    if test "x$new_path" = x; then
17270      # It's still not found. Now this is an unrecoverable error.
17271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17272$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17273      has_space=`$ECHO "$complete" | $GREP " "`
17274      if test "x$has_space" != x; then
17275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17277      fi
17278      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17279    fi
17280  fi
17281
17282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17285  # "foo.exe" is OK but "foo" is an error.
17286  #
17287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17288  # It is also a way to make sure we got the proper file name for the real test later on.
17289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17290  if test "x$test_shortpath" = x; then
17291    # Short path failed, file does not exist as specified.
17292    # Try adding .exe or .cmd
17293    if test -f "${new_path}.exe"; then
17294      input_to_shortpath="${new_path}.exe"
17295    elif test -f "${new_path}.cmd"; then
17296      input_to_shortpath="${new_path}.cmd"
17297    else
17298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17299$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17302      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17303    fi
17304  else
17305    input_to_shortpath="$new_path"
17306  fi
17307
17308  # Call helper function which possibly converts this using DOS-style short mode.
17309  # If so, the updated path is stored in $new_path.
17310  new_path="$input_to_shortpath"
17311
17312  input_path="$input_to_shortpath"
17313  # Check if we need to convert this using DOS-style short mode. If the path
17314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17315  # take no chances and rewrite it.
17316  # Note: m4 eats our [], so we need to use [ and ] instead.
17317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17318  if test "x$has_forbidden_chars" != x; then
17319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17323      # Going to short mode and back again did indeed matter. Since short mode is
17324      # case insensitive, let's make it lowercase to improve readability.
17325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17326      # Now convert it back to Unix-style (cygpath)
17327      input_path=`$CYGPATH -u "$shortmode_path"`
17328      new_path="$input_path"
17329    fi
17330  fi
17331
17332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17333  if test "x$test_cygdrive_prefix" = x; then
17334    # As a simple fix, exclude /usr/bin since it's not a real path.
17335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17337      # a path prefixed by /cygdrive for fixpath to work.
17338      new_path="$CYGWIN_ROOT_PATH$input_path"
17339    fi
17340  fi
17341
17342  # remove trailing .exe if any
17343  new_path="${new_path/%.exe/}"
17344
17345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17346
17347  # First separate the path from the arguments. This will split at the first
17348  # space.
17349  complete="$FOUND_MAKE"
17350  path="${complete%% *}"
17351  tmp="$complete EOL"
17352  arguments="${tmp#* }"
17353
17354  # Input might be given as Windows format, start by converting to
17355  # unix format.
17356  new_path="$path"
17357
17358  windows_path="$new_path"
17359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17360    unix_path=`$CYGPATH -u "$windows_path"`
17361    new_path="$unix_path"
17362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17364    new_path="$unix_path"
17365  fi
17366
17367
17368  # Now try to locate executable using which
17369  new_path=`$WHICH "$new_path" 2> /dev/null`
17370
17371  if test "x$new_path" = x; then
17372    # Oops. Which didn't find the executable.
17373    # The splitting of arguments from the executable at a space might have been incorrect,
17374    # since paths with space are more likely in Windows. Give it another try with the whole
17375    # argument.
17376    path="$complete"
17377    arguments="EOL"
17378    new_path="$path"
17379
17380  windows_path="$new_path"
17381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17382    unix_path=`$CYGPATH -u "$windows_path"`
17383    new_path="$unix_path"
17384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17386    new_path="$unix_path"
17387  fi
17388
17389
17390    new_path=`$WHICH "$new_path" 2> /dev/null`
17391    # bat and cmd files are not always considered executable in MSYS causing which
17392    # to not find them
17393    if test "x$new_path" = x \
17394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17396      new_path="$path"
17397
17398  windows_path="$new_path"
17399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17400    unix_path=`$CYGPATH -u "$windows_path"`
17401    new_path="$unix_path"
17402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17404    new_path="$unix_path"
17405  fi
17406
17407    fi
17408
17409    if test "x$new_path" = x; then
17410      # It's still not found. Now this is an unrecoverable error.
17411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17413      has_space=`$ECHO "$complete" | $GREP " "`
17414      if test "x$has_space" != x; then
17415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17417      fi
17418      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17419    fi
17420  fi
17421
17422  # Now new_path has a complete unix path to the binary
17423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17424    # Keep paths in /bin as-is, but remove trailing .exe if any
17425    new_path="${new_path/%.exe/}"
17426    # Do not save /bin paths to all_fixpath_prefixes!
17427  else
17428    # Not in mixed or Windows style, start by that.
17429    new_path=`cmd //c echo $new_path`
17430
17431  input_path="$new_path"
17432  # Check if we need to convert this using DOS-style short mode. If the path
17433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17434  # take no chances and rewrite it.
17435  # Note: m4 eats our [], so we need to use [ and ] instead.
17436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17437  if test "x$has_forbidden_chars" != x; then
17438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17440  fi
17441
17442    # Output is in $new_path
17443
17444  windows_path="$new_path"
17445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17446    unix_path=`$CYGPATH -u "$windows_path"`
17447    new_path="$unix_path"
17448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17450    new_path="$unix_path"
17451  fi
17452
17453    # remove trailing .exe if any
17454    new_path="${new_path/%.exe/}"
17455
17456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17458  fi
17459
17460    else
17461      # We're on a unix platform. Hooray! :)
17462      # First separate the path from the arguments. This will split at the first
17463      # space.
17464      complete="$FOUND_MAKE"
17465      path="${complete%% *}"
17466      tmp="$complete EOL"
17467      arguments="${tmp#* }"
17468
17469      # Cannot rely on the command "which" here since it doesn't always work.
17470      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17471      if test -z "$is_absolute_path"; then
17472        # Path to executable is not absolute. Find it.
17473        IFS_save="$IFS"
17474        IFS=:
17475        for p in $PATH; do
17476          if test -f "$p/$path" && test -x "$p/$path"; then
17477            new_path="$p/$path"
17478            break
17479          fi
17480        done
17481        IFS="$IFS_save"
17482      else
17483        # This is an absolute path, we can use it without further modifications.
17484        new_path="$path"
17485      fi
17486
17487      if test "x$new_path" = x; then
17488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17490        has_space=`$ECHO "$complete" | $GREP " "`
17491        if test "x$has_space" != x; then
17492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17494        fi
17495        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17496      fi
17497    fi
17498
17499    # Now join together the path and the arguments once again
17500    if test "x$arguments" != xEOL; then
17501      new_complete="$new_path ${arguments% *}"
17502    else
17503      new_complete="$new_path"
17504    fi
17505
17506    if test "x$complete" != "x$new_complete"; then
17507      FOUND_MAKE="$new_complete"
17508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17509$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17510    fi
17511  fi
17512
17513        fi
17514      fi
17515    fi
17516  fi
17517
17518    fi
17519
17520    if test "x$FOUND_MAKE" = x; then
17521      if test "x$TOOLCHAIN_PATH" != x; then
17522        # We have a toolchain path, check that as well before giving up.
17523        OLD_PATH=$PATH
17524        PATH=$TOOLCHAIN_PATH:$PATH
17525        for ac_prog in gmake
17526do
17527  # Extract the first word of "$ac_prog", so it can be a program name with args.
17528set dummy $ac_prog; ac_word=$2
17529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17530$as_echo_n "checking for $ac_word... " >&6; }
17531if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17532  $as_echo_n "(cached) " >&6
17533else
17534  case $CHECK_TOOLSDIR_GMAKE in
17535  [\\/]* | ?:[\\/]*)
17536  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17537  ;;
17538  *)
17539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17540for as_dir in $PATH
17541do
17542  IFS=$as_save_IFS
17543  test -z "$as_dir" && as_dir=.
17544    for ac_exec_ext in '' $ac_executable_extensions; do
17545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17546    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17548    break 2
17549  fi
17550done
17551  done
17552IFS=$as_save_IFS
17553
17554  ;;
17555esac
17556fi
17557CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17558if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17560$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17561else
17562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17563$as_echo "no" >&6; }
17564fi
17565
17566
17567  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17568done
17569
17570
17571  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17572  DESCRIPTION="gmake in tools-dir"
17573
17574  # On Cygwin, we require a newer version of make than on other platforms
17575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17576    MAKE_VERSION_EXPR="-e 4\."
17577    MAKE_REQUIRED_VERSION="4.0"
17578   else
17579    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17580    MAKE_REQUIRED_VERSION="3.81"
17581  fi
17582
17583  if test "x$MAKE_CANDIDATE" != x; then
17584    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17585$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17586    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17587    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17588    if test "x$IS_GNU_MAKE" = x; then
17589      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17590$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17591    else
17592      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17593      if test "x$IS_MODERN_MAKE" = x; then
17594        { $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
17595$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;}
17596      else
17597        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17598          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17599            MAKE_EXPECTED_ENV='cygwin'
17600          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17601            MAKE_EXPECTED_ENV='msys'
17602          else
17603            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17604          fi
17605          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17606          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17607        else
17608          # Not relevant for non-Windows
17609          IS_MAKE_CORRECT_ENV=true
17610        fi
17611        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17612          { $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
17613$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;}
17614        else
17615          FOUND_MAKE=$MAKE_CANDIDATE
17616
17617  # Only process if variable expands to non-empty
17618
17619  if test "x$FOUND_MAKE" != x; then
17620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17621
17622  # First separate the path from the arguments. This will split at the first
17623  # space.
17624  complete="$FOUND_MAKE"
17625  path="${complete%% *}"
17626  tmp="$complete EOL"
17627  arguments="${tmp#* }"
17628
17629  # Input might be given as Windows format, start by converting to
17630  # unix format.
17631  new_path=`$CYGPATH -u "$path"`
17632
17633  # Now try to locate executable using which
17634  new_path=`$WHICH "$new_path" 2> /dev/null`
17635  # bat and cmd files are not always considered executable in cygwin causing which
17636  # to not find them
17637  if test "x$new_path" = x \
17638      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17639      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17640    new_path=`$CYGPATH -u "$path"`
17641  fi
17642  if test "x$new_path" = x; then
17643    # Oops. Which didn't find the executable.
17644    # The splitting of arguments from the executable at a space might have been incorrect,
17645    # since paths with space are more likely in Windows. Give it another try with the whole
17646    # argument.
17647    path="$complete"
17648    arguments="EOL"
17649    new_path=`$CYGPATH -u "$path"`
17650    new_path=`$WHICH "$new_path" 2> /dev/null`
17651    # bat and cmd files are not always considered executable in cygwin causing which
17652    # to not find them
17653    if test "x$new_path" = x \
17654        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17655        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17656      new_path=`$CYGPATH -u "$path"`
17657    fi
17658    if test "x$new_path" = x; then
17659      # It's still not found. Now this is an unrecoverable error.
17660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17661$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17662      has_space=`$ECHO "$complete" | $GREP " "`
17663      if test "x$has_space" != x; then
17664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17666      fi
17667      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17668    fi
17669  fi
17670
17671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17674  # "foo.exe" is OK but "foo" is an error.
17675  #
17676  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17677  # It is also a way to make sure we got the proper file name for the real test later on.
17678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17679  if test "x$test_shortpath" = x; then
17680    # Short path failed, file does not exist as specified.
17681    # Try adding .exe or .cmd
17682    if test -f "${new_path}.exe"; then
17683      input_to_shortpath="${new_path}.exe"
17684    elif test -f "${new_path}.cmd"; then
17685      input_to_shortpath="${new_path}.cmd"
17686    else
17687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17688$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17689      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17690$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17691      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17692    fi
17693  else
17694    input_to_shortpath="$new_path"
17695  fi
17696
17697  # Call helper function which possibly converts this using DOS-style short mode.
17698  # If so, the updated path is stored in $new_path.
17699  new_path="$input_to_shortpath"
17700
17701  input_path="$input_to_shortpath"
17702  # Check if we need to convert this using DOS-style short mode. If the path
17703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17704  # take no chances and rewrite it.
17705  # Note: m4 eats our [], so we need to use [ and ] instead.
17706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17707  if test "x$has_forbidden_chars" != x; then
17708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17712      # Going to short mode and back again did indeed matter. Since short mode is
17713      # case insensitive, let's make it lowercase to improve readability.
17714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17715      # Now convert it back to Unix-style (cygpath)
17716      input_path=`$CYGPATH -u "$shortmode_path"`
17717      new_path="$input_path"
17718    fi
17719  fi
17720
17721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17722  if test "x$test_cygdrive_prefix" = x; then
17723    # As a simple fix, exclude /usr/bin since it's not a real path.
17724    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17726      # a path prefixed by /cygdrive for fixpath to work.
17727      new_path="$CYGWIN_ROOT_PATH$input_path"
17728    fi
17729  fi
17730
17731  # remove trailing .exe if any
17732  new_path="${new_path/%.exe/}"
17733
17734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17735
17736  # First separate the path from the arguments. This will split at the first
17737  # space.
17738  complete="$FOUND_MAKE"
17739  path="${complete%% *}"
17740  tmp="$complete EOL"
17741  arguments="${tmp#* }"
17742
17743  # Input might be given as Windows format, start by converting to
17744  # unix format.
17745  new_path="$path"
17746
17747  windows_path="$new_path"
17748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17749    unix_path=`$CYGPATH -u "$windows_path"`
17750    new_path="$unix_path"
17751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17753    new_path="$unix_path"
17754  fi
17755
17756
17757  # Now try to locate executable using which
17758  new_path=`$WHICH "$new_path" 2> /dev/null`
17759
17760  if test "x$new_path" = x; then
17761    # Oops. Which didn't find the executable.
17762    # The splitting of arguments from the executable at a space might have been incorrect,
17763    # since paths with space are more likely in Windows. Give it another try with the whole
17764    # argument.
17765    path="$complete"
17766    arguments="EOL"
17767    new_path="$path"
17768
17769  windows_path="$new_path"
17770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17771    unix_path=`$CYGPATH -u "$windows_path"`
17772    new_path="$unix_path"
17773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17775    new_path="$unix_path"
17776  fi
17777
17778
17779    new_path=`$WHICH "$new_path" 2> /dev/null`
17780    # bat and cmd files are not always considered executable in MSYS causing which
17781    # to not find them
17782    if test "x$new_path" = x \
17783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17785      new_path="$path"
17786
17787  windows_path="$new_path"
17788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17789    unix_path=`$CYGPATH -u "$windows_path"`
17790    new_path="$unix_path"
17791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17793    new_path="$unix_path"
17794  fi
17795
17796    fi
17797
17798    if test "x$new_path" = x; then
17799      # It's still not found. Now this is an unrecoverable error.
17800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17801$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17802      has_space=`$ECHO "$complete" | $GREP " "`
17803      if test "x$has_space" != x; then
17804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17806      fi
17807      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17808    fi
17809  fi
17810
17811  # Now new_path has a complete unix path to the binary
17812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17813    # Keep paths in /bin as-is, but remove trailing .exe if any
17814    new_path="${new_path/%.exe/}"
17815    # Do not save /bin paths to all_fixpath_prefixes!
17816  else
17817    # Not in mixed or Windows style, start by that.
17818    new_path=`cmd //c echo $new_path`
17819
17820  input_path="$new_path"
17821  # Check if we need to convert this using DOS-style short mode. If the path
17822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17823  # take no chances and rewrite it.
17824  # Note: m4 eats our [], so we need to use [ and ] instead.
17825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17826  if test "x$has_forbidden_chars" != x; then
17827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17829  fi
17830
17831    # Output is in $new_path
17832
17833  windows_path="$new_path"
17834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17835    unix_path=`$CYGPATH -u "$windows_path"`
17836    new_path="$unix_path"
17837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17839    new_path="$unix_path"
17840  fi
17841
17842    # remove trailing .exe if any
17843    new_path="${new_path/%.exe/}"
17844
17845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17847  fi
17848
17849    else
17850      # We're on a unix platform. Hooray! :)
17851      # First separate the path from the arguments. This will split at the first
17852      # space.
17853      complete="$FOUND_MAKE"
17854      path="${complete%% *}"
17855      tmp="$complete EOL"
17856      arguments="${tmp#* }"
17857
17858      # Cannot rely on the command "which" here since it doesn't always work.
17859      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17860      if test -z "$is_absolute_path"; then
17861        # Path to executable is not absolute. Find it.
17862        IFS_save="$IFS"
17863        IFS=:
17864        for p in $PATH; do
17865          if test -f "$p/$path" && test -x "$p/$path"; then
17866            new_path="$p/$path"
17867            break
17868          fi
17869        done
17870        IFS="$IFS_save"
17871      else
17872        # This is an absolute path, we can use it without further modifications.
17873        new_path="$path"
17874      fi
17875
17876      if test "x$new_path" = x; then
17877        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17878$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17879        has_space=`$ECHO "$complete" | $GREP " "`
17880        if test "x$has_space" != x; then
17881          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17882$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17883        fi
17884        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17885      fi
17886    fi
17887
17888    # Now join together the path and the arguments once again
17889    if test "x$arguments" != xEOL; then
17890      new_complete="$new_path ${arguments% *}"
17891    else
17892      new_complete="$new_path"
17893    fi
17894
17895    if test "x$complete" != "x$new_complete"; then
17896      FOUND_MAKE="$new_complete"
17897      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17898$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17899    fi
17900  fi
17901
17902        fi
17903      fi
17904    fi
17905  fi
17906
17907        if test "x$FOUND_MAKE" = x; then
17908          for ac_prog in make
17909do
17910  # Extract the first word of "$ac_prog", so it can be a program name with args.
17911set dummy $ac_prog; ac_word=$2
17912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17913$as_echo_n "checking for $ac_word... " >&6; }
17914if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17915  $as_echo_n "(cached) " >&6
17916else
17917  case $CHECK_TOOLSDIR_MAKE in
17918  [\\/]* | ?:[\\/]*)
17919  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17920  ;;
17921  *)
17922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17923for as_dir in $PATH
17924do
17925  IFS=$as_save_IFS
17926  test -z "$as_dir" && as_dir=.
17927    for ac_exec_ext in '' $ac_executable_extensions; do
17928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17929    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17931    break 2
17932  fi
17933done
17934  done
17935IFS=$as_save_IFS
17936
17937  ;;
17938esac
17939fi
17940CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17941if test -n "$CHECK_TOOLSDIR_MAKE"; then
17942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17943$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17944else
17945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17946$as_echo "no" >&6; }
17947fi
17948
17949
17950  test -n "$CHECK_TOOLSDIR_MAKE" && break
17951done
17952
17953
17954  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17955  DESCRIPTION="make in tools-dir"
17956
17957  # On Cygwin, we require a newer version of make than on other platforms
17958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17959    MAKE_VERSION_EXPR="-e 4\."
17960    MAKE_REQUIRED_VERSION="4.0"
17961   else
17962    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17963    MAKE_REQUIRED_VERSION="3.81"
17964  fi
17965
17966  if test "x$MAKE_CANDIDATE" != x; then
17967    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17968$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17969    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17970    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17971    if test "x$IS_GNU_MAKE" = x; then
17972      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17973$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17974    else
17975      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17976      if test "x$IS_MODERN_MAKE" = x; then
17977        { $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
17978$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;}
17979      else
17980        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17981          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17982            MAKE_EXPECTED_ENV='cygwin'
17983          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17984            MAKE_EXPECTED_ENV='msys'
17985          else
17986            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17987          fi
17988          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17989          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17990        else
17991          # Not relevant for non-Windows
17992          IS_MAKE_CORRECT_ENV=true
17993        fi
17994        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17995          { $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
17996$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;}
17997        else
17998          FOUND_MAKE=$MAKE_CANDIDATE
17999
18000  # Only process if variable expands to non-empty
18001
18002  if test "x$FOUND_MAKE" != x; then
18003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18004
18005  # First separate the path from the arguments. This will split at the first
18006  # space.
18007  complete="$FOUND_MAKE"
18008  path="${complete%% *}"
18009  tmp="$complete EOL"
18010  arguments="${tmp#* }"
18011
18012  # Input might be given as Windows format, start by converting to
18013  # unix format.
18014  new_path=`$CYGPATH -u "$path"`
18015
18016  # Now try to locate executable using which
18017  new_path=`$WHICH "$new_path" 2> /dev/null`
18018  # bat and cmd files are not always considered executable in cygwin causing which
18019  # to not find them
18020  if test "x$new_path" = x \
18021      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18022      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18023    new_path=`$CYGPATH -u "$path"`
18024  fi
18025  if test "x$new_path" = x; then
18026    # Oops. Which didn't find the executable.
18027    # The splitting of arguments from the executable at a space might have been incorrect,
18028    # since paths with space are more likely in Windows. Give it another try with the whole
18029    # argument.
18030    path="$complete"
18031    arguments="EOL"
18032    new_path=`$CYGPATH -u "$path"`
18033    new_path=`$WHICH "$new_path" 2> /dev/null`
18034    # bat and cmd files are not always considered executable in cygwin causing which
18035    # to not find them
18036    if test "x$new_path" = x \
18037        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18038        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18039      new_path=`$CYGPATH -u "$path"`
18040    fi
18041    if test "x$new_path" = x; then
18042      # It's still not found. Now this is an unrecoverable error.
18043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18044$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18045      has_space=`$ECHO "$complete" | $GREP " "`
18046      if test "x$has_space" != x; then
18047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18049      fi
18050      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18051    fi
18052  fi
18053
18054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18057  # "foo.exe" is OK but "foo" is an error.
18058  #
18059  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18060  # It is also a way to make sure we got the proper file name for the real test later on.
18061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18062  if test "x$test_shortpath" = x; then
18063    # Short path failed, file does not exist as specified.
18064    # Try adding .exe or .cmd
18065    if test -f "${new_path}.exe"; then
18066      input_to_shortpath="${new_path}.exe"
18067    elif test -f "${new_path}.cmd"; then
18068      input_to_shortpath="${new_path}.cmd"
18069    else
18070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18071$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18072      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18073$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18074      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18075    fi
18076  else
18077    input_to_shortpath="$new_path"
18078  fi
18079
18080  # Call helper function which possibly converts this using DOS-style short mode.
18081  # If so, the updated path is stored in $new_path.
18082  new_path="$input_to_shortpath"
18083
18084  input_path="$input_to_shortpath"
18085  # Check if we need to convert this using DOS-style short mode. If the path
18086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18087  # take no chances and rewrite it.
18088  # Note: m4 eats our [], so we need to use [ and ] instead.
18089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18090  if test "x$has_forbidden_chars" != x; then
18091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18095      # Going to short mode and back again did indeed matter. Since short mode is
18096      # case insensitive, let's make it lowercase to improve readability.
18097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18098      # Now convert it back to Unix-style (cygpath)
18099      input_path=`$CYGPATH -u "$shortmode_path"`
18100      new_path="$input_path"
18101    fi
18102  fi
18103
18104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18105  if test "x$test_cygdrive_prefix" = x; then
18106    # As a simple fix, exclude /usr/bin since it's not a real path.
18107    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18109      # a path prefixed by /cygdrive for fixpath to work.
18110      new_path="$CYGWIN_ROOT_PATH$input_path"
18111    fi
18112  fi
18113
18114  # remove trailing .exe if any
18115  new_path="${new_path/%.exe/}"
18116
18117    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18118
18119  # First separate the path from the arguments. This will split at the first
18120  # space.
18121  complete="$FOUND_MAKE"
18122  path="${complete%% *}"
18123  tmp="$complete EOL"
18124  arguments="${tmp#* }"
18125
18126  # Input might be given as Windows format, start by converting to
18127  # unix format.
18128  new_path="$path"
18129
18130  windows_path="$new_path"
18131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18132    unix_path=`$CYGPATH -u "$windows_path"`
18133    new_path="$unix_path"
18134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18136    new_path="$unix_path"
18137  fi
18138
18139
18140  # Now try to locate executable using which
18141  new_path=`$WHICH "$new_path" 2> /dev/null`
18142
18143  if test "x$new_path" = x; then
18144    # Oops. Which didn't find the executable.
18145    # The splitting of arguments from the executable at a space might have been incorrect,
18146    # since paths with space are more likely in Windows. Give it another try with the whole
18147    # argument.
18148    path="$complete"
18149    arguments="EOL"
18150    new_path="$path"
18151
18152  windows_path="$new_path"
18153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18154    unix_path=`$CYGPATH -u "$windows_path"`
18155    new_path="$unix_path"
18156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18158    new_path="$unix_path"
18159  fi
18160
18161
18162    new_path=`$WHICH "$new_path" 2> /dev/null`
18163    # bat and cmd files are not always considered executable in MSYS causing which
18164    # to not find them
18165    if test "x$new_path" = x \
18166        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18167        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18168      new_path="$path"
18169
18170  windows_path="$new_path"
18171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18172    unix_path=`$CYGPATH -u "$windows_path"`
18173    new_path="$unix_path"
18174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18176    new_path="$unix_path"
18177  fi
18178
18179    fi
18180
18181    if test "x$new_path" = x; then
18182      # It's still not found. Now this is an unrecoverable error.
18183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18184$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18185      has_space=`$ECHO "$complete" | $GREP " "`
18186      if test "x$has_space" != x; then
18187        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18188$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18189      fi
18190      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18191    fi
18192  fi
18193
18194  # Now new_path has a complete unix path to the binary
18195  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18196    # Keep paths in /bin as-is, but remove trailing .exe if any
18197    new_path="${new_path/%.exe/}"
18198    # Do not save /bin paths to all_fixpath_prefixes!
18199  else
18200    # Not in mixed or Windows style, start by that.
18201    new_path=`cmd //c echo $new_path`
18202
18203  input_path="$new_path"
18204  # Check if we need to convert this using DOS-style short mode. If the path
18205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18206  # take no chances and rewrite it.
18207  # Note: m4 eats our [], so we need to use [ and ] instead.
18208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18209  if test "x$has_forbidden_chars" != x; then
18210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18212  fi
18213
18214    # Output is in $new_path
18215
18216  windows_path="$new_path"
18217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18218    unix_path=`$CYGPATH -u "$windows_path"`
18219    new_path="$unix_path"
18220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18222    new_path="$unix_path"
18223  fi
18224
18225    # remove trailing .exe if any
18226    new_path="${new_path/%.exe/}"
18227
18228    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18229    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18230  fi
18231
18232    else
18233      # We're on a unix platform. Hooray! :)
18234      # First separate the path from the arguments. This will split at the first
18235      # space.
18236      complete="$FOUND_MAKE"
18237      path="${complete%% *}"
18238      tmp="$complete EOL"
18239      arguments="${tmp#* }"
18240
18241      # Cannot rely on the command "which" here since it doesn't always work.
18242      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18243      if test -z "$is_absolute_path"; then
18244        # Path to executable is not absolute. Find it.
18245        IFS_save="$IFS"
18246        IFS=:
18247        for p in $PATH; do
18248          if test -f "$p/$path" && test -x "$p/$path"; then
18249            new_path="$p/$path"
18250            break
18251          fi
18252        done
18253        IFS="$IFS_save"
18254      else
18255        # This is an absolute path, we can use it without further modifications.
18256        new_path="$path"
18257      fi
18258
18259      if test "x$new_path" = x; then
18260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18261$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18262        has_space=`$ECHO "$complete" | $GREP " "`
18263        if test "x$has_space" != x; then
18264          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18265$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18266        fi
18267        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18268      fi
18269    fi
18270
18271    # Now join together the path and the arguments once again
18272    if test "x$arguments" != xEOL; then
18273      new_complete="$new_path ${arguments% *}"
18274    else
18275      new_complete="$new_path"
18276    fi
18277
18278    if test "x$complete" != "x$new_complete"; then
18279      FOUND_MAKE="$new_complete"
18280      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18281$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18282    fi
18283  fi
18284
18285        fi
18286      fi
18287    fi
18288  fi
18289
18290        fi
18291        PATH=$OLD_PATH
18292      fi
18293    fi
18294
18295    if test "x$FOUND_MAKE" = x; then
18296      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
18297    fi
18298
18299  else
18300    # The variable is set, but is it from the command line or the environment?
18301
18302    # Try to remove the string !MAKE! from our list.
18303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18305      # If it failed, the variable was not from the command line. Ignore it,
18306      # but warn the user (except for BASH, which is always set by the calling BASH).
18307      if test "xMAKE" != xBASH; then
18308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18309$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18310      fi
18311      # Try to locate tool using the code snippet
18312
18313    # Try our hardest to locate a correct version of GNU make
18314    for ac_prog in gmake
18315do
18316  # Extract the first word of "$ac_prog", so it can be a program name with args.
18317set dummy $ac_prog; ac_word=$2
18318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18319$as_echo_n "checking for $ac_word... " >&6; }
18320if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18321  $as_echo_n "(cached) " >&6
18322else
18323  case $CHECK_GMAKE in
18324  [\\/]* | ?:[\\/]*)
18325  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18326  ;;
18327  *)
18328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18329for as_dir in $PATH
18330do
18331  IFS=$as_save_IFS
18332  test -z "$as_dir" && as_dir=.
18333    for ac_exec_ext in '' $ac_executable_extensions; do
18334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18335    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18337    break 2
18338  fi
18339done
18340  done
18341IFS=$as_save_IFS
18342
18343  ;;
18344esac
18345fi
18346CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18347if test -n "$CHECK_GMAKE"; then
18348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18349$as_echo "$CHECK_GMAKE" >&6; }
18350else
18351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18352$as_echo "no" >&6; }
18353fi
18354
18355
18356  test -n "$CHECK_GMAKE" && break
18357done
18358
18359
18360  MAKE_CANDIDATE=""$CHECK_GMAKE""
18361  DESCRIPTION="gmake in PATH"
18362
18363  # On Cygwin, we require a newer version of make than on other platforms
18364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18365    MAKE_VERSION_EXPR="-e 4\."
18366    MAKE_REQUIRED_VERSION="4.0"
18367   else
18368    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18369    MAKE_REQUIRED_VERSION="3.81"
18370  fi
18371
18372  if test "x$MAKE_CANDIDATE" != x; then
18373    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18374$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18375    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18376    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18377    if test "x$IS_GNU_MAKE" = x; then
18378      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18379$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18380    else
18381      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18382      if test "x$IS_MODERN_MAKE" = x; then
18383        { $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
18384$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;}
18385      else
18386        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18387          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18388            MAKE_EXPECTED_ENV='cygwin'
18389          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18390            MAKE_EXPECTED_ENV='msys'
18391          else
18392            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18393          fi
18394          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18395          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18396        else
18397          # Not relevant for non-Windows
18398          IS_MAKE_CORRECT_ENV=true
18399        fi
18400        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18401          { $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
18402$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;}
18403        else
18404          FOUND_MAKE=$MAKE_CANDIDATE
18405
18406  # Only process if variable expands to non-empty
18407
18408  if test "x$FOUND_MAKE" != x; then
18409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18410
18411  # First separate the path from the arguments. This will split at the first
18412  # space.
18413  complete="$FOUND_MAKE"
18414  path="${complete%% *}"
18415  tmp="$complete EOL"
18416  arguments="${tmp#* }"
18417
18418  # Input might be given as Windows format, start by converting to
18419  # unix format.
18420  new_path=`$CYGPATH -u "$path"`
18421
18422  # Now try to locate executable using which
18423  new_path=`$WHICH "$new_path" 2> /dev/null`
18424  # bat and cmd files are not always considered executable in cygwin causing which
18425  # to not find them
18426  if test "x$new_path" = x \
18427      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18428      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18429    new_path=`$CYGPATH -u "$path"`
18430  fi
18431  if test "x$new_path" = x; then
18432    # Oops. Which didn't find the executable.
18433    # The splitting of arguments from the executable at a space might have been incorrect,
18434    # since paths with space are more likely in Windows. Give it another try with the whole
18435    # argument.
18436    path="$complete"
18437    arguments="EOL"
18438    new_path=`$CYGPATH -u "$path"`
18439    new_path=`$WHICH "$new_path" 2> /dev/null`
18440    # bat and cmd files are not always considered executable in cygwin causing which
18441    # to not find them
18442    if test "x$new_path" = x \
18443        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18444        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18445      new_path=`$CYGPATH -u "$path"`
18446    fi
18447    if test "x$new_path" = x; then
18448      # It's still not found. Now this is an unrecoverable error.
18449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18450$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18451      has_space=`$ECHO "$complete" | $GREP " "`
18452      if test "x$has_space" != x; then
18453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18455      fi
18456      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18457    fi
18458  fi
18459
18460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18463  # "foo.exe" is OK but "foo" is an error.
18464  #
18465  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18466  # It is also a way to make sure we got the proper file name for the real test later on.
18467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18468  if test "x$test_shortpath" = x; then
18469    # Short path failed, file does not exist as specified.
18470    # Try adding .exe or .cmd
18471    if test -f "${new_path}.exe"; then
18472      input_to_shortpath="${new_path}.exe"
18473    elif test -f "${new_path}.cmd"; then
18474      input_to_shortpath="${new_path}.cmd"
18475    else
18476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18477$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18478      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18479$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18480      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18481    fi
18482  else
18483    input_to_shortpath="$new_path"
18484  fi
18485
18486  # Call helper function which possibly converts this using DOS-style short mode.
18487  # If so, the updated path is stored in $new_path.
18488  new_path="$input_to_shortpath"
18489
18490  input_path="$input_to_shortpath"
18491  # Check if we need to convert this using DOS-style short mode. If the path
18492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18493  # take no chances and rewrite it.
18494  # Note: m4 eats our [], so we need to use [ and ] instead.
18495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18496  if test "x$has_forbidden_chars" != x; then
18497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18501      # Going to short mode and back again did indeed matter. Since short mode is
18502      # case insensitive, let's make it lowercase to improve readability.
18503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18504      # Now convert it back to Unix-style (cygpath)
18505      input_path=`$CYGPATH -u "$shortmode_path"`
18506      new_path="$input_path"
18507    fi
18508  fi
18509
18510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18511  if test "x$test_cygdrive_prefix" = x; then
18512    # As a simple fix, exclude /usr/bin since it's not a real path.
18513    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18515      # a path prefixed by /cygdrive for fixpath to work.
18516      new_path="$CYGWIN_ROOT_PATH$input_path"
18517    fi
18518  fi
18519
18520  # remove trailing .exe if any
18521  new_path="${new_path/%.exe/}"
18522
18523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18524
18525  # First separate the path from the arguments. This will split at the first
18526  # space.
18527  complete="$FOUND_MAKE"
18528  path="${complete%% *}"
18529  tmp="$complete EOL"
18530  arguments="${tmp#* }"
18531
18532  # Input might be given as Windows format, start by converting to
18533  # unix format.
18534  new_path="$path"
18535
18536  windows_path="$new_path"
18537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18538    unix_path=`$CYGPATH -u "$windows_path"`
18539    new_path="$unix_path"
18540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18542    new_path="$unix_path"
18543  fi
18544
18545
18546  # Now try to locate executable using which
18547  new_path=`$WHICH "$new_path" 2> /dev/null`
18548
18549  if test "x$new_path" = x; then
18550    # Oops. Which didn't find the executable.
18551    # The splitting of arguments from the executable at a space might have been incorrect,
18552    # since paths with space are more likely in Windows. Give it another try with the whole
18553    # argument.
18554    path="$complete"
18555    arguments="EOL"
18556    new_path="$path"
18557
18558  windows_path="$new_path"
18559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18560    unix_path=`$CYGPATH -u "$windows_path"`
18561    new_path="$unix_path"
18562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18564    new_path="$unix_path"
18565  fi
18566
18567
18568    new_path=`$WHICH "$new_path" 2> /dev/null`
18569    # bat and cmd files are not always considered executable in MSYS causing which
18570    # to not find them
18571    if test "x$new_path" = x \
18572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18574      new_path="$path"
18575
18576  windows_path="$new_path"
18577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18578    unix_path=`$CYGPATH -u "$windows_path"`
18579    new_path="$unix_path"
18580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18582    new_path="$unix_path"
18583  fi
18584
18585    fi
18586
18587    if test "x$new_path" = x; then
18588      # It's still not found. Now this is an unrecoverable error.
18589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18590$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18591      has_space=`$ECHO "$complete" | $GREP " "`
18592      if test "x$has_space" != x; then
18593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18595      fi
18596      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18597    fi
18598  fi
18599
18600  # Now new_path has a complete unix path to the binary
18601  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18602    # Keep paths in /bin as-is, but remove trailing .exe if any
18603    new_path="${new_path/%.exe/}"
18604    # Do not save /bin paths to all_fixpath_prefixes!
18605  else
18606    # Not in mixed or Windows style, start by that.
18607    new_path=`cmd //c echo $new_path`
18608
18609  input_path="$new_path"
18610  # Check if we need to convert this using DOS-style short mode. If the path
18611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18612  # take no chances and rewrite it.
18613  # Note: m4 eats our [], so we need to use [ and ] instead.
18614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18615  if test "x$has_forbidden_chars" != x; then
18616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18618  fi
18619
18620    # Output is in $new_path
18621
18622  windows_path="$new_path"
18623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18624    unix_path=`$CYGPATH -u "$windows_path"`
18625    new_path="$unix_path"
18626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18628    new_path="$unix_path"
18629  fi
18630
18631    # remove trailing .exe if any
18632    new_path="${new_path/%.exe/}"
18633
18634    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18635    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18636  fi
18637
18638    else
18639      # We're on a unix platform. Hooray! :)
18640      # First separate the path from the arguments. This will split at the first
18641      # space.
18642      complete="$FOUND_MAKE"
18643      path="${complete%% *}"
18644      tmp="$complete EOL"
18645      arguments="${tmp#* }"
18646
18647      # Cannot rely on the command "which" here since it doesn't always work.
18648      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18649      if test -z "$is_absolute_path"; then
18650        # Path to executable is not absolute. Find it.
18651        IFS_save="$IFS"
18652        IFS=:
18653        for p in $PATH; do
18654          if test -f "$p/$path" && test -x "$p/$path"; then
18655            new_path="$p/$path"
18656            break
18657          fi
18658        done
18659        IFS="$IFS_save"
18660      else
18661        # This is an absolute path, we can use it without further modifications.
18662        new_path="$path"
18663      fi
18664
18665      if test "x$new_path" = x; then
18666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18668        has_space=`$ECHO "$complete" | $GREP " "`
18669        if test "x$has_space" != x; then
18670          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18671$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18672        fi
18673        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18674      fi
18675    fi
18676
18677    # Now join together the path and the arguments once again
18678    if test "x$arguments" != xEOL; then
18679      new_complete="$new_path ${arguments% *}"
18680    else
18681      new_complete="$new_path"
18682    fi
18683
18684    if test "x$complete" != "x$new_complete"; then
18685      FOUND_MAKE="$new_complete"
18686      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18687$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18688    fi
18689  fi
18690
18691        fi
18692      fi
18693    fi
18694  fi
18695
18696
18697    if test "x$FOUND_MAKE" = x; then
18698      for ac_prog in make
18699do
18700  # Extract the first word of "$ac_prog", so it can be a program name with args.
18701set dummy $ac_prog; ac_word=$2
18702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18703$as_echo_n "checking for $ac_word... " >&6; }
18704if ${ac_cv_path_CHECK_MAKE+:} false; then :
18705  $as_echo_n "(cached) " >&6
18706else
18707  case $CHECK_MAKE in
18708  [\\/]* | ?:[\\/]*)
18709  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18710  ;;
18711  *)
18712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18713for as_dir in $PATH
18714do
18715  IFS=$as_save_IFS
18716  test -z "$as_dir" && as_dir=.
18717    for ac_exec_ext in '' $ac_executable_extensions; do
18718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18719    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18721    break 2
18722  fi
18723done
18724  done
18725IFS=$as_save_IFS
18726
18727  ;;
18728esac
18729fi
18730CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18731if test -n "$CHECK_MAKE"; then
18732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18733$as_echo "$CHECK_MAKE" >&6; }
18734else
18735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18736$as_echo "no" >&6; }
18737fi
18738
18739
18740  test -n "$CHECK_MAKE" && break
18741done
18742
18743
18744  MAKE_CANDIDATE=""$CHECK_MAKE""
18745  DESCRIPTION="make in PATH"
18746
18747  # On Cygwin, we require a newer version of make than on other platforms
18748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18749    MAKE_VERSION_EXPR="-e 4\."
18750    MAKE_REQUIRED_VERSION="4.0"
18751   else
18752    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18753    MAKE_REQUIRED_VERSION="3.81"
18754  fi
18755
18756  if test "x$MAKE_CANDIDATE" != x; then
18757    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18758$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18759    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18760    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18761    if test "x$IS_GNU_MAKE" = x; then
18762      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18763$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18764    else
18765      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18766      if test "x$IS_MODERN_MAKE" = x; then
18767        { $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
18768$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;}
18769      else
18770        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18771          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18772            MAKE_EXPECTED_ENV='cygwin'
18773          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18774            MAKE_EXPECTED_ENV='msys'
18775          else
18776            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18777          fi
18778          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18779          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18780        else
18781          # Not relevant for non-Windows
18782          IS_MAKE_CORRECT_ENV=true
18783        fi
18784        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18785          { $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
18786$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;}
18787        else
18788          FOUND_MAKE=$MAKE_CANDIDATE
18789
18790  # Only process if variable expands to non-empty
18791
18792  if test "x$FOUND_MAKE" != x; then
18793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18794
18795  # First separate the path from the arguments. This will split at the first
18796  # space.
18797  complete="$FOUND_MAKE"
18798  path="${complete%% *}"
18799  tmp="$complete EOL"
18800  arguments="${tmp#* }"
18801
18802  # Input might be given as Windows format, start by converting to
18803  # unix format.
18804  new_path=`$CYGPATH -u "$path"`
18805
18806  # Now try to locate executable using which
18807  new_path=`$WHICH "$new_path" 2> /dev/null`
18808  # bat and cmd files are not always considered executable in cygwin causing which
18809  # to not find them
18810  if test "x$new_path" = x \
18811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18813    new_path=`$CYGPATH -u "$path"`
18814  fi
18815  if test "x$new_path" = x; then
18816    # Oops. Which didn't find the executable.
18817    # The splitting of arguments from the executable at a space might have been incorrect,
18818    # since paths with space are more likely in Windows. Give it another try with the whole
18819    # argument.
18820    path="$complete"
18821    arguments="EOL"
18822    new_path=`$CYGPATH -u "$path"`
18823    new_path=`$WHICH "$new_path" 2> /dev/null`
18824    # bat and cmd files are not always considered executable in cygwin causing which
18825    # to not find them
18826    if test "x$new_path" = x \
18827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18829      new_path=`$CYGPATH -u "$path"`
18830    fi
18831    if test "x$new_path" = x; then
18832      # It's still not found. Now this is an unrecoverable error.
18833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18834$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18835      has_space=`$ECHO "$complete" | $GREP " "`
18836      if test "x$has_space" != x; then
18837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18839      fi
18840      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18841    fi
18842  fi
18843
18844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18847  # "foo.exe" is OK but "foo" is an error.
18848  #
18849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18850  # It is also a way to make sure we got the proper file name for the real test later on.
18851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18852  if test "x$test_shortpath" = x; then
18853    # Short path failed, file does not exist as specified.
18854    # Try adding .exe or .cmd
18855    if test -f "${new_path}.exe"; then
18856      input_to_shortpath="${new_path}.exe"
18857    elif test -f "${new_path}.cmd"; then
18858      input_to_shortpath="${new_path}.cmd"
18859    else
18860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18861$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18864      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18865    fi
18866  else
18867    input_to_shortpath="$new_path"
18868  fi
18869
18870  # Call helper function which possibly converts this using DOS-style short mode.
18871  # If so, the updated path is stored in $new_path.
18872  new_path="$input_to_shortpath"
18873
18874  input_path="$input_to_shortpath"
18875  # Check if we need to convert this using DOS-style short mode. If the path
18876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18877  # take no chances and rewrite it.
18878  # Note: m4 eats our [], so we need to use [ and ] instead.
18879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18880  if test "x$has_forbidden_chars" != x; then
18881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18885      # Going to short mode and back again did indeed matter. Since short mode is
18886      # case insensitive, let's make it lowercase to improve readability.
18887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18888      # Now convert it back to Unix-style (cygpath)
18889      input_path=`$CYGPATH -u "$shortmode_path"`
18890      new_path="$input_path"
18891    fi
18892  fi
18893
18894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18895  if test "x$test_cygdrive_prefix" = x; then
18896    # As a simple fix, exclude /usr/bin since it's not a real path.
18897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18899      # a path prefixed by /cygdrive for fixpath to work.
18900      new_path="$CYGWIN_ROOT_PATH$input_path"
18901    fi
18902  fi
18903
18904  # remove trailing .exe if any
18905  new_path="${new_path/%.exe/}"
18906
18907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18908
18909  # First separate the path from the arguments. This will split at the first
18910  # space.
18911  complete="$FOUND_MAKE"
18912  path="${complete%% *}"
18913  tmp="$complete EOL"
18914  arguments="${tmp#* }"
18915
18916  # Input might be given as Windows format, start by converting to
18917  # unix format.
18918  new_path="$path"
18919
18920  windows_path="$new_path"
18921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18922    unix_path=`$CYGPATH -u "$windows_path"`
18923    new_path="$unix_path"
18924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18926    new_path="$unix_path"
18927  fi
18928
18929
18930  # Now try to locate executable using which
18931  new_path=`$WHICH "$new_path" 2> /dev/null`
18932
18933  if test "x$new_path" = x; then
18934    # Oops. Which didn't find the executable.
18935    # The splitting of arguments from the executable at a space might have been incorrect,
18936    # since paths with space are more likely in Windows. Give it another try with the whole
18937    # argument.
18938    path="$complete"
18939    arguments="EOL"
18940    new_path="$path"
18941
18942  windows_path="$new_path"
18943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18944    unix_path=`$CYGPATH -u "$windows_path"`
18945    new_path="$unix_path"
18946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18948    new_path="$unix_path"
18949  fi
18950
18951
18952    new_path=`$WHICH "$new_path" 2> /dev/null`
18953    # bat and cmd files are not always considered executable in MSYS causing which
18954    # to not find them
18955    if test "x$new_path" = x \
18956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18958      new_path="$path"
18959
18960  windows_path="$new_path"
18961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18962    unix_path=`$CYGPATH -u "$windows_path"`
18963    new_path="$unix_path"
18964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18966    new_path="$unix_path"
18967  fi
18968
18969    fi
18970
18971    if test "x$new_path" = x; then
18972      # It's still not found. Now this is an unrecoverable error.
18973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18974$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18975      has_space=`$ECHO "$complete" | $GREP " "`
18976      if test "x$has_space" != x; then
18977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18979      fi
18980      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18981    fi
18982  fi
18983
18984  # Now new_path has a complete unix path to the binary
18985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18986    # Keep paths in /bin as-is, but remove trailing .exe if any
18987    new_path="${new_path/%.exe/}"
18988    # Do not save /bin paths to all_fixpath_prefixes!
18989  else
18990    # Not in mixed or Windows style, start by that.
18991    new_path=`cmd //c echo $new_path`
18992
18993  input_path="$new_path"
18994  # Check if we need to convert this using DOS-style short mode. If the path
18995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18996  # take no chances and rewrite it.
18997  # Note: m4 eats our [], so we need to use [ and ] instead.
18998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18999  if test "x$has_forbidden_chars" != x; then
19000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19002  fi
19003
19004    # Output is in $new_path
19005
19006  windows_path="$new_path"
19007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19008    unix_path=`$CYGPATH -u "$windows_path"`
19009    new_path="$unix_path"
19010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19012    new_path="$unix_path"
19013  fi
19014
19015    # remove trailing .exe if any
19016    new_path="${new_path/%.exe/}"
19017
19018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19020  fi
19021
19022    else
19023      # We're on a unix platform. Hooray! :)
19024      # First separate the path from the arguments. This will split at the first
19025      # space.
19026      complete="$FOUND_MAKE"
19027      path="${complete%% *}"
19028      tmp="$complete EOL"
19029      arguments="${tmp#* }"
19030
19031      # Cannot rely on the command "which" here since it doesn't always work.
19032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19033      if test -z "$is_absolute_path"; then
19034        # Path to executable is not absolute. Find it.
19035        IFS_save="$IFS"
19036        IFS=:
19037        for p in $PATH; do
19038          if test -f "$p/$path" && test -x "$p/$path"; then
19039            new_path="$p/$path"
19040            break
19041          fi
19042        done
19043        IFS="$IFS_save"
19044      else
19045        # This is an absolute path, we can use it without further modifications.
19046        new_path="$path"
19047      fi
19048
19049      if test "x$new_path" = x; then
19050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19052        has_space=`$ECHO "$complete" | $GREP " "`
19053        if test "x$has_space" != x; then
19054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19056        fi
19057        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19058      fi
19059    fi
19060
19061    # Now join together the path and the arguments once again
19062    if test "x$arguments" != xEOL; then
19063      new_complete="$new_path ${arguments% *}"
19064    else
19065      new_complete="$new_path"
19066    fi
19067
19068    if test "x$complete" != "x$new_complete"; then
19069      FOUND_MAKE="$new_complete"
19070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19071$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19072    fi
19073  fi
19074
19075        fi
19076      fi
19077    fi
19078  fi
19079
19080    fi
19081
19082    if test "x$FOUND_MAKE" = x; then
19083      if test "x$TOOLCHAIN_PATH" != x; then
19084        # We have a toolchain path, check that as well before giving up.
19085        OLD_PATH=$PATH
19086        PATH=$TOOLCHAIN_PATH:$PATH
19087        for ac_prog in gmake
19088do
19089  # Extract the first word of "$ac_prog", so it can be a program name with args.
19090set dummy $ac_prog; ac_word=$2
19091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19092$as_echo_n "checking for $ac_word... " >&6; }
19093if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19094  $as_echo_n "(cached) " >&6
19095else
19096  case $CHECK_TOOLSDIR_GMAKE in
19097  [\\/]* | ?:[\\/]*)
19098  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19099  ;;
19100  *)
19101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19102for as_dir in $PATH
19103do
19104  IFS=$as_save_IFS
19105  test -z "$as_dir" && as_dir=.
19106    for ac_exec_ext in '' $ac_executable_extensions; do
19107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19108    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19110    break 2
19111  fi
19112done
19113  done
19114IFS=$as_save_IFS
19115
19116  ;;
19117esac
19118fi
19119CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19120if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19122$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19123else
19124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19125$as_echo "no" >&6; }
19126fi
19127
19128
19129  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19130done
19131
19132
19133  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19134  DESCRIPTION="gmake in tools-dir"
19135
19136  # On Cygwin, we require a newer version of make than on other platforms
19137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19138    MAKE_VERSION_EXPR="-e 4\."
19139    MAKE_REQUIRED_VERSION="4.0"
19140   else
19141    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19142    MAKE_REQUIRED_VERSION="3.81"
19143  fi
19144
19145  if test "x$MAKE_CANDIDATE" != x; then
19146    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19147$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19148    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19149    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19150    if test "x$IS_GNU_MAKE" = x; then
19151      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19152$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19153    else
19154      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19155      if test "x$IS_MODERN_MAKE" = x; then
19156        { $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
19157$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;}
19158      else
19159        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19160          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19161            MAKE_EXPECTED_ENV='cygwin'
19162          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19163            MAKE_EXPECTED_ENV='msys'
19164          else
19165            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19166          fi
19167          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19168          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19169        else
19170          # Not relevant for non-Windows
19171          IS_MAKE_CORRECT_ENV=true
19172        fi
19173        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19174          { $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
19175$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;}
19176        else
19177          FOUND_MAKE=$MAKE_CANDIDATE
19178
19179  # Only process if variable expands to non-empty
19180
19181  if test "x$FOUND_MAKE" != x; then
19182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19183
19184  # First separate the path from the arguments. This will split at the first
19185  # space.
19186  complete="$FOUND_MAKE"
19187  path="${complete%% *}"
19188  tmp="$complete EOL"
19189  arguments="${tmp#* }"
19190
19191  # Input might be given as Windows format, start by converting to
19192  # unix format.
19193  new_path=`$CYGPATH -u "$path"`
19194
19195  # Now try to locate executable using which
19196  new_path=`$WHICH "$new_path" 2> /dev/null`
19197  # bat and cmd files are not always considered executable in cygwin causing which
19198  # to not find them
19199  if test "x$new_path" = x \
19200      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19201      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19202    new_path=`$CYGPATH -u "$path"`
19203  fi
19204  if test "x$new_path" = x; then
19205    # Oops. Which didn't find the executable.
19206    # The splitting of arguments from the executable at a space might have been incorrect,
19207    # since paths with space are more likely in Windows. Give it another try with the whole
19208    # argument.
19209    path="$complete"
19210    arguments="EOL"
19211    new_path=`$CYGPATH -u "$path"`
19212    new_path=`$WHICH "$new_path" 2> /dev/null`
19213    # bat and cmd files are not always considered executable in cygwin causing which
19214    # to not find them
19215    if test "x$new_path" = x \
19216        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19217        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19218      new_path=`$CYGPATH -u "$path"`
19219    fi
19220    if test "x$new_path" = x; then
19221      # It's still not found. Now this is an unrecoverable error.
19222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19223$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19224      has_space=`$ECHO "$complete" | $GREP " "`
19225      if test "x$has_space" != x; then
19226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19228      fi
19229      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19230    fi
19231  fi
19232
19233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19236  # "foo.exe" is OK but "foo" is an error.
19237  #
19238  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19239  # It is also a way to make sure we got the proper file name for the real test later on.
19240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19241  if test "x$test_shortpath" = x; then
19242    # Short path failed, file does not exist as specified.
19243    # Try adding .exe or .cmd
19244    if test -f "${new_path}.exe"; then
19245      input_to_shortpath="${new_path}.exe"
19246    elif test -f "${new_path}.cmd"; then
19247      input_to_shortpath="${new_path}.cmd"
19248    else
19249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19250$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19251      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19252$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19253      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19254    fi
19255  else
19256    input_to_shortpath="$new_path"
19257  fi
19258
19259  # Call helper function which possibly converts this using DOS-style short mode.
19260  # If so, the updated path is stored in $new_path.
19261  new_path="$input_to_shortpath"
19262
19263  input_path="$input_to_shortpath"
19264  # Check if we need to convert this using DOS-style short mode. If the path
19265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19266  # take no chances and rewrite it.
19267  # Note: m4 eats our [], so we need to use [ and ] instead.
19268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19269  if test "x$has_forbidden_chars" != x; then
19270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19274      # Going to short mode and back again did indeed matter. Since short mode is
19275      # case insensitive, let's make it lowercase to improve readability.
19276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19277      # Now convert it back to Unix-style (cygpath)
19278      input_path=`$CYGPATH -u "$shortmode_path"`
19279      new_path="$input_path"
19280    fi
19281  fi
19282
19283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19284  if test "x$test_cygdrive_prefix" = x; then
19285    # As a simple fix, exclude /usr/bin since it's not a real path.
19286    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19288      # a path prefixed by /cygdrive for fixpath to work.
19289      new_path="$CYGWIN_ROOT_PATH$input_path"
19290    fi
19291  fi
19292
19293  # remove trailing .exe if any
19294  new_path="${new_path/%.exe/}"
19295
19296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19297
19298  # First separate the path from the arguments. This will split at the first
19299  # space.
19300  complete="$FOUND_MAKE"
19301  path="${complete%% *}"
19302  tmp="$complete EOL"
19303  arguments="${tmp#* }"
19304
19305  # Input might be given as Windows format, start by converting to
19306  # unix format.
19307  new_path="$path"
19308
19309  windows_path="$new_path"
19310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19311    unix_path=`$CYGPATH -u "$windows_path"`
19312    new_path="$unix_path"
19313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19315    new_path="$unix_path"
19316  fi
19317
19318
19319  # Now try to locate executable using which
19320  new_path=`$WHICH "$new_path" 2> /dev/null`
19321
19322  if test "x$new_path" = x; then
19323    # Oops. Which didn't find the executable.
19324    # The splitting of arguments from the executable at a space might have been incorrect,
19325    # since paths with space are more likely in Windows. Give it another try with the whole
19326    # argument.
19327    path="$complete"
19328    arguments="EOL"
19329    new_path="$path"
19330
19331  windows_path="$new_path"
19332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19333    unix_path=`$CYGPATH -u "$windows_path"`
19334    new_path="$unix_path"
19335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19337    new_path="$unix_path"
19338  fi
19339
19340
19341    new_path=`$WHICH "$new_path" 2> /dev/null`
19342    # bat and cmd files are not always considered executable in MSYS causing which
19343    # to not find them
19344    if test "x$new_path" = x \
19345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19347      new_path="$path"
19348
19349  windows_path="$new_path"
19350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19351    unix_path=`$CYGPATH -u "$windows_path"`
19352    new_path="$unix_path"
19353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19355    new_path="$unix_path"
19356  fi
19357
19358    fi
19359
19360    if test "x$new_path" = x; then
19361      # It's still not found. Now this is an unrecoverable error.
19362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19363$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19364      has_space=`$ECHO "$complete" | $GREP " "`
19365      if test "x$has_space" != x; then
19366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19368      fi
19369      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19370    fi
19371  fi
19372
19373  # Now new_path has a complete unix path to the binary
19374  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19375    # Keep paths in /bin as-is, but remove trailing .exe if any
19376    new_path="${new_path/%.exe/}"
19377    # Do not save /bin paths to all_fixpath_prefixes!
19378  else
19379    # Not in mixed or Windows style, start by that.
19380    new_path=`cmd //c echo $new_path`
19381
19382  input_path="$new_path"
19383  # Check if we need to convert this using DOS-style short mode. If the path
19384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19385  # take no chances and rewrite it.
19386  # Note: m4 eats our [], so we need to use [ and ] instead.
19387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19388  if test "x$has_forbidden_chars" != x; then
19389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19391  fi
19392
19393    # Output is in $new_path
19394
19395  windows_path="$new_path"
19396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19397    unix_path=`$CYGPATH -u "$windows_path"`
19398    new_path="$unix_path"
19399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19401    new_path="$unix_path"
19402  fi
19403
19404    # remove trailing .exe if any
19405    new_path="${new_path/%.exe/}"
19406
19407    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19408    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19409  fi
19410
19411    else
19412      # We're on a unix platform. Hooray! :)
19413      # First separate the path from the arguments. This will split at the first
19414      # space.
19415      complete="$FOUND_MAKE"
19416      path="${complete%% *}"
19417      tmp="$complete EOL"
19418      arguments="${tmp#* }"
19419
19420      # Cannot rely on the command "which" here since it doesn't always work.
19421      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19422      if test -z "$is_absolute_path"; then
19423        # Path to executable is not absolute. Find it.
19424        IFS_save="$IFS"
19425        IFS=:
19426        for p in $PATH; do
19427          if test -f "$p/$path" && test -x "$p/$path"; then
19428            new_path="$p/$path"
19429            break
19430          fi
19431        done
19432        IFS="$IFS_save"
19433      else
19434        # This is an absolute path, we can use it without further modifications.
19435        new_path="$path"
19436      fi
19437
19438      if test "x$new_path" = x; then
19439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19440$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19441        has_space=`$ECHO "$complete" | $GREP " "`
19442        if test "x$has_space" != x; then
19443          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19444$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19445        fi
19446        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19447      fi
19448    fi
19449
19450    # Now join together the path and the arguments once again
19451    if test "x$arguments" != xEOL; then
19452      new_complete="$new_path ${arguments% *}"
19453    else
19454      new_complete="$new_path"
19455    fi
19456
19457    if test "x$complete" != "x$new_complete"; then
19458      FOUND_MAKE="$new_complete"
19459      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19460$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19461    fi
19462  fi
19463
19464        fi
19465      fi
19466    fi
19467  fi
19468
19469        if test "x$FOUND_MAKE" = x; then
19470          for ac_prog in make
19471do
19472  # Extract the first word of "$ac_prog", so it can be a program name with args.
19473set dummy $ac_prog; ac_word=$2
19474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19475$as_echo_n "checking for $ac_word... " >&6; }
19476if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19477  $as_echo_n "(cached) " >&6
19478else
19479  case $CHECK_TOOLSDIR_MAKE in
19480  [\\/]* | ?:[\\/]*)
19481  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19482  ;;
19483  *)
19484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19485for as_dir in $PATH
19486do
19487  IFS=$as_save_IFS
19488  test -z "$as_dir" && as_dir=.
19489    for ac_exec_ext in '' $ac_executable_extensions; do
19490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19491    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19493    break 2
19494  fi
19495done
19496  done
19497IFS=$as_save_IFS
19498
19499  ;;
19500esac
19501fi
19502CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19503if test -n "$CHECK_TOOLSDIR_MAKE"; then
19504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19505$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19506else
19507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19508$as_echo "no" >&6; }
19509fi
19510
19511
19512  test -n "$CHECK_TOOLSDIR_MAKE" && break
19513done
19514
19515
19516  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19517  DESCRIPTION="make in tools-dir"
19518
19519  # On Cygwin, we require a newer version of make than on other platforms
19520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19521    MAKE_VERSION_EXPR="-e 4\."
19522    MAKE_REQUIRED_VERSION="4.0"
19523   else
19524    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19525    MAKE_REQUIRED_VERSION="3.81"
19526  fi
19527
19528  if test "x$MAKE_CANDIDATE" != x; then
19529    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19530$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19531    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19532    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19533    if test "x$IS_GNU_MAKE" = x; then
19534      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19535$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19536    else
19537      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19538      if test "x$IS_MODERN_MAKE" = x; then
19539        { $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
19540$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;}
19541      else
19542        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19543          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19544            MAKE_EXPECTED_ENV='cygwin'
19545          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19546            MAKE_EXPECTED_ENV='msys'
19547          else
19548            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19549          fi
19550          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19551          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19552        else
19553          # Not relevant for non-Windows
19554          IS_MAKE_CORRECT_ENV=true
19555        fi
19556        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19557          { $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
19558$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;}
19559        else
19560          FOUND_MAKE=$MAKE_CANDIDATE
19561
19562  # Only process if variable expands to non-empty
19563
19564  if test "x$FOUND_MAKE" != x; then
19565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19566
19567  # First separate the path from the arguments. This will split at the first
19568  # space.
19569  complete="$FOUND_MAKE"
19570  path="${complete%% *}"
19571  tmp="$complete EOL"
19572  arguments="${tmp#* }"
19573
19574  # Input might be given as Windows format, start by converting to
19575  # unix format.
19576  new_path=`$CYGPATH -u "$path"`
19577
19578  # Now try to locate executable using which
19579  new_path=`$WHICH "$new_path" 2> /dev/null`
19580  # bat and cmd files are not always considered executable in cygwin causing which
19581  # to not find them
19582  if test "x$new_path" = x \
19583      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19584      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19585    new_path=`$CYGPATH -u "$path"`
19586  fi
19587  if test "x$new_path" = x; then
19588    # Oops. Which didn't find the executable.
19589    # The splitting of arguments from the executable at a space might have been incorrect,
19590    # since paths with space are more likely in Windows. Give it another try with the whole
19591    # argument.
19592    path="$complete"
19593    arguments="EOL"
19594    new_path=`$CYGPATH -u "$path"`
19595    new_path=`$WHICH "$new_path" 2> /dev/null`
19596    # bat and cmd files are not always considered executable in cygwin causing which
19597    # to not find them
19598    if test "x$new_path" = x \
19599        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19600        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19601      new_path=`$CYGPATH -u "$path"`
19602    fi
19603    if test "x$new_path" = x; then
19604      # It's still not found. Now this is an unrecoverable error.
19605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19606$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19607      has_space=`$ECHO "$complete" | $GREP " "`
19608      if test "x$has_space" != x; then
19609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19611      fi
19612      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19613    fi
19614  fi
19615
19616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19619  # "foo.exe" is OK but "foo" is an error.
19620  #
19621  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19622  # It is also a way to make sure we got the proper file name for the real test later on.
19623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19624  if test "x$test_shortpath" = x; then
19625    # Short path failed, file does not exist as specified.
19626    # Try adding .exe or .cmd
19627    if test -f "${new_path}.exe"; then
19628      input_to_shortpath="${new_path}.exe"
19629    elif test -f "${new_path}.cmd"; then
19630      input_to_shortpath="${new_path}.cmd"
19631    else
19632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19633$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19634      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19635$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19636      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19637    fi
19638  else
19639    input_to_shortpath="$new_path"
19640  fi
19641
19642  # Call helper function which possibly converts this using DOS-style short mode.
19643  # If so, the updated path is stored in $new_path.
19644  new_path="$input_to_shortpath"
19645
19646  input_path="$input_to_shortpath"
19647  # Check if we need to convert this using DOS-style short mode. If the path
19648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19649  # take no chances and rewrite it.
19650  # Note: m4 eats our [], so we need to use [ and ] instead.
19651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19652  if test "x$has_forbidden_chars" != x; then
19653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19657      # Going to short mode and back again did indeed matter. Since short mode is
19658      # case insensitive, let's make it lowercase to improve readability.
19659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19660      # Now convert it back to Unix-style (cygpath)
19661      input_path=`$CYGPATH -u "$shortmode_path"`
19662      new_path="$input_path"
19663    fi
19664  fi
19665
19666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19667  if test "x$test_cygdrive_prefix" = x; then
19668    # As a simple fix, exclude /usr/bin since it's not a real path.
19669    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19671      # a path prefixed by /cygdrive for fixpath to work.
19672      new_path="$CYGWIN_ROOT_PATH$input_path"
19673    fi
19674  fi
19675
19676  # remove trailing .exe if any
19677  new_path="${new_path/%.exe/}"
19678
19679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19680
19681  # First separate the path from the arguments. This will split at the first
19682  # space.
19683  complete="$FOUND_MAKE"
19684  path="${complete%% *}"
19685  tmp="$complete EOL"
19686  arguments="${tmp#* }"
19687
19688  # Input might be given as Windows format, start by converting to
19689  # unix format.
19690  new_path="$path"
19691
19692  windows_path="$new_path"
19693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19694    unix_path=`$CYGPATH -u "$windows_path"`
19695    new_path="$unix_path"
19696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19698    new_path="$unix_path"
19699  fi
19700
19701
19702  # Now try to locate executable using which
19703  new_path=`$WHICH "$new_path" 2> /dev/null`
19704
19705  if test "x$new_path" = x; then
19706    # Oops. Which didn't find the executable.
19707    # The splitting of arguments from the executable at a space might have been incorrect,
19708    # since paths with space are more likely in Windows. Give it another try with the whole
19709    # argument.
19710    path="$complete"
19711    arguments="EOL"
19712    new_path="$path"
19713
19714  windows_path="$new_path"
19715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19716    unix_path=`$CYGPATH -u "$windows_path"`
19717    new_path="$unix_path"
19718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19720    new_path="$unix_path"
19721  fi
19722
19723
19724    new_path=`$WHICH "$new_path" 2> /dev/null`
19725    # bat and cmd files are not always considered executable in MSYS causing which
19726    # to not find them
19727    if test "x$new_path" = x \
19728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19730      new_path="$path"
19731
19732  windows_path="$new_path"
19733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19734    unix_path=`$CYGPATH -u "$windows_path"`
19735    new_path="$unix_path"
19736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19738    new_path="$unix_path"
19739  fi
19740
19741    fi
19742
19743    if test "x$new_path" = x; then
19744      # It's still not found. Now this is an unrecoverable error.
19745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19746$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19747      has_space=`$ECHO "$complete" | $GREP " "`
19748      if test "x$has_space" != x; then
19749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19751      fi
19752      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19753    fi
19754  fi
19755
19756  # Now new_path has a complete unix path to the binary
19757  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19758    # Keep paths in /bin as-is, but remove trailing .exe if any
19759    new_path="${new_path/%.exe/}"
19760    # Do not save /bin paths to all_fixpath_prefixes!
19761  else
19762    # Not in mixed or Windows style, start by that.
19763    new_path=`cmd //c echo $new_path`
19764
19765  input_path="$new_path"
19766  # Check if we need to convert this using DOS-style short mode. If the path
19767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19768  # take no chances and rewrite it.
19769  # Note: m4 eats our [], so we need to use [ and ] instead.
19770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19771  if test "x$has_forbidden_chars" != x; then
19772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19774  fi
19775
19776    # Output is in $new_path
19777
19778  windows_path="$new_path"
19779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19780    unix_path=`$CYGPATH -u "$windows_path"`
19781    new_path="$unix_path"
19782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19784    new_path="$unix_path"
19785  fi
19786
19787    # remove trailing .exe if any
19788    new_path="${new_path/%.exe/}"
19789
19790    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19791    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19792  fi
19793
19794    else
19795      # We're on a unix platform. Hooray! :)
19796      # First separate the path from the arguments. This will split at the first
19797      # space.
19798      complete="$FOUND_MAKE"
19799      path="${complete%% *}"
19800      tmp="$complete EOL"
19801      arguments="${tmp#* }"
19802
19803      # Cannot rely on the command "which" here since it doesn't always work.
19804      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19805      if test -z "$is_absolute_path"; then
19806        # Path to executable is not absolute. Find it.
19807        IFS_save="$IFS"
19808        IFS=:
19809        for p in $PATH; do
19810          if test -f "$p/$path" && test -x "$p/$path"; then
19811            new_path="$p/$path"
19812            break
19813          fi
19814        done
19815        IFS="$IFS_save"
19816      else
19817        # This is an absolute path, we can use it without further modifications.
19818        new_path="$path"
19819      fi
19820
19821      if test "x$new_path" = x; then
19822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19824        has_space=`$ECHO "$complete" | $GREP " "`
19825        if test "x$has_space" != x; then
19826          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19827$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19828        fi
19829        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19830      fi
19831    fi
19832
19833    # Now join together the path and the arguments once again
19834    if test "x$arguments" != xEOL; then
19835      new_complete="$new_path ${arguments% *}"
19836    else
19837      new_complete="$new_path"
19838    fi
19839
19840    if test "x$complete" != "x$new_complete"; then
19841      FOUND_MAKE="$new_complete"
19842      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19843$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19844    fi
19845  fi
19846
19847        fi
19848      fi
19849    fi
19850  fi
19851
19852        fi
19853        PATH=$OLD_PATH
19854      fi
19855    fi
19856
19857    if test "x$FOUND_MAKE" = x; then
19858      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
19859    fi
19860
19861    else
19862      # If it succeeded, then it was overridden by the user. We will use it
19863      # for the tool.
19864
19865      # First remove it from the list of overridden variables, so we can test
19866      # for unknown variables in the end.
19867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19868
19869      # Check if we try to supply an empty value
19870      if test "x$MAKE" = x; then
19871        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19872$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19874$as_echo_n "checking for MAKE... " >&6; }
19875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19876$as_echo "disabled" >&6; }
19877      else
19878        # Check if the provided tool contains a complete path.
19879        tool_specified="$MAKE"
19880        tool_basename="${tool_specified##*/}"
19881        if test "x$tool_basename" = "x$tool_specified"; then
19882          # A command without a complete path is provided, search $PATH.
19883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19884$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19885          # Extract the first word of "$tool_basename", so it can be a program name with args.
19886set dummy $tool_basename; ac_word=$2
19887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19888$as_echo_n "checking for $ac_word... " >&6; }
19889if ${ac_cv_path_MAKE+:} false; then :
19890  $as_echo_n "(cached) " >&6
19891else
19892  case $MAKE in
19893  [\\/]* | ?:[\\/]*)
19894  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19895  ;;
19896  *)
19897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19898for as_dir in $PATH
19899do
19900  IFS=$as_save_IFS
19901  test -z "$as_dir" && as_dir=.
19902    for ac_exec_ext in '' $ac_executable_extensions; do
19903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19904    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19906    break 2
19907  fi
19908done
19909  done
19910IFS=$as_save_IFS
19911
19912  ;;
19913esac
19914fi
19915MAKE=$ac_cv_path_MAKE
19916if test -n "$MAKE"; then
19917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19918$as_echo "$MAKE" >&6; }
19919else
19920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19921$as_echo "no" >&6; }
19922fi
19923
19924
19925          if test "x$MAKE" = x; then
19926            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19927          fi
19928        else
19929          # Otherwise we believe it is a complete path. Use it as it is.
19930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19931$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19932          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19933$as_echo_n "checking for MAKE... " >&6; }
19934          if test ! -x "$tool_specified"; then
19935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19936$as_echo "not found" >&6; }
19937            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19938          fi
19939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19940$as_echo "$tool_specified" >&6; }
19941        fi
19942      fi
19943    fi
19944
19945    # If MAKE was set by user, verify the version
19946
19947  MAKE_CANDIDATE=""$MAKE""
19948  DESCRIPTION="user supplied MAKE=$MAKE"
19949
19950  # On Cygwin, we require a newer version of make than on other platforms
19951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19952    MAKE_VERSION_EXPR="-e 4\."
19953    MAKE_REQUIRED_VERSION="4.0"
19954   else
19955    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19956    MAKE_REQUIRED_VERSION="3.81"
19957  fi
19958
19959  if test "x$MAKE_CANDIDATE" != x; then
19960    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19961$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19962    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19963    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19964    if test "x$IS_GNU_MAKE" = x; then
19965      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19966$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19967    else
19968      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19969      if test "x$IS_MODERN_MAKE" = x; then
19970        { $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
19971$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;}
19972      else
19973        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19974          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19975            MAKE_EXPECTED_ENV='cygwin'
19976          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19977            MAKE_EXPECTED_ENV='msys'
19978          else
19979            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19980          fi
19981          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19982          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19983        else
19984          # Not relevant for non-Windows
19985          IS_MAKE_CORRECT_ENV=true
19986        fi
19987        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19988          { $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
19989$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;}
19990        else
19991          FOUND_MAKE=$MAKE_CANDIDATE
19992
19993  # Only process if variable expands to non-empty
19994
19995  if test "x$FOUND_MAKE" != x; then
19996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19997
19998  # First separate the path from the arguments. This will split at the first
19999  # space.
20000  complete="$FOUND_MAKE"
20001  path="${complete%% *}"
20002  tmp="$complete EOL"
20003  arguments="${tmp#* }"
20004
20005  # Input might be given as Windows format, start by converting to
20006  # unix format.
20007  new_path=`$CYGPATH -u "$path"`
20008
20009  # Now try to locate executable using which
20010  new_path=`$WHICH "$new_path" 2> /dev/null`
20011  # bat and cmd files are not always considered executable in cygwin causing which
20012  # to not find them
20013  if test "x$new_path" = x \
20014      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20015      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20016    new_path=`$CYGPATH -u "$path"`
20017  fi
20018  if test "x$new_path" = x; then
20019    # Oops. Which didn't find the executable.
20020    # The splitting of arguments from the executable at a space might have been incorrect,
20021    # since paths with space are more likely in Windows. Give it another try with the whole
20022    # argument.
20023    path="$complete"
20024    arguments="EOL"
20025    new_path=`$CYGPATH -u "$path"`
20026    new_path=`$WHICH "$new_path" 2> /dev/null`
20027    # bat and cmd files are not always considered executable in cygwin causing which
20028    # to not find them
20029    if test "x$new_path" = x \
20030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20032      new_path=`$CYGPATH -u "$path"`
20033    fi
20034    if test "x$new_path" = x; then
20035      # It's still not found. Now this is an unrecoverable error.
20036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20037$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20038      has_space=`$ECHO "$complete" | $GREP " "`
20039      if test "x$has_space" != x; then
20040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20042      fi
20043      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20044    fi
20045  fi
20046
20047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20050  # "foo.exe" is OK but "foo" is an error.
20051  #
20052  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20053  # It is also a way to make sure we got the proper file name for the real test later on.
20054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20055  if test "x$test_shortpath" = x; then
20056    # Short path failed, file does not exist as specified.
20057    # Try adding .exe or .cmd
20058    if test -f "${new_path}.exe"; then
20059      input_to_shortpath="${new_path}.exe"
20060    elif test -f "${new_path}.cmd"; then
20061      input_to_shortpath="${new_path}.cmd"
20062    else
20063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20064$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20067      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20068    fi
20069  else
20070    input_to_shortpath="$new_path"
20071  fi
20072
20073  # Call helper function which possibly converts this using DOS-style short mode.
20074  # If so, the updated path is stored in $new_path.
20075  new_path="$input_to_shortpath"
20076
20077  input_path="$input_to_shortpath"
20078  # Check if we need to convert this using DOS-style short mode. If the path
20079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20080  # take no chances and rewrite it.
20081  # Note: m4 eats our [], so we need to use [ and ] instead.
20082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20083  if test "x$has_forbidden_chars" != x; then
20084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20088      # Going to short mode and back again did indeed matter. Since short mode is
20089      # case insensitive, let's make it lowercase to improve readability.
20090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20091      # Now convert it back to Unix-style (cygpath)
20092      input_path=`$CYGPATH -u "$shortmode_path"`
20093      new_path="$input_path"
20094    fi
20095  fi
20096
20097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20098  if test "x$test_cygdrive_prefix" = x; then
20099    # As a simple fix, exclude /usr/bin since it's not a real path.
20100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20102      # a path prefixed by /cygdrive for fixpath to work.
20103      new_path="$CYGWIN_ROOT_PATH$input_path"
20104    fi
20105  fi
20106
20107  # remove trailing .exe if any
20108  new_path="${new_path/%.exe/}"
20109
20110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20111
20112  # First separate the path from the arguments. This will split at the first
20113  # space.
20114  complete="$FOUND_MAKE"
20115  path="${complete%% *}"
20116  tmp="$complete EOL"
20117  arguments="${tmp#* }"
20118
20119  # Input might be given as Windows format, start by converting to
20120  # unix format.
20121  new_path="$path"
20122
20123  windows_path="$new_path"
20124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20125    unix_path=`$CYGPATH -u "$windows_path"`
20126    new_path="$unix_path"
20127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20129    new_path="$unix_path"
20130  fi
20131
20132
20133  # Now try to locate executable using which
20134  new_path=`$WHICH "$new_path" 2> /dev/null`
20135
20136  if test "x$new_path" = x; then
20137    # Oops. Which didn't find the executable.
20138    # The splitting of arguments from the executable at a space might have been incorrect,
20139    # since paths with space are more likely in Windows. Give it another try with the whole
20140    # argument.
20141    path="$complete"
20142    arguments="EOL"
20143    new_path="$path"
20144
20145  windows_path="$new_path"
20146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20147    unix_path=`$CYGPATH -u "$windows_path"`
20148    new_path="$unix_path"
20149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20151    new_path="$unix_path"
20152  fi
20153
20154
20155    new_path=`$WHICH "$new_path" 2> /dev/null`
20156    # bat and cmd files are not always considered executable in MSYS causing which
20157    # to not find them
20158    if test "x$new_path" = x \
20159        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20160        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20161      new_path="$path"
20162
20163  windows_path="$new_path"
20164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20165    unix_path=`$CYGPATH -u "$windows_path"`
20166    new_path="$unix_path"
20167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20169    new_path="$unix_path"
20170  fi
20171
20172    fi
20173
20174    if test "x$new_path" = x; then
20175      # It's still not found. Now this is an unrecoverable error.
20176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20177$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20178      has_space=`$ECHO "$complete" | $GREP " "`
20179      if test "x$has_space" != x; then
20180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20182      fi
20183      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20184    fi
20185  fi
20186
20187  # Now new_path has a complete unix path to the binary
20188  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20189    # Keep paths in /bin as-is, but remove trailing .exe if any
20190    new_path="${new_path/%.exe/}"
20191    # Do not save /bin paths to all_fixpath_prefixes!
20192  else
20193    # Not in mixed or Windows style, start by that.
20194    new_path=`cmd //c echo $new_path`
20195
20196  input_path="$new_path"
20197  # Check if we need to convert this using DOS-style short mode. If the path
20198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20199  # take no chances and rewrite it.
20200  # Note: m4 eats our [], so we need to use [ and ] instead.
20201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20202  if test "x$has_forbidden_chars" != x; then
20203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20205  fi
20206
20207    # Output is in $new_path
20208
20209  windows_path="$new_path"
20210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20211    unix_path=`$CYGPATH -u "$windows_path"`
20212    new_path="$unix_path"
20213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20215    new_path="$unix_path"
20216  fi
20217
20218    # remove trailing .exe if any
20219    new_path="${new_path/%.exe/}"
20220
20221    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20222    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20223  fi
20224
20225    else
20226      # We're on a unix platform. Hooray! :)
20227      # First separate the path from the arguments. This will split at the first
20228      # space.
20229      complete="$FOUND_MAKE"
20230      path="${complete%% *}"
20231      tmp="$complete EOL"
20232      arguments="${tmp#* }"
20233
20234      # Cannot rely on the command "which" here since it doesn't always work.
20235      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20236      if test -z "$is_absolute_path"; then
20237        # Path to executable is not absolute. Find it.
20238        IFS_save="$IFS"
20239        IFS=:
20240        for p in $PATH; do
20241          if test -f "$p/$path" && test -x "$p/$path"; then
20242            new_path="$p/$path"
20243            break
20244          fi
20245        done
20246        IFS="$IFS_save"
20247      else
20248        # This is an absolute path, we can use it without further modifications.
20249        new_path="$path"
20250      fi
20251
20252      if test "x$new_path" = x; then
20253        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20254$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20255        has_space=`$ECHO "$complete" | $GREP " "`
20256        if test "x$has_space" != x; then
20257          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20258$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20259        fi
20260        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20261      fi
20262    fi
20263
20264    # Now join together the path and the arguments once again
20265    if test "x$arguments" != xEOL; then
20266      new_complete="$new_path ${arguments% *}"
20267    else
20268      new_complete="$new_path"
20269    fi
20270
20271    if test "x$complete" != "x$new_complete"; then
20272      FOUND_MAKE="$new_complete"
20273      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20274$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20275    fi
20276  fi
20277
20278        fi
20279      fi
20280    fi
20281  fi
20282
20283    if test "x$FOUND_MAKE" = x; then
20284      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20285    fi
20286
20287  fi
20288
20289
20290  MAKE=$FOUND_MAKE
20291
20292  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20293$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20294
20295
20296  # Check if make supports the output sync option and if so, setup using it.
20297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20298$as_echo_n "checking if make --output-sync is supported... " >&6; }
20299  if $MAKE --version -O > /dev/null 2>&1; then
20300    OUTPUT_SYNC_SUPPORTED=true
20301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20302$as_echo "yes" >&6; }
20303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20304$as_echo_n "checking for output-sync value... " >&6; }
20305
20306# Check whether --with-output-sync was given.
20307if test "${with_output_sync+set}" = set; then :
20308  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20309fi
20310
20311    if test "x$OUTPUT_SYNC" = "x"; then
20312      OUTPUT_SYNC=none
20313    fi
20314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20315$as_echo "$OUTPUT_SYNC" >&6; }
20316    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20317      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20318    fi
20319  else
20320    OUTPUT_SYNC_SUPPORTED=false
20321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20322$as_echo "no" >&6; }
20323  fi
20324
20325
20326
20327
20328
20329
20330  # Test if find supports -delete
20331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20332$as_echo_n "checking if find supports -delete... " >&6; }
20333  FIND_DELETE="-delete"
20334
20335  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20336
20337  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20338
20339  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20340  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20341    # No, it does not.
20342    rm $DELETEDIR/TestIfFindSupportsDelete
20343    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20344      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20345      FIND_DELETE="-print | xargs rm"
20346    else
20347      FIND_DELETE="-exec rm \{\} \+"
20348    fi
20349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20350$as_echo "no" >&6; }
20351  else
20352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20353$as_echo "yes" >&6; }
20354  fi
20355  rmdir $DELETEDIR
20356
20357
20358
20359  # These tools might not be installed by default,
20360  # need hint on how to install them.
20361
20362
20363
20364  # Publish this variable in the help.
20365
20366
20367  if [ -z "${UNZIP+x}" ]; then
20368    # The variable is not set by user, try to locate tool using the code snippet
20369    for ac_prog in unzip
20370do
20371  # Extract the first word of "$ac_prog", so it can be a program name with args.
20372set dummy $ac_prog; ac_word=$2
20373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20374$as_echo_n "checking for $ac_word... " >&6; }
20375if ${ac_cv_path_UNZIP+:} false; then :
20376  $as_echo_n "(cached) " >&6
20377else
20378  case $UNZIP in
20379  [\\/]* | ?:[\\/]*)
20380  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20381  ;;
20382  *)
20383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20384for as_dir in $PATH
20385do
20386  IFS=$as_save_IFS
20387  test -z "$as_dir" && as_dir=.
20388    for ac_exec_ext in '' $ac_executable_extensions; do
20389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20390    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20392    break 2
20393  fi
20394done
20395  done
20396IFS=$as_save_IFS
20397
20398  ;;
20399esac
20400fi
20401UNZIP=$ac_cv_path_UNZIP
20402if test -n "$UNZIP"; then
20403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20404$as_echo "$UNZIP" >&6; }
20405else
20406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20407$as_echo "no" >&6; }
20408fi
20409
20410
20411  test -n "$UNZIP" && break
20412done
20413
20414  else
20415    # The variable is set, but is it from the command line or the environment?
20416
20417    # Try to remove the string !UNZIP! from our list.
20418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20420      # If it failed, the variable was not from the command line. Ignore it,
20421      # but warn the user (except for BASH, which is always set by the calling BASH).
20422      if test "xUNZIP" != xBASH; then
20423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20424$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20425      fi
20426      # Try to locate tool using the code snippet
20427      for ac_prog in unzip
20428do
20429  # Extract the first word of "$ac_prog", so it can be a program name with args.
20430set dummy $ac_prog; ac_word=$2
20431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20432$as_echo_n "checking for $ac_word... " >&6; }
20433if ${ac_cv_path_UNZIP+:} false; then :
20434  $as_echo_n "(cached) " >&6
20435else
20436  case $UNZIP in
20437  [\\/]* | ?:[\\/]*)
20438  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20439  ;;
20440  *)
20441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20442for as_dir in $PATH
20443do
20444  IFS=$as_save_IFS
20445  test -z "$as_dir" && as_dir=.
20446    for ac_exec_ext in '' $ac_executable_extensions; do
20447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20448    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20450    break 2
20451  fi
20452done
20453  done
20454IFS=$as_save_IFS
20455
20456  ;;
20457esac
20458fi
20459UNZIP=$ac_cv_path_UNZIP
20460if test -n "$UNZIP"; then
20461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20462$as_echo "$UNZIP" >&6; }
20463else
20464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20465$as_echo "no" >&6; }
20466fi
20467
20468
20469  test -n "$UNZIP" && break
20470done
20471
20472    else
20473      # If it succeeded, then it was overridden by the user. We will use it
20474      # for the tool.
20475
20476      # First remove it from the list of overridden variables, so we can test
20477      # for unknown variables in the end.
20478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20479
20480      # Check if we try to supply an empty value
20481      if test "x$UNZIP" = x; then
20482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20483$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20485$as_echo_n "checking for UNZIP... " >&6; }
20486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20487$as_echo "disabled" >&6; }
20488      else
20489        # Check if the provided tool contains a complete path.
20490        tool_specified="$UNZIP"
20491        tool_basename="${tool_specified##*/}"
20492        if test "x$tool_basename" = "x$tool_specified"; then
20493          # A command without a complete path is provided, search $PATH.
20494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20495$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20496          # Extract the first word of "$tool_basename", so it can be a program name with args.
20497set dummy $tool_basename; ac_word=$2
20498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20499$as_echo_n "checking for $ac_word... " >&6; }
20500if ${ac_cv_path_UNZIP+:} false; then :
20501  $as_echo_n "(cached) " >&6
20502else
20503  case $UNZIP in
20504  [\\/]* | ?:[\\/]*)
20505  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20506  ;;
20507  *)
20508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20509for as_dir in $PATH
20510do
20511  IFS=$as_save_IFS
20512  test -z "$as_dir" && as_dir=.
20513    for ac_exec_ext in '' $ac_executable_extensions; do
20514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20515    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20517    break 2
20518  fi
20519done
20520  done
20521IFS=$as_save_IFS
20522
20523  ;;
20524esac
20525fi
20526UNZIP=$ac_cv_path_UNZIP
20527if test -n "$UNZIP"; then
20528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20529$as_echo "$UNZIP" >&6; }
20530else
20531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20532$as_echo "no" >&6; }
20533fi
20534
20535
20536          if test "x$UNZIP" = x; then
20537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20538          fi
20539        else
20540          # Otherwise we believe it is a complete path. Use it as it is.
20541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20542$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20544$as_echo_n "checking for UNZIP... " >&6; }
20545          if test ! -x "$tool_specified"; then
20546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20547$as_echo "not found" >&6; }
20548            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20549          fi
20550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20551$as_echo "$tool_specified" >&6; }
20552        fi
20553      fi
20554    fi
20555
20556  fi
20557
20558
20559
20560  if test "x$UNZIP" = x; then
20561    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20562  fi
20563
20564
20565
20566
20567
20568  # Publish this variable in the help.
20569
20570
20571  if [ -z "${ZIP+x}" ]; then
20572    # The variable is not set by user, try to locate tool using the code snippet
20573    for ac_prog in zip
20574do
20575  # Extract the first word of "$ac_prog", so it can be a program name with args.
20576set dummy $ac_prog; ac_word=$2
20577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20578$as_echo_n "checking for $ac_word... " >&6; }
20579if ${ac_cv_path_ZIP+:} false; then :
20580  $as_echo_n "(cached) " >&6
20581else
20582  case $ZIP in
20583  [\\/]* | ?:[\\/]*)
20584  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20585  ;;
20586  *)
20587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20588for as_dir in $PATH
20589do
20590  IFS=$as_save_IFS
20591  test -z "$as_dir" && as_dir=.
20592    for ac_exec_ext in '' $ac_executable_extensions; do
20593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20594    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20596    break 2
20597  fi
20598done
20599  done
20600IFS=$as_save_IFS
20601
20602  ;;
20603esac
20604fi
20605ZIP=$ac_cv_path_ZIP
20606if test -n "$ZIP"; then
20607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20608$as_echo "$ZIP" >&6; }
20609else
20610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20611$as_echo "no" >&6; }
20612fi
20613
20614
20615  test -n "$ZIP" && break
20616done
20617
20618  else
20619    # The variable is set, but is it from the command line or the environment?
20620
20621    # Try to remove the string !ZIP! from our list.
20622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20624      # If it failed, the variable was not from the command line. Ignore it,
20625      # but warn the user (except for BASH, which is always set by the calling BASH).
20626      if test "xZIP" != xBASH; then
20627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20628$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20629      fi
20630      # Try to locate tool using the code snippet
20631      for ac_prog in zip
20632do
20633  # Extract the first word of "$ac_prog", so it can be a program name with args.
20634set dummy $ac_prog; ac_word=$2
20635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20636$as_echo_n "checking for $ac_word... " >&6; }
20637if ${ac_cv_path_ZIP+:} false; then :
20638  $as_echo_n "(cached) " >&6
20639else
20640  case $ZIP in
20641  [\\/]* | ?:[\\/]*)
20642  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20643  ;;
20644  *)
20645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20646for as_dir in $PATH
20647do
20648  IFS=$as_save_IFS
20649  test -z "$as_dir" && as_dir=.
20650    for ac_exec_ext in '' $ac_executable_extensions; do
20651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20652    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20654    break 2
20655  fi
20656done
20657  done
20658IFS=$as_save_IFS
20659
20660  ;;
20661esac
20662fi
20663ZIP=$ac_cv_path_ZIP
20664if test -n "$ZIP"; then
20665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20666$as_echo "$ZIP" >&6; }
20667else
20668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20669$as_echo "no" >&6; }
20670fi
20671
20672
20673  test -n "$ZIP" && break
20674done
20675
20676    else
20677      # If it succeeded, then it was overridden by the user. We will use it
20678      # for the tool.
20679
20680      # First remove it from the list of overridden variables, so we can test
20681      # for unknown variables in the end.
20682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20683
20684      # Check if we try to supply an empty value
20685      if test "x$ZIP" = x; then
20686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20687$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20689$as_echo_n "checking for ZIP... " >&6; }
20690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20691$as_echo "disabled" >&6; }
20692      else
20693        # Check if the provided tool contains a complete path.
20694        tool_specified="$ZIP"
20695        tool_basename="${tool_specified##*/}"
20696        if test "x$tool_basename" = "x$tool_specified"; then
20697          # A command without a complete path is provided, search $PATH.
20698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20699$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20700          # Extract the first word of "$tool_basename", so it can be a program name with args.
20701set dummy $tool_basename; ac_word=$2
20702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20703$as_echo_n "checking for $ac_word... " >&6; }
20704if ${ac_cv_path_ZIP+:} false; then :
20705  $as_echo_n "(cached) " >&6
20706else
20707  case $ZIP in
20708  [\\/]* | ?:[\\/]*)
20709  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20710  ;;
20711  *)
20712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20713for as_dir in $PATH
20714do
20715  IFS=$as_save_IFS
20716  test -z "$as_dir" && as_dir=.
20717    for ac_exec_ext in '' $ac_executable_extensions; do
20718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20719    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20721    break 2
20722  fi
20723done
20724  done
20725IFS=$as_save_IFS
20726
20727  ;;
20728esac
20729fi
20730ZIP=$ac_cv_path_ZIP
20731if test -n "$ZIP"; then
20732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20733$as_echo "$ZIP" >&6; }
20734else
20735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20736$as_echo "no" >&6; }
20737fi
20738
20739
20740          if test "x$ZIP" = x; then
20741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20742          fi
20743        else
20744          # Otherwise we believe it is a complete path. Use it as it is.
20745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20746$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20748$as_echo_n "checking for ZIP... " >&6; }
20749          if test ! -x "$tool_specified"; then
20750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20751$as_echo "not found" >&6; }
20752            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20753          fi
20754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20755$as_echo "$tool_specified" >&6; }
20756        fi
20757      fi
20758    fi
20759
20760  fi
20761
20762
20763
20764  if test "x$ZIP" = x; then
20765    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20766  fi
20767
20768
20769
20770  # Non-required basic tools
20771
20772
20773
20774  # Publish this variable in the help.
20775
20776
20777  if [ -z "${LDD+x}" ]; then
20778    # The variable is not set by user, try to locate tool using the code snippet
20779    for ac_prog in ldd
20780do
20781  # Extract the first word of "$ac_prog", so it can be a program name with args.
20782set dummy $ac_prog; ac_word=$2
20783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20784$as_echo_n "checking for $ac_word... " >&6; }
20785if ${ac_cv_path_LDD+:} false; then :
20786  $as_echo_n "(cached) " >&6
20787else
20788  case $LDD in
20789  [\\/]* | ?:[\\/]*)
20790  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20791  ;;
20792  *)
20793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20794for as_dir in $PATH
20795do
20796  IFS=$as_save_IFS
20797  test -z "$as_dir" && as_dir=.
20798    for ac_exec_ext in '' $ac_executable_extensions; do
20799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20800    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20802    break 2
20803  fi
20804done
20805  done
20806IFS=$as_save_IFS
20807
20808  ;;
20809esac
20810fi
20811LDD=$ac_cv_path_LDD
20812if test -n "$LDD"; then
20813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20814$as_echo "$LDD" >&6; }
20815else
20816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20817$as_echo "no" >&6; }
20818fi
20819
20820
20821  test -n "$LDD" && break
20822done
20823
20824  else
20825    # The variable is set, but is it from the command line or the environment?
20826
20827    # Try to remove the string !LDD! from our list.
20828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20830      # If it failed, the variable was not from the command line. Ignore it,
20831      # but warn the user (except for BASH, which is always set by the calling BASH).
20832      if test "xLDD" != xBASH; then
20833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20834$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20835      fi
20836      # Try to locate tool using the code snippet
20837      for ac_prog in ldd
20838do
20839  # Extract the first word of "$ac_prog", so it can be a program name with args.
20840set dummy $ac_prog; ac_word=$2
20841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20842$as_echo_n "checking for $ac_word... " >&6; }
20843if ${ac_cv_path_LDD+:} false; then :
20844  $as_echo_n "(cached) " >&6
20845else
20846  case $LDD in
20847  [\\/]* | ?:[\\/]*)
20848  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20849  ;;
20850  *)
20851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20852for as_dir in $PATH
20853do
20854  IFS=$as_save_IFS
20855  test -z "$as_dir" && as_dir=.
20856    for ac_exec_ext in '' $ac_executable_extensions; do
20857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20858    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20860    break 2
20861  fi
20862done
20863  done
20864IFS=$as_save_IFS
20865
20866  ;;
20867esac
20868fi
20869LDD=$ac_cv_path_LDD
20870if test -n "$LDD"; then
20871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20872$as_echo "$LDD" >&6; }
20873else
20874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20875$as_echo "no" >&6; }
20876fi
20877
20878
20879  test -n "$LDD" && break
20880done
20881
20882    else
20883      # If it succeeded, then it was overridden by the user. We will use it
20884      # for the tool.
20885
20886      # First remove it from the list of overridden variables, so we can test
20887      # for unknown variables in the end.
20888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20889
20890      # Check if we try to supply an empty value
20891      if test "x$LDD" = x; then
20892        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20893$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20895$as_echo_n "checking for LDD... " >&6; }
20896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20897$as_echo "disabled" >&6; }
20898      else
20899        # Check if the provided tool contains a complete path.
20900        tool_specified="$LDD"
20901        tool_basename="${tool_specified##*/}"
20902        if test "x$tool_basename" = "x$tool_specified"; then
20903          # A command without a complete path is provided, search $PATH.
20904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20905$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20906          # Extract the first word of "$tool_basename", so it can be a program name with args.
20907set dummy $tool_basename; ac_word=$2
20908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20909$as_echo_n "checking for $ac_word... " >&6; }
20910if ${ac_cv_path_LDD+:} false; then :
20911  $as_echo_n "(cached) " >&6
20912else
20913  case $LDD in
20914  [\\/]* | ?:[\\/]*)
20915  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20916  ;;
20917  *)
20918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20919for as_dir in $PATH
20920do
20921  IFS=$as_save_IFS
20922  test -z "$as_dir" && as_dir=.
20923    for ac_exec_ext in '' $ac_executable_extensions; do
20924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20925    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20927    break 2
20928  fi
20929done
20930  done
20931IFS=$as_save_IFS
20932
20933  ;;
20934esac
20935fi
20936LDD=$ac_cv_path_LDD
20937if test -n "$LDD"; then
20938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20939$as_echo "$LDD" >&6; }
20940else
20941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20942$as_echo "no" >&6; }
20943fi
20944
20945
20946          if test "x$LDD" = x; then
20947            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20948          fi
20949        else
20950          # Otherwise we believe it is a complete path. Use it as it is.
20951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20952$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20953          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20954$as_echo_n "checking for LDD... " >&6; }
20955          if test ! -x "$tool_specified"; then
20956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20957$as_echo "not found" >&6; }
20958            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20959          fi
20960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20961$as_echo "$tool_specified" >&6; }
20962        fi
20963      fi
20964    fi
20965
20966  fi
20967
20968
20969  if test "x$LDD" = "x"; then
20970    # List shared lib dependencies is used for
20971    # debug output and checking for forbidden dependencies.
20972    # We can build without it.
20973    LDD="true"
20974  fi
20975
20976
20977  # Publish this variable in the help.
20978
20979
20980  if [ -z "${OTOOL+x}" ]; then
20981    # The variable is not set by user, try to locate tool using the code snippet
20982    for ac_prog in otool
20983do
20984  # Extract the first word of "$ac_prog", so it can be a program name with args.
20985set dummy $ac_prog; ac_word=$2
20986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20987$as_echo_n "checking for $ac_word... " >&6; }
20988if ${ac_cv_path_OTOOL+:} false; then :
20989  $as_echo_n "(cached) " >&6
20990else
20991  case $OTOOL in
20992  [\\/]* | ?:[\\/]*)
20993  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20994  ;;
20995  *)
20996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20997for as_dir in $PATH
20998do
20999  IFS=$as_save_IFS
21000  test -z "$as_dir" && as_dir=.
21001    for ac_exec_ext in '' $ac_executable_extensions; do
21002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21003    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21005    break 2
21006  fi
21007done
21008  done
21009IFS=$as_save_IFS
21010
21011  ;;
21012esac
21013fi
21014OTOOL=$ac_cv_path_OTOOL
21015if test -n "$OTOOL"; then
21016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21017$as_echo "$OTOOL" >&6; }
21018else
21019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21020$as_echo "no" >&6; }
21021fi
21022
21023
21024  test -n "$OTOOL" && break
21025done
21026
21027  else
21028    # The variable is set, but is it from the command line or the environment?
21029
21030    # Try to remove the string !OTOOL! from our list.
21031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21033      # If it failed, the variable was not from the command line. Ignore it,
21034      # but warn the user (except for BASH, which is always set by the calling BASH).
21035      if test "xOTOOL" != xBASH; then
21036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21037$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21038      fi
21039      # Try to locate tool using the code snippet
21040      for ac_prog in otool
21041do
21042  # Extract the first word of "$ac_prog", so it can be a program name with args.
21043set dummy $ac_prog; ac_word=$2
21044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21045$as_echo_n "checking for $ac_word... " >&6; }
21046if ${ac_cv_path_OTOOL+:} false; then :
21047  $as_echo_n "(cached) " >&6
21048else
21049  case $OTOOL in
21050  [\\/]* | ?:[\\/]*)
21051  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21052  ;;
21053  *)
21054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21055for as_dir in $PATH
21056do
21057  IFS=$as_save_IFS
21058  test -z "$as_dir" && as_dir=.
21059    for ac_exec_ext in '' $ac_executable_extensions; do
21060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21061    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21063    break 2
21064  fi
21065done
21066  done
21067IFS=$as_save_IFS
21068
21069  ;;
21070esac
21071fi
21072OTOOL=$ac_cv_path_OTOOL
21073if test -n "$OTOOL"; then
21074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21075$as_echo "$OTOOL" >&6; }
21076else
21077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21078$as_echo "no" >&6; }
21079fi
21080
21081
21082  test -n "$OTOOL" && break
21083done
21084
21085    else
21086      # If it succeeded, then it was overridden by the user. We will use it
21087      # for the tool.
21088
21089      # First remove it from the list of overridden variables, so we can test
21090      # for unknown variables in the end.
21091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21092
21093      # Check if we try to supply an empty value
21094      if test "x$OTOOL" = x; then
21095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21096$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21098$as_echo_n "checking for OTOOL... " >&6; }
21099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21100$as_echo "disabled" >&6; }
21101      else
21102        # Check if the provided tool contains a complete path.
21103        tool_specified="$OTOOL"
21104        tool_basename="${tool_specified##*/}"
21105        if test "x$tool_basename" = "x$tool_specified"; then
21106          # A command without a complete path is provided, search $PATH.
21107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21108$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21109          # Extract the first word of "$tool_basename", so it can be a program name with args.
21110set dummy $tool_basename; ac_word=$2
21111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21112$as_echo_n "checking for $ac_word... " >&6; }
21113if ${ac_cv_path_OTOOL+:} false; then :
21114  $as_echo_n "(cached) " >&6
21115else
21116  case $OTOOL in
21117  [\\/]* | ?:[\\/]*)
21118  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21119  ;;
21120  *)
21121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21122for as_dir in $PATH
21123do
21124  IFS=$as_save_IFS
21125  test -z "$as_dir" && as_dir=.
21126    for ac_exec_ext in '' $ac_executable_extensions; do
21127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21128    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21130    break 2
21131  fi
21132done
21133  done
21134IFS=$as_save_IFS
21135
21136  ;;
21137esac
21138fi
21139OTOOL=$ac_cv_path_OTOOL
21140if test -n "$OTOOL"; then
21141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21142$as_echo "$OTOOL" >&6; }
21143else
21144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21145$as_echo "no" >&6; }
21146fi
21147
21148
21149          if test "x$OTOOL" = x; then
21150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21151          fi
21152        else
21153          # Otherwise we believe it is a complete path. Use it as it is.
21154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21155$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21157$as_echo_n "checking for OTOOL... " >&6; }
21158          if test ! -x "$tool_specified"; then
21159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21160$as_echo "not found" >&6; }
21161            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21162          fi
21163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21164$as_echo "$tool_specified" >&6; }
21165        fi
21166      fi
21167    fi
21168
21169  fi
21170
21171
21172  if test "x$OTOOL" = "x"; then
21173    OTOOL="true"
21174  fi
21175
21176
21177  # Publish this variable in the help.
21178
21179
21180  if [ -z "${READELF+x}" ]; then
21181    # The variable is not set by user, try to locate tool using the code snippet
21182    for ac_prog in greadelf readelf
21183do
21184  # Extract the first word of "$ac_prog", so it can be a program name with args.
21185set dummy $ac_prog; ac_word=$2
21186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21187$as_echo_n "checking for $ac_word... " >&6; }
21188if ${ac_cv_path_READELF+:} false; then :
21189  $as_echo_n "(cached) " >&6
21190else
21191  case $READELF in
21192  [\\/]* | ?:[\\/]*)
21193  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21194  ;;
21195  *)
21196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21197for as_dir in $PATH
21198do
21199  IFS=$as_save_IFS
21200  test -z "$as_dir" && as_dir=.
21201    for ac_exec_ext in '' $ac_executable_extensions; do
21202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21203    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21205    break 2
21206  fi
21207done
21208  done
21209IFS=$as_save_IFS
21210
21211  ;;
21212esac
21213fi
21214READELF=$ac_cv_path_READELF
21215if test -n "$READELF"; then
21216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21217$as_echo "$READELF" >&6; }
21218else
21219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21220$as_echo "no" >&6; }
21221fi
21222
21223
21224  test -n "$READELF" && break
21225done
21226
21227  else
21228    # The variable is set, but is it from the command line or the environment?
21229
21230    # Try to remove the string !READELF! from our list.
21231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21233      # If it failed, the variable was not from the command line. Ignore it,
21234      # but warn the user (except for BASH, which is always set by the calling BASH).
21235      if test "xREADELF" != xBASH; then
21236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21237$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21238      fi
21239      # Try to locate tool using the code snippet
21240      for ac_prog in greadelf readelf
21241do
21242  # Extract the first word of "$ac_prog", so it can be a program name with args.
21243set dummy $ac_prog; ac_word=$2
21244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21245$as_echo_n "checking for $ac_word... " >&6; }
21246if ${ac_cv_path_READELF+:} false; then :
21247  $as_echo_n "(cached) " >&6
21248else
21249  case $READELF in
21250  [\\/]* | ?:[\\/]*)
21251  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21252  ;;
21253  *)
21254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21255for as_dir in $PATH
21256do
21257  IFS=$as_save_IFS
21258  test -z "$as_dir" && as_dir=.
21259    for ac_exec_ext in '' $ac_executable_extensions; do
21260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21261    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21263    break 2
21264  fi
21265done
21266  done
21267IFS=$as_save_IFS
21268
21269  ;;
21270esac
21271fi
21272READELF=$ac_cv_path_READELF
21273if test -n "$READELF"; then
21274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21275$as_echo "$READELF" >&6; }
21276else
21277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21278$as_echo "no" >&6; }
21279fi
21280
21281
21282  test -n "$READELF" && break
21283done
21284
21285    else
21286      # If it succeeded, then it was overridden by the user. We will use it
21287      # for the tool.
21288
21289      # First remove it from the list of overridden variables, so we can test
21290      # for unknown variables in the end.
21291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21292
21293      # Check if we try to supply an empty value
21294      if test "x$READELF" = x; then
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21296$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21298$as_echo_n "checking for READELF... " >&6; }
21299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21300$as_echo "disabled" >&6; }
21301      else
21302        # Check if the provided tool contains a complete path.
21303        tool_specified="$READELF"
21304        tool_basename="${tool_specified##*/}"
21305        if test "x$tool_basename" = "x$tool_specified"; then
21306          # A command without a complete path is provided, search $PATH.
21307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21308$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21309          # Extract the first word of "$tool_basename", so it can be a program name with args.
21310set dummy $tool_basename; ac_word=$2
21311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21312$as_echo_n "checking for $ac_word... " >&6; }
21313if ${ac_cv_path_READELF+:} false; then :
21314  $as_echo_n "(cached) " >&6
21315else
21316  case $READELF in
21317  [\\/]* | ?:[\\/]*)
21318  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21319  ;;
21320  *)
21321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21322for as_dir in $PATH
21323do
21324  IFS=$as_save_IFS
21325  test -z "$as_dir" && as_dir=.
21326    for ac_exec_ext in '' $ac_executable_extensions; do
21327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21328    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21330    break 2
21331  fi
21332done
21333  done
21334IFS=$as_save_IFS
21335
21336  ;;
21337esac
21338fi
21339READELF=$ac_cv_path_READELF
21340if test -n "$READELF"; then
21341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21342$as_echo "$READELF" >&6; }
21343else
21344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21345$as_echo "no" >&6; }
21346fi
21347
21348
21349          if test "x$READELF" = x; then
21350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21351          fi
21352        else
21353          # Otherwise we believe it is a complete path. Use it as it is.
21354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21355$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21357$as_echo_n "checking for READELF... " >&6; }
21358          if test ! -x "$tool_specified"; then
21359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21360$as_echo "not found" >&6; }
21361            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21362          fi
21363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21364$as_echo "$tool_specified" >&6; }
21365        fi
21366      fi
21367    fi
21368
21369  fi
21370
21371
21372
21373
21374  # Publish this variable in the help.
21375
21376
21377  if [ -z "${HG+x}" ]; then
21378    # The variable is not set by user, try to locate tool using the code snippet
21379    for ac_prog in hg
21380do
21381  # Extract the first word of "$ac_prog", so it can be a program name with args.
21382set dummy $ac_prog; ac_word=$2
21383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21384$as_echo_n "checking for $ac_word... " >&6; }
21385if ${ac_cv_path_HG+:} false; then :
21386  $as_echo_n "(cached) " >&6
21387else
21388  case $HG in
21389  [\\/]* | ?:[\\/]*)
21390  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21391  ;;
21392  *)
21393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21394for as_dir in $PATH
21395do
21396  IFS=$as_save_IFS
21397  test -z "$as_dir" && as_dir=.
21398    for ac_exec_ext in '' $ac_executable_extensions; do
21399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21400    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21402    break 2
21403  fi
21404done
21405  done
21406IFS=$as_save_IFS
21407
21408  ;;
21409esac
21410fi
21411HG=$ac_cv_path_HG
21412if test -n "$HG"; then
21413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21414$as_echo "$HG" >&6; }
21415else
21416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21417$as_echo "no" >&6; }
21418fi
21419
21420
21421  test -n "$HG" && break
21422done
21423
21424  else
21425    # The variable is set, but is it from the command line or the environment?
21426
21427    # Try to remove the string !HG! from our list.
21428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21430      # If it failed, the variable was not from the command line. Ignore it,
21431      # but warn the user (except for BASH, which is always set by the calling BASH).
21432      if test "xHG" != xBASH; then
21433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21434$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21435      fi
21436      # Try to locate tool using the code snippet
21437      for ac_prog in hg
21438do
21439  # Extract the first word of "$ac_prog", so it can be a program name with args.
21440set dummy $ac_prog; ac_word=$2
21441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21442$as_echo_n "checking for $ac_word... " >&6; }
21443if ${ac_cv_path_HG+:} false; then :
21444  $as_echo_n "(cached) " >&6
21445else
21446  case $HG in
21447  [\\/]* | ?:[\\/]*)
21448  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21449  ;;
21450  *)
21451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21452for as_dir in $PATH
21453do
21454  IFS=$as_save_IFS
21455  test -z "$as_dir" && as_dir=.
21456    for ac_exec_ext in '' $ac_executable_extensions; do
21457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21458    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21460    break 2
21461  fi
21462done
21463  done
21464IFS=$as_save_IFS
21465
21466  ;;
21467esac
21468fi
21469HG=$ac_cv_path_HG
21470if test -n "$HG"; then
21471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21472$as_echo "$HG" >&6; }
21473else
21474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21475$as_echo "no" >&6; }
21476fi
21477
21478
21479  test -n "$HG" && break
21480done
21481
21482    else
21483      # If it succeeded, then it was overridden by the user. We will use it
21484      # for the tool.
21485
21486      # First remove it from the list of overridden variables, so we can test
21487      # for unknown variables in the end.
21488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21489
21490      # Check if we try to supply an empty value
21491      if test "x$HG" = x; then
21492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21493$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21495$as_echo_n "checking for HG... " >&6; }
21496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21497$as_echo "disabled" >&6; }
21498      else
21499        # Check if the provided tool contains a complete path.
21500        tool_specified="$HG"
21501        tool_basename="${tool_specified##*/}"
21502        if test "x$tool_basename" = "x$tool_specified"; then
21503          # A command without a complete path is provided, search $PATH.
21504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21505$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21506          # Extract the first word of "$tool_basename", so it can be a program name with args.
21507set dummy $tool_basename; ac_word=$2
21508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21509$as_echo_n "checking for $ac_word... " >&6; }
21510if ${ac_cv_path_HG+:} false; then :
21511  $as_echo_n "(cached) " >&6
21512else
21513  case $HG in
21514  [\\/]* | ?:[\\/]*)
21515  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21516  ;;
21517  *)
21518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21519for as_dir in $PATH
21520do
21521  IFS=$as_save_IFS
21522  test -z "$as_dir" && as_dir=.
21523    for ac_exec_ext in '' $ac_executable_extensions; do
21524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21525    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21527    break 2
21528  fi
21529done
21530  done
21531IFS=$as_save_IFS
21532
21533  ;;
21534esac
21535fi
21536HG=$ac_cv_path_HG
21537if test -n "$HG"; then
21538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21539$as_echo "$HG" >&6; }
21540else
21541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21542$as_echo "no" >&6; }
21543fi
21544
21545
21546          if test "x$HG" = x; then
21547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21548          fi
21549        else
21550          # Otherwise we believe it is a complete path. Use it as it is.
21551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21552$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21554$as_echo_n "checking for HG... " >&6; }
21555          if test ! -x "$tool_specified"; then
21556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21557$as_echo "not found" >&6; }
21558            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21559          fi
21560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21561$as_echo "$tool_specified" >&6; }
21562        fi
21563      fi
21564    fi
21565
21566  fi
21567
21568
21569
21570
21571  # Publish this variable in the help.
21572
21573
21574  if [ -z "${STAT+x}" ]; then
21575    # The variable is not set by user, try to locate tool using the code snippet
21576    for ac_prog in stat
21577do
21578  # Extract the first word of "$ac_prog", so it can be a program name with args.
21579set dummy $ac_prog; ac_word=$2
21580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21581$as_echo_n "checking for $ac_word... " >&6; }
21582if ${ac_cv_path_STAT+:} false; then :
21583  $as_echo_n "(cached) " >&6
21584else
21585  case $STAT in
21586  [\\/]* | ?:[\\/]*)
21587  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21588  ;;
21589  *)
21590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21591for as_dir in $PATH
21592do
21593  IFS=$as_save_IFS
21594  test -z "$as_dir" && as_dir=.
21595    for ac_exec_ext in '' $ac_executable_extensions; do
21596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21597    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21599    break 2
21600  fi
21601done
21602  done
21603IFS=$as_save_IFS
21604
21605  ;;
21606esac
21607fi
21608STAT=$ac_cv_path_STAT
21609if test -n "$STAT"; then
21610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21611$as_echo "$STAT" >&6; }
21612else
21613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21614$as_echo "no" >&6; }
21615fi
21616
21617
21618  test -n "$STAT" && break
21619done
21620
21621  else
21622    # The variable is set, but is it from the command line or the environment?
21623
21624    # Try to remove the string !STAT! from our list.
21625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21627      # If it failed, the variable was not from the command line. Ignore it,
21628      # but warn the user (except for BASH, which is always set by the calling BASH).
21629      if test "xSTAT" != xBASH; then
21630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21631$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21632      fi
21633      # Try to locate tool using the code snippet
21634      for ac_prog in stat
21635do
21636  # Extract the first word of "$ac_prog", so it can be a program name with args.
21637set dummy $ac_prog; ac_word=$2
21638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21639$as_echo_n "checking for $ac_word... " >&6; }
21640if ${ac_cv_path_STAT+:} false; then :
21641  $as_echo_n "(cached) " >&6
21642else
21643  case $STAT in
21644  [\\/]* | ?:[\\/]*)
21645  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21646  ;;
21647  *)
21648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21649for as_dir in $PATH
21650do
21651  IFS=$as_save_IFS
21652  test -z "$as_dir" && as_dir=.
21653    for ac_exec_ext in '' $ac_executable_extensions; do
21654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21655    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21657    break 2
21658  fi
21659done
21660  done
21661IFS=$as_save_IFS
21662
21663  ;;
21664esac
21665fi
21666STAT=$ac_cv_path_STAT
21667if test -n "$STAT"; then
21668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21669$as_echo "$STAT" >&6; }
21670else
21671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21672$as_echo "no" >&6; }
21673fi
21674
21675
21676  test -n "$STAT" && break
21677done
21678
21679    else
21680      # If it succeeded, then it was overridden by the user. We will use it
21681      # for the tool.
21682
21683      # First remove it from the list of overridden variables, so we can test
21684      # for unknown variables in the end.
21685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21686
21687      # Check if we try to supply an empty value
21688      if test "x$STAT" = x; then
21689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21690$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21692$as_echo_n "checking for STAT... " >&6; }
21693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21694$as_echo "disabled" >&6; }
21695      else
21696        # Check if the provided tool contains a complete path.
21697        tool_specified="$STAT"
21698        tool_basename="${tool_specified##*/}"
21699        if test "x$tool_basename" = "x$tool_specified"; then
21700          # A command without a complete path is provided, search $PATH.
21701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21702$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21703          # Extract the first word of "$tool_basename", so it can be a program name with args.
21704set dummy $tool_basename; ac_word=$2
21705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21706$as_echo_n "checking for $ac_word... " >&6; }
21707if ${ac_cv_path_STAT+:} false; then :
21708  $as_echo_n "(cached) " >&6
21709else
21710  case $STAT in
21711  [\\/]* | ?:[\\/]*)
21712  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21713  ;;
21714  *)
21715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21716for as_dir in $PATH
21717do
21718  IFS=$as_save_IFS
21719  test -z "$as_dir" && as_dir=.
21720    for ac_exec_ext in '' $ac_executable_extensions; do
21721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21722    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21724    break 2
21725  fi
21726done
21727  done
21728IFS=$as_save_IFS
21729
21730  ;;
21731esac
21732fi
21733STAT=$ac_cv_path_STAT
21734if test -n "$STAT"; then
21735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21736$as_echo "$STAT" >&6; }
21737else
21738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21739$as_echo "no" >&6; }
21740fi
21741
21742
21743          if test "x$STAT" = x; then
21744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21745          fi
21746        else
21747          # Otherwise we believe it is a complete path. Use it as it is.
21748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21749$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21751$as_echo_n "checking for STAT... " >&6; }
21752          if test ! -x "$tool_specified"; then
21753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21754$as_echo "not found" >&6; }
21755            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21756          fi
21757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21758$as_echo "$tool_specified" >&6; }
21759        fi
21760      fi
21761    fi
21762
21763  fi
21764
21765
21766
21767
21768  # Publish this variable in the help.
21769
21770
21771  if [ -z "${TIME+x}" ]; then
21772    # The variable is not set by user, try to locate tool using the code snippet
21773    for ac_prog in time
21774do
21775  # Extract the first word of "$ac_prog", so it can be a program name with args.
21776set dummy $ac_prog; ac_word=$2
21777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21778$as_echo_n "checking for $ac_word... " >&6; }
21779if ${ac_cv_path_TIME+:} false; then :
21780  $as_echo_n "(cached) " >&6
21781else
21782  case $TIME in
21783  [\\/]* | ?:[\\/]*)
21784  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21785  ;;
21786  *)
21787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21788for as_dir in $PATH
21789do
21790  IFS=$as_save_IFS
21791  test -z "$as_dir" && as_dir=.
21792    for ac_exec_ext in '' $ac_executable_extensions; do
21793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21794    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21796    break 2
21797  fi
21798done
21799  done
21800IFS=$as_save_IFS
21801
21802  ;;
21803esac
21804fi
21805TIME=$ac_cv_path_TIME
21806if test -n "$TIME"; then
21807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21808$as_echo "$TIME" >&6; }
21809else
21810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21811$as_echo "no" >&6; }
21812fi
21813
21814
21815  test -n "$TIME" && break
21816done
21817
21818  else
21819    # The variable is set, but is it from the command line or the environment?
21820
21821    # Try to remove the string !TIME! from our list.
21822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21824      # If it failed, the variable was not from the command line. Ignore it,
21825      # but warn the user (except for BASH, which is always set by the calling BASH).
21826      if test "xTIME" != xBASH; then
21827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21828$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21829      fi
21830      # Try to locate tool using the code snippet
21831      for ac_prog in time
21832do
21833  # Extract the first word of "$ac_prog", so it can be a program name with args.
21834set dummy $ac_prog; ac_word=$2
21835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21836$as_echo_n "checking for $ac_word... " >&6; }
21837if ${ac_cv_path_TIME+:} false; then :
21838  $as_echo_n "(cached) " >&6
21839else
21840  case $TIME in
21841  [\\/]* | ?:[\\/]*)
21842  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21843  ;;
21844  *)
21845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21846for as_dir in $PATH
21847do
21848  IFS=$as_save_IFS
21849  test -z "$as_dir" && as_dir=.
21850    for ac_exec_ext in '' $ac_executable_extensions; do
21851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21852    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21854    break 2
21855  fi
21856done
21857  done
21858IFS=$as_save_IFS
21859
21860  ;;
21861esac
21862fi
21863TIME=$ac_cv_path_TIME
21864if test -n "$TIME"; then
21865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21866$as_echo "$TIME" >&6; }
21867else
21868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21869$as_echo "no" >&6; }
21870fi
21871
21872
21873  test -n "$TIME" && break
21874done
21875
21876    else
21877      # If it succeeded, then it was overridden by the user. We will use it
21878      # for the tool.
21879
21880      # First remove it from the list of overridden variables, so we can test
21881      # for unknown variables in the end.
21882      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21883
21884      # Check if we try to supply an empty value
21885      if test "x$TIME" = x; then
21886        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21887$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21888        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21889$as_echo_n "checking for TIME... " >&6; }
21890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21891$as_echo "disabled" >&6; }
21892      else
21893        # Check if the provided tool contains a complete path.
21894        tool_specified="$TIME"
21895        tool_basename="${tool_specified##*/}"
21896        if test "x$tool_basename" = "x$tool_specified"; then
21897          # A command without a complete path is provided, search $PATH.
21898          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21899$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21900          # Extract the first word of "$tool_basename", so it can be a program name with args.
21901set dummy $tool_basename; ac_word=$2
21902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21903$as_echo_n "checking for $ac_word... " >&6; }
21904if ${ac_cv_path_TIME+:} false; then :
21905  $as_echo_n "(cached) " >&6
21906else
21907  case $TIME in
21908  [\\/]* | ?:[\\/]*)
21909  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21910  ;;
21911  *)
21912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21913for as_dir in $PATH
21914do
21915  IFS=$as_save_IFS
21916  test -z "$as_dir" && as_dir=.
21917    for ac_exec_ext in '' $ac_executable_extensions; do
21918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21919    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21921    break 2
21922  fi
21923done
21924  done
21925IFS=$as_save_IFS
21926
21927  ;;
21928esac
21929fi
21930TIME=$ac_cv_path_TIME
21931if test -n "$TIME"; then
21932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21933$as_echo "$TIME" >&6; }
21934else
21935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21936$as_echo "no" >&6; }
21937fi
21938
21939
21940          if test "x$TIME" = x; then
21941            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21942          fi
21943        else
21944          # Otherwise we believe it is a complete path. Use it as it is.
21945          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21946$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21947          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21948$as_echo_n "checking for TIME... " >&6; }
21949          if test ! -x "$tool_specified"; then
21950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21951$as_echo "not found" >&6; }
21952            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21953          fi
21954          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21955$as_echo "$tool_specified" >&6; }
21956        fi
21957      fi
21958    fi
21959
21960  fi
21961
21962
21963
21964
21965  # Publish this variable in the help.
21966
21967
21968  if [ -z "${PATCH+x}" ]; then
21969    # The variable is not set by user, try to locate tool using the code snippet
21970    for ac_prog in gpatch patch
21971do
21972  # Extract the first word of "$ac_prog", so it can be a program name with args.
21973set dummy $ac_prog; ac_word=$2
21974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21975$as_echo_n "checking for $ac_word... " >&6; }
21976if ${ac_cv_path_PATCH+:} false; then :
21977  $as_echo_n "(cached) " >&6
21978else
21979  case $PATCH in
21980  [\\/]* | ?:[\\/]*)
21981  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21982  ;;
21983  *)
21984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21985for as_dir in $PATH
21986do
21987  IFS=$as_save_IFS
21988  test -z "$as_dir" && as_dir=.
21989    for ac_exec_ext in '' $ac_executable_extensions; do
21990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21991    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21993    break 2
21994  fi
21995done
21996  done
21997IFS=$as_save_IFS
21998
21999  ;;
22000esac
22001fi
22002PATCH=$ac_cv_path_PATCH
22003if test -n "$PATCH"; then
22004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22005$as_echo "$PATCH" >&6; }
22006else
22007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22008$as_echo "no" >&6; }
22009fi
22010
22011
22012  test -n "$PATCH" && break
22013done
22014
22015  else
22016    # The variable is set, but is it from the command line or the environment?
22017
22018    # Try to remove the string !PATCH! from our list.
22019    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22020    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22021      # If it failed, the variable was not from the command line. Ignore it,
22022      # but warn the user (except for BASH, which is always set by the calling BASH).
22023      if test "xPATCH" != xBASH; then
22024        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22025$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22026      fi
22027      # Try to locate tool using the code snippet
22028      for ac_prog in gpatch patch
22029do
22030  # Extract the first word of "$ac_prog", so it can be a program name with args.
22031set dummy $ac_prog; ac_word=$2
22032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22033$as_echo_n "checking for $ac_word... " >&6; }
22034if ${ac_cv_path_PATCH+:} false; then :
22035  $as_echo_n "(cached) " >&6
22036else
22037  case $PATCH in
22038  [\\/]* | ?:[\\/]*)
22039  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22040  ;;
22041  *)
22042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22043for as_dir in $PATH
22044do
22045  IFS=$as_save_IFS
22046  test -z "$as_dir" && as_dir=.
22047    for ac_exec_ext in '' $ac_executable_extensions; do
22048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22049    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22051    break 2
22052  fi
22053done
22054  done
22055IFS=$as_save_IFS
22056
22057  ;;
22058esac
22059fi
22060PATCH=$ac_cv_path_PATCH
22061if test -n "$PATCH"; then
22062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22063$as_echo "$PATCH" >&6; }
22064else
22065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22066$as_echo "no" >&6; }
22067fi
22068
22069
22070  test -n "$PATCH" && break
22071done
22072
22073    else
22074      # If it succeeded, then it was overridden by the user. We will use it
22075      # for the tool.
22076
22077      # First remove it from the list of overridden variables, so we can test
22078      # for unknown variables in the end.
22079      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22080
22081      # Check if we try to supply an empty value
22082      if test "x$PATCH" = x; then
22083        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22084$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22085        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22086$as_echo_n "checking for PATCH... " >&6; }
22087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22088$as_echo "disabled" >&6; }
22089      else
22090        # Check if the provided tool contains a complete path.
22091        tool_specified="$PATCH"
22092        tool_basename="${tool_specified##*/}"
22093        if test "x$tool_basename" = "x$tool_specified"; then
22094          # A command without a complete path is provided, search $PATH.
22095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22096$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22097          # Extract the first word of "$tool_basename", so it can be a program name with args.
22098set dummy $tool_basename; ac_word=$2
22099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22100$as_echo_n "checking for $ac_word... " >&6; }
22101if ${ac_cv_path_PATCH+:} false; then :
22102  $as_echo_n "(cached) " >&6
22103else
22104  case $PATCH in
22105  [\\/]* | ?:[\\/]*)
22106  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22107  ;;
22108  *)
22109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22110for as_dir in $PATH
22111do
22112  IFS=$as_save_IFS
22113  test -z "$as_dir" && as_dir=.
22114    for ac_exec_ext in '' $ac_executable_extensions; do
22115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22116    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22118    break 2
22119  fi
22120done
22121  done
22122IFS=$as_save_IFS
22123
22124  ;;
22125esac
22126fi
22127PATCH=$ac_cv_path_PATCH
22128if test -n "$PATCH"; then
22129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22130$as_echo "$PATCH" >&6; }
22131else
22132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22133$as_echo "no" >&6; }
22134fi
22135
22136
22137          if test "x$PATCH" = x; then
22138            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22139          fi
22140        else
22141          # Otherwise we believe it is a complete path. Use it as it is.
22142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22143$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22144          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22145$as_echo_n "checking for PATCH... " >&6; }
22146          if test ! -x "$tool_specified"; then
22147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22148$as_echo "not found" >&6; }
22149            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22150          fi
22151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22152$as_echo "$tool_specified" >&6; }
22153        fi
22154      fi
22155    fi
22156
22157  fi
22158
22159
22160  # Check if it's GNU time
22161  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22162  if test "x$IS_GNU_TIME" != x; then
22163    IS_GNU_TIME=yes
22164  else
22165    IS_GNU_TIME=no
22166  fi
22167
22168
22169  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22170
22171
22172
22173  # Publish this variable in the help.
22174
22175
22176  if [ -z "${DSYMUTIL+x}" ]; then
22177    # The variable is not set by user, try to locate tool using the code snippet
22178    for ac_prog in dsymutil
22179do
22180  # Extract the first word of "$ac_prog", so it can be a program name with args.
22181set dummy $ac_prog; ac_word=$2
22182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22183$as_echo_n "checking for $ac_word... " >&6; }
22184if ${ac_cv_path_DSYMUTIL+:} false; then :
22185  $as_echo_n "(cached) " >&6
22186else
22187  case $DSYMUTIL in
22188  [\\/]* | ?:[\\/]*)
22189  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22190  ;;
22191  *)
22192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22193for as_dir in $PATH
22194do
22195  IFS=$as_save_IFS
22196  test -z "$as_dir" && as_dir=.
22197    for ac_exec_ext in '' $ac_executable_extensions; do
22198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22199    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22201    break 2
22202  fi
22203done
22204  done
22205IFS=$as_save_IFS
22206
22207  ;;
22208esac
22209fi
22210DSYMUTIL=$ac_cv_path_DSYMUTIL
22211if test -n "$DSYMUTIL"; then
22212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22213$as_echo "$DSYMUTIL" >&6; }
22214else
22215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22216$as_echo "no" >&6; }
22217fi
22218
22219
22220  test -n "$DSYMUTIL" && break
22221done
22222
22223  else
22224    # The variable is set, but is it from the command line or the environment?
22225
22226    # Try to remove the string !DSYMUTIL! from our list.
22227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22229      # If it failed, the variable was not from the command line. Ignore it,
22230      # but warn the user (except for BASH, which is always set by the calling BASH).
22231      if test "xDSYMUTIL" != xBASH; then
22232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22233$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22234      fi
22235      # Try to locate tool using the code snippet
22236      for ac_prog in dsymutil
22237do
22238  # Extract the first word of "$ac_prog", so it can be a program name with args.
22239set dummy $ac_prog; ac_word=$2
22240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22241$as_echo_n "checking for $ac_word... " >&6; }
22242if ${ac_cv_path_DSYMUTIL+:} false; then :
22243  $as_echo_n "(cached) " >&6
22244else
22245  case $DSYMUTIL in
22246  [\\/]* | ?:[\\/]*)
22247  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22248  ;;
22249  *)
22250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22251for as_dir in $PATH
22252do
22253  IFS=$as_save_IFS
22254  test -z "$as_dir" && as_dir=.
22255    for ac_exec_ext in '' $ac_executable_extensions; do
22256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22257    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22259    break 2
22260  fi
22261done
22262  done
22263IFS=$as_save_IFS
22264
22265  ;;
22266esac
22267fi
22268DSYMUTIL=$ac_cv_path_DSYMUTIL
22269if test -n "$DSYMUTIL"; then
22270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22271$as_echo "$DSYMUTIL" >&6; }
22272else
22273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22274$as_echo "no" >&6; }
22275fi
22276
22277
22278  test -n "$DSYMUTIL" && break
22279done
22280
22281    else
22282      # If it succeeded, then it was overridden by the user. We will use it
22283      # for the tool.
22284
22285      # First remove it from the list of overridden variables, so we can test
22286      # for unknown variables in the end.
22287      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22288
22289      # Check if we try to supply an empty value
22290      if test "x$DSYMUTIL" = x; then
22291        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22292$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22294$as_echo_n "checking for DSYMUTIL... " >&6; }
22295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22296$as_echo "disabled" >&6; }
22297      else
22298        # Check if the provided tool contains a complete path.
22299        tool_specified="$DSYMUTIL"
22300        tool_basename="${tool_specified##*/}"
22301        if test "x$tool_basename" = "x$tool_specified"; then
22302          # A command without a complete path is provided, search $PATH.
22303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22304$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22305          # Extract the first word of "$tool_basename", so it can be a program name with args.
22306set dummy $tool_basename; ac_word=$2
22307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22308$as_echo_n "checking for $ac_word... " >&6; }
22309if ${ac_cv_path_DSYMUTIL+:} false; then :
22310  $as_echo_n "(cached) " >&6
22311else
22312  case $DSYMUTIL in
22313  [\\/]* | ?:[\\/]*)
22314  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22315  ;;
22316  *)
22317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22318for as_dir in $PATH
22319do
22320  IFS=$as_save_IFS
22321  test -z "$as_dir" && as_dir=.
22322    for ac_exec_ext in '' $ac_executable_extensions; do
22323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22324    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22326    break 2
22327  fi
22328done
22329  done
22330IFS=$as_save_IFS
22331
22332  ;;
22333esac
22334fi
22335DSYMUTIL=$ac_cv_path_DSYMUTIL
22336if test -n "$DSYMUTIL"; then
22337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22338$as_echo "$DSYMUTIL" >&6; }
22339else
22340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22341$as_echo "no" >&6; }
22342fi
22343
22344
22345          if test "x$DSYMUTIL" = x; then
22346            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22347          fi
22348        else
22349          # Otherwise we believe it is a complete path. Use it as it is.
22350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22351$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22352          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22353$as_echo_n "checking for DSYMUTIL... " >&6; }
22354          if test ! -x "$tool_specified"; then
22355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22356$as_echo "not found" >&6; }
22357            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22358          fi
22359          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22360$as_echo "$tool_specified" >&6; }
22361        fi
22362      fi
22363    fi
22364
22365  fi
22366
22367
22368
22369  if test "x$DSYMUTIL" = x; then
22370    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22371  fi
22372
22373
22374
22375
22376
22377  # Publish this variable in the help.
22378
22379
22380  if [ -z "${XATTR+x}" ]; then
22381    # The variable is not set by user, try to locate tool using the code snippet
22382    for ac_prog in xattr
22383do
22384  # Extract the first word of "$ac_prog", so it can be a program name with args.
22385set dummy $ac_prog; ac_word=$2
22386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22387$as_echo_n "checking for $ac_word... " >&6; }
22388if ${ac_cv_path_XATTR+:} false; then :
22389  $as_echo_n "(cached) " >&6
22390else
22391  case $XATTR in
22392  [\\/]* | ?:[\\/]*)
22393  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22394  ;;
22395  *)
22396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22397for as_dir in $PATH
22398do
22399  IFS=$as_save_IFS
22400  test -z "$as_dir" && as_dir=.
22401    for ac_exec_ext in '' $ac_executable_extensions; do
22402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22403    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22405    break 2
22406  fi
22407done
22408  done
22409IFS=$as_save_IFS
22410
22411  ;;
22412esac
22413fi
22414XATTR=$ac_cv_path_XATTR
22415if test -n "$XATTR"; then
22416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22417$as_echo "$XATTR" >&6; }
22418else
22419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22420$as_echo "no" >&6; }
22421fi
22422
22423
22424  test -n "$XATTR" && break
22425done
22426
22427  else
22428    # The variable is set, but is it from the command line or the environment?
22429
22430    # Try to remove the string !XATTR! from our list.
22431    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22432    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22433      # If it failed, the variable was not from the command line. Ignore it,
22434      # but warn the user (except for BASH, which is always set by the calling BASH).
22435      if test "xXATTR" != xBASH; then
22436        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22437$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22438      fi
22439      # Try to locate tool using the code snippet
22440      for ac_prog in xattr
22441do
22442  # Extract the first word of "$ac_prog", so it can be a program name with args.
22443set dummy $ac_prog; ac_word=$2
22444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22445$as_echo_n "checking for $ac_word... " >&6; }
22446if ${ac_cv_path_XATTR+:} false; then :
22447  $as_echo_n "(cached) " >&6
22448else
22449  case $XATTR in
22450  [\\/]* | ?:[\\/]*)
22451  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22452  ;;
22453  *)
22454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22455for as_dir in $PATH
22456do
22457  IFS=$as_save_IFS
22458  test -z "$as_dir" && as_dir=.
22459    for ac_exec_ext in '' $ac_executable_extensions; do
22460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22461    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22463    break 2
22464  fi
22465done
22466  done
22467IFS=$as_save_IFS
22468
22469  ;;
22470esac
22471fi
22472XATTR=$ac_cv_path_XATTR
22473if test -n "$XATTR"; then
22474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22475$as_echo "$XATTR" >&6; }
22476else
22477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22478$as_echo "no" >&6; }
22479fi
22480
22481
22482  test -n "$XATTR" && break
22483done
22484
22485    else
22486      # If it succeeded, then it was overridden by the user. We will use it
22487      # for the tool.
22488
22489      # First remove it from the list of overridden variables, so we can test
22490      # for unknown variables in the end.
22491      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22492
22493      # Check if we try to supply an empty value
22494      if test "x$XATTR" = x; then
22495        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22496$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22498$as_echo_n "checking for XATTR... " >&6; }
22499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22500$as_echo "disabled" >&6; }
22501      else
22502        # Check if the provided tool contains a complete path.
22503        tool_specified="$XATTR"
22504        tool_basename="${tool_specified##*/}"
22505        if test "x$tool_basename" = "x$tool_specified"; then
22506          # A command without a complete path is provided, search $PATH.
22507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22508$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22509          # Extract the first word of "$tool_basename", so it can be a program name with args.
22510set dummy $tool_basename; ac_word=$2
22511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22512$as_echo_n "checking for $ac_word... " >&6; }
22513if ${ac_cv_path_XATTR+:} false; then :
22514  $as_echo_n "(cached) " >&6
22515else
22516  case $XATTR in
22517  [\\/]* | ?:[\\/]*)
22518  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22519  ;;
22520  *)
22521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22522for as_dir in $PATH
22523do
22524  IFS=$as_save_IFS
22525  test -z "$as_dir" && as_dir=.
22526    for ac_exec_ext in '' $ac_executable_extensions; do
22527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22528    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22530    break 2
22531  fi
22532done
22533  done
22534IFS=$as_save_IFS
22535
22536  ;;
22537esac
22538fi
22539XATTR=$ac_cv_path_XATTR
22540if test -n "$XATTR"; then
22541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22542$as_echo "$XATTR" >&6; }
22543else
22544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22545$as_echo "no" >&6; }
22546fi
22547
22548
22549          if test "x$XATTR" = x; then
22550            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22551          fi
22552        else
22553          # Otherwise we believe it is a complete path. Use it as it is.
22554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22555$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22556          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22557$as_echo_n "checking for XATTR... " >&6; }
22558          if test ! -x "$tool_specified"; then
22559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22560$as_echo "not found" >&6; }
22561            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22562          fi
22563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22564$as_echo "$tool_specified" >&6; }
22565        fi
22566      fi
22567    fi
22568
22569  fi
22570
22571
22572
22573  if test "x$XATTR" = x; then
22574    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22575  fi
22576
22577
22578
22579
22580  # Publish this variable in the help.
22581
22582
22583  if [ -z "${CODESIGN+x}" ]; then
22584    # The variable is not set by user, try to locate tool using the code snippet
22585    for ac_prog in codesign
22586do
22587  # Extract the first word of "$ac_prog", so it can be a program name with args.
22588set dummy $ac_prog; ac_word=$2
22589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22590$as_echo_n "checking for $ac_word... " >&6; }
22591if ${ac_cv_path_CODESIGN+:} false; then :
22592  $as_echo_n "(cached) " >&6
22593else
22594  case $CODESIGN in
22595  [\\/]* | ?:[\\/]*)
22596  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22597  ;;
22598  *)
22599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22600for as_dir in $PATH
22601do
22602  IFS=$as_save_IFS
22603  test -z "$as_dir" && as_dir=.
22604    for ac_exec_ext in '' $ac_executable_extensions; do
22605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22606    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22608    break 2
22609  fi
22610done
22611  done
22612IFS=$as_save_IFS
22613
22614  ;;
22615esac
22616fi
22617CODESIGN=$ac_cv_path_CODESIGN
22618if test -n "$CODESIGN"; then
22619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22620$as_echo "$CODESIGN" >&6; }
22621else
22622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22623$as_echo "no" >&6; }
22624fi
22625
22626
22627  test -n "$CODESIGN" && break
22628done
22629
22630  else
22631    # The variable is set, but is it from the command line or the environment?
22632
22633    # Try to remove the string !CODESIGN! from our list.
22634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22636      # If it failed, the variable was not from the command line. Ignore it,
22637      # but warn the user (except for BASH, which is always set by the calling BASH).
22638      if test "xCODESIGN" != xBASH; then
22639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22640$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22641      fi
22642      # Try to locate tool using the code snippet
22643      for ac_prog in codesign
22644do
22645  # Extract the first word of "$ac_prog", so it can be a program name with args.
22646set dummy $ac_prog; ac_word=$2
22647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22648$as_echo_n "checking for $ac_word... " >&6; }
22649if ${ac_cv_path_CODESIGN+:} false; then :
22650  $as_echo_n "(cached) " >&6
22651else
22652  case $CODESIGN in
22653  [\\/]* | ?:[\\/]*)
22654  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22655  ;;
22656  *)
22657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22658for as_dir in $PATH
22659do
22660  IFS=$as_save_IFS
22661  test -z "$as_dir" && as_dir=.
22662    for ac_exec_ext in '' $ac_executable_extensions; do
22663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22664    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22666    break 2
22667  fi
22668done
22669  done
22670IFS=$as_save_IFS
22671
22672  ;;
22673esac
22674fi
22675CODESIGN=$ac_cv_path_CODESIGN
22676if test -n "$CODESIGN"; then
22677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22678$as_echo "$CODESIGN" >&6; }
22679else
22680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22681$as_echo "no" >&6; }
22682fi
22683
22684
22685  test -n "$CODESIGN" && break
22686done
22687
22688    else
22689      # If it succeeded, then it was overridden by the user. We will use it
22690      # for the tool.
22691
22692      # First remove it from the list of overridden variables, so we can test
22693      # for unknown variables in the end.
22694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22695
22696      # Check if we try to supply an empty value
22697      if test "x$CODESIGN" = x; then
22698        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22699$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22701$as_echo_n "checking for CODESIGN... " >&6; }
22702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22703$as_echo "disabled" >&6; }
22704      else
22705        # Check if the provided tool contains a complete path.
22706        tool_specified="$CODESIGN"
22707        tool_basename="${tool_specified##*/}"
22708        if test "x$tool_basename" = "x$tool_specified"; then
22709          # A command without a complete path is provided, search $PATH.
22710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22711$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22712          # Extract the first word of "$tool_basename", so it can be a program name with args.
22713set dummy $tool_basename; ac_word=$2
22714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22715$as_echo_n "checking for $ac_word... " >&6; }
22716if ${ac_cv_path_CODESIGN+:} false; then :
22717  $as_echo_n "(cached) " >&6
22718else
22719  case $CODESIGN in
22720  [\\/]* | ?:[\\/]*)
22721  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22722  ;;
22723  *)
22724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22725for as_dir in $PATH
22726do
22727  IFS=$as_save_IFS
22728  test -z "$as_dir" && as_dir=.
22729    for ac_exec_ext in '' $ac_executable_extensions; do
22730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22731    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22733    break 2
22734  fi
22735done
22736  done
22737IFS=$as_save_IFS
22738
22739  ;;
22740esac
22741fi
22742CODESIGN=$ac_cv_path_CODESIGN
22743if test -n "$CODESIGN"; then
22744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22745$as_echo "$CODESIGN" >&6; }
22746else
22747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22748$as_echo "no" >&6; }
22749fi
22750
22751
22752          if test "x$CODESIGN" = x; then
22753            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22754          fi
22755        else
22756          # Otherwise we believe it is a complete path. Use it as it is.
22757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22758$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22759          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22760$as_echo_n "checking for CODESIGN... " >&6; }
22761          if test ! -x "$tool_specified"; then
22762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22763$as_echo "not found" >&6; }
22764            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22765          fi
22766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22767$as_echo "$tool_specified" >&6; }
22768        fi
22769      fi
22770    fi
22771
22772  fi
22773
22774
22775    if test "x$CODESIGN" != "x"; then
22776      # Verify that the openjdk_codesign certificate is present
22777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22778$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22779      rm -f codesign-testfile
22780      touch codesign-testfile
22781      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22782      rm -f codesign-testfile
22783      if test "x$CODESIGN" = x; then
22784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22785$as_echo "no" >&6; }
22786      else
22787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22788$as_echo "yes" >&6; }
22789      fi
22790    fi
22791
22792
22793
22794  # Publish this variable in the help.
22795
22796
22797  if [ -z "${SETFILE+x}" ]; then
22798    # The variable is not set by user, try to locate tool using the code snippet
22799    for ac_prog in SetFile
22800do
22801  # Extract the first word of "$ac_prog", so it can be a program name with args.
22802set dummy $ac_prog; ac_word=$2
22803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22804$as_echo_n "checking for $ac_word... " >&6; }
22805if ${ac_cv_path_SETFILE+:} false; then :
22806  $as_echo_n "(cached) " >&6
22807else
22808  case $SETFILE in
22809  [\\/]* | ?:[\\/]*)
22810  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22811  ;;
22812  *)
22813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22814for as_dir in $PATH
22815do
22816  IFS=$as_save_IFS
22817  test -z "$as_dir" && as_dir=.
22818    for ac_exec_ext in '' $ac_executable_extensions; do
22819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22820    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22822    break 2
22823  fi
22824done
22825  done
22826IFS=$as_save_IFS
22827
22828  ;;
22829esac
22830fi
22831SETFILE=$ac_cv_path_SETFILE
22832if test -n "$SETFILE"; then
22833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22834$as_echo "$SETFILE" >&6; }
22835else
22836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22837$as_echo "no" >&6; }
22838fi
22839
22840
22841  test -n "$SETFILE" && break
22842done
22843
22844  else
22845    # The variable is set, but is it from the command line or the environment?
22846
22847    # Try to remove the string !SETFILE! from our list.
22848    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22849    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22850      # If it failed, the variable was not from the command line. Ignore it,
22851      # but warn the user (except for BASH, which is always set by the calling BASH).
22852      if test "xSETFILE" != xBASH; then
22853        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22854$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22855      fi
22856      # Try to locate tool using the code snippet
22857      for ac_prog in SetFile
22858do
22859  # Extract the first word of "$ac_prog", so it can be a program name with args.
22860set dummy $ac_prog; ac_word=$2
22861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22862$as_echo_n "checking for $ac_word... " >&6; }
22863if ${ac_cv_path_SETFILE+:} false; then :
22864  $as_echo_n "(cached) " >&6
22865else
22866  case $SETFILE in
22867  [\\/]* | ?:[\\/]*)
22868  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22869  ;;
22870  *)
22871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22872for as_dir in $PATH
22873do
22874  IFS=$as_save_IFS
22875  test -z "$as_dir" && as_dir=.
22876    for ac_exec_ext in '' $ac_executable_extensions; do
22877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22878    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22880    break 2
22881  fi
22882done
22883  done
22884IFS=$as_save_IFS
22885
22886  ;;
22887esac
22888fi
22889SETFILE=$ac_cv_path_SETFILE
22890if test -n "$SETFILE"; then
22891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22892$as_echo "$SETFILE" >&6; }
22893else
22894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22895$as_echo "no" >&6; }
22896fi
22897
22898
22899  test -n "$SETFILE" && break
22900done
22901
22902    else
22903      # If it succeeded, then it was overridden by the user. We will use it
22904      # for the tool.
22905
22906      # First remove it from the list of overridden variables, so we can test
22907      # for unknown variables in the end.
22908      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22909
22910      # Check if we try to supply an empty value
22911      if test "x$SETFILE" = x; then
22912        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22913$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22915$as_echo_n "checking for SETFILE... " >&6; }
22916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22917$as_echo "disabled" >&6; }
22918      else
22919        # Check if the provided tool contains a complete path.
22920        tool_specified="$SETFILE"
22921        tool_basename="${tool_specified##*/}"
22922        if test "x$tool_basename" = "x$tool_specified"; then
22923          # A command without a complete path is provided, search $PATH.
22924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22925$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22926          # Extract the first word of "$tool_basename", so it can be a program name with args.
22927set dummy $tool_basename; ac_word=$2
22928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22929$as_echo_n "checking for $ac_word... " >&6; }
22930if ${ac_cv_path_SETFILE+:} false; then :
22931  $as_echo_n "(cached) " >&6
22932else
22933  case $SETFILE in
22934  [\\/]* | ?:[\\/]*)
22935  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22936  ;;
22937  *)
22938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22939for as_dir in $PATH
22940do
22941  IFS=$as_save_IFS
22942  test -z "$as_dir" && as_dir=.
22943    for ac_exec_ext in '' $ac_executable_extensions; do
22944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22945    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22947    break 2
22948  fi
22949done
22950  done
22951IFS=$as_save_IFS
22952
22953  ;;
22954esac
22955fi
22956SETFILE=$ac_cv_path_SETFILE
22957if test -n "$SETFILE"; then
22958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22959$as_echo "$SETFILE" >&6; }
22960else
22961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22962$as_echo "no" >&6; }
22963fi
22964
22965
22966          if test "x$SETFILE" = x; then
22967            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22968          fi
22969        else
22970          # Otherwise we believe it is a complete path. Use it as it is.
22971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22972$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22973          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22974$as_echo_n "checking for SETFILE... " >&6; }
22975          if test ! -x "$tool_specified"; then
22976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22977$as_echo "not found" >&6; }
22978            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22979          fi
22980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22981$as_echo "$tool_specified" >&6; }
22982        fi
22983      fi
22984    fi
22985
22986  fi
22987
22988
22989
22990  if test "x$SETFILE" = x; then
22991    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22992  fi
22993
22994
22995  fi
22996
22997
22998  # Test if bash supports pipefail.
22999  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23000$as_echo_n "checking if bash supports pipefail... " >&6; }
23001  if ${BASH} -c 'set -o pipefail'; then
23002    BASH_ARGS="$BASH_ARGS -o pipefail"
23003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23004$as_echo "yes" >&6; }
23005  else
23006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23007$as_echo "no" >&6; }
23008  fi
23009
23010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23011$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23012  if ${BASH} -e -c 'true'; then
23013    BASH_ARGS="$BASH_ARGS -e"
23014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23015$as_echo "yes" >&6; }
23016  else
23017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23018$as_echo "no" >&6; }
23019  fi
23020
23021
23022
23023
23024# Check if pkg-config is available.
23025
23026
23027if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23028	if test -n "$ac_tool_prefix"; then
23029  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23030set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23032$as_echo_n "checking for $ac_word... " >&6; }
23033if ${ac_cv_path_PKG_CONFIG+:} false; then :
23034  $as_echo_n "(cached) " >&6
23035else
23036  case $PKG_CONFIG in
23037  [\\/]* | ?:[\\/]*)
23038  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23039  ;;
23040  *)
23041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23042for as_dir in $PATH
23043do
23044  IFS=$as_save_IFS
23045  test -z "$as_dir" && as_dir=.
23046    for ac_exec_ext in '' $ac_executable_extensions; do
23047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23048    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23050    break 2
23051  fi
23052done
23053  done
23054IFS=$as_save_IFS
23055
23056  ;;
23057esac
23058fi
23059PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23060if test -n "$PKG_CONFIG"; then
23061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23062$as_echo "$PKG_CONFIG" >&6; }
23063else
23064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23065$as_echo "no" >&6; }
23066fi
23067
23068
23069fi
23070if test -z "$ac_cv_path_PKG_CONFIG"; then
23071  ac_pt_PKG_CONFIG=$PKG_CONFIG
23072  # Extract the first word of "pkg-config", so it can be a program name with args.
23073set dummy pkg-config; ac_word=$2
23074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23075$as_echo_n "checking for $ac_word... " >&6; }
23076if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23077  $as_echo_n "(cached) " >&6
23078else
23079  case $ac_pt_PKG_CONFIG in
23080  [\\/]* | ?:[\\/]*)
23081  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23082  ;;
23083  *)
23084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23085for as_dir in $PATH
23086do
23087  IFS=$as_save_IFS
23088  test -z "$as_dir" && as_dir=.
23089    for ac_exec_ext in '' $ac_executable_extensions; do
23090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23091    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23093    break 2
23094  fi
23095done
23096  done
23097IFS=$as_save_IFS
23098
23099  ;;
23100esac
23101fi
23102ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23103if test -n "$ac_pt_PKG_CONFIG"; then
23104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23105$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23106else
23107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23108$as_echo "no" >&6; }
23109fi
23110
23111  if test "x$ac_pt_PKG_CONFIG" = x; then
23112    PKG_CONFIG=""
23113  else
23114    case $cross_compiling:$ac_tool_warned in
23115yes:)
23116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23118ac_tool_warned=yes ;;
23119esac
23120    PKG_CONFIG=$ac_pt_PKG_CONFIG
23121  fi
23122else
23123  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23124fi
23125
23126fi
23127if test -n "$PKG_CONFIG"; then
23128	_pkg_min_version=0.9.0
23129	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23130$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23131	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23132		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23133$as_echo "yes" >&6; }
23134	else
23135		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23136$as_echo "no" >&6; }
23137		PKG_CONFIG=""
23138	fi
23139
23140fi
23141
23142# After basic tools have been setup, we can check build os specific details.
23143
23144  ###############################################################################
23145
23146  # Note that this is the build platform OS version!
23147
23148  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23149  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23150  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23151  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23152
23153
23154
23155
23156
23157# Misc basic settings
23158
23159
23160# Check whether --with-default-make-target was given.
23161if test "${with_default_make_target+set}" = set; then :
23162  withval=$with_default_make_target;
23163fi
23164
23165  if test "x$with_default_make_target" = "x" \
23166      || test "x$with_default_make_target" = "xyes"; then
23167    DEFAULT_MAKE_TARGET="exploded-image"
23168  elif test "x$with_default_make_target" = "xno"; then
23169    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23170  else
23171    DEFAULT_MAKE_TARGET="$with_default_make_target"
23172  fi
23173
23174
23175
23176
23177###############################################################################
23178#
23179# Determine OpenJDK variants, options and version numbers.
23180#
23181###############################################################################
23182
23183# We need build & target for this.
23184
23185  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23186  # We always build headless support.
23187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23188$as_echo_n "checking headful support... " >&6; }
23189  # Check whether --enable-headful was given.
23190if test "${enable_headful+set}" = set; then :
23191  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23192else
23193  SUPPORT_HEADFUL=yes
23194fi
23195
23196
23197  SUPPORT_HEADLESS=yes
23198  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23199
23200  if test "x$SUPPORT_HEADFUL" = xyes; then
23201    # We are building both headful and headless.
23202    headful_msg="include support for both headful and headless"
23203  fi
23204
23205  if test "x$SUPPORT_HEADFUL" = xno; then
23206    # Thus we are building headless only.
23207    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23208    headful_msg="headless only"
23209  fi
23210
23211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23212$as_echo "$headful_msg" >&6; }
23213
23214
23215
23216
23217
23218  # Choose cacerts source file
23219
23220# Check whether --with-cacerts-file was given.
23221if test "${with_cacerts_file+set}" = set; then :
23222  withval=$with_cacerts_file;
23223fi
23224
23225  if test "x$with_cacerts_file" != x; then
23226    CACERTS_FILE=$with_cacerts_file
23227  fi
23228
23229
23230  # Enable or disable unlimited crypto
23231  # Check whether --enable-unlimited-crypto was given.
23232if test "${enable_unlimited_crypto+set}" = set; then :
23233  enableval=$enable_unlimited_crypto;
23234else
23235  enable_unlimited_crypto=no
23236fi
23237
23238  if test "x$enable_unlimited_crypto" = "xyes"; then
23239    UNLIMITED_CRYPTO=true
23240  else
23241    UNLIMITED_CRYPTO=false
23242  fi
23243
23244
23245  # Compress jars
23246  COMPRESS_JARS=false
23247
23248
23249
23250  # Setup default copyright year. Mostly overridden when building close to a new year.
23251
23252# Check whether --with-copyright-year was given.
23253if test "${with_copyright_year+set}" = set; then :
23254  withval=$with_copyright_year;
23255fi
23256
23257  if test "x$with_copyright_year" = xyes; then
23258    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23259  elif test "x$with_copyright_year" != x; then
23260    COPYRIGHT_YEAR="$with_copyright_year"
23261  else
23262    COPYRIGHT_YEAR=`date +'%Y'`
23263  fi
23264
23265
23266
23267  # Control wether Hotspot runs Queens test after build.
23268  # Check whether --enable-hotspot-test-in-build was given.
23269if test "${enable_hotspot_test_in_build+set}" = set; then :
23270  enableval=$enable_hotspot_test_in_build;
23271else
23272  enable_hotspot_test_in_build=no
23273fi
23274
23275  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23276    TEST_IN_BUILD=true
23277  else
23278    TEST_IN_BUILD=false
23279  fi
23280
23281
23282
23283  # Warn user that old version arguments are deprecated.
23284
23285
23286# Check whether --with-milestone was given.
23287if test "${with_milestone+set}" = set; then :
23288  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23289$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23290fi
23291
23292
23293
23294
23295# Check whether --with-update-version was given.
23296if test "${with_update_version+set}" = set; then :
23297  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23298$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23299fi
23300
23301
23302
23303
23304# Check whether --with-user-release-suffix was given.
23305if test "${with_user_release_suffix+set}" = set; then :
23306  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
23307$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23308fi
23309
23310
23311
23312
23313# Check whether --with-build-number was given.
23314if test "${with_build_number+set}" = set; then :
23315  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23316$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23317fi
23318
23319
23320
23321  # Source the version numbers file
23322  . $AUTOCONF_DIR/version-numbers
23323
23324  # Some non-version number information is set in that file
23325
23326
23327
23328
23329
23330
23331
23332
23333  # Override version from arguments
23334
23335  # If --with-version-string is set, process it first. It is possible to
23336  # override parts with more specific flags, since these are processed later.
23337
23338# Check whether --with-version-string was given.
23339if test "${with_version_string+set}" = set; then :
23340  withval=$with_version_string;
23341fi
23342
23343  if test "x$with_version_string" = xyes; then
23344    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23345  elif test "x$with_version_string" != x; then
23346    # Additional [] needed to keep m4 from mangling shell constructs.
23347    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23348      VERSION_MAJOR=${BASH_REMATCH[1]}
23349      VERSION_MINOR=${BASH_REMATCH[3]}
23350      VERSION_SECURITY=${BASH_REMATCH[5]}
23351      VERSION_PATCH=${BASH_REMATCH[7]}
23352      VERSION_PRE=${BASH_REMATCH[9]}
23353      version_plus_separator=${BASH_REMATCH[11]}
23354      VERSION_BUILD=${BASH_REMATCH[12]}
23355      VERSION_OPT=${BASH_REMATCH[14]}
23356      # Unspecified numerical fields are interpreted as 0.
23357      if test "x$VERSION_MINOR" = x; then
23358        VERSION_MINOR=0
23359      fi
23360      if test "x$VERSION_SECURITY" = x; then
23361        VERSION_SECURITY=0
23362      fi
23363      if test "x$VERSION_PATCH" = x; then
23364        VERSION_PATCH=0
23365      fi
23366      if test "x$version_plus_separator" != x \
23367          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23368        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23369      fi
23370      # Stop the version part process from setting default values.
23371      # We still allow them to explicitely override though.
23372      NO_DEFAULT_VERSION_PARTS=true
23373    else
23374      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23375    fi
23376  fi
23377
23378
23379# Check whether --with-version-pre was given.
23380if test "${with_version_pre+set}" = set; then :
23381  withval=$with_version_pre; with_version_pre_present=true
23382else
23383  with_version_pre_present=false
23384fi
23385
23386
23387  if test "x$with_version_pre_present" = xtrue; then
23388    if test "x$with_version_pre" = xyes; then
23389      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23390    elif test "x$with_version_pre" = xno; then
23391      # Interpret --without-* as empty string instead of the literal "no"
23392      VERSION_PRE=
23393    else
23394      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23395       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23396      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23398$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23399      fi
23400    fi
23401  else
23402    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23403      # Default is to use "internal" as pre
23404      VERSION_PRE="internal"
23405    fi
23406  fi
23407
23408
23409# Check whether --with-version-opt was given.
23410if test "${with_version_opt+set}" = set; then :
23411  withval=$with_version_opt; with_version_opt_present=true
23412else
23413  with_version_opt_present=false
23414fi
23415
23416
23417  if test "x$with_version_opt_present" = xtrue; then
23418    if test "x$with_version_opt" = xyes; then
23419      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23420    elif test "x$with_version_opt" = xno; then
23421      # Interpret --without-* as empty string instead of the literal "no"
23422      VERSION_OPT=
23423    else
23424      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23425       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23426      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23428$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23429      fi
23430    fi
23431  else
23432    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23433      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23434      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23435      # Outer [ ] to quote m4.
23436       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23437       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23438      VERSION_OPT="$timestamp.$username.$basedirname"
23439    fi
23440  fi
23441
23442
23443# Check whether --with-version-build was given.
23444if test "${with_version_build+set}" = set; then :
23445  withval=$with_version_build; with_version_build_present=true
23446else
23447  with_version_build_present=false
23448fi
23449
23450
23451  if test "x$with_version_build_present" = xtrue; then
23452    if test "x$with_version_build" = xyes; then
23453      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23454    elif test "x$with_version_build" = xno; then
23455      # Interpret --without-* as empty string instead of the literal "no"
23456      VERSION_BUILD=
23457    elif test "x$with_version_build" = x; then
23458      VERSION_BUILD=
23459    else
23460
23461  # Additional [] needed to keep m4 from mangling shell constructs.
23462  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23463    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23464  fi
23465  # Extract the version number without leading zeros.
23466  cleaned_value=${BASH_REMATCH[1]}
23467  if test "x$cleaned_value" = x; then
23468    # Special case for zero
23469    cleaned_value=${BASH_REMATCH[2]}
23470  fi
23471
23472  if test $cleaned_value -gt 255; then
23473    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23474  fi
23475  if test "x$cleaned_value" != "x$with_version_build"; then
23476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23477$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23478  fi
23479  VERSION_BUILD=$cleaned_value
23480
23481    fi
23482  else
23483    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23484      # Default is to not have a build number.
23485      VERSION_BUILD=""
23486      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23487      VERSION_BUILD=0
23488    fi
23489  fi
23490
23491
23492# Check whether --with-version-major was given.
23493if test "${with_version_major+set}" = set; then :
23494  withval=$with_version_major; with_version_major_present=true
23495else
23496  with_version_major_present=false
23497fi
23498
23499
23500  if test "x$with_version_major_present" = xtrue; then
23501    if test "x$with_version_major" = xyes; then
23502      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23503    else
23504
23505  # Additional [] needed to keep m4 from mangling shell constructs.
23506  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23507    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23508  fi
23509  # Extract the version number without leading zeros.
23510  cleaned_value=${BASH_REMATCH[1]}
23511  if test "x$cleaned_value" = x; then
23512    # Special case for zero
23513    cleaned_value=${BASH_REMATCH[2]}
23514  fi
23515
23516  if test $cleaned_value -gt 255; then
23517    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23518  fi
23519  if test "x$cleaned_value" != "x$with_version_major"; then
23520    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23521$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23522  fi
23523  VERSION_MAJOR=$cleaned_value
23524
23525    fi
23526  else
23527    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23528      # Default is to get value from version-numbers
23529      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23530    fi
23531  fi
23532
23533
23534# Check whether --with-version-minor was given.
23535if test "${with_version_minor+set}" = set; then :
23536  withval=$with_version_minor; with_version_minor_present=true
23537else
23538  with_version_minor_present=false
23539fi
23540
23541
23542  if test "x$with_version_minor_present" = xtrue; then
23543    if test "x$with_version_minor" = xyes; then
23544      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23545    elif test "x$with_version_minor" = xno; then
23546      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23547      VERSION_MINOR=0
23548    elif test "x$with_version_minor" = x; then
23549      VERSION_MINOR=0
23550    else
23551
23552  # Additional [] needed to keep m4 from mangling shell constructs.
23553  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23554    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23555  fi
23556  # Extract the version number without leading zeros.
23557  cleaned_value=${BASH_REMATCH[1]}
23558  if test "x$cleaned_value" = x; then
23559    # Special case for zero
23560    cleaned_value=${BASH_REMATCH[2]}
23561  fi
23562
23563  if test $cleaned_value -gt 255; then
23564    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23565  fi
23566  if test "x$cleaned_value" != "x$with_version_minor"; then
23567    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23568$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23569  fi
23570  VERSION_MINOR=$cleaned_value
23571
23572    fi
23573  else
23574    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23575      # Default is 0, if unspecified
23576      VERSION_MINOR=0
23577    fi
23578  fi
23579
23580
23581# Check whether --with-version-security was given.
23582if test "${with_version_security+set}" = set; then :
23583  withval=$with_version_security; with_version_security_present=true
23584else
23585  with_version_security_present=false
23586fi
23587
23588
23589  if test "x$with_version_security_present" = xtrue; then
23590    if test "x$with_version_security" = xyes; then
23591      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23592    elif test "x$with_version_security" = xno; then
23593      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23594      VERSION_SECURITY=0
23595    elif test "x$with_version_security" = x; then
23596      VERSION_SECURITY=0
23597    else
23598
23599  # Additional [] needed to keep m4 from mangling shell constructs.
23600  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23601    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23602  fi
23603  # Extract the version number without leading zeros.
23604  cleaned_value=${BASH_REMATCH[1]}
23605  if test "x$cleaned_value" = x; then
23606    # Special case for zero
23607    cleaned_value=${BASH_REMATCH[2]}
23608  fi
23609
23610  if test $cleaned_value -gt 255; then
23611    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23612  fi
23613  if test "x$cleaned_value" != "x$with_version_security"; then
23614    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23615$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23616  fi
23617  VERSION_SECURITY=$cleaned_value
23618
23619    fi
23620  else
23621    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23622      # Default is 0, if unspecified
23623      VERSION_SECURITY=0
23624    fi
23625  fi
23626
23627
23628# Check whether --with-version-patch was given.
23629if test "${with_version_patch+set}" = set; then :
23630  withval=$with_version_patch; with_version_patch_present=true
23631else
23632  with_version_patch_present=false
23633fi
23634
23635
23636  if test "x$with_version_patch_present" = xtrue; then
23637    if test "x$with_version_patch" = xyes; then
23638      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23639    elif test "x$with_version_patch" = xno; then
23640      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23641      VERSION_PATCH=0
23642    elif test "x$with_version_patch" = x; then
23643      VERSION_PATCH=0
23644    else
23645
23646  # Additional [] needed to keep m4 from mangling shell constructs.
23647  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23648    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23649  fi
23650  # Extract the version number without leading zeros.
23651  cleaned_value=${BASH_REMATCH[1]}
23652  if test "x$cleaned_value" = x; then
23653    # Special case for zero
23654    cleaned_value=${BASH_REMATCH[2]}
23655  fi
23656
23657  if test $cleaned_value -gt 255; then
23658    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23659  fi
23660  if test "x$cleaned_value" != "x$with_version_patch"; then
23661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23662$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23663  fi
23664  VERSION_PATCH=$cleaned_value
23665
23666    fi
23667  else
23668    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23669      # Default is 0, if unspecified
23670      VERSION_PATCH=0
23671    fi
23672  fi
23673
23674  # Calculate derived version properties
23675
23676  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23677  if test "x$VERSION_PRE" = x; then
23678    VERSION_IS_GA=true
23679  else
23680    VERSION_IS_GA=false
23681  fi
23682
23683  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23684  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23685
23686  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23687  # Strip trailing zeroes from stripped_version_number
23688  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23689  VERSION_NUMBER=$stripped_version_number
23690
23691  # The complete version string, with additional build information
23692  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23693    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23694  else
23695    # If either build or opt is set, we need a + separator
23696    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23697  fi
23698
23699  # The short version string, just VERSION_NUMBER and PRE, if present.
23700  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23701
23702  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23703$as_echo_n "checking for version string... " >&6; }
23704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23705$as_echo "$VERSION_STRING" >&6; }
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721###############################################################################
23722#
23723# Setup BootJDK, used to bootstrap the build.
23724#
23725###############################################################################
23726
23727
23728  BOOT_JDK_FOUND=no
23729
23730# Check whether --with-boot-jdk was given.
23731if test "${with_boot_jdk+set}" = set; then :
23732  withval=$with_boot_jdk;
23733fi
23734
23735
23736  # We look for the Boot JDK through various means, going from more certain to
23737  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23738  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23739  # must check if this is indeed valid; otherwise we'll continue looking.
23740
23741  # Test: Is bootjdk explicitely set by command line arguments?
23742
23743  if test "x$BOOT_JDK_FOUND" = xno; then
23744    # Now execute the test
23745
23746  if test "x$with_boot_jdk" != x; then
23747    BOOT_JDK=$with_boot_jdk
23748    BOOT_JDK_FOUND=maybe
23749    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23750$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23751  fi
23752
23753
23754    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23755    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23756      # Do we have a bin/java?
23757      if test ! -x "$BOOT_JDK/bin/java"; then
23758        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23760        BOOT_JDK_FOUND=no
23761      else
23762        # Do we have a bin/javac?
23763        if test ! -x "$BOOT_JDK/bin/javac"; then
23764          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23766          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23767$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23768          BOOT_JDK_FOUND=no
23769        else
23770          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23771          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23772
23773          # Extra M4 quote needed to protect [] in grep expression.
23774          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23775          if test "x$FOUND_CORRECT_VERSION" = x; then
23776            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23778            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23779$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23780            BOOT_JDK_FOUND=no
23781          else
23782            # We're done! :-)
23783            BOOT_JDK_FOUND=yes
23784
23785  # Only process if variable expands to non-empty
23786
23787  if test "x$BOOT_JDK" != x; then
23788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23789
23790  # Input might be given as Windows format, start by converting to
23791  # unix format.
23792  path="$BOOT_JDK"
23793  new_path=`$CYGPATH -u "$path"`
23794
23795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23798  # "foo.exe" is OK but "foo" is an error.
23799  #
23800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23801  # It is also a way to make sure we got the proper file name for the real test later on.
23802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23803  if test "x$test_shortpath" = x; then
23804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23806    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23807  fi
23808
23809  # Call helper function which possibly converts this using DOS-style short mode.
23810  # If so, the updated path is stored in $new_path.
23811
23812  input_path="$new_path"
23813  # Check if we need to convert this using DOS-style short mode. If the path
23814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23815  # take no chances and rewrite it.
23816  # Note: m4 eats our [], so we need to use [ and ] instead.
23817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23818  if test "x$has_forbidden_chars" != x; then
23819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23823      # Going to short mode and back again did indeed matter. Since short mode is
23824      # case insensitive, let's make it lowercase to improve readability.
23825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23826      # Now convert it back to Unix-style (cygpath)
23827      input_path=`$CYGPATH -u "$shortmode_path"`
23828      new_path="$input_path"
23829    fi
23830  fi
23831
23832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23833  if test "x$test_cygdrive_prefix" = x; then
23834    # As a simple fix, exclude /usr/bin since it's not a real path.
23835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23837      # a path prefixed by /cygdrive for fixpath to work.
23838      new_path="$CYGWIN_ROOT_PATH$input_path"
23839    fi
23840  fi
23841
23842
23843  if test "x$path" != "x$new_path"; then
23844    BOOT_JDK="$new_path"
23845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23847  fi
23848
23849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23850
23851  path="$BOOT_JDK"
23852  has_colon=`$ECHO $path | $GREP ^.:`
23853  new_path="$path"
23854  if test "x$has_colon" = x; then
23855    # Not in mixed or Windows style, start by that.
23856    new_path=`cmd //c echo $path`
23857  fi
23858
23859
23860  input_path="$new_path"
23861  # Check if we need to convert this using DOS-style short mode. If the path
23862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23863  # take no chances and rewrite it.
23864  # Note: m4 eats our [], so we need to use [ and ] instead.
23865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23866  if test "x$has_forbidden_chars" != x; then
23867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23869  fi
23870
23871
23872  windows_path="$new_path"
23873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23874    unix_path=`$CYGPATH -u "$windows_path"`
23875    new_path="$unix_path"
23876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23878    new_path="$unix_path"
23879  fi
23880
23881  if test "x$path" != "x$new_path"; then
23882    BOOT_JDK="$new_path"
23883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23885  fi
23886
23887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23889
23890    else
23891      # We're on a unix platform. Hooray! :)
23892      path="$BOOT_JDK"
23893      has_space=`$ECHO "$path" | $GREP " "`
23894      if test "x$has_space" != x; then
23895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23898      fi
23899
23900      # Use eval to expand a potential ~
23901      eval path="$path"
23902      if test ! -f "$path" && test ! -d "$path"; then
23903        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23904      fi
23905
23906      if test -d "$path"; then
23907        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23908      else
23909        dir="`$DIRNAME "$path"`"
23910        base="`$BASENAME "$path"`"
23911        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23912      fi
23913    fi
23914  fi
23915
23916            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23917$as_echo_n "checking for Boot JDK... " >&6; }
23918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23919$as_echo "$BOOT_JDK" >&6; }
23920            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23921$as_echo_n "checking Boot JDK version... " >&6; }
23922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23924$as_echo "$BOOT_JDK_VERSION" >&6; }
23925          fi # end check jdk version
23926        fi # end check javac
23927      fi # end check java
23928    fi # end check boot jdk found
23929  fi
23930
23931  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23932    # Having specified an argument which is incorrect will produce an instant failure;
23933    # we should not go on looking
23934    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23935  fi
23936
23937  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23938
23939  if test "x$BOOT_JDK_FOUND" = xno; then
23940    # Now execute the test
23941
23942  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23943    # First check at user selected default
23944
23945  if test "x$BOOT_JDK_FOUND" = xno; then
23946    # Now execute the test
23947
23948  if test -x /usr/libexec/java_home; then
23949    BOOT_JDK=`/usr/libexec/java_home `
23950    BOOT_JDK_FOUND=maybe
23951    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23952$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23953  fi
23954
23955
23956    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23957    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23958      # Do we have a bin/java?
23959      if test ! -x "$BOOT_JDK/bin/java"; then
23960        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23962        BOOT_JDK_FOUND=no
23963      else
23964        # Do we have a bin/javac?
23965        if test ! -x "$BOOT_JDK/bin/javac"; then
23966          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23968          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23969$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23970          BOOT_JDK_FOUND=no
23971        else
23972          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23973          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23974
23975          # Extra M4 quote needed to protect [] in grep expression.
23976          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23977          if test "x$FOUND_CORRECT_VERSION" = x; then
23978            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23980            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23981$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23982            BOOT_JDK_FOUND=no
23983          else
23984            # We're done! :-)
23985            BOOT_JDK_FOUND=yes
23986
23987  # Only process if variable expands to non-empty
23988
23989  if test "x$BOOT_JDK" != x; then
23990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23991
23992  # Input might be given as Windows format, start by converting to
23993  # unix format.
23994  path="$BOOT_JDK"
23995  new_path=`$CYGPATH -u "$path"`
23996
23997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24000  # "foo.exe" is OK but "foo" is an error.
24001  #
24002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24003  # It is also a way to make sure we got the proper file name for the real test later on.
24004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24005  if test "x$test_shortpath" = x; then
24006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24007$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24008    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24009  fi
24010
24011  # Call helper function which possibly converts this using DOS-style short mode.
24012  # If so, the updated path is stored in $new_path.
24013
24014  input_path="$new_path"
24015  # Check if we need to convert this using DOS-style short mode. If the path
24016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24017  # take no chances and rewrite it.
24018  # Note: m4 eats our [], so we need to use [ and ] instead.
24019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24020  if test "x$has_forbidden_chars" != x; then
24021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24025      # Going to short mode and back again did indeed matter. Since short mode is
24026      # case insensitive, let's make it lowercase to improve readability.
24027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24028      # Now convert it back to Unix-style (cygpath)
24029      input_path=`$CYGPATH -u "$shortmode_path"`
24030      new_path="$input_path"
24031    fi
24032  fi
24033
24034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24035  if test "x$test_cygdrive_prefix" = x; then
24036    # As a simple fix, exclude /usr/bin since it's not a real path.
24037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24039      # a path prefixed by /cygdrive for fixpath to work.
24040      new_path="$CYGWIN_ROOT_PATH$input_path"
24041    fi
24042  fi
24043
24044
24045  if test "x$path" != "x$new_path"; then
24046    BOOT_JDK="$new_path"
24047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24048$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24049  fi
24050
24051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24052
24053  path="$BOOT_JDK"
24054  has_colon=`$ECHO $path | $GREP ^.:`
24055  new_path="$path"
24056  if test "x$has_colon" = x; then
24057    # Not in mixed or Windows style, start by that.
24058    new_path=`cmd //c echo $path`
24059  fi
24060
24061
24062  input_path="$new_path"
24063  # Check if we need to convert this using DOS-style short mode. If the path
24064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24065  # take no chances and rewrite it.
24066  # Note: m4 eats our [], so we need to use [ and ] instead.
24067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24068  if test "x$has_forbidden_chars" != x; then
24069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24071  fi
24072
24073
24074  windows_path="$new_path"
24075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24076    unix_path=`$CYGPATH -u "$windows_path"`
24077    new_path="$unix_path"
24078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24080    new_path="$unix_path"
24081  fi
24082
24083  if test "x$path" != "x$new_path"; then
24084    BOOT_JDK="$new_path"
24085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24087  fi
24088
24089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24091
24092    else
24093      # We're on a unix platform. Hooray! :)
24094      path="$BOOT_JDK"
24095      has_space=`$ECHO "$path" | $GREP " "`
24096      if test "x$has_space" != x; then
24097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24099        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24100      fi
24101
24102      # Use eval to expand a potential ~
24103      eval path="$path"
24104      if test ! -f "$path" && test ! -d "$path"; then
24105        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24106      fi
24107
24108      if test -d "$path"; then
24109        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24110      else
24111        dir="`$DIRNAME "$path"`"
24112        base="`$BASENAME "$path"`"
24113        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24114      fi
24115    fi
24116  fi
24117
24118            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24119$as_echo_n "checking for Boot JDK... " >&6; }
24120            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24121$as_echo "$BOOT_JDK" >&6; }
24122            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24123$as_echo_n "checking Boot JDK version... " >&6; }
24124            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24125            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24126$as_echo "$BOOT_JDK_VERSION" >&6; }
24127          fi # end check jdk version
24128        fi # end check javac
24129      fi # end check java
24130    fi # end check boot jdk found
24131  fi
24132
24133    # If that did not work out (e.g. too old), try explicit versions instead
24134
24135  if test "x$BOOT_JDK_FOUND" = xno; then
24136    # Now execute the test
24137
24138  if test -x /usr/libexec/java_home; then
24139    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24140    BOOT_JDK_FOUND=maybe
24141    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24142$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24143  fi
24144
24145
24146    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24147    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24148      # Do we have a bin/java?
24149      if test ! -x "$BOOT_JDK/bin/java"; then
24150        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24152        BOOT_JDK_FOUND=no
24153      else
24154        # Do we have a bin/javac?
24155        if test ! -x "$BOOT_JDK/bin/javac"; then
24156          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24158          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24159$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24160          BOOT_JDK_FOUND=no
24161        else
24162          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24163          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24164
24165          # Extra M4 quote needed to protect [] in grep expression.
24166          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24167          if test "x$FOUND_CORRECT_VERSION" = x; then
24168            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24170            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24171$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24172            BOOT_JDK_FOUND=no
24173          else
24174            # We're done! :-)
24175            BOOT_JDK_FOUND=yes
24176
24177  # Only process if variable expands to non-empty
24178
24179  if test "x$BOOT_JDK" != x; then
24180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24181
24182  # Input might be given as Windows format, start by converting to
24183  # unix format.
24184  path="$BOOT_JDK"
24185  new_path=`$CYGPATH -u "$path"`
24186
24187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24190  # "foo.exe" is OK but "foo" is an error.
24191  #
24192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24193  # It is also a way to make sure we got the proper file name for the real test later on.
24194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24195  if test "x$test_shortpath" = x; then
24196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24198    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24199  fi
24200
24201  # Call helper function which possibly converts this using DOS-style short mode.
24202  # If so, the updated path is stored in $new_path.
24203
24204  input_path="$new_path"
24205  # Check if we need to convert this using DOS-style short mode. If the path
24206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24207  # take no chances and rewrite it.
24208  # Note: m4 eats our [], so we need to use [ and ] instead.
24209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24210  if test "x$has_forbidden_chars" != x; then
24211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24215      # Going to short mode and back again did indeed matter. Since short mode is
24216      # case insensitive, let's make it lowercase to improve readability.
24217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24218      # Now convert it back to Unix-style (cygpath)
24219      input_path=`$CYGPATH -u "$shortmode_path"`
24220      new_path="$input_path"
24221    fi
24222  fi
24223
24224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24225  if test "x$test_cygdrive_prefix" = x; then
24226    # As a simple fix, exclude /usr/bin since it's not a real path.
24227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24229      # a path prefixed by /cygdrive for fixpath to work.
24230      new_path="$CYGWIN_ROOT_PATH$input_path"
24231    fi
24232  fi
24233
24234
24235  if test "x$path" != "x$new_path"; then
24236    BOOT_JDK="$new_path"
24237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24238$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24239  fi
24240
24241    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24242
24243  path="$BOOT_JDK"
24244  has_colon=`$ECHO $path | $GREP ^.:`
24245  new_path="$path"
24246  if test "x$has_colon" = x; then
24247    # Not in mixed or Windows style, start by that.
24248    new_path=`cmd //c echo $path`
24249  fi
24250
24251
24252  input_path="$new_path"
24253  # Check if we need to convert this using DOS-style short mode. If the path
24254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24255  # take no chances and rewrite it.
24256  # Note: m4 eats our [], so we need to use [ and ] instead.
24257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24258  if test "x$has_forbidden_chars" != x; then
24259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24261  fi
24262
24263
24264  windows_path="$new_path"
24265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24266    unix_path=`$CYGPATH -u "$windows_path"`
24267    new_path="$unix_path"
24268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24270    new_path="$unix_path"
24271  fi
24272
24273  if test "x$path" != "x$new_path"; then
24274    BOOT_JDK="$new_path"
24275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24277  fi
24278
24279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24281
24282    else
24283      # We're on a unix platform. Hooray! :)
24284      path="$BOOT_JDK"
24285      has_space=`$ECHO "$path" | $GREP " "`
24286      if test "x$has_space" != x; then
24287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24288$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24289        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24290      fi
24291
24292      # Use eval to expand a potential ~
24293      eval path="$path"
24294      if test ! -f "$path" && test ! -d "$path"; then
24295        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24296      fi
24297
24298      if test -d "$path"; then
24299        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24300      else
24301        dir="`$DIRNAME "$path"`"
24302        base="`$BASENAME "$path"`"
24303        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24304      fi
24305    fi
24306  fi
24307
24308            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24309$as_echo_n "checking for Boot JDK... " >&6; }
24310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24311$as_echo "$BOOT_JDK" >&6; }
24312            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24313$as_echo_n "checking Boot JDK version... " >&6; }
24314            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24316$as_echo "$BOOT_JDK_VERSION" >&6; }
24317          fi # end check jdk version
24318        fi # end check javac
24319      fi # end check java
24320    fi # end check boot jdk found
24321  fi
24322
24323
24324  if test "x$BOOT_JDK_FOUND" = xno; then
24325    # Now execute the test
24326
24327  if test -x /usr/libexec/java_home; then
24328    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24329    BOOT_JDK_FOUND=maybe
24330    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24331$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24332  fi
24333
24334
24335    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24336    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24337      # Do we have a bin/java?
24338      if test ! -x "$BOOT_JDK/bin/java"; then
24339        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24341        BOOT_JDK_FOUND=no
24342      else
24343        # Do we have a bin/javac?
24344        if test ! -x "$BOOT_JDK/bin/javac"; then
24345          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24347          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24348$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24349          BOOT_JDK_FOUND=no
24350        else
24351          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24352          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24353
24354          # Extra M4 quote needed to protect [] in grep expression.
24355          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24356          if test "x$FOUND_CORRECT_VERSION" = x; then
24357            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24359            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24360$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24361            BOOT_JDK_FOUND=no
24362          else
24363            # We're done! :-)
24364            BOOT_JDK_FOUND=yes
24365
24366  # Only process if variable expands to non-empty
24367
24368  if test "x$BOOT_JDK" != x; then
24369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24370
24371  # Input might be given as Windows format, start by converting to
24372  # unix format.
24373  path="$BOOT_JDK"
24374  new_path=`$CYGPATH -u "$path"`
24375
24376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24379  # "foo.exe" is OK but "foo" is an error.
24380  #
24381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24382  # It is also a way to make sure we got the proper file name for the real test later on.
24383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24384  if test "x$test_shortpath" = x; then
24385    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24386$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24387    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24388  fi
24389
24390  # Call helper function which possibly converts this using DOS-style short mode.
24391  # If so, the updated path is stored in $new_path.
24392
24393  input_path="$new_path"
24394  # Check if we need to convert this using DOS-style short mode. If the path
24395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24396  # take no chances and rewrite it.
24397  # Note: m4 eats our [], so we need to use [ and ] instead.
24398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24399  if test "x$has_forbidden_chars" != x; then
24400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24404      # Going to short mode and back again did indeed matter. Since short mode is
24405      # case insensitive, let's make it lowercase to improve readability.
24406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24407      # Now convert it back to Unix-style (cygpath)
24408      input_path=`$CYGPATH -u "$shortmode_path"`
24409      new_path="$input_path"
24410    fi
24411  fi
24412
24413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24414  if test "x$test_cygdrive_prefix" = x; then
24415    # As a simple fix, exclude /usr/bin since it's not a real path.
24416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24418      # a path prefixed by /cygdrive for fixpath to work.
24419      new_path="$CYGWIN_ROOT_PATH$input_path"
24420    fi
24421  fi
24422
24423
24424  if test "x$path" != "x$new_path"; then
24425    BOOT_JDK="$new_path"
24426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24427$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24428  fi
24429
24430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24431
24432  path="$BOOT_JDK"
24433  has_colon=`$ECHO $path | $GREP ^.:`
24434  new_path="$path"
24435  if test "x$has_colon" = x; then
24436    # Not in mixed or Windows style, start by that.
24437    new_path=`cmd //c echo $path`
24438  fi
24439
24440
24441  input_path="$new_path"
24442  # Check if we need to convert this using DOS-style short mode. If the path
24443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24444  # take no chances and rewrite it.
24445  # Note: m4 eats our [], so we need to use [ and ] instead.
24446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24447  if test "x$has_forbidden_chars" != x; then
24448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24450  fi
24451
24452
24453  windows_path="$new_path"
24454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24455    unix_path=`$CYGPATH -u "$windows_path"`
24456    new_path="$unix_path"
24457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24459    new_path="$unix_path"
24460  fi
24461
24462  if test "x$path" != "x$new_path"; then
24463    BOOT_JDK="$new_path"
24464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24466  fi
24467
24468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24470
24471    else
24472      # We're on a unix platform. Hooray! :)
24473      path="$BOOT_JDK"
24474      has_space=`$ECHO "$path" | $GREP " "`
24475      if test "x$has_space" != x; then
24476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24477$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24478        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24479      fi
24480
24481      # Use eval to expand a potential ~
24482      eval path="$path"
24483      if test ! -f "$path" && test ! -d "$path"; then
24484        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24485      fi
24486
24487      if test -d "$path"; then
24488        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24489      else
24490        dir="`$DIRNAME "$path"`"
24491        base="`$BASENAME "$path"`"
24492        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24493      fi
24494    fi
24495  fi
24496
24497            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24498$as_echo_n "checking for Boot JDK... " >&6; }
24499            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24500$as_echo "$BOOT_JDK" >&6; }
24501            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24502$as_echo_n "checking Boot JDK version... " >&6; }
24503            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24505$as_echo "$BOOT_JDK_VERSION" >&6; }
24506          fi # end check jdk version
24507        fi # end check javac
24508      fi # end check java
24509    fi # end check boot jdk found
24510  fi
24511
24512
24513  if test "x$BOOT_JDK_FOUND" = xno; then
24514    # Now execute the test
24515
24516  if test -x /usr/libexec/java_home; then
24517    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24518    BOOT_JDK_FOUND=maybe
24519    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24520$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24521  fi
24522
24523
24524    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24525    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24526      # Do we have a bin/java?
24527      if test ! -x "$BOOT_JDK/bin/java"; then
24528        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24530        BOOT_JDK_FOUND=no
24531      else
24532        # Do we have a bin/javac?
24533        if test ! -x "$BOOT_JDK/bin/javac"; then
24534          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24536          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24537$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24538          BOOT_JDK_FOUND=no
24539        else
24540          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24541          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24542
24543          # Extra M4 quote needed to protect [] in grep expression.
24544          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24545          if test "x$FOUND_CORRECT_VERSION" = x; then
24546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24548            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24549$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24550            BOOT_JDK_FOUND=no
24551          else
24552            # We're done! :-)
24553            BOOT_JDK_FOUND=yes
24554
24555  # Only process if variable expands to non-empty
24556
24557  if test "x$BOOT_JDK" != x; then
24558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24559
24560  # Input might be given as Windows format, start by converting to
24561  # unix format.
24562  path="$BOOT_JDK"
24563  new_path=`$CYGPATH -u "$path"`
24564
24565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24568  # "foo.exe" is OK but "foo" is an error.
24569  #
24570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24571  # It is also a way to make sure we got the proper file name for the real test later on.
24572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24573  if test "x$test_shortpath" = x; then
24574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24576    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24577  fi
24578
24579  # Call helper function which possibly converts this using DOS-style short mode.
24580  # If so, the updated path is stored in $new_path.
24581
24582  input_path="$new_path"
24583  # Check if we need to convert this using DOS-style short mode. If the path
24584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24585  # take no chances and rewrite it.
24586  # Note: m4 eats our [], so we need to use [ and ] instead.
24587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24588  if test "x$has_forbidden_chars" != x; then
24589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24593      # Going to short mode and back again did indeed matter. Since short mode is
24594      # case insensitive, let's make it lowercase to improve readability.
24595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24596      # Now convert it back to Unix-style (cygpath)
24597      input_path=`$CYGPATH -u "$shortmode_path"`
24598      new_path="$input_path"
24599    fi
24600  fi
24601
24602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24603  if test "x$test_cygdrive_prefix" = x; then
24604    # As a simple fix, exclude /usr/bin since it's not a real path.
24605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24607      # a path prefixed by /cygdrive for fixpath to work.
24608      new_path="$CYGWIN_ROOT_PATH$input_path"
24609    fi
24610  fi
24611
24612
24613  if test "x$path" != "x$new_path"; then
24614    BOOT_JDK="$new_path"
24615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24617  fi
24618
24619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24620
24621  path="$BOOT_JDK"
24622  has_colon=`$ECHO $path | $GREP ^.:`
24623  new_path="$path"
24624  if test "x$has_colon" = x; then
24625    # Not in mixed or Windows style, start by that.
24626    new_path=`cmd //c echo $path`
24627  fi
24628
24629
24630  input_path="$new_path"
24631  # Check if we need to convert this using DOS-style short mode. If the path
24632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24633  # take no chances and rewrite it.
24634  # Note: m4 eats our [], so we need to use [ and ] instead.
24635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24636  if test "x$has_forbidden_chars" != x; then
24637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24639  fi
24640
24641
24642  windows_path="$new_path"
24643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24644    unix_path=`$CYGPATH -u "$windows_path"`
24645    new_path="$unix_path"
24646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24648    new_path="$unix_path"
24649  fi
24650
24651  if test "x$path" != "x$new_path"; then
24652    BOOT_JDK="$new_path"
24653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24655  fi
24656
24657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24659
24660    else
24661      # We're on a unix platform. Hooray! :)
24662      path="$BOOT_JDK"
24663      has_space=`$ECHO "$path" | $GREP " "`
24664      if test "x$has_space" != x; then
24665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24668      fi
24669
24670      # Use eval to expand a potential ~
24671      eval path="$path"
24672      if test ! -f "$path" && test ! -d "$path"; then
24673        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24674      fi
24675
24676      if test -d "$path"; then
24677        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24678      else
24679        dir="`$DIRNAME "$path"`"
24680        base="`$BASENAME "$path"`"
24681        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24682      fi
24683    fi
24684  fi
24685
24686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24687$as_echo_n "checking for Boot JDK... " >&6; }
24688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24689$as_echo "$BOOT_JDK" >&6; }
24690            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24691$as_echo_n "checking Boot JDK version... " >&6; }
24692            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24694$as_echo "$BOOT_JDK_VERSION" >&6; }
24695          fi # end check jdk version
24696        fi # end check javac
24697      fi # end check java
24698    fi # end check boot jdk found
24699  fi
24700
24701  fi
24702
24703
24704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24705    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24706      # Do we have a bin/java?
24707      if test ! -x "$BOOT_JDK/bin/java"; then
24708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24710        BOOT_JDK_FOUND=no
24711      else
24712        # Do we have a bin/javac?
24713        if test ! -x "$BOOT_JDK/bin/javac"; then
24714          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24716          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24717$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24718          BOOT_JDK_FOUND=no
24719        else
24720          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24721          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24722
24723          # Extra M4 quote needed to protect [] in grep expression.
24724          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24725          if test "x$FOUND_CORRECT_VERSION" = x; then
24726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24728            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24729$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24730            BOOT_JDK_FOUND=no
24731          else
24732            # We're done! :-)
24733            BOOT_JDK_FOUND=yes
24734
24735  # Only process if variable expands to non-empty
24736
24737  if test "x$BOOT_JDK" != x; then
24738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24739
24740  # Input might be given as Windows format, start by converting to
24741  # unix format.
24742  path="$BOOT_JDK"
24743  new_path=`$CYGPATH -u "$path"`
24744
24745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24748  # "foo.exe" is OK but "foo" is an error.
24749  #
24750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24751  # It is also a way to make sure we got the proper file name for the real test later on.
24752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24753  if test "x$test_shortpath" = x; then
24754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24757  fi
24758
24759  # Call helper function which possibly converts this using DOS-style short mode.
24760  # If so, the updated path is stored in $new_path.
24761
24762  input_path="$new_path"
24763  # Check if we need to convert this using DOS-style short mode. If the path
24764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24765  # take no chances and rewrite it.
24766  # Note: m4 eats our [], so we need to use [ and ] instead.
24767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24768  if test "x$has_forbidden_chars" != x; then
24769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24773      # Going to short mode and back again did indeed matter. Since short mode is
24774      # case insensitive, let's make it lowercase to improve readability.
24775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24776      # Now convert it back to Unix-style (cygpath)
24777      input_path=`$CYGPATH -u "$shortmode_path"`
24778      new_path="$input_path"
24779    fi
24780  fi
24781
24782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24783  if test "x$test_cygdrive_prefix" = x; then
24784    # As a simple fix, exclude /usr/bin since it's not a real path.
24785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24787      # a path prefixed by /cygdrive for fixpath to work.
24788      new_path="$CYGWIN_ROOT_PATH$input_path"
24789    fi
24790  fi
24791
24792
24793  if test "x$path" != "x$new_path"; then
24794    BOOT_JDK="$new_path"
24795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24797  fi
24798
24799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24800
24801  path="$BOOT_JDK"
24802  has_colon=`$ECHO $path | $GREP ^.:`
24803  new_path="$path"
24804  if test "x$has_colon" = x; then
24805    # Not in mixed or Windows style, start by that.
24806    new_path=`cmd //c echo $path`
24807  fi
24808
24809
24810  input_path="$new_path"
24811  # Check if we need to convert this using DOS-style short mode. If the path
24812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24813  # take no chances and rewrite it.
24814  # Note: m4 eats our [], so we need to use [ and ] instead.
24815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24816  if test "x$has_forbidden_chars" != x; then
24817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24819  fi
24820
24821
24822  windows_path="$new_path"
24823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24824    unix_path=`$CYGPATH -u "$windows_path"`
24825    new_path="$unix_path"
24826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24828    new_path="$unix_path"
24829  fi
24830
24831  if test "x$path" != "x$new_path"; then
24832    BOOT_JDK="$new_path"
24833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24835  fi
24836
24837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24839
24840    else
24841      # We're on a unix platform. Hooray! :)
24842      path="$BOOT_JDK"
24843      has_space=`$ECHO "$path" | $GREP " "`
24844      if test "x$has_space" != x; then
24845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24848      fi
24849
24850      # Use eval to expand a potential ~
24851      eval path="$path"
24852      if test ! -f "$path" && test ! -d "$path"; then
24853        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24854      fi
24855
24856      if test -d "$path"; then
24857        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24858      else
24859        dir="`$DIRNAME "$path"`"
24860        base="`$BASENAME "$path"`"
24861        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24862      fi
24863    fi
24864  fi
24865
24866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24867$as_echo_n "checking for Boot JDK... " >&6; }
24868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24869$as_echo "$BOOT_JDK" >&6; }
24870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24871$as_echo_n "checking Boot JDK version... " >&6; }
24872            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24874$as_echo "$BOOT_JDK_VERSION" >&6; }
24875          fi # end check jdk version
24876        fi # end check javac
24877      fi # end check java
24878    fi # end check boot jdk found
24879  fi
24880
24881
24882  # Test: Is $JAVA_HOME set?
24883
24884  if test "x$BOOT_JDK_FOUND" = xno; then
24885    # Now execute the test
24886
24887  if test "x$JAVA_HOME" != x; then
24888    JAVA_HOME_PROCESSED="$JAVA_HOME"
24889
24890  # Only process if variable expands to non-empty
24891
24892  if test "x$JAVA_HOME_PROCESSED" != x; then
24893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24894
24895  # Input might be given as Windows format, start by converting to
24896  # unix format.
24897  path="$JAVA_HOME_PROCESSED"
24898  new_path=`$CYGPATH -u "$path"`
24899
24900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24903  # "foo.exe" is OK but "foo" is an error.
24904  #
24905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24906  # It is also a way to make sure we got the proper file name for the real test later on.
24907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24908  if test "x$test_shortpath" = x; then
24909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24910$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24911    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24912  fi
24913
24914  # Call helper function which possibly converts this using DOS-style short mode.
24915  # If so, the updated path is stored in $new_path.
24916
24917  input_path="$new_path"
24918  # Check if we need to convert this using DOS-style short mode. If the path
24919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24920  # take no chances and rewrite it.
24921  # Note: m4 eats our [], so we need to use [ and ] instead.
24922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24923  if test "x$has_forbidden_chars" != x; then
24924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24928      # Going to short mode and back again did indeed matter. Since short mode is
24929      # case insensitive, let's make it lowercase to improve readability.
24930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24931      # Now convert it back to Unix-style (cygpath)
24932      input_path=`$CYGPATH -u "$shortmode_path"`
24933      new_path="$input_path"
24934    fi
24935  fi
24936
24937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24938  if test "x$test_cygdrive_prefix" = x; then
24939    # As a simple fix, exclude /usr/bin since it's not a real path.
24940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24942      # a path prefixed by /cygdrive for fixpath to work.
24943      new_path="$CYGWIN_ROOT_PATH$input_path"
24944    fi
24945  fi
24946
24947
24948  if test "x$path" != "x$new_path"; then
24949    JAVA_HOME_PROCESSED="$new_path"
24950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24951$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24952  fi
24953
24954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24955
24956  path="$JAVA_HOME_PROCESSED"
24957  has_colon=`$ECHO $path | $GREP ^.:`
24958  new_path="$path"
24959  if test "x$has_colon" = x; then
24960    # Not in mixed or Windows style, start by that.
24961    new_path=`cmd //c echo $path`
24962  fi
24963
24964
24965  input_path="$new_path"
24966  # Check if we need to convert this using DOS-style short mode. If the path
24967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24968  # take no chances and rewrite it.
24969  # Note: m4 eats our [], so we need to use [ and ] instead.
24970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24971  if test "x$has_forbidden_chars" != x; then
24972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24974  fi
24975
24976
24977  windows_path="$new_path"
24978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24979    unix_path=`$CYGPATH -u "$windows_path"`
24980    new_path="$unix_path"
24981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24983    new_path="$unix_path"
24984  fi
24985
24986  if test "x$path" != "x$new_path"; then
24987    JAVA_HOME_PROCESSED="$new_path"
24988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24989$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24990  fi
24991
24992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24994
24995    else
24996      # We're on a unix platform. Hooray! :)
24997      path="$JAVA_HOME_PROCESSED"
24998      has_space=`$ECHO "$path" | $GREP " "`
24999      if test "x$has_space" != x; then
25000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25001$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25002        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25003      fi
25004
25005      # Use eval to expand a potential ~
25006      eval path="$path"
25007      if test ! -f "$path" && test ! -d "$path"; then
25008        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25009      fi
25010
25011      if test -d "$path"; then
25012        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25013      else
25014        dir="`$DIRNAME "$path"`"
25015        base="`$BASENAME "$path"`"
25016        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25017      fi
25018    fi
25019  fi
25020
25021    if test ! -d "$JAVA_HOME_PROCESSED"; then
25022      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25023$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25024    else
25025      # Aha, the user has set a JAVA_HOME
25026      # let us use that as the Boot JDK.
25027      BOOT_JDK="$JAVA_HOME_PROCESSED"
25028      BOOT_JDK_FOUND=maybe
25029      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25030$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25031    fi
25032  fi
25033
25034
25035    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25036    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25037      # Do we have a bin/java?
25038      if test ! -x "$BOOT_JDK/bin/java"; then
25039        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25041        BOOT_JDK_FOUND=no
25042      else
25043        # Do we have a bin/javac?
25044        if test ! -x "$BOOT_JDK/bin/javac"; then
25045          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25047          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25048$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25049          BOOT_JDK_FOUND=no
25050        else
25051          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25052          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25053
25054          # Extra M4 quote needed to protect [] in grep expression.
25055          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25056          if test "x$FOUND_CORRECT_VERSION" = x; then
25057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25059            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25060$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25061            BOOT_JDK_FOUND=no
25062          else
25063            # We're done! :-)
25064            BOOT_JDK_FOUND=yes
25065
25066  # Only process if variable expands to non-empty
25067
25068  if test "x$BOOT_JDK" != x; then
25069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25070
25071  # Input might be given as Windows format, start by converting to
25072  # unix format.
25073  path="$BOOT_JDK"
25074  new_path=`$CYGPATH -u "$path"`
25075
25076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25079  # "foo.exe" is OK but "foo" is an error.
25080  #
25081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25082  # It is also a way to make sure we got the proper file name for the real test later on.
25083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25084  if test "x$test_shortpath" = x; then
25085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25087    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25088  fi
25089
25090  # Call helper function which possibly converts this using DOS-style short mode.
25091  # If so, the updated path is stored in $new_path.
25092
25093  input_path="$new_path"
25094  # Check if we need to convert this using DOS-style short mode. If the path
25095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25096  # take no chances and rewrite it.
25097  # Note: m4 eats our [], so we need to use [ and ] instead.
25098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25099  if test "x$has_forbidden_chars" != x; then
25100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25104      # Going to short mode and back again did indeed matter. Since short mode is
25105      # case insensitive, let's make it lowercase to improve readability.
25106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25107      # Now convert it back to Unix-style (cygpath)
25108      input_path=`$CYGPATH -u "$shortmode_path"`
25109      new_path="$input_path"
25110    fi
25111  fi
25112
25113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25114  if test "x$test_cygdrive_prefix" = x; then
25115    # As a simple fix, exclude /usr/bin since it's not a real path.
25116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25118      # a path prefixed by /cygdrive for fixpath to work.
25119      new_path="$CYGWIN_ROOT_PATH$input_path"
25120    fi
25121  fi
25122
25123
25124  if test "x$path" != "x$new_path"; then
25125    BOOT_JDK="$new_path"
25126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25128  fi
25129
25130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25131
25132  path="$BOOT_JDK"
25133  has_colon=`$ECHO $path | $GREP ^.:`
25134  new_path="$path"
25135  if test "x$has_colon" = x; then
25136    # Not in mixed or Windows style, start by that.
25137    new_path=`cmd //c echo $path`
25138  fi
25139
25140
25141  input_path="$new_path"
25142  # Check if we need to convert this using DOS-style short mode. If the path
25143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25144  # take no chances and rewrite it.
25145  # Note: m4 eats our [], so we need to use [ and ] instead.
25146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25147  if test "x$has_forbidden_chars" != x; then
25148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25150  fi
25151
25152
25153  windows_path="$new_path"
25154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25155    unix_path=`$CYGPATH -u "$windows_path"`
25156    new_path="$unix_path"
25157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25159    new_path="$unix_path"
25160  fi
25161
25162  if test "x$path" != "x$new_path"; then
25163    BOOT_JDK="$new_path"
25164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25166  fi
25167
25168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25170
25171    else
25172      # We're on a unix platform. Hooray! :)
25173      path="$BOOT_JDK"
25174      has_space=`$ECHO "$path" | $GREP " "`
25175      if test "x$has_space" != x; then
25176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25179      fi
25180
25181      # Use eval to expand a potential ~
25182      eval path="$path"
25183      if test ! -f "$path" && test ! -d "$path"; then
25184        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25185      fi
25186
25187      if test -d "$path"; then
25188        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25189      else
25190        dir="`$DIRNAME "$path"`"
25191        base="`$BASENAME "$path"`"
25192        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25193      fi
25194    fi
25195  fi
25196
25197            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25198$as_echo_n "checking for Boot JDK... " >&6; }
25199            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25200$as_echo "$BOOT_JDK" >&6; }
25201            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25202$as_echo_n "checking Boot JDK version... " >&6; }
25203            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25205$as_echo "$BOOT_JDK_VERSION" >&6; }
25206          fi # end check jdk version
25207        fi # end check javac
25208      fi # end check java
25209    fi # end check boot jdk found
25210  fi
25211
25212
25213  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25214
25215  if test "x$BOOT_JDK_FOUND" = xno; then
25216    # Now execute the test
25217
25218  # Extract the first word of "javac", so it can be a program name with args.
25219set dummy javac; ac_word=$2
25220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25221$as_echo_n "checking for $ac_word... " >&6; }
25222if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25223  $as_echo_n "(cached) " >&6
25224else
25225  case $JAVAC_CHECK in
25226  [\\/]* | ?:[\\/]*)
25227  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25228  ;;
25229  *)
25230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25231for as_dir in $PATH
25232do
25233  IFS=$as_save_IFS
25234  test -z "$as_dir" && as_dir=.
25235    for ac_exec_ext in '' $ac_executable_extensions; do
25236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25237    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25239    break 2
25240  fi
25241done
25242  done
25243IFS=$as_save_IFS
25244
25245  ;;
25246esac
25247fi
25248JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25249if test -n "$JAVAC_CHECK"; then
25250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25251$as_echo "$JAVAC_CHECK" >&6; }
25252else
25253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25254$as_echo "no" >&6; }
25255fi
25256
25257
25258  # Extract the first word of "java", so it can be a program name with args.
25259set dummy java; ac_word=$2
25260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25261$as_echo_n "checking for $ac_word... " >&6; }
25262if ${ac_cv_path_JAVA_CHECK+:} false; then :
25263  $as_echo_n "(cached) " >&6
25264else
25265  case $JAVA_CHECK in
25266  [\\/]* | ?:[\\/]*)
25267  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25268  ;;
25269  *)
25270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25271for as_dir in $PATH
25272do
25273  IFS=$as_save_IFS
25274  test -z "$as_dir" && as_dir=.
25275    for ac_exec_ext in '' $ac_executable_extensions; do
25276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25277    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25279    break 2
25280  fi
25281done
25282  done
25283IFS=$as_save_IFS
25284
25285  ;;
25286esac
25287fi
25288JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25289if test -n "$JAVA_CHECK"; then
25290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25291$as_echo "$JAVA_CHECK" >&6; }
25292else
25293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25294$as_echo "no" >&6; }
25295fi
25296
25297
25298  BINARY="$JAVAC_CHECK"
25299  if test "x$JAVAC_CHECK" = x; then
25300    BINARY="$JAVA_CHECK"
25301  fi
25302  if test "x$BINARY" != x; then
25303    # So there is a java(c) binary, it might be part of a JDK.
25304    # Lets find the JDK/JRE directory by following symbolic links.
25305    # Linux/GNU systems often have links from /usr/bin/java to
25306    # /etc/alternatives/java to the real JDK binary.
25307
25308  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25309    # Follow a chain of symbolic links. Use readlink
25310    # where it exists, else fall back to horribly
25311    # complicated shell code.
25312    if test "x$READLINK_TESTED" != yes; then
25313      # On MacOSX there is a readlink tool with a different
25314      # purpose than the GNU readlink tool. Check the found readlink.
25315      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25316      if test "x$ISGNU" = x; then
25317        # A readlink that we do not know how to use.
25318        # Are there other non-GNU readlinks out there?
25319        READLINK_TESTED=yes
25320        READLINK=
25321      fi
25322    fi
25323
25324    if test "x$READLINK" != x; then
25325      BINARY=`$READLINK -f $BINARY`
25326    else
25327      # Save the current directory for restoring afterwards
25328      STARTDIR=$PWD
25329      COUNTER=0
25330      sym_link_dir=`$DIRNAME $BINARY`
25331      sym_link_file=`$BASENAME $BINARY`
25332      cd $sym_link_dir
25333      # Use -P flag to resolve symlinks in directories.
25334      cd `$THEPWDCMD -P`
25335      sym_link_dir=`$THEPWDCMD -P`
25336      # Resolve file symlinks
25337      while test $COUNTER -lt 20; do
25338        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25339        if test "x$ISLINK" == x; then
25340          # This is not a symbolic link! We are done!
25341          break
25342        fi
25343        # Again resolve directory symlinks since the target of the just found
25344        # link could be in a different directory
25345        cd `$DIRNAME $ISLINK`
25346        sym_link_dir=`$THEPWDCMD -P`
25347        sym_link_file=`$BASENAME $ISLINK`
25348        let COUNTER=COUNTER+1
25349      done
25350      cd $STARTDIR
25351      BINARY=$sym_link_dir/$sym_link_file
25352    fi
25353  fi
25354
25355    BOOT_JDK=`dirname "$BINARY"`
25356    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25357    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25358      # Looks like we found ourselves an JDK
25359      BOOT_JDK_FOUND=maybe
25360      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25361$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25362    fi
25363  fi
25364
25365
25366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25368      # Do we have a bin/java?
25369      if test ! -x "$BOOT_JDK/bin/java"; then
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25372        BOOT_JDK_FOUND=no
25373      else
25374        # Do we have a bin/javac?
25375        if test ! -x "$BOOT_JDK/bin/javac"; then
25376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25380          BOOT_JDK_FOUND=no
25381        else
25382          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25383          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25384
25385          # Extra M4 quote needed to protect [] in grep expression.
25386          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25387          if test "x$FOUND_CORRECT_VERSION" = x; then
25388            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25390            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25391$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25392            BOOT_JDK_FOUND=no
25393          else
25394            # We're done! :-)
25395            BOOT_JDK_FOUND=yes
25396
25397  # Only process if variable expands to non-empty
25398
25399  if test "x$BOOT_JDK" != x; then
25400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25401
25402  # Input might be given as Windows format, start by converting to
25403  # unix format.
25404  path="$BOOT_JDK"
25405  new_path=`$CYGPATH -u "$path"`
25406
25407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25410  # "foo.exe" is OK but "foo" is an error.
25411  #
25412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25413  # It is also a way to make sure we got the proper file name for the real test later on.
25414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25415  if test "x$test_shortpath" = x; then
25416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25419  fi
25420
25421  # Call helper function which possibly converts this using DOS-style short mode.
25422  # If so, the updated path is stored in $new_path.
25423
25424  input_path="$new_path"
25425  # Check if we need to convert this using DOS-style short mode. If the path
25426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25427  # take no chances and rewrite it.
25428  # Note: m4 eats our [], so we need to use [ and ] instead.
25429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25430  if test "x$has_forbidden_chars" != x; then
25431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25435      # Going to short mode and back again did indeed matter. Since short mode is
25436      # case insensitive, let's make it lowercase to improve readability.
25437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25438      # Now convert it back to Unix-style (cygpath)
25439      input_path=`$CYGPATH -u "$shortmode_path"`
25440      new_path="$input_path"
25441    fi
25442  fi
25443
25444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25445  if test "x$test_cygdrive_prefix" = x; then
25446    # As a simple fix, exclude /usr/bin since it's not a real path.
25447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25449      # a path prefixed by /cygdrive for fixpath to work.
25450      new_path="$CYGWIN_ROOT_PATH$input_path"
25451    fi
25452  fi
25453
25454
25455  if test "x$path" != "x$new_path"; then
25456    BOOT_JDK="$new_path"
25457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25459  fi
25460
25461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25462
25463  path="$BOOT_JDK"
25464  has_colon=`$ECHO $path | $GREP ^.:`
25465  new_path="$path"
25466  if test "x$has_colon" = x; then
25467    # Not in mixed or Windows style, start by that.
25468    new_path=`cmd //c echo $path`
25469  fi
25470
25471
25472  input_path="$new_path"
25473  # Check if we need to convert this using DOS-style short mode. If the path
25474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25475  # take no chances and rewrite it.
25476  # Note: m4 eats our [], so we need to use [ and ] instead.
25477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25478  if test "x$has_forbidden_chars" != x; then
25479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25481  fi
25482
25483
25484  windows_path="$new_path"
25485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25486    unix_path=`$CYGPATH -u "$windows_path"`
25487    new_path="$unix_path"
25488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25490    new_path="$unix_path"
25491  fi
25492
25493  if test "x$path" != "x$new_path"; then
25494    BOOT_JDK="$new_path"
25495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25497  fi
25498
25499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25501
25502    else
25503      # We're on a unix platform. Hooray! :)
25504      path="$BOOT_JDK"
25505      has_space=`$ECHO "$path" | $GREP " "`
25506      if test "x$has_space" != x; then
25507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25508$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25510      fi
25511
25512      # Use eval to expand a potential ~
25513      eval path="$path"
25514      if test ! -f "$path" && test ! -d "$path"; then
25515        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25516      fi
25517
25518      if test -d "$path"; then
25519        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25520      else
25521        dir="`$DIRNAME "$path"`"
25522        base="`$BASENAME "$path"`"
25523        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25524      fi
25525    fi
25526  fi
25527
25528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25529$as_echo_n "checking for Boot JDK... " >&6; }
25530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25531$as_echo "$BOOT_JDK" >&6; }
25532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25533$as_echo_n "checking Boot JDK version... " >&6; }
25534            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25536$as_echo "$BOOT_JDK_VERSION" >&6; }
25537          fi # end check jdk version
25538        fi # end check javac
25539      fi # end check java
25540    fi # end check boot jdk found
25541  fi
25542
25543
25544  # Test: Is there a JDK installed in default, well-known locations?
25545
25546  if test "x$BOOT_JDK_FOUND" = xno; then
25547    # Now execute the test
25548
25549  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25550
25551  if test "x$BOOT_JDK_FOUND" = xno; then
25552    # Now execute the test
25553
25554  if test "x$ProgramW6432" != x; then
25555    VIRTUAL_DIR="$ProgramW6432/Java"
25556
25557  windows_path="$VIRTUAL_DIR"
25558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25559    unix_path=`$CYGPATH -u "$windows_path"`
25560    VIRTUAL_DIR="$unix_path"
25561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25563    VIRTUAL_DIR="$unix_path"
25564  fi
25565
25566
25567  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25568  BOOT_JDK_SUFFIX=""
25569  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25570  if test "x$ALL_JDKS_FOUND" != x; then
25571    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25572
25573  if test "x$BOOT_JDK_FOUND" = xno; then
25574    # Now execute the test
25575
25576        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25577        if test -d "$BOOT_JDK"; then
25578          BOOT_JDK_FOUND=maybe
25579          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25580$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25581        fi
25582
25583
25584    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25585    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25586      # Do we have a bin/java?
25587      if test ! -x "$BOOT_JDK/bin/java"; then
25588        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25590        BOOT_JDK_FOUND=no
25591      else
25592        # Do we have a bin/javac?
25593        if test ! -x "$BOOT_JDK/bin/javac"; then
25594          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25596          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25597$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25598          BOOT_JDK_FOUND=no
25599        else
25600          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25601          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25602
25603          # Extra M4 quote needed to protect [] in grep expression.
25604          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25605          if test "x$FOUND_CORRECT_VERSION" = x; then
25606            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25608            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25609$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25610            BOOT_JDK_FOUND=no
25611          else
25612            # We're done! :-)
25613            BOOT_JDK_FOUND=yes
25614
25615  # Only process if variable expands to non-empty
25616
25617  if test "x$BOOT_JDK" != x; then
25618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25619
25620  # Input might be given as Windows format, start by converting to
25621  # unix format.
25622  path="$BOOT_JDK"
25623  new_path=`$CYGPATH -u "$path"`
25624
25625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25628  # "foo.exe" is OK but "foo" is an error.
25629  #
25630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25631  # It is also a way to make sure we got the proper file name for the real test later on.
25632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25633  if test "x$test_shortpath" = x; then
25634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25635$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25636    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25637  fi
25638
25639  # Call helper function which possibly converts this using DOS-style short mode.
25640  # If so, the updated path is stored in $new_path.
25641
25642  input_path="$new_path"
25643  # Check if we need to convert this using DOS-style short mode. If the path
25644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25645  # take no chances and rewrite it.
25646  # Note: m4 eats our [], so we need to use [ and ] instead.
25647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25648  if test "x$has_forbidden_chars" != x; then
25649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25653      # Going to short mode and back again did indeed matter. Since short mode is
25654      # case insensitive, let's make it lowercase to improve readability.
25655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25656      # Now convert it back to Unix-style (cygpath)
25657      input_path=`$CYGPATH -u "$shortmode_path"`
25658      new_path="$input_path"
25659    fi
25660  fi
25661
25662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25663  if test "x$test_cygdrive_prefix" = x; then
25664    # As a simple fix, exclude /usr/bin since it's not a real path.
25665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25667      # a path prefixed by /cygdrive for fixpath to work.
25668      new_path="$CYGWIN_ROOT_PATH$input_path"
25669    fi
25670  fi
25671
25672
25673  if test "x$path" != "x$new_path"; then
25674    BOOT_JDK="$new_path"
25675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25677  fi
25678
25679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25680
25681  path="$BOOT_JDK"
25682  has_colon=`$ECHO $path | $GREP ^.:`
25683  new_path="$path"
25684  if test "x$has_colon" = x; then
25685    # Not in mixed or Windows style, start by that.
25686    new_path=`cmd //c echo $path`
25687  fi
25688
25689
25690  input_path="$new_path"
25691  # Check if we need to convert this using DOS-style short mode. If the path
25692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25693  # take no chances and rewrite it.
25694  # Note: m4 eats our [], so we need to use [ and ] instead.
25695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25696  if test "x$has_forbidden_chars" != x; then
25697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25699  fi
25700
25701
25702  windows_path="$new_path"
25703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25704    unix_path=`$CYGPATH -u "$windows_path"`
25705    new_path="$unix_path"
25706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25708    new_path="$unix_path"
25709  fi
25710
25711  if test "x$path" != "x$new_path"; then
25712    BOOT_JDK="$new_path"
25713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25715  fi
25716
25717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25719
25720    else
25721      # We're on a unix platform. Hooray! :)
25722      path="$BOOT_JDK"
25723      has_space=`$ECHO "$path" | $GREP " "`
25724      if test "x$has_space" != x; then
25725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25728      fi
25729
25730      # Use eval to expand a potential ~
25731      eval path="$path"
25732      if test ! -f "$path" && test ! -d "$path"; then
25733        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25734      fi
25735
25736      if test -d "$path"; then
25737        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25738      else
25739        dir="`$DIRNAME "$path"`"
25740        base="`$BASENAME "$path"`"
25741        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25742      fi
25743    fi
25744  fi
25745
25746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25747$as_echo_n "checking for Boot JDK... " >&6; }
25748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25749$as_echo "$BOOT_JDK" >&6; }
25750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25751$as_echo_n "checking Boot JDK version... " >&6; }
25752            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25754$as_echo "$BOOT_JDK_VERSION" >&6; }
25755          fi # end check jdk version
25756        fi # end check javac
25757      fi # end check java
25758    fi # end check boot jdk found
25759  fi
25760
25761    done
25762  fi
25763
25764  fi
25765
25766
25767    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25768    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25769      # Do we have a bin/java?
25770      if test ! -x "$BOOT_JDK/bin/java"; then
25771        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25773        BOOT_JDK_FOUND=no
25774      else
25775        # Do we have a bin/javac?
25776        if test ! -x "$BOOT_JDK/bin/javac"; then
25777          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25779          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25780$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25781          BOOT_JDK_FOUND=no
25782        else
25783          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25784          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25785
25786          # Extra M4 quote needed to protect [] in grep expression.
25787          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25788          if test "x$FOUND_CORRECT_VERSION" = x; then
25789            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25791            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25792$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25793            BOOT_JDK_FOUND=no
25794          else
25795            # We're done! :-)
25796            BOOT_JDK_FOUND=yes
25797
25798  # Only process if variable expands to non-empty
25799
25800  if test "x$BOOT_JDK" != x; then
25801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25802
25803  # Input might be given as Windows format, start by converting to
25804  # unix format.
25805  path="$BOOT_JDK"
25806  new_path=`$CYGPATH -u "$path"`
25807
25808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25811  # "foo.exe" is OK but "foo" is an error.
25812  #
25813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25814  # It is also a way to make sure we got the proper file name for the real test later on.
25815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25816  if test "x$test_shortpath" = x; then
25817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25819    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25820  fi
25821
25822  # Call helper function which possibly converts this using DOS-style short mode.
25823  # If so, the updated path is stored in $new_path.
25824
25825  input_path="$new_path"
25826  # Check if we need to convert this using DOS-style short mode. If the path
25827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25828  # take no chances and rewrite it.
25829  # Note: m4 eats our [], so we need to use [ and ] instead.
25830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25831  if test "x$has_forbidden_chars" != x; then
25832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25836      # Going to short mode and back again did indeed matter. Since short mode is
25837      # case insensitive, let's make it lowercase to improve readability.
25838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25839      # Now convert it back to Unix-style (cygpath)
25840      input_path=`$CYGPATH -u "$shortmode_path"`
25841      new_path="$input_path"
25842    fi
25843  fi
25844
25845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25846  if test "x$test_cygdrive_prefix" = x; then
25847    # As a simple fix, exclude /usr/bin since it's not a real path.
25848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25850      # a path prefixed by /cygdrive for fixpath to work.
25851      new_path="$CYGWIN_ROOT_PATH$input_path"
25852    fi
25853  fi
25854
25855
25856  if test "x$path" != "x$new_path"; then
25857    BOOT_JDK="$new_path"
25858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25860  fi
25861
25862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25863
25864  path="$BOOT_JDK"
25865  has_colon=`$ECHO $path | $GREP ^.:`
25866  new_path="$path"
25867  if test "x$has_colon" = x; then
25868    # Not in mixed or Windows style, start by that.
25869    new_path=`cmd //c echo $path`
25870  fi
25871
25872
25873  input_path="$new_path"
25874  # Check if we need to convert this using DOS-style short mode. If the path
25875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25876  # take no chances and rewrite it.
25877  # Note: m4 eats our [], so we need to use [ and ] instead.
25878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25879  if test "x$has_forbidden_chars" != x; then
25880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25882  fi
25883
25884
25885  windows_path="$new_path"
25886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25887    unix_path=`$CYGPATH -u "$windows_path"`
25888    new_path="$unix_path"
25889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25891    new_path="$unix_path"
25892  fi
25893
25894  if test "x$path" != "x$new_path"; then
25895    BOOT_JDK="$new_path"
25896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25898  fi
25899
25900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25902
25903    else
25904      # We're on a unix platform. Hooray! :)
25905      path="$BOOT_JDK"
25906      has_space=`$ECHO "$path" | $GREP " "`
25907      if test "x$has_space" != x; then
25908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25911      fi
25912
25913      # Use eval to expand a potential ~
25914      eval path="$path"
25915      if test ! -f "$path" && test ! -d "$path"; then
25916        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25917      fi
25918
25919      if test -d "$path"; then
25920        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25921      else
25922        dir="`$DIRNAME "$path"`"
25923        base="`$BASENAME "$path"`"
25924        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25925      fi
25926    fi
25927  fi
25928
25929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25930$as_echo_n "checking for Boot JDK... " >&6; }
25931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25932$as_echo "$BOOT_JDK" >&6; }
25933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25934$as_echo_n "checking Boot JDK version... " >&6; }
25935            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25936            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25937$as_echo "$BOOT_JDK_VERSION" >&6; }
25938          fi # end check jdk version
25939        fi # end check javac
25940      fi # end check java
25941    fi # end check boot jdk found
25942  fi
25943
25944
25945  if test "x$BOOT_JDK_FOUND" = xno; then
25946    # Now execute the test
25947
25948  if test "x$PROGRAMW6432" != x; then
25949    VIRTUAL_DIR="$PROGRAMW6432/Java"
25950
25951  windows_path="$VIRTUAL_DIR"
25952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25953    unix_path=`$CYGPATH -u "$windows_path"`
25954    VIRTUAL_DIR="$unix_path"
25955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25957    VIRTUAL_DIR="$unix_path"
25958  fi
25959
25960
25961  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25962  BOOT_JDK_SUFFIX=""
25963  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25964  if test "x$ALL_JDKS_FOUND" != x; then
25965    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25966
25967  if test "x$BOOT_JDK_FOUND" = xno; then
25968    # Now execute the test
25969
25970        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25971        if test -d "$BOOT_JDK"; then
25972          BOOT_JDK_FOUND=maybe
25973          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25974$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25975        fi
25976
25977
25978    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25979    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25980      # Do we have a bin/java?
25981      if test ! -x "$BOOT_JDK/bin/java"; then
25982        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25984        BOOT_JDK_FOUND=no
25985      else
25986        # Do we have a bin/javac?
25987        if test ! -x "$BOOT_JDK/bin/javac"; then
25988          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25990          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25991$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25992          BOOT_JDK_FOUND=no
25993        else
25994          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25995          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25996
25997          # Extra M4 quote needed to protect [] in grep expression.
25998          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25999          if test "x$FOUND_CORRECT_VERSION" = x; then
26000            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26002            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26003$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26004            BOOT_JDK_FOUND=no
26005          else
26006            # We're done! :-)
26007            BOOT_JDK_FOUND=yes
26008
26009  # Only process if variable expands to non-empty
26010
26011  if test "x$BOOT_JDK" != x; then
26012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26013
26014  # Input might be given as Windows format, start by converting to
26015  # unix format.
26016  path="$BOOT_JDK"
26017  new_path=`$CYGPATH -u "$path"`
26018
26019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26022  # "foo.exe" is OK but "foo" is an error.
26023  #
26024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26025  # It is also a way to make sure we got the proper file name for the real test later on.
26026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26027  if test "x$test_shortpath" = x; then
26028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26031  fi
26032
26033  # Call helper function which possibly converts this using DOS-style short mode.
26034  # If so, the updated path is stored in $new_path.
26035
26036  input_path="$new_path"
26037  # Check if we need to convert this using DOS-style short mode. If the path
26038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26039  # take no chances and rewrite it.
26040  # Note: m4 eats our [], so we need to use [ and ] instead.
26041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26042  if test "x$has_forbidden_chars" != x; then
26043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26047      # Going to short mode and back again did indeed matter. Since short mode is
26048      # case insensitive, let's make it lowercase to improve readability.
26049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26050      # Now convert it back to Unix-style (cygpath)
26051      input_path=`$CYGPATH -u "$shortmode_path"`
26052      new_path="$input_path"
26053    fi
26054  fi
26055
26056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26057  if test "x$test_cygdrive_prefix" = x; then
26058    # As a simple fix, exclude /usr/bin since it's not a real path.
26059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26061      # a path prefixed by /cygdrive for fixpath to work.
26062      new_path="$CYGWIN_ROOT_PATH$input_path"
26063    fi
26064  fi
26065
26066
26067  if test "x$path" != "x$new_path"; then
26068    BOOT_JDK="$new_path"
26069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26071  fi
26072
26073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26074
26075  path="$BOOT_JDK"
26076  has_colon=`$ECHO $path | $GREP ^.:`
26077  new_path="$path"
26078  if test "x$has_colon" = x; then
26079    # Not in mixed or Windows style, start by that.
26080    new_path=`cmd //c echo $path`
26081  fi
26082
26083
26084  input_path="$new_path"
26085  # Check if we need to convert this using DOS-style short mode. If the path
26086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26087  # take no chances and rewrite it.
26088  # Note: m4 eats our [], so we need to use [ and ] instead.
26089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26090  if test "x$has_forbidden_chars" != x; then
26091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26093  fi
26094
26095
26096  windows_path="$new_path"
26097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26098    unix_path=`$CYGPATH -u "$windows_path"`
26099    new_path="$unix_path"
26100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26102    new_path="$unix_path"
26103  fi
26104
26105  if test "x$path" != "x$new_path"; then
26106    BOOT_JDK="$new_path"
26107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26109  fi
26110
26111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26113
26114    else
26115      # We're on a unix platform. Hooray! :)
26116      path="$BOOT_JDK"
26117      has_space=`$ECHO "$path" | $GREP " "`
26118      if test "x$has_space" != x; then
26119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26122      fi
26123
26124      # Use eval to expand a potential ~
26125      eval path="$path"
26126      if test ! -f "$path" && test ! -d "$path"; then
26127        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26128      fi
26129
26130      if test -d "$path"; then
26131        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26132      else
26133        dir="`$DIRNAME "$path"`"
26134        base="`$BASENAME "$path"`"
26135        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26136      fi
26137    fi
26138  fi
26139
26140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26141$as_echo_n "checking for Boot JDK... " >&6; }
26142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26143$as_echo "$BOOT_JDK" >&6; }
26144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26145$as_echo_n "checking Boot JDK version... " >&6; }
26146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26148$as_echo "$BOOT_JDK_VERSION" >&6; }
26149          fi # end check jdk version
26150        fi # end check javac
26151      fi # end check java
26152    fi # end check boot jdk found
26153  fi
26154
26155    done
26156  fi
26157
26158  fi
26159
26160
26161    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26162    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26163      # Do we have a bin/java?
26164      if test ! -x "$BOOT_JDK/bin/java"; then
26165        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26167        BOOT_JDK_FOUND=no
26168      else
26169        # Do we have a bin/javac?
26170        if test ! -x "$BOOT_JDK/bin/javac"; then
26171          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26173          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26174$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26175          BOOT_JDK_FOUND=no
26176        else
26177          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26178          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26179
26180          # Extra M4 quote needed to protect [] in grep expression.
26181          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26182          if test "x$FOUND_CORRECT_VERSION" = x; then
26183            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26185            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26186$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26187            BOOT_JDK_FOUND=no
26188          else
26189            # We're done! :-)
26190            BOOT_JDK_FOUND=yes
26191
26192  # Only process if variable expands to non-empty
26193
26194  if test "x$BOOT_JDK" != x; then
26195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26196
26197  # Input might be given as Windows format, start by converting to
26198  # unix format.
26199  path="$BOOT_JDK"
26200  new_path=`$CYGPATH -u "$path"`
26201
26202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26205  # "foo.exe" is OK but "foo" is an error.
26206  #
26207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26208  # It is also a way to make sure we got the proper file name for the real test later on.
26209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26210  if test "x$test_shortpath" = x; then
26211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26213    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26214  fi
26215
26216  # Call helper function which possibly converts this using DOS-style short mode.
26217  # If so, the updated path is stored in $new_path.
26218
26219  input_path="$new_path"
26220  # Check if we need to convert this using DOS-style short mode. If the path
26221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26222  # take no chances and rewrite it.
26223  # Note: m4 eats our [], so we need to use [ and ] instead.
26224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26225  if test "x$has_forbidden_chars" != x; then
26226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26230      # Going to short mode and back again did indeed matter. Since short mode is
26231      # case insensitive, let's make it lowercase to improve readability.
26232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26233      # Now convert it back to Unix-style (cygpath)
26234      input_path=`$CYGPATH -u "$shortmode_path"`
26235      new_path="$input_path"
26236    fi
26237  fi
26238
26239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26240  if test "x$test_cygdrive_prefix" = x; then
26241    # As a simple fix, exclude /usr/bin since it's not a real path.
26242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26244      # a path prefixed by /cygdrive for fixpath to work.
26245      new_path="$CYGWIN_ROOT_PATH$input_path"
26246    fi
26247  fi
26248
26249
26250  if test "x$path" != "x$new_path"; then
26251    BOOT_JDK="$new_path"
26252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26254  fi
26255
26256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26257
26258  path="$BOOT_JDK"
26259  has_colon=`$ECHO $path | $GREP ^.:`
26260  new_path="$path"
26261  if test "x$has_colon" = x; then
26262    # Not in mixed or Windows style, start by that.
26263    new_path=`cmd //c echo $path`
26264  fi
26265
26266
26267  input_path="$new_path"
26268  # Check if we need to convert this using DOS-style short mode. If the path
26269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26270  # take no chances and rewrite it.
26271  # Note: m4 eats our [], so we need to use [ and ] instead.
26272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26273  if test "x$has_forbidden_chars" != x; then
26274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26276  fi
26277
26278
26279  windows_path="$new_path"
26280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26281    unix_path=`$CYGPATH -u "$windows_path"`
26282    new_path="$unix_path"
26283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26285    new_path="$unix_path"
26286  fi
26287
26288  if test "x$path" != "x$new_path"; then
26289    BOOT_JDK="$new_path"
26290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26292  fi
26293
26294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26296
26297    else
26298      # We're on a unix platform. Hooray! :)
26299      path="$BOOT_JDK"
26300      has_space=`$ECHO "$path" | $GREP " "`
26301      if test "x$has_space" != x; then
26302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26303$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26305      fi
26306
26307      # Use eval to expand a potential ~
26308      eval path="$path"
26309      if test ! -f "$path" && test ! -d "$path"; then
26310        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26311      fi
26312
26313      if test -d "$path"; then
26314        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26315      else
26316        dir="`$DIRNAME "$path"`"
26317        base="`$BASENAME "$path"`"
26318        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26319      fi
26320    fi
26321  fi
26322
26323            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26324$as_echo_n "checking for Boot JDK... " >&6; }
26325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26326$as_echo "$BOOT_JDK" >&6; }
26327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26328$as_echo_n "checking Boot JDK version... " >&6; }
26329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26331$as_echo "$BOOT_JDK_VERSION" >&6; }
26332          fi # end check jdk version
26333        fi # end check javac
26334      fi # end check java
26335    fi # end check boot jdk found
26336  fi
26337
26338
26339  if test "x$BOOT_JDK_FOUND" = xno; then
26340    # Now execute the test
26341
26342  if test "x$PROGRAMFILES" != x; then
26343    VIRTUAL_DIR="$PROGRAMFILES/Java"
26344
26345  windows_path="$VIRTUAL_DIR"
26346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26347    unix_path=`$CYGPATH -u "$windows_path"`
26348    VIRTUAL_DIR="$unix_path"
26349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26351    VIRTUAL_DIR="$unix_path"
26352  fi
26353
26354
26355  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26356  BOOT_JDK_SUFFIX=""
26357  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26358  if test "x$ALL_JDKS_FOUND" != x; then
26359    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26360
26361  if test "x$BOOT_JDK_FOUND" = xno; then
26362    # Now execute the test
26363
26364        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26365        if test -d "$BOOT_JDK"; then
26366          BOOT_JDK_FOUND=maybe
26367          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26368$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26369        fi
26370
26371
26372    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26373    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26374      # Do we have a bin/java?
26375      if test ! -x "$BOOT_JDK/bin/java"; then
26376        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26378        BOOT_JDK_FOUND=no
26379      else
26380        # Do we have a bin/javac?
26381        if test ! -x "$BOOT_JDK/bin/javac"; then
26382          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26384          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26385$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26386          BOOT_JDK_FOUND=no
26387        else
26388          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26389          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26390
26391          # Extra M4 quote needed to protect [] in grep expression.
26392          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26393          if test "x$FOUND_CORRECT_VERSION" = x; then
26394            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26396            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26397$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26398            BOOT_JDK_FOUND=no
26399          else
26400            # We're done! :-)
26401            BOOT_JDK_FOUND=yes
26402
26403  # Only process if variable expands to non-empty
26404
26405  if test "x$BOOT_JDK" != x; then
26406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26407
26408  # Input might be given as Windows format, start by converting to
26409  # unix format.
26410  path="$BOOT_JDK"
26411  new_path=`$CYGPATH -u "$path"`
26412
26413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26416  # "foo.exe" is OK but "foo" is an error.
26417  #
26418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26419  # It is also a way to make sure we got the proper file name for the real test later on.
26420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26421  if test "x$test_shortpath" = x; then
26422    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26423$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26424    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26425  fi
26426
26427  # Call helper function which possibly converts this using DOS-style short mode.
26428  # If so, the updated path is stored in $new_path.
26429
26430  input_path="$new_path"
26431  # Check if we need to convert this using DOS-style short mode. If the path
26432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26433  # take no chances and rewrite it.
26434  # Note: m4 eats our [], so we need to use [ and ] instead.
26435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26436  if test "x$has_forbidden_chars" != x; then
26437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26441      # Going to short mode and back again did indeed matter. Since short mode is
26442      # case insensitive, let's make it lowercase to improve readability.
26443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26444      # Now convert it back to Unix-style (cygpath)
26445      input_path=`$CYGPATH -u "$shortmode_path"`
26446      new_path="$input_path"
26447    fi
26448  fi
26449
26450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26451  if test "x$test_cygdrive_prefix" = x; then
26452    # As a simple fix, exclude /usr/bin since it's not a real path.
26453    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26455      # a path prefixed by /cygdrive for fixpath to work.
26456      new_path="$CYGWIN_ROOT_PATH$input_path"
26457    fi
26458  fi
26459
26460
26461  if test "x$path" != "x$new_path"; then
26462    BOOT_JDK="$new_path"
26463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26465  fi
26466
26467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26468
26469  path="$BOOT_JDK"
26470  has_colon=`$ECHO $path | $GREP ^.:`
26471  new_path="$path"
26472  if test "x$has_colon" = x; then
26473    # Not in mixed or Windows style, start by that.
26474    new_path=`cmd //c echo $path`
26475  fi
26476
26477
26478  input_path="$new_path"
26479  # Check if we need to convert this using DOS-style short mode. If the path
26480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26481  # take no chances and rewrite it.
26482  # Note: m4 eats our [], so we need to use [ and ] instead.
26483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26484  if test "x$has_forbidden_chars" != x; then
26485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26487  fi
26488
26489
26490  windows_path="$new_path"
26491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26492    unix_path=`$CYGPATH -u "$windows_path"`
26493    new_path="$unix_path"
26494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26496    new_path="$unix_path"
26497  fi
26498
26499  if test "x$path" != "x$new_path"; then
26500    BOOT_JDK="$new_path"
26501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26502$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26503  fi
26504
26505  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26506  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26507
26508    else
26509      # We're on a unix platform. Hooray! :)
26510      path="$BOOT_JDK"
26511      has_space=`$ECHO "$path" | $GREP " "`
26512      if test "x$has_space" != x; then
26513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26515        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26516      fi
26517
26518      # Use eval to expand a potential ~
26519      eval path="$path"
26520      if test ! -f "$path" && test ! -d "$path"; then
26521        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26522      fi
26523
26524      if test -d "$path"; then
26525        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26526      else
26527        dir="`$DIRNAME "$path"`"
26528        base="`$BASENAME "$path"`"
26529        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26530      fi
26531    fi
26532  fi
26533
26534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26535$as_echo_n "checking for Boot JDK... " >&6; }
26536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26537$as_echo "$BOOT_JDK" >&6; }
26538            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26539$as_echo_n "checking Boot JDK version... " >&6; }
26540            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26542$as_echo "$BOOT_JDK_VERSION" >&6; }
26543          fi # end check jdk version
26544        fi # end check javac
26545      fi # end check java
26546    fi # end check boot jdk found
26547  fi
26548
26549    done
26550  fi
26551
26552  fi
26553
26554
26555    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26556    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26557      # Do we have a bin/java?
26558      if test ! -x "$BOOT_JDK/bin/java"; then
26559        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26561        BOOT_JDK_FOUND=no
26562      else
26563        # Do we have a bin/javac?
26564        if test ! -x "$BOOT_JDK/bin/javac"; then
26565          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26567          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26568$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26569          BOOT_JDK_FOUND=no
26570        else
26571          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26572          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26573
26574          # Extra M4 quote needed to protect [] in grep expression.
26575          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26576          if test "x$FOUND_CORRECT_VERSION" = x; then
26577            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26579            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26580$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26581            BOOT_JDK_FOUND=no
26582          else
26583            # We're done! :-)
26584            BOOT_JDK_FOUND=yes
26585
26586  # Only process if variable expands to non-empty
26587
26588  if test "x$BOOT_JDK" != x; then
26589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26590
26591  # Input might be given as Windows format, start by converting to
26592  # unix format.
26593  path="$BOOT_JDK"
26594  new_path=`$CYGPATH -u "$path"`
26595
26596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26599  # "foo.exe" is OK but "foo" is an error.
26600  #
26601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26602  # It is also a way to make sure we got the proper file name for the real test later on.
26603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26604  if test "x$test_shortpath" = x; then
26605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26607    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26608  fi
26609
26610  # Call helper function which possibly converts this using DOS-style short mode.
26611  # If so, the updated path is stored in $new_path.
26612
26613  input_path="$new_path"
26614  # Check if we need to convert this using DOS-style short mode. If the path
26615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26616  # take no chances and rewrite it.
26617  # Note: m4 eats our [], so we need to use [ and ] instead.
26618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26619  if test "x$has_forbidden_chars" != x; then
26620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26624      # Going to short mode and back again did indeed matter. Since short mode is
26625      # case insensitive, let's make it lowercase to improve readability.
26626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26627      # Now convert it back to Unix-style (cygpath)
26628      input_path=`$CYGPATH -u "$shortmode_path"`
26629      new_path="$input_path"
26630    fi
26631  fi
26632
26633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26634  if test "x$test_cygdrive_prefix" = x; then
26635    # As a simple fix, exclude /usr/bin since it's not a real path.
26636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26638      # a path prefixed by /cygdrive for fixpath to work.
26639      new_path="$CYGWIN_ROOT_PATH$input_path"
26640    fi
26641  fi
26642
26643
26644  if test "x$path" != "x$new_path"; then
26645    BOOT_JDK="$new_path"
26646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26648  fi
26649
26650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26651
26652  path="$BOOT_JDK"
26653  has_colon=`$ECHO $path | $GREP ^.:`
26654  new_path="$path"
26655  if test "x$has_colon" = x; then
26656    # Not in mixed or Windows style, start by that.
26657    new_path=`cmd //c echo $path`
26658  fi
26659
26660
26661  input_path="$new_path"
26662  # Check if we need to convert this using DOS-style short mode. If the path
26663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26664  # take no chances and rewrite it.
26665  # Note: m4 eats our [], so we need to use [ and ] instead.
26666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26667  if test "x$has_forbidden_chars" != x; then
26668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26670  fi
26671
26672
26673  windows_path="$new_path"
26674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26675    unix_path=`$CYGPATH -u "$windows_path"`
26676    new_path="$unix_path"
26677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26679    new_path="$unix_path"
26680  fi
26681
26682  if test "x$path" != "x$new_path"; then
26683    BOOT_JDK="$new_path"
26684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26686  fi
26687
26688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26690
26691    else
26692      # We're on a unix platform. Hooray! :)
26693      path="$BOOT_JDK"
26694      has_space=`$ECHO "$path" | $GREP " "`
26695      if test "x$has_space" != x; then
26696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26697$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26699      fi
26700
26701      # Use eval to expand a potential ~
26702      eval path="$path"
26703      if test ! -f "$path" && test ! -d "$path"; then
26704        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26705      fi
26706
26707      if test -d "$path"; then
26708        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26709      else
26710        dir="`$DIRNAME "$path"`"
26711        base="`$BASENAME "$path"`"
26712        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26713      fi
26714    fi
26715  fi
26716
26717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26718$as_echo_n "checking for Boot JDK... " >&6; }
26719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26720$as_echo "$BOOT_JDK" >&6; }
26721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26722$as_echo_n "checking Boot JDK version... " >&6; }
26723            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26725$as_echo "$BOOT_JDK_VERSION" >&6; }
26726          fi # end check jdk version
26727        fi # end check javac
26728      fi # end check java
26729    fi # end check boot jdk found
26730  fi
26731
26732
26733  if test "x$BOOT_JDK_FOUND" = xno; then
26734    # Now execute the test
26735
26736  if test "x$ProgramFiles" != x; then
26737    VIRTUAL_DIR="$ProgramFiles/Java"
26738
26739  windows_path="$VIRTUAL_DIR"
26740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26741    unix_path=`$CYGPATH -u "$windows_path"`
26742    VIRTUAL_DIR="$unix_path"
26743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26745    VIRTUAL_DIR="$unix_path"
26746  fi
26747
26748
26749  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26750  BOOT_JDK_SUFFIX=""
26751  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26752  if test "x$ALL_JDKS_FOUND" != x; then
26753    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26754
26755  if test "x$BOOT_JDK_FOUND" = xno; then
26756    # Now execute the test
26757
26758        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26759        if test -d "$BOOT_JDK"; then
26760          BOOT_JDK_FOUND=maybe
26761          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26762$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26763        fi
26764
26765
26766    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26767    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26768      # Do we have a bin/java?
26769      if test ! -x "$BOOT_JDK/bin/java"; then
26770        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26772        BOOT_JDK_FOUND=no
26773      else
26774        # Do we have a bin/javac?
26775        if test ! -x "$BOOT_JDK/bin/javac"; then
26776          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26778          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26779$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26780          BOOT_JDK_FOUND=no
26781        else
26782          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26783          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26784
26785          # Extra M4 quote needed to protect [] in grep expression.
26786          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26787          if test "x$FOUND_CORRECT_VERSION" = x; then
26788            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26790            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26791$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26792            BOOT_JDK_FOUND=no
26793          else
26794            # We're done! :-)
26795            BOOT_JDK_FOUND=yes
26796
26797  # Only process if variable expands to non-empty
26798
26799  if test "x$BOOT_JDK" != x; then
26800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26801
26802  # Input might be given as Windows format, start by converting to
26803  # unix format.
26804  path="$BOOT_JDK"
26805  new_path=`$CYGPATH -u "$path"`
26806
26807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26810  # "foo.exe" is OK but "foo" is an error.
26811  #
26812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26813  # It is also a way to make sure we got the proper file name for the real test later on.
26814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26815  if test "x$test_shortpath" = x; then
26816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26818    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26819  fi
26820
26821  # Call helper function which possibly converts this using DOS-style short mode.
26822  # If so, the updated path is stored in $new_path.
26823
26824  input_path="$new_path"
26825  # Check if we need to convert this using DOS-style short mode. If the path
26826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26827  # take no chances and rewrite it.
26828  # Note: m4 eats our [], so we need to use [ and ] instead.
26829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26830  if test "x$has_forbidden_chars" != x; then
26831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26835      # Going to short mode and back again did indeed matter. Since short mode is
26836      # case insensitive, let's make it lowercase to improve readability.
26837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26838      # Now convert it back to Unix-style (cygpath)
26839      input_path=`$CYGPATH -u "$shortmode_path"`
26840      new_path="$input_path"
26841    fi
26842  fi
26843
26844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26845  if test "x$test_cygdrive_prefix" = x; then
26846    # As a simple fix, exclude /usr/bin since it's not a real path.
26847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26849      # a path prefixed by /cygdrive for fixpath to work.
26850      new_path="$CYGWIN_ROOT_PATH$input_path"
26851    fi
26852  fi
26853
26854
26855  if test "x$path" != "x$new_path"; then
26856    BOOT_JDK="$new_path"
26857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26859  fi
26860
26861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26862
26863  path="$BOOT_JDK"
26864  has_colon=`$ECHO $path | $GREP ^.:`
26865  new_path="$path"
26866  if test "x$has_colon" = x; then
26867    # Not in mixed or Windows style, start by that.
26868    new_path=`cmd //c echo $path`
26869  fi
26870
26871
26872  input_path="$new_path"
26873  # Check if we need to convert this using DOS-style short mode. If the path
26874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26875  # take no chances and rewrite it.
26876  # Note: m4 eats our [], so we need to use [ and ] instead.
26877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26878  if test "x$has_forbidden_chars" != x; then
26879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26881  fi
26882
26883
26884  windows_path="$new_path"
26885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26886    unix_path=`$CYGPATH -u "$windows_path"`
26887    new_path="$unix_path"
26888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26890    new_path="$unix_path"
26891  fi
26892
26893  if test "x$path" != "x$new_path"; then
26894    BOOT_JDK="$new_path"
26895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26897  fi
26898
26899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26901
26902    else
26903      # We're on a unix platform. Hooray! :)
26904      path="$BOOT_JDK"
26905      has_space=`$ECHO "$path" | $GREP " "`
26906      if test "x$has_space" != x; then
26907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26910      fi
26911
26912      # Use eval to expand a potential ~
26913      eval path="$path"
26914      if test ! -f "$path" && test ! -d "$path"; then
26915        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26916      fi
26917
26918      if test -d "$path"; then
26919        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26920      else
26921        dir="`$DIRNAME "$path"`"
26922        base="`$BASENAME "$path"`"
26923        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26924      fi
26925    fi
26926  fi
26927
26928            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26929$as_echo_n "checking for Boot JDK... " >&6; }
26930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26931$as_echo "$BOOT_JDK" >&6; }
26932            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26933$as_echo_n "checking Boot JDK version... " >&6; }
26934            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26936$as_echo "$BOOT_JDK_VERSION" >&6; }
26937          fi # end check jdk version
26938        fi # end check javac
26939      fi # end check java
26940    fi # end check boot jdk found
26941  fi
26942
26943    done
26944  fi
26945
26946  fi
26947
26948
26949    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26950    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26951      # Do we have a bin/java?
26952      if test ! -x "$BOOT_JDK/bin/java"; then
26953        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26955        BOOT_JDK_FOUND=no
26956      else
26957        # Do we have a bin/javac?
26958        if test ! -x "$BOOT_JDK/bin/javac"; then
26959          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26961          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26962$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26963          BOOT_JDK_FOUND=no
26964        else
26965          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26966          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26967
26968          # Extra M4 quote needed to protect [] in grep expression.
26969          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26970          if test "x$FOUND_CORRECT_VERSION" = x; then
26971            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26973            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26974$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26975            BOOT_JDK_FOUND=no
26976          else
26977            # We're done! :-)
26978            BOOT_JDK_FOUND=yes
26979
26980  # Only process if variable expands to non-empty
26981
26982  if test "x$BOOT_JDK" != x; then
26983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26984
26985  # Input might be given as Windows format, start by converting to
26986  # unix format.
26987  path="$BOOT_JDK"
26988  new_path=`$CYGPATH -u "$path"`
26989
26990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26993  # "foo.exe" is OK but "foo" is an error.
26994  #
26995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26996  # It is also a way to make sure we got the proper file name for the real test later on.
26997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26998  if test "x$test_shortpath" = x; then
26999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27001    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27002  fi
27003
27004  # Call helper function which possibly converts this using DOS-style short mode.
27005  # If so, the updated path is stored in $new_path.
27006
27007  input_path="$new_path"
27008  # Check if we need to convert this using DOS-style short mode. If the path
27009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27010  # take no chances and rewrite it.
27011  # Note: m4 eats our [], so we need to use [ and ] instead.
27012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27013  if test "x$has_forbidden_chars" != x; then
27014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27018      # Going to short mode and back again did indeed matter. Since short mode is
27019      # case insensitive, let's make it lowercase to improve readability.
27020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27021      # Now convert it back to Unix-style (cygpath)
27022      input_path=`$CYGPATH -u "$shortmode_path"`
27023      new_path="$input_path"
27024    fi
27025  fi
27026
27027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27028  if test "x$test_cygdrive_prefix" = x; then
27029    # As a simple fix, exclude /usr/bin since it's not a real path.
27030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27032      # a path prefixed by /cygdrive for fixpath to work.
27033      new_path="$CYGWIN_ROOT_PATH$input_path"
27034    fi
27035  fi
27036
27037
27038  if test "x$path" != "x$new_path"; then
27039    BOOT_JDK="$new_path"
27040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27042  fi
27043
27044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27045
27046  path="$BOOT_JDK"
27047  has_colon=`$ECHO $path | $GREP ^.:`
27048  new_path="$path"
27049  if test "x$has_colon" = x; then
27050    # Not in mixed or Windows style, start by that.
27051    new_path=`cmd //c echo $path`
27052  fi
27053
27054
27055  input_path="$new_path"
27056  # Check if we need to convert this using DOS-style short mode. If the path
27057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27058  # take no chances and rewrite it.
27059  # Note: m4 eats our [], so we need to use [ and ] instead.
27060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27061  if test "x$has_forbidden_chars" != x; then
27062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27064  fi
27065
27066
27067  windows_path="$new_path"
27068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27069    unix_path=`$CYGPATH -u "$windows_path"`
27070    new_path="$unix_path"
27071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27073    new_path="$unix_path"
27074  fi
27075
27076  if test "x$path" != "x$new_path"; then
27077    BOOT_JDK="$new_path"
27078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27080  fi
27081
27082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27084
27085    else
27086      # We're on a unix platform. Hooray! :)
27087      path="$BOOT_JDK"
27088      has_space=`$ECHO "$path" | $GREP " "`
27089      if test "x$has_space" != x; then
27090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27093      fi
27094
27095      # Use eval to expand a potential ~
27096      eval path="$path"
27097      if test ! -f "$path" && test ! -d "$path"; then
27098        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27099      fi
27100
27101      if test -d "$path"; then
27102        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27103      else
27104        dir="`$DIRNAME "$path"`"
27105        base="`$BASENAME "$path"`"
27106        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27107      fi
27108    fi
27109  fi
27110
27111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27112$as_echo_n "checking for Boot JDK... " >&6; }
27113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27114$as_echo "$BOOT_JDK" >&6; }
27115            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27116$as_echo_n "checking Boot JDK version... " >&6; }
27117            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27119$as_echo "$BOOT_JDK_VERSION" >&6; }
27120          fi # end check jdk version
27121        fi # end check javac
27122      fi # end check java
27123    fi # end check boot jdk found
27124  fi
27125
27126
27127  if test "x$BOOT_JDK_FOUND" = xno; then
27128    # Now execute the test
27129
27130  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27131  BOOT_JDK_SUFFIX=""
27132  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27133  if test "x$ALL_JDKS_FOUND" != x; then
27134    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27135
27136  if test "x$BOOT_JDK_FOUND" = xno; then
27137    # Now execute the test
27138
27139        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27140        if test -d "$BOOT_JDK"; then
27141          BOOT_JDK_FOUND=maybe
27142          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27143$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27144        fi
27145
27146
27147    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27148    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27149      # Do we have a bin/java?
27150      if test ! -x "$BOOT_JDK/bin/java"; then
27151        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27153        BOOT_JDK_FOUND=no
27154      else
27155        # Do we have a bin/javac?
27156        if test ! -x "$BOOT_JDK/bin/javac"; then
27157          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27159          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27160$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27161          BOOT_JDK_FOUND=no
27162        else
27163          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27164          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27165
27166          # Extra M4 quote needed to protect [] in grep expression.
27167          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27168          if test "x$FOUND_CORRECT_VERSION" = x; then
27169            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27171            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27172$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27173            BOOT_JDK_FOUND=no
27174          else
27175            # We're done! :-)
27176            BOOT_JDK_FOUND=yes
27177
27178  # Only process if variable expands to non-empty
27179
27180  if test "x$BOOT_JDK" != x; then
27181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27182
27183  # Input might be given as Windows format, start by converting to
27184  # unix format.
27185  path="$BOOT_JDK"
27186  new_path=`$CYGPATH -u "$path"`
27187
27188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27191  # "foo.exe" is OK but "foo" is an error.
27192  #
27193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27194  # It is also a way to make sure we got the proper file name for the real test later on.
27195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27196  if test "x$test_shortpath" = x; then
27197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27199    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27200  fi
27201
27202  # Call helper function which possibly converts this using DOS-style short mode.
27203  # If so, the updated path is stored in $new_path.
27204
27205  input_path="$new_path"
27206  # Check if we need to convert this using DOS-style short mode. If the path
27207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27208  # take no chances and rewrite it.
27209  # Note: m4 eats our [], so we need to use [ and ] instead.
27210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27211  if test "x$has_forbidden_chars" != x; then
27212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27216      # Going to short mode and back again did indeed matter. Since short mode is
27217      # case insensitive, let's make it lowercase to improve readability.
27218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27219      # Now convert it back to Unix-style (cygpath)
27220      input_path=`$CYGPATH -u "$shortmode_path"`
27221      new_path="$input_path"
27222    fi
27223  fi
27224
27225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27226  if test "x$test_cygdrive_prefix" = x; then
27227    # As a simple fix, exclude /usr/bin since it's not a real path.
27228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27230      # a path prefixed by /cygdrive for fixpath to work.
27231      new_path="$CYGWIN_ROOT_PATH$input_path"
27232    fi
27233  fi
27234
27235
27236  if test "x$path" != "x$new_path"; then
27237    BOOT_JDK="$new_path"
27238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27240  fi
27241
27242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27243
27244  path="$BOOT_JDK"
27245  has_colon=`$ECHO $path | $GREP ^.:`
27246  new_path="$path"
27247  if test "x$has_colon" = x; then
27248    # Not in mixed or Windows style, start by that.
27249    new_path=`cmd //c echo $path`
27250  fi
27251
27252
27253  input_path="$new_path"
27254  # Check if we need to convert this using DOS-style short mode. If the path
27255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27256  # take no chances and rewrite it.
27257  # Note: m4 eats our [], so we need to use [ and ] instead.
27258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27259  if test "x$has_forbidden_chars" != x; then
27260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27262  fi
27263
27264
27265  windows_path="$new_path"
27266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27267    unix_path=`$CYGPATH -u "$windows_path"`
27268    new_path="$unix_path"
27269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27271    new_path="$unix_path"
27272  fi
27273
27274  if test "x$path" != "x$new_path"; then
27275    BOOT_JDK="$new_path"
27276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27278  fi
27279
27280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27282
27283    else
27284      # We're on a unix platform. Hooray! :)
27285      path="$BOOT_JDK"
27286      has_space=`$ECHO "$path" | $GREP " "`
27287      if test "x$has_space" != x; then
27288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27291      fi
27292
27293      # Use eval to expand a potential ~
27294      eval path="$path"
27295      if test ! -f "$path" && test ! -d "$path"; then
27296        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27297      fi
27298
27299      if test -d "$path"; then
27300        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27301      else
27302        dir="`$DIRNAME "$path"`"
27303        base="`$BASENAME "$path"`"
27304        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27305      fi
27306    fi
27307  fi
27308
27309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27310$as_echo_n "checking for Boot JDK... " >&6; }
27311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27312$as_echo "$BOOT_JDK" >&6; }
27313            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27314$as_echo_n "checking Boot JDK version... " >&6; }
27315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27317$as_echo "$BOOT_JDK_VERSION" >&6; }
27318          fi # end check jdk version
27319        fi # end check javac
27320      fi # end check java
27321    fi # end check boot jdk found
27322  fi
27323
27324    done
27325  fi
27326
27327
27328    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27329    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27330      # Do we have a bin/java?
27331      if test ! -x "$BOOT_JDK/bin/java"; then
27332        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27334        BOOT_JDK_FOUND=no
27335      else
27336        # Do we have a bin/javac?
27337        if test ! -x "$BOOT_JDK/bin/javac"; then
27338          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27340          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27341$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27342          BOOT_JDK_FOUND=no
27343        else
27344          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27345          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27346
27347          # Extra M4 quote needed to protect [] in grep expression.
27348          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27349          if test "x$FOUND_CORRECT_VERSION" = x; then
27350            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27352            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27353$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27354            BOOT_JDK_FOUND=no
27355          else
27356            # We're done! :-)
27357            BOOT_JDK_FOUND=yes
27358
27359  # Only process if variable expands to non-empty
27360
27361  if test "x$BOOT_JDK" != x; then
27362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27363
27364  # Input might be given as Windows format, start by converting to
27365  # unix format.
27366  path="$BOOT_JDK"
27367  new_path=`$CYGPATH -u "$path"`
27368
27369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27372  # "foo.exe" is OK but "foo" is an error.
27373  #
27374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27375  # It is also a way to make sure we got the proper file name for the real test later on.
27376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27377  if test "x$test_shortpath" = x; then
27378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27380    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27381  fi
27382
27383  # Call helper function which possibly converts this using DOS-style short mode.
27384  # If so, the updated path is stored in $new_path.
27385
27386  input_path="$new_path"
27387  # Check if we need to convert this using DOS-style short mode. If the path
27388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27389  # take no chances and rewrite it.
27390  # Note: m4 eats our [], so we need to use [ and ] instead.
27391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27392  if test "x$has_forbidden_chars" != x; then
27393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27397      # Going to short mode and back again did indeed matter. Since short mode is
27398      # case insensitive, let's make it lowercase to improve readability.
27399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27400      # Now convert it back to Unix-style (cygpath)
27401      input_path=`$CYGPATH -u "$shortmode_path"`
27402      new_path="$input_path"
27403    fi
27404  fi
27405
27406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27407  if test "x$test_cygdrive_prefix" = x; then
27408    # As a simple fix, exclude /usr/bin since it's not a real path.
27409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27411      # a path prefixed by /cygdrive for fixpath to work.
27412      new_path="$CYGWIN_ROOT_PATH$input_path"
27413    fi
27414  fi
27415
27416
27417  if test "x$path" != "x$new_path"; then
27418    BOOT_JDK="$new_path"
27419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27421  fi
27422
27423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27424
27425  path="$BOOT_JDK"
27426  has_colon=`$ECHO $path | $GREP ^.:`
27427  new_path="$path"
27428  if test "x$has_colon" = x; then
27429    # Not in mixed or Windows style, start by that.
27430    new_path=`cmd //c echo $path`
27431  fi
27432
27433
27434  input_path="$new_path"
27435  # Check if we need to convert this using DOS-style short mode. If the path
27436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27437  # take no chances and rewrite it.
27438  # Note: m4 eats our [], so we need to use [ and ] instead.
27439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27440  if test "x$has_forbidden_chars" != x; then
27441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27443  fi
27444
27445
27446  windows_path="$new_path"
27447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27448    unix_path=`$CYGPATH -u "$windows_path"`
27449    new_path="$unix_path"
27450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27452    new_path="$unix_path"
27453  fi
27454
27455  if test "x$path" != "x$new_path"; then
27456    BOOT_JDK="$new_path"
27457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27459  fi
27460
27461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27463
27464    else
27465      # We're on a unix platform. Hooray! :)
27466      path="$BOOT_JDK"
27467      has_space=`$ECHO "$path" | $GREP " "`
27468      if test "x$has_space" != x; then
27469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27472      fi
27473
27474      # Use eval to expand a potential ~
27475      eval path="$path"
27476      if test ! -f "$path" && test ! -d "$path"; then
27477        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27478      fi
27479
27480      if test -d "$path"; then
27481        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27482      else
27483        dir="`$DIRNAME "$path"`"
27484        base="`$BASENAME "$path"`"
27485        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27486      fi
27487    fi
27488  fi
27489
27490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27491$as_echo_n "checking for Boot JDK... " >&6; }
27492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27493$as_echo "$BOOT_JDK" >&6; }
27494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27495$as_echo_n "checking Boot JDK version... " >&6; }
27496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27498$as_echo "$BOOT_JDK_VERSION" >&6; }
27499          fi # end check jdk version
27500        fi # end check javac
27501      fi # end check java
27502    fi # end check boot jdk found
27503  fi
27504
27505  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27506
27507  if test "x$BOOT_JDK_FOUND" = xno; then
27508    # Now execute the test
27509
27510  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27511  BOOT_JDK_SUFFIX="/Contents/Home"
27512  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27513  if test "x$ALL_JDKS_FOUND" != x; then
27514    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27515
27516  if test "x$BOOT_JDK_FOUND" = xno; then
27517    # Now execute the test
27518
27519        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27520        if test -d "$BOOT_JDK"; then
27521          BOOT_JDK_FOUND=maybe
27522          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27523$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27524        fi
27525
27526
27527    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27528    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27529      # Do we have a bin/java?
27530      if test ! -x "$BOOT_JDK/bin/java"; then
27531        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27533        BOOT_JDK_FOUND=no
27534      else
27535        # Do we have a bin/javac?
27536        if test ! -x "$BOOT_JDK/bin/javac"; then
27537          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27539          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27540$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27541          BOOT_JDK_FOUND=no
27542        else
27543          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27544          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27545
27546          # Extra M4 quote needed to protect [] in grep expression.
27547          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27548          if test "x$FOUND_CORRECT_VERSION" = x; then
27549            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27551            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27552$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27553            BOOT_JDK_FOUND=no
27554          else
27555            # We're done! :-)
27556            BOOT_JDK_FOUND=yes
27557
27558  # Only process if variable expands to non-empty
27559
27560  if test "x$BOOT_JDK" != x; then
27561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27562
27563  # Input might be given as Windows format, start by converting to
27564  # unix format.
27565  path="$BOOT_JDK"
27566  new_path=`$CYGPATH -u "$path"`
27567
27568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27571  # "foo.exe" is OK but "foo" is an error.
27572  #
27573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27574  # It is also a way to make sure we got the proper file name for the real test later on.
27575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27576  if test "x$test_shortpath" = x; then
27577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27579    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27580  fi
27581
27582  # Call helper function which possibly converts this using DOS-style short mode.
27583  # If so, the updated path is stored in $new_path.
27584
27585  input_path="$new_path"
27586  # Check if we need to convert this using DOS-style short mode. If the path
27587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27588  # take no chances and rewrite it.
27589  # Note: m4 eats our [], so we need to use [ and ] instead.
27590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27591  if test "x$has_forbidden_chars" != x; then
27592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27596      # Going to short mode and back again did indeed matter. Since short mode is
27597      # case insensitive, let's make it lowercase to improve readability.
27598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27599      # Now convert it back to Unix-style (cygpath)
27600      input_path=`$CYGPATH -u "$shortmode_path"`
27601      new_path="$input_path"
27602    fi
27603  fi
27604
27605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27606  if test "x$test_cygdrive_prefix" = x; then
27607    # As a simple fix, exclude /usr/bin since it's not a real path.
27608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27610      # a path prefixed by /cygdrive for fixpath to work.
27611      new_path="$CYGWIN_ROOT_PATH$input_path"
27612    fi
27613  fi
27614
27615
27616  if test "x$path" != "x$new_path"; then
27617    BOOT_JDK="$new_path"
27618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27620  fi
27621
27622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27623
27624  path="$BOOT_JDK"
27625  has_colon=`$ECHO $path | $GREP ^.:`
27626  new_path="$path"
27627  if test "x$has_colon" = x; then
27628    # Not in mixed or Windows style, start by that.
27629    new_path=`cmd //c echo $path`
27630  fi
27631
27632
27633  input_path="$new_path"
27634  # Check if we need to convert this using DOS-style short mode. If the path
27635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27636  # take no chances and rewrite it.
27637  # Note: m4 eats our [], so we need to use [ and ] instead.
27638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27639  if test "x$has_forbidden_chars" != x; then
27640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27642  fi
27643
27644
27645  windows_path="$new_path"
27646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27647    unix_path=`$CYGPATH -u "$windows_path"`
27648    new_path="$unix_path"
27649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27651    new_path="$unix_path"
27652  fi
27653
27654  if test "x$path" != "x$new_path"; then
27655    BOOT_JDK="$new_path"
27656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27658  fi
27659
27660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27662
27663    else
27664      # We're on a unix platform. Hooray! :)
27665      path="$BOOT_JDK"
27666      has_space=`$ECHO "$path" | $GREP " "`
27667      if test "x$has_space" != x; then
27668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27671      fi
27672
27673      # Use eval to expand a potential ~
27674      eval path="$path"
27675      if test ! -f "$path" && test ! -d "$path"; then
27676        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27677      fi
27678
27679      if test -d "$path"; then
27680        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27681      else
27682        dir="`$DIRNAME "$path"`"
27683        base="`$BASENAME "$path"`"
27684        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27685      fi
27686    fi
27687  fi
27688
27689            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27690$as_echo_n "checking for Boot JDK... " >&6; }
27691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27692$as_echo "$BOOT_JDK" >&6; }
27693            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27694$as_echo_n "checking Boot JDK version... " >&6; }
27695            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27697$as_echo "$BOOT_JDK_VERSION" >&6; }
27698          fi # end check jdk version
27699        fi # end check javac
27700      fi # end check java
27701    fi # end check boot jdk found
27702  fi
27703
27704    done
27705  fi
27706
27707
27708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27710      # Do we have a bin/java?
27711      if test ! -x "$BOOT_JDK/bin/java"; then
27712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27714        BOOT_JDK_FOUND=no
27715      else
27716        # Do we have a bin/javac?
27717        if test ! -x "$BOOT_JDK/bin/javac"; then
27718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27722          BOOT_JDK_FOUND=no
27723        else
27724          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27725          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27726
27727          # Extra M4 quote needed to protect [] in grep expression.
27728          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27729          if test "x$FOUND_CORRECT_VERSION" = x; then
27730            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27732            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27733$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27734            BOOT_JDK_FOUND=no
27735          else
27736            # We're done! :-)
27737            BOOT_JDK_FOUND=yes
27738
27739  # Only process if variable expands to non-empty
27740
27741  if test "x$BOOT_JDK" != x; then
27742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27743
27744  # Input might be given as Windows format, start by converting to
27745  # unix format.
27746  path="$BOOT_JDK"
27747  new_path=`$CYGPATH -u "$path"`
27748
27749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27752  # "foo.exe" is OK but "foo" is an error.
27753  #
27754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27755  # It is also a way to make sure we got the proper file name for the real test later on.
27756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27757  if test "x$test_shortpath" = x; then
27758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27760    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27761  fi
27762
27763  # Call helper function which possibly converts this using DOS-style short mode.
27764  # If so, the updated path is stored in $new_path.
27765
27766  input_path="$new_path"
27767  # Check if we need to convert this using DOS-style short mode. If the path
27768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27769  # take no chances and rewrite it.
27770  # Note: m4 eats our [], so we need to use [ and ] instead.
27771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27772  if test "x$has_forbidden_chars" != x; then
27773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27777      # Going to short mode and back again did indeed matter. Since short mode is
27778      # case insensitive, let's make it lowercase to improve readability.
27779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27780      # Now convert it back to Unix-style (cygpath)
27781      input_path=`$CYGPATH -u "$shortmode_path"`
27782      new_path="$input_path"
27783    fi
27784  fi
27785
27786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27787  if test "x$test_cygdrive_prefix" = x; then
27788    # As a simple fix, exclude /usr/bin since it's not a real path.
27789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27791      # a path prefixed by /cygdrive for fixpath to work.
27792      new_path="$CYGWIN_ROOT_PATH$input_path"
27793    fi
27794  fi
27795
27796
27797  if test "x$path" != "x$new_path"; then
27798    BOOT_JDK="$new_path"
27799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27800$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27801  fi
27802
27803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27804
27805  path="$BOOT_JDK"
27806  has_colon=`$ECHO $path | $GREP ^.:`
27807  new_path="$path"
27808  if test "x$has_colon" = x; then
27809    # Not in mixed or Windows style, start by that.
27810    new_path=`cmd //c echo $path`
27811  fi
27812
27813
27814  input_path="$new_path"
27815  # Check if we need to convert this using DOS-style short mode. If the path
27816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27817  # take no chances and rewrite it.
27818  # Note: m4 eats our [], so we need to use [ and ] instead.
27819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27820  if test "x$has_forbidden_chars" != x; then
27821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27823  fi
27824
27825
27826  windows_path="$new_path"
27827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27828    unix_path=`$CYGPATH -u "$windows_path"`
27829    new_path="$unix_path"
27830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27832    new_path="$unix_path"
27833  fi
27834
27835  if test "x$path" != "x$new_path"; then
27836    BOOT_JDK="$new_path"
27837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27839  fi
27840
27841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27843
27844    else
27845      # We're on a unix platform. Hooray! :)
27846      path="$BOOT_JDK"
27847      has_space=`$ECHO "$path" | $GREP " "`
27848      if test "x$has_space" != x; then
27849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27852      fi
27853
27854      # Use eval to expand a potential ~
27855      eval path="$path"
27856      if test ! -f "$path" && test ! -d "$path"; then
27857        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27858      fi
27859
27860      if test -d "$path"; then
27861        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27862      else
27863        dir="`$DIRNAME "$path"`"
27864        base="`$BASENAME "$path"`"
27865        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27866      fi
27867    fi
27868  fi
27869
27870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27871$as_echo_n "checking for Boot JDK... " >&6; }
27872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27873$as_echo "$BOOT_JDK" >&6; }
27874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27875$as_echo_n "checking Boot JDK version... " >&6; }
27876            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27878$as_echo "$BOOT_JDK_VERSION" >&6; }
27879          fi # end check jdk version
27880        fi # end check javac
27881      fi # end check java
27882    fi # end check boot jdk found
27883  fi
27884
27885
27886  if test "x$BOOT_JDK_FOUND" = xno; then
27887    # Now execute the test
27888
27889  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27890  BOOT_JDK_SUFFIX="/Contents/Home"
27891  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27892  if test "x$ALL_JDKS_FOUND" != x; then
27893    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27894
27895  if test "x$BOOT_JDK_FOUND" = xno; then
27896    # Now execute the test
27897
27898        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27899        if test -d "$BOOT_JDK"; then
27900          BOOT_JDK_FOUND=maybe
27901          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27902$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27903        fi
27904
27905
27906    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27907    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27908      # Do we have a bin/java?
27909      if test ! -x "$BOOT_JDK/bin/java"; then
27910        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27912        BOOT_JDK_FOUND=no
27913      else
27914        # Do we have a bin/javac?
27915        if test ! -x "$BOOT_JDK/bin/javac"; then
27916          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27918          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27919$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27920          BOOT_JDK_FOUND=no
27921        else
27922          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27923          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27924
27925          # Extra M4 quote needed to protect [] in grep expression.
27926          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27927          if test "x$FOUND_CORRECT_VERSION" = x; then
27928            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27930            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27931$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27932            BOOT_JDK_FOUND=no
27933          else
27934            # We're done! :-)
27935            BOOT_JDK_FOUND=yes
27936
27937  # Only process if variable expands to non-empty
27938
27939  if test "x$BOOT_JDK" != x; then
27940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941
27942  # Input might be given as Windows format, start by converting to
27943  # unix format.
27944  path="$BOOT_JDK"
27945  new_path=`$CYGPATH -u "$path"`
27946
27947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27950  # "foo.exe" is OK but "foo" is an error.
27951  #
27952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27953  # It is also a way to make sure we got the proper file name for the real test later on.
27954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27955  if test "x$test_shortpath" = x; then
27956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27957$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27958    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27959  fi
27960
27961  # Call helper function which possibly converts this using DOS-style short mode.
27962  # If so, the updated path is stored in $new_path.
27963
27964  input_path="$new_path"
27965  # Check if we need to convert this using DOS-style short mode. If the path
27966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27967  # take no chances and rewrite it.
27968  # Note: m4 eats our [], so we need to use [ and ] instead.
27969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27970  if test "x$has_forbidden_chars" != x; then
27971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27975      # Going to short mode and back again did indeed matter. Since short mode is
27976      # case insensitive, let's make it lowercase to improve readability.
27977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27978      # Now convert it back to Unix-style (cygpath)
27979      input_path=`$CYGPATH -u "$shortmode_path"`
27980      new_path="$input_path"
27981    fi
27982  fi
27983
27984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27985  if test "x$test_cygdrive_prefix" = x; then
27986    # As a simple fix, exclude /usr/bin since it's not a real path.
27987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27989      # a path prefixed by /cygdrive for fixpath to work.
27990      new_path="$CYGWIN_ROOT_PATH$input_path"
27991    fi
27992  fi
27993
27994
27995  if test "x$path" != "x$new_path"; then
27996    BOOT_JDK="$new_path"
27997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27998$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27999  fi
28000
28001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28002
28003  path="$BOOT_JDK"
28004  has_colon=`$ECHO $path | $GREP ^.:`
28005  new_path="$path"
28006  if test "x$has_colon" = x; then
28007    # Not in mixed or Windows style, start by that.
28008    new_path=`cmd //c echo $path`
28009  fi
28010
28011
28012  input_path="$new_path"
28013  # Check if we need to convert this using DOS-style short mode. If the path
28014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28015  # take no chances and rewrite it.
28016  # Note: m4 eats our [], so we need to use [ and ] instead.
28017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28018  if test "x$has_forbidden_chars" != x; then
28019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28021  fi
28022
28023
28024  windows_path="$new_path"
28025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28026    unix_path=`$CYGPATH -u "$windows_path"`
28027    new_path="$unix_path"
28028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28030    new_path="$unix_path"
28031  fi
28032
28033  if test "x$path" != "x$new_path"; then
28034    BOOT_JDK="$new_path"
28035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28037  fi
28038
28039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28041
28042    else
28043      # We're on a unix platform. Hooray! :)
28044      path="$BOOT_JDK"
28045      has_space=`$ECHO "$path" | $GREP " "`
28046      if test "x$has_space" != x; then
28047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28050      fi
28051
28052      # Use eval to expand a potential ~
28053      eval path="$path"
28054      if test ! -f "$path" && test ! -d "$path"; then
28055        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28056      fi
28057
28058      if test -d "$path"; then
28059        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28060      else
28061        dir="`$DIRNAME "$path"`"
28062        base="`$BASENAME "$path"`"
28063        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28064      fi
28065    fi
28066  fi
28067
28068            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28069$as_echo_n "checking for Boot JDK... " >&6; }
28070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28071$as_echo "$BOOT_JDK" >&6; }
28072            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28073$as_echo_n "checking Boot JDK version... " >&6; }
28074            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28076$as_echo "$BOOT_JDK_VERSION" >&6; }
28077          fi # end check jdk version
28078        fi # end check javac
28079      fi # end check java
28080    fi # end check boot jdk found
28081  fi
28082
28083    done
28084  fi
28085
28086
28087    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28088    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28089      # Do we have a bin/java?
28090      if test ! -x "$BOOT_JDK/bin/java"; then
28091        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28093        BOOT_JDK_FOUND=no
28094      else
28095        # Do we have a bin/javac?
28096        if test ! -x "$BOOT_JDK/bin/javac"; then
28097          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28099          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28100$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28101          BOOT_JDK_FOUND=no
28102        else
28103          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28104          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28105
28106          # Extra M4 quote needed to protect [] in grep expression.
28107          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28108          if test "x$FOUND_CORRECT_VERSION" = x; then
28109            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28111            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28112$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28113            BOOT_JDK_FOUND=no
28114          else
28115            # We're done! :-)
28116            BOOT_JDK_FOUND=yes
28117
28118  # Only process if variable expands to non-empty
28119
28120  if test "x$BOOT_JDK" != x; then
28121    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28122
28123  # Input might be given as Windows format, start by converting to
28124  # unix format.
28125  path="$BOOT_JDK"
28126  new_path=`$CYGPATH -u "$path"`
28127
28128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28131  # "foo.exe" is OK but "foo" is an error.
28132  #
28133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28134  # It is also a way to make sure we got the proper file name for the real test later on.
28135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28136  if test "x$test_shortpath" = x; then
28137    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28139    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28140  fi
28141
28142  # Call helper function which possibly converts this using DOS-style short mode.
28143  # If so, the updated path is stored in $new_path.
28144
28145  input_path="$new_path"
28146  # Check if we need to convert this using DOS-style short mode. If the path
28147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28148  # take no chances and rewrite it.
28149  # Note: m4 eats our [], so we need to use [ and ] instead.
28150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28151  if test "x$has_forbidden_chars" != x; then
28152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28156      # Going to short mode and back again did indeed matter. Since short mode is
28157      # case insensitive, let's make it lowercase to improve readability.
28158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28159      # Now convert it back to Unix-style (cygpath)
28160      input_path=`$CYGPATH -u "$shortmode_path"`
28161      new_path="$input_path"
28162    fi
28163  fi
28164
28165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28166  if test "x$test_cygdrive_prefix" = x; then
28167    # As a simple fix, exclude /usr/bin since it's not a real path.
28168    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28170      # a path prefixed by /cygdrive for fixpath to work.
28171      new_path="$CYGWIN_ROOT_PATH$input_path"
28172    fi
28173  fi
28174
28175
28176  if test "x$path" != "x$new_path"; then
28177    BOOT_JDK="$new_path"
28178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28180  fi
28181
28182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28183
28184  path="$BOOT_JDK"
28185  has_colon=`$ECHO $path | $GREP ^.:`
28186  new_path="$path"
28187  if test "x$has_colon" = x; then
28188    # Not in mixed or Windows style, start by that.
28189    new_path=`cmd //c echo $path`
28190  fi
28191
28192
28193  input_path="$new_path"
28194  # Check if we need to convert this using DOS-style short mode. If the path
28195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28196  # take no chances and rewrite it.
28197  # Note: m4 eats our [], so we need to use [ and ] instead.
28198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28199  if test "x$has_forbidden_chars" != x; then
28200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28202  fi
28203
28204
28205  windows_path="$new_path"
28206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28207    unix_path=`$CYGPATH -u "$windows_path"`
28208    new_path="$unix_path"
28209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28211    new_path="$unix_path"
28212  fi
28213
28214  if test "x$path" != "x$new_path"; then
28215    BOOT_JDK="$new_path"
28216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28218  fi
28219
28220  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28221  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28222
28223    else
28224      # We're on a unix platform. Hooray! :)
28225      path="$BOOT_JDK"
28226      has_space=`$ECHO "$path" | $GREP " "`
28227      if test "x$has_space" != x; then
28228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28230        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28231      fi
28232
28233      # Use eval to expand a potential ~
28234      eval path="$path"
28235      if test ! -f "$path" && test ! -d "$path"; then
28236        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28237      fi
28238
28239      if test -d "$path"; then
28240        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28241      else
28242        dir="`$DIRNAME "$path"`"
28243        base="`$BASENAME "$path"`"
28244        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28245      fi
28246    fi
28247  fi
28248
28249            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28250$as_echo_n "checking for Boot JDK... " >&6; }
28251            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28252$as_echo "$BOOT_JDK" >&6; }
28253            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28254$as_echo_n "checking Boot JDK version... " >&6; }
28255            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28257$as_echo "$BOOT_JDK_VERSION" >&6; }
28258          fi # end check jdk version
28259        fi # end check javac
28260      fi # end check java
28261    fi # end check boot jdk found
28262  fi
28263
28264  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28265
28266  if test "x$BOOT_JDK_FOUND" = xno; then
28267    # Now execute the test
28268
28269  BOOT_JDK_PREFIX="/usr/lib/jvm"
28270  BOOT_JDK_SUFFIX=""
28271  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28272  if test "x$ALL_JDKS_FOUND" != x; then
28273    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28274
28275  if test "x$BOOT_JDK_FOUND" = xno; then
28276    # Now execute the test
28277
28278        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28279        if test -d "$BOOT_JDK"; then
28280          BOOT_JDK_FOUND=maybe
28281          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28282$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28283        fi
28284
28285
28286    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28287    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28288      # Do we have a bin/java?
28289      if test ! -x "$BOOT_JDK/bin/java"; then
28290        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28292        BOOT_JDK_FOUND=no
28293      else
28294        # Do we have a bin/javac?
28295        if test ! -x "$BOOT_JDK/bin/javac"; then
28296          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28298          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28299$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28300          BOOT_JDK_FOUND=no
28301        else
28302          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28303          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28304
28305          # Extra M4 quote needed to protect [] in grep expression.
28306          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28307          if test "x$FOUND_CORRECT_VERSION" = x; then
28308            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28310            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28311$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28312            BOOT_JDK_FOUND=no
28313          else
28314            # We're done! :-)
28315            BOOT_JDK_FOUND=yes
28316
28317  # Only process if variable expands to non-empty
28318
28319  if test "x$BOOT_JDK" != x; then
28320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28321
28322  # Input might be given as Windows format, start by converting to
28323  # unix format.
28324  path="$BOOT_JDK"
28325  new_path=`$CYGPATH -u "$path"`
28326
28327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28330  # "foo.exe" is OK but "foo" is an error.
28331  #
28332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28333  # It is also a way to make sure we got the proper file name for the real test later on.
28334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28335  if test "x$test_shortpath" = x; then
28336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28338    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28339  fi
28340
28341  # Call helper function which possibly converts this using DOS-style short mode.
28342  # If so, the updated path is stored in $new_path.
28343
28344  input_path="$new_path"
28345  # Check if we need to convert this using DOS-style short mode. If the path
28346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28347  # take no chances and rewrite it.
28348  # Note: m4 eats our [], so we need to use [ and ] instead.
28349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28350  if test "x$has_forbidden_chars" != x; then
28351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28355      # Going to short mode and back again did indeed matter. Since short mode is
28356      # case insensitive, let's make it lowercase to improve readability.
28357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28358      # Now convert it back to Unix-style (cygpath)
28359      input_path=`$CYGPATH -u "$shortmode_path"`
28360      new_path="$input_path"
28361    fi
28362  fi
28363
28364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28365  if test "x$test_cygdrive_prefix" = x; then
28366    # As a simple fix, exclude /usr/bin since it's not a real path.
28367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28369      # a path prefixed by /cygdrive for fixpath to work.
28370      new_path="$CYGWIN_ROOT_PATH$input_path"
28371    fi
28372  fi
28373
28374
28375  if test "x$path" != "x$new_path"; then
28376    BOOT_JDK="$new_path"
28377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28379  fi
28380
28381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28382
28383  path="$BOOT_JDK"
28384  has_colon=`$ECHO $path | $GREP ^.:`
28385  new_path="$path"
28386  if test "x$has_colon" = x; then
28387    # Not in mixed or Windows style, start by that.
28388    new_path=`cmd //c echo $path`
28389  fi
28390
28391
28392  input_path="$new_path"
28393  # Check if we need to convert this using DOS-style short mode. If the path
28394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28395  # take no chances and rewrite it.
28396  # Note: m4 eats our [], so we need to use [ and ] instead.
28397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28398  if test "x$has_forbidden_chars" != x; then
28399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28401  fi
28402
28403
28404  windows_path="$new_path"
28405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28406    unix_path=`$CYGPATH -u "$windows_path"`
28407    new_path="$unix_path"
28408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28410    new_path="$unix_path"
28411  fi
28412
28413  if test "x$path" != "x$new_path"; then
28414    BOOT_JDK="$new_path"
28415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28417  fi
28418
28419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28421
28422    else
28423      # We're on a unix platform. Hooray! :)
28424      path="$BOOT_JDK"
28425      has_space=`$ECHO "$path" | $GREP " "`
28426      if test "x$has_space" != x; then
28427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28428$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28429        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28430      fi
28431
28432      # Use eval to expand a potential ~
28433      eval path="$path"
28434      if test ! -f "$path" && test ! -d "$path"; then
28435        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28436      fi
28437
28438      if test -d "$path"; then
28439        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28440      else
28441        dir="`$DIRNAME "$path"`"
28442        base="`$BASENAME "$path"`"
28443        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28444      fi
28445    fi
28446  fi
28447
28448            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28449$as_echo_n "checking for Boot JDK... " >&6; }
28450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28451$as_echo "$BOOT_JDK" >&6; }
28452            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28453$as_echo_n "checking Boot JDK version... " >&6; }
28454            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28456$as_echo "$BOOT_JDK_VERSION" >&6; }
28457          fi # end check jdk version
28458        fi # end check javac
28459      fi # end check java
28460    fi # end check boot jdk found
28461  fi
28462
28463    done
28464  fi
28465
28466
28467    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28468    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28469      # Do we have a bin/java?
28470      if test ! -x "$BOOT_JDK/bin/java"; then
28471        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28473        BOOT_JDK_FOUND=no
28474      else
28475        # Do we have a bin/javac?
28476        if test ! -x "$BOOT_JDK/bin/javac"; then
28477          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28479          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28480$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28481          BOOT_JDK_FOUND=no
28482        else
28483          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28484          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28485
28486          # Extra M4 quote needed to protect [] in grep expression.
28487          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28488          if test "x$FOUND_CORRECT_VERSION" = x; then
28489            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28491            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28492$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28493            BOOT_JDK_FOUND=no
28494          else
28495            # We're done! :-)
28496            BOOT_JDK_FOUND=yes
28497
28498  # Only process if variable expands to non-empty
28499
28500  if test "x$BOOT_JDK" != x; then
28501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28502
28503  # Input might be given as Windows format, start by converting to
28504  # unix format.
28505  path="$BOOT_JDK"
28506  new_path=`$CYGPATH -u "$path"`
28507
28508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28511  # "foo.exe" is OK but "foo" is an error.
28512  #
28513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28514  # It is also a way to make sure we got the proper file name for the real test later on.
28515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28516  if test "x$test_shortpath" = x; then
28517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28519    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28520  fi
28521
28522  # Call helper function which possibly converts this using DOS-style short mode.
28523  # If so, the updated path is stored in $new_path.
28524
28525  input_path="$new_path"
28526  # Check if we need to convert this using DOS-style short mode. If the path
28527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28528  # take no chances and rewrite it.
28529  # Note: m4 eats our [], so we need to use [ and ] instead.
28530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28531  if test "x$has_forbidden_chars" != x; then
28532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28536      # Going to short mode and back again did indeed matter. Since short mode is
28537      # case insensitive, let's make it lowercase to improve readability.
28538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28539      # Now convert it back to Unix-style (cygpath)
28540      input_path=`$CYGPATH -u "$shortmode_path"`
28541      new_path="$input_path"
28542    fi
28543  fi
28544
28545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28546  if test "x$test_cygdrive_prefix" = x; then
28547    # As a simple fix, exclude /usr/bin since it's not a real path.
28548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28550      # a path prefixed by /cygdrive for fixpath to work.
28551      new_path="$CYGWIN_ROOT_PATH$input_path"
28552    fi
28553  fi
28554
28555
28556  if test "x$path" != "x$new_path"; then
28557    BOOT_JDK="$new_path"
28558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28560  fi
28561
28562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28563
28564  path="$BOOT_JDK"
28565  has_colon=`$ECHO $path | $GREP ^.:`
28566  new_path="$path"
28567  if test "x$has_colon" = x; then
28568    # Not in mixed or Windows style, start by that.
28569    new_path=`cmd //c echo $path`
28570  fi
28571
28572
28573  input_path="$new_path"
28574  # Check if we need to convert this using DOS-style short mode. If the path
28575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28576  # take no chances and rewrite it.
28577  # Note: m4 eats our [], so we need to use [ and ] instead.
28578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28579  if test "x$has_forbidden_chars" != x; then
28580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28582  fi
28583
28584
28585  windows_path="$new_path"
28586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28587    unix_path=`$CYGPATH -u "$windows_path"`
28588    new_path="$unix_path"
28589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28591    new_path="$unix_path"
28592  fi
28593
28594  if test "x$path" != "x$new_path"; then
28595    BOOT_JDK="$new_path"
28596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28598  fi
28599
28600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28602
28603    else
28604      # We're on a unix platform. Hooray! :)
28605      path="$BOOT_JDK"
28606      has_space=`$ECHO "$path" | $GREP " "`
28607      if test "x$has_space" != x; then
28608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28611      fi
28612
28613      # Use eval to expand a potential ~
28614      eval path="$path"
28615      if test ! -f "$path" && test ! -d "$path"; then
28616        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28617      fi
28618
28619      if test -d "$path"; then
28620        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28621      else
28622        dir="`$DIRNAME "$path"`"
28623        base="`$BASENAME "$path"`"
28624        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28625      fi
28626    fi
28627  fi
28628
28629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28630$as_echo_n "checking for Boot JDK... " >&6; }
28631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28632$as_echo "$BOOT_JDK" >&6; }
28633            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28634$as_echo_n "checking Boot JDK version... " >&6; }
28635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28637$as_echo "$BOOT_JDK_VERSION" >&6; }
28638          fi # end check jdk version
28639        fi # end check javac
28640      fi # end check java
28641    fi # end check boot jdk found
28642  fi
28643
28644  fi
28645
28646
28647    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28648    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28649      # Do we have a bin/java?
28650      if test ! -x "$BOOT_JDK/bin/java"; then
28651        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28653        BOOT_JDK_FOUND=no
28654      else
28655        # Do we have a bin/javac?
28656        if test ! -x "$BOOT_JDK/bin/javac"; then
28657          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28659          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28660$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28661          BOOT_JDK_FOUND=no
28662        else
28663          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28664          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28665
28666          # Extra M4 quote needed to protect [] in grep expression.
28667          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28668          if test "x$FOUND_CORRECT_VERSION" = x; then
28669            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28671            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28672$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28673            BOOT_JDK_FOUND=no
28674          else
28675            # We're done! :-)
28676            BOOT_JDK_FOUND=yes
28677
28678  # Only process if variable expands to non-empty
28679
28680  if test "x$BOOT_JDK" != x; then
28681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28682
28683  # Input might be given as Windows format, start by converting to
28684  # unix format.
28685  path="$BOOT_JDK"
28686  new_path=`$CYGPATH -u "$path"`
28687
28688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28691  # "foo.exe" is OK but "foo" is an error.
28692  #
28693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28694  # It is also a way to make sure we got the proper file name for the real test later on.
28695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28696  if test "x$test_shortpath" = x; then
28697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28699    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28700  fi
28701
28702  # Call helper function which possibly converts this using DOS-style short mode.
28703  # If so, the updated path is stored in $new_path.
28704
28705  input_path="$new_path"
28706  # Check if we need to convert this using DOS-style short mode. If the path
28707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28708  # take no chances and rewrite it.
28709  # Note: m4 eats our [], so we need to use [ and ] instead.
28710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28711  if test "x$has_forbidden_chars" != x; then
28712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28716      # Going to short mode and back again did indeed matter. Since short mode is
28717      # case insensitive, let's make it lowercase to improve readability.
28718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28719      # Now convert it back to Unix-style (cygpath)
28720      input_path=`$CYGPATH -u "$shortmode_path"`
28721      new_path="$input_path"
28722    fi
28723  fi
28724
28725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28726  if test "x$test_cygdrive_prefix" = x; then
28727    # As a simple fix, exclude /usr/bin since it's not a real path.
28728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28730      # a path prefixed by /cygdrive for fixpath to work.
28731      new_path="$CYGWIN_ROOT_PATH$input_path"
28732    fi
28733  fi
28734
28735
28736  if test "x$path" != "x$new_path"; then
28737    BOOT_JDK="$new_path"
28738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28740  fi
28741
28742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28743
28744  path="$BOOT_JDK"
28745  has_colon=`$ECHO $path | $GREP ^.:`
28746  new_path="$path"
28747  if test "x$has_colon" = x; then
28748    # Not in mixed or Windows style, start by that.
28749    new_path=`cmd //c echo $path`
28750  fi
28751
28752
28753  input_path="$new_path"
28754  # Check if we need to convert this using DOS-style short mode. If the path
28755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28756  # take no chances and rewrite it.
28757  # Note: m4 eats our [], so we need to use [ and ] instead.
28758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28759  if test "x$has_forbidden_chars" != x; then
28760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28762  fi
28763
28764
28765  windows_path="$new_path"
28766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28767    unix_path=`$CYGPATH -u "$windows_path"`
28768    new_path="$unix_path"
28769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28771    new_path="$unix_path"
28772  fi
28773
28774  if test "x$path" != "x$new_path"; then
28775    BOOT_JDK="$new_path"
28776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28778  fi
28779
28780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28782
28783    else
28784      # We're on a unix platform. Hooray! :)
28785      path="$BOOT_JDK"
28786      has_space=`$ECHO "$path" | $GREP " "`
28787      if test "x$has_space" != x; then
28788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28791      fi
28792
28793      # Use eval to expand a potential ~
28794      eval path="$path"
28795      if test ! -f "$path" && test ! -d "$path"; then
28796        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28797      fi
28798
28799      if test -d "$path"; then
28800        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28801      else
28802        dir="`$DIRNAME "$path"`"
28803        base="`$BASENAME "$path"`"
28804        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28805      fi
28806    fi
28807  fi
28808
28809            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28810$as_echo_n "checking for Boot JDK... " >&6; }
28811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28812$as_echo "$BOOT_JDK" >&6; }
28813            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28814$as_echo_n "checking Boot JDK version... " >&6; }
28815            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28817$as_echo "$BOOT_JDK_VERSION" >&6; }
28818          fi # end check jdk version
28819        fi # end check javac
28820      fi # end check java
28821    fi # end check boot jdk found
28822  fi
28823
28824
28825  # If we haven't found anything yet, we've truly lost. Give up.
28826  if test "x$BOOT_JDK_FOUND" = xno; then
28827
28828  # Print a helpful message on how to acquire the necessary build dependency.
28829  # openjdk is the help tag: freetype, cups, alsa etc
28830  MISSING_DEPENDENCY=openjdk
28831
28832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28833    cygwin_help $MISSING_DEPENDENCY
28834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28835    msys_help $MISSING_DEPENDENCY
28836  else
28837    PKGHANDLER_COMMAND=
28838
28839    case $PKGHANDLER in
28840      apt-get)
28841        apt_help     $MISSING_DEPENDENCY ;;
28842      yum)
28843        yum_help     $MISSING_DEPENDENCY ;;
28844      port)
28845        port_help    $MISSING_DEPENDENCY ;;
28846      pkgutil)
28847        pkgutil_help $MISSING_DEPENDENCY ;;
28848      pkgadd)
28849        pkgadd_help  $MISSING_DEPENDENCY ;;
28850    esac
28851
28852    if test "x$PKGHANDLER_COMMAND" != x; then
28853      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28854    fi
28855  fi
28856
28857    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28858$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28859    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28860$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28861    as_fn_error $? "Cannot continue" "$LINENO" 5
28862  fi
28863
28864
28865
28866  # Setup tools from the Boot JDK.
28867
28868  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28869
28870  # Publish this variable in the help.
28871
28872
28873  if [ -z "${JAVA+x}" ]; then
28874    # The variable is not set by user, try to locate tool using the code snippet
28875
28876      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28877$as_echo_n "checking for java in Boot JDK... " >&6; }
28878      JAVA=$BOOT_JDK/bin/java
28879      if test ! -x $JAVA; then
28880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28881$as_echo "not found" >&6; }
28882        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28883$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28884        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28885      fi
28886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28887$as_echo "ok" >&6; }
28888
28889
28890  else
28891    # The variable is set, but is it from the command line or the environment?
28892
28893    # Try to remove the string !JAVA! from our list.
28894    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28895    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28896      # If it failed, the variable was not from the command line. Ignore it,
28897      # but warn the user (except for BASH, which is always set by the calling BASH).
28898      if test "xJAVA" != xBASH; then
28899        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28900$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28901      fi
28902      # Try to locate tool using the code snippet
28903
28904      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28905$as_echo_n "checking for java in Boot JDK... " >&6; }
28906      JAVA=$BOOT_JDK/bin/java
28907      if test ! -x $JAVA; then
28908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28909$as_echo "not found" >&6; }
28910        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28911$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28912        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28913      fi
28914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28915$as_echo "ok" >&6; }
28916
28917
28918    else
28919      # If it succeeded, then it was overridden by the user. We will use it
28920      # for the tool.
28921
28922      # First remove it from the list of overridden variables, so we can test
28923      # for unknown variables in the end.
28924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28925
28926      # Check if we try to supply an empty value
28927      if test "x$JAVA" = x; then
28928        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28929$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28931$as_echo_n "checking for JAVA... " >&6; }
28932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28933$as_echo "disabled" >&6; }
28934      else
28935        # Check if the provided tool contains a complete path.
28936        tool_specified="$JAVA"
28937        tool_basename="${tool_specified##*/}"
28938        if test "x$tool_basename" = "x$tool_specified"; then
28939          # A command without a complete path is provided, search $PATH.
28940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28941$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28942          # Extract the first word of "$tool_basename", so it can be a program name with args.
28943set dummy $tool_basename; ac_word=$2
28944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28945$as_echo_n "checking for $ac_word... " >&6; }
28946if ${ac_cv_path_JAVA+:} false; then :
28947  $as_echo_n "(cached) " >&6
28948else
28949  case $JAVA in
28950  [\\/]* | ?:[\\/]*)
28951  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28952  ;;
28953  *)
28954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28955for as_dir in $PATH
28956do
28957  IFS=$as_save_IFS
28958  test -z "$as_dir" && as_dir=.
28959    for ac_exec_ext in '' $ac_executable_extensions; do
28960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28961    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28963    break 2
28964  fi
28965done
28966  done
28967IFS=$as_save_IFS
28968
28969  ;;
28970esac
28971fi
28972JAVA=$ac_cv_path_JAVA
28973if test -n "$JAVA"; then
28974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28975$as_echo "$JAVA" >&6; }
28976else
28977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28978$as_echo "no" >&6; }
28979fi
28980
28981
28982          if test "x$JAVA" = x; then
28983            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28984          fi
28985        else
28986          # Otherwise we believe it is a complete path. Use it as it is.
28987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28988$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28989          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28990$as_echo_n "checking for JAVA... " >&6; }
28991          if test ! -x "$tool_specified"; then
28992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28993$as_echo "not found" >&6; }
28994            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28995          fi
28996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28997$as_echo "$tool_specified" >&6; }
28998        fi
28999      fi
29000    fi
29001
29002  fi
29003
29004
29005
29006  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29007
29008  # Publish this variable in the help.
29009
29010
29011  if [ -z "${JAVAC+x}" ]; then
29012    # The variable is not set by user, try to locate tool using the code snippet
29013
29014      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29015$as_echo_n "checking for javac in Boot JDK... " >&6; }
29016      JAVAC=$BOOT_JDK/bin/javac
29017      if test ! -x $JAVAC; then
29018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29019$as_echo "not found" >&6; }
29020        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29021$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29022        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29023      fi
29024      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29025$as_echo "ok" >&6; }
29026
29027
29028  else
29029    # The variable is set, but is it from the command line or the environment?
29030
29031    # Try to remove the string !JAVAC! from our list.
29032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29034      # If it failed, the variable was not from the command line. Ignore it,
29035      # but warn the user (except for BASH, which is always set by the calling BASH).
29036      if test "xJAVAC" != xBASH; then
29037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29038$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29039      fi
29040      # Try to locate tool using the code snippet
29041
29042      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29043$as_echo_n "checking for javac in Boot JDK... " >&6; }
29044      JAVAC=$BOOT_JDK/bin/javac
29045      if test ! -x $JAVAC; then
29046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29047$as_echo "not found" >&6; }
29048        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29049$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29050        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29051      fi
29052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29053$as_echo "ok" >&6; }
29054
29055
29056    else
29057      # If it succeeded, then it was overridden by the user. We will use it
29058      # for the tool.
29059
29060      # First remove it from the list of overridden variables, so we can test
29061      # for unknown variables in the end.
29062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29063
29064      # Check if we try to supply an empty value
29065      if test "x$JAVAC" = x; then
29066        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29067$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29069$as_echo_n "checking for JAVAC... " >&6; }
29070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29071$as_echo "disabled" >&6; }
29072      else
29073        # Check if the provided tool contains a complete path.
29074        tool_specified="$JAVAC"
29075        tool_basename="${tool_specified##*/}"
29076        if test "x$tool_basename" = "x$tool_specified"; then
29077          # A command without a complete path is provided, search $PATH.
29078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29079$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29080          # Extract the first word of "$tool_basename", so it can be a program name with args.
29081set dummy $tool_basename; ac_word=$2
29082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29083$as_echo_n "checking for $ac_word... " >&6; }
29084if ${ac_cv_path_JAVAC+:} false; then :
29085  $as_echo_n "(cached) " >&6
29086else
29087  case $JAVAC in
29088  [\\/]* | ?:[\\/]*)
29089  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29090  ;;
29091  *)
29092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29093for as_dir in $PATH
29094do
29095  IFS=$as_save_IFS
29096  test -z "$as_dir" && as_dir=.
29097    for ac_exec_ext in '' $ac_executable_extensions; do
29098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29099    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29101    break 2
29102  fi
29103done
29104  done
29105IFS=$as_save_IFS
29106
29107  ;;
29108esac
29109fi
29110JAVAC=$ac_cv_path_JAVAC
29111if test -n "$JAVAC"; then
29112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29113$as_echo "$JAVAC" >&6; }
29114else
29115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29116$as_echo "no" >&6; }
29117fi
29118
29119
29120          if test "x$JAVAC" = x; then
29121            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29122          fi
29123        else
29124          # Otherwise we believe it is a complete path. Use it as it is.
29125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29126$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29127          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29128$as_echo_n "checking for JAVAC... " >&6; }
29129          if test ! -x "$tool_specified"; then
29130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29131$as_echo "not found" >&6; }
29132            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29133          fi
29134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29135$as_echo "$tool_specified" >&6; }
29136        fi
29137      fi
29138    fi
29139
29140  fi
29141
29142
29143
29144  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29145
29146  # Publish this variable in the help.
29147
29148
29149  if [ -z "${JAVAH+x}" ]; then
29150    # The variable is not set by user, try to locate tool using the code snippet
29151
29152      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29153$as_echo_n "checking for javah in Boot JDK... " >&6; }
29154      JAVAH=$BOOT_JDK/bin/javah
29155      if test ! -x $JAVAH; then
29156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29157$as_echo "not found" >&6; }
29158        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29159$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29160        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29161      fi
29162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29163$as_echo "ok" >&6; }
29164
29165
29166  else
29167    # The variable is set, but is it from the command line or the environment?
29168
29169    # Try to remove the string !JAVAH! from our list.
29170    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29171    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29172      # If it failed, the variable was not from the command line. Ignore it,
29173      # but warn the user (except for BASH, which is always set by the calling BASH).
29174      if test "xJAVAH" != xBASH; then
29175        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29176$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29177      fi
29178      # Try to locate tool using the code snippet
29179
29180      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29181$as_echo_n "checking for javah in Boot JDK... " >&6; }
29182      JAVAH=$BOOT_JDK/bin/javah
29183      if test ! -x $JAVAH; then
29184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29185$as_echo "not found" >&6; }
29186        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29187$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29188        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29189      fi
29190      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29191$as_echo "ok" >&6; }
29192
29193
29194    else
29195      # If it succeeded, then it was overridden by the user. We will use it
29196      # for the tool.
29197
29198      # First remove it from the list of overridden variables, so we can test
29199      # for unknown variables in the end.
29200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29201
29202      # Check if we try to supply an empty value
29203      if test "x$JAVAH" = x; then
29204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29205$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29207$as_echo_n "checking for JAVAH... " >&6; }
29208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29209$as_echo "disabled" >&6; }
29210      else
29211        # Check if the provided tool contains a complete path.
29212        tool_specified="$JAVAH"
29213        tool_basename="${tool_specified##*/}"
29214        if test "x$tool_basename" = "x$tool_specified"; then
29215          # A command without a complete path is provided, search $PATH.
29216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29217$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29218          # Extract the first word of "$tool_basename", so it can be a program name with args.
29219set dummy $tool_basename; ac_word=$2
29220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29221$as_echo_n "checking for $ac_word... " >&6; }
29222if ${ac_cv_path_JAVAH+:} false; then :
29223  $as_echo_n "(cached) " >&6
29224else
29225  case $JAVAH in
29226  [\\/]* | ?:[\\/]*)
29227  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29228  ;;
29229  *)
29230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29231for as_dir in $PATH
29232do
29233  IFS=$as_save_IFS
29234  test -z "$as_dir" && as_dir=.
29235    for ac_exec_ext in '' $ac_executable_extensions; do
29236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29237    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29239    break 2
29240  fi
29241done
29242  done
29243IFS=$as_save_IFS
29244
29245  ;;
29246esac
29247fi
29248JAVAH=$ac_cv_path_JAVAH
29249if test -n "$JAVAH"; then
29250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29251$as_echo "$JAVAH" >&6; }
29252else
29253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29254$as_echo "no" >&6; }
29255fi
29256
29257
29258          if test "x$JAVAH" = x; then
29259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29260          fi
29261        else
29262          # Otherwise we believe it is a complete path. Use it as it is.
29263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29264$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29266$as_echo_n "checking for JAVAH... " >&6; }
29267          if test ! -x "$tool_specified"; then
29268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29269$as_echo "not found" >&6; }
29270            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29271          fi
29272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29273$as_echo "$tool_specified" >&6; }
29274        fi
29275      fi
29276    fi
29277
29278  fi
29279
29280
29281
29282  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29283
29284  # Publish this variable in the help.
29285
29286
29287  if [ -z "${JAR+x}" ]; then
29288    # The variable is not set by user, try to locate tool using the code snippet
29289
29290      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29291$as_echo_n "checking for jar in Boot JDK... " >&6; }
29292      JAR=$BOOT_JDK/bin/jar
29293      if test ! -x $JAR; then
29294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29295$as_echo "not found" >&6; }
29296        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29297$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29298        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29299      fi
29300      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29301$as_echo "ok" >&6; }
29302
29303
29304  else
29305    # The variable is set, but is it from the command line or the environment?
29306
29307    # Try to remove the string !JAR! from our list.
29308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29310      # If it failed, the variable was not from the command line. Ignore it,
29311      # but warn the user (except for BASH, which is always set by the calling BASH).
29312      if test "xJAR" != xBASH; then
29313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29314$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29315      fi
29316      # Try to locate tool using the code snippet
29317
29318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29319$as_echo_n "checking for jar in Boot JDK... " >&6; }
29320      JAR=$BOOT_JDK/bin/jar
29321      if test ! -x $JAR; then
29322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29323$as_echo "not found" >&6; }
29324        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29325$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29326        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29327      fi
29328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29329$as_echo "ok" >&6; }
29330
29331
29332    else
29333      # If it succeeded, then it was overridden by the user. We will use it
29334      # for the tool.
29335
29336      # First remove it from the list of overridden variables, so we can test
29337      # for unknown variables in the end.
29338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29339
29340      # Check if we try to supply an empty value
29341      if test "x$JAR" = x; then
29342        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29343$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29345$as_echo_n "checking for JAR... " >&6; }
29346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29347$as_echo "disabled" >&6; }
29348      else
29349        # Check if the provided tool contains a complete path.
29350        tool_specified="$JAR"
29351        tool_basename="${tool_specified##*/}"
29352        if test "x$tool_basename" = "x$tool_specified"; then
29353          # A command without a complete path is provided, search $PATH.
29354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29355$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29356          # Extract the first word of "$tool_basename", so it can be a program name with args.
29357set dummy $tool_basename; ac_word=$2
29358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29359$as_echo_n "checking for $ac_word... " >&6; }
29360if ${ac_cv_path_JAR+:} false; then :
29361  $as_echo_n "(cached) " >&6
29362else
29363  case $JAR in
29364  [\\/]* | ?:[\\/]*)
29365  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29366  ;;
29367  *)
29368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29369for as_dir in $PATH
29370do
29371  IFS=$as_save_IFS
29372  test -z "$as_dir" && as_dir=.
29373    for ac_exec_ext in '' $ac_executable_extensions; do
29374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29375    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29377    break 2
29378  fi
29379done
29380  done
29381IFS=$as_save_IFS
29382
29383  ;;
29384esac
29385fi
29386JAR=$ac_cv_path_JAR
29387if test -n "$JAR"; then
29388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29389$as_echo "$JAR" >&6; }
29390else
29391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29392$as_echo "no" >&6; }
29393fi
29394
29395
29396          if test "x$JAR" = x; then
29397            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29398          fi
29399        else
29400          # Otherwise we believe it is a complete path. Use it as it is.
29401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29402$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29403          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29404$as_echo_n "checking for JAR... " >&6; }
29405          if test ! -x "$tool_specified"; then
29406            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29407$as_echo "not found" >&6; }
29408            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29409          fi
29410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29411$as_echo "$tool_specified" >&6; }
29412        fi
29413      fi
29414    fi
29415
29416  fi
29417
29418
29419
29420  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29421
29422  # Publish this variable in the help.
29423
29424
29425  if [ -z "${JARSIGNER+x}" ]; then
29426    # The variable is not set by user, try to locate tool using the code snippet
29427
29428      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29429$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29430      JARSIGNER=$BOOT_JDK/bin/jarsigner
29431      if test ! -x $JARSIGNER; then
29432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29433$as_echo "not found" >&6; }
29434        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29435$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29436        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29437      fi
29438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29439$as_echo "ok" >&6; }
29440
29441
29442  else
29443    # The variable is set, but is it from the command line or the environment?
29444
29445    # Try to remove the string !JARSIGNER! from our list.
29446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29448      # If it failed, the variable was not from the command line. Ignore it,
29449      # but warn the user (except for BASH, which is always set by the calling BASH).
29450      if test "xJARSIGNER" != xBASH; then
29451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29452$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29453      fi
29454      # Try to locate tool using the code snippet
29455
29456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29457$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29458      JARSIGNER=$BOOT_JDK/bin/jarsigner
29459      if test ! -x $JARSIGNER; then
29460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29461$as_echo "not found" >&6; }
29462        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29463$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29464        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29465      fi
29466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29467$as_echo "ok" >&6; }
29468
29469
29470    else
29471      # If it succeeded, then it was overridden by the user. We will use it
29472      # for the tool.
29473
29474      # First remove it from the list of overridden variables, so we can test
29475      # for unknown variables in the end.
29476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29477
29478      # Check if we try to supply an empty value
29479      if test "x$JARSIGNER" = x; then
29480        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29481$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29483$as_echo_n "checking for JARSIGNER... " >&6; }
29484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29485$as_echo "disabled" >&6; }
29486      else
29487        # Check if the provided tool contains a complete path.
29488        tool_specified="$JARSIGNER"
29489        tool_basename="${tool_specified##*/}"
29490        if test "x$tool_basename" = "x$tool_specified"; then
29491          # A command without a complete path is provided, search $PATH.
29492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29493$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29494          # Extract the first word of "$tool_basename", so it can be a program name with args.
29495set dummy $tool_basename; ac_word=$2
29496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29497$as_echo_n "checking for $ac_word... " >&6; }
29498if ${ac_cv_path_JARSIGNER+:} false; then :
29499  $as_echo_n "(cached) " >&6
29500else
29501  case $JARSIGNER in
29502  [\\/]* | ?:[\\/]*)
29503  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29504  ;;
29505  *)
29506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29507for as_dir in $PATH
29508do
29509  IFS=$as_save_IFS
29510  test -z "$as_dir" && as_dir=.
29511    for ac_exec_ext in '' $ac_executable_extensions; do
29512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29513    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29515    break 2
29516  fi
29517done
29518  done
29519IFS=$as_save_IFS
29520
29521  ;;
29522esac
29523fi
29524JARSIGNER=$ac_cv_path_JARSIGNER
29525if test -n "$JARSIGNER"; then
29526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29527$as_echo "$JARSIGNER" >&6; }
29528else
29529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29530$as_echo "no" >&6; }
29531fi
29532
29533
29534          if test "x$JARSIGNER" = x; then
29535            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29536          fi
29537        else
29538          # Otherwise we believe it is a complete path. Use it as it is.
29539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29540$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29541          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29542$as_echo_n "checking for JARSIGNER... " >&6; }
29543          if test ! -x "$tool_specified"; then
29544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29545$as_echo "not found" >&6; }
29546            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29547          fi
29548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29549$as_echo "$tool_specified" >&6; }
29550        fi
29551      fi
29552    fi
29553
29554  fi
29555
29556
29557
29558  # Finally, set some other options...
29559
29560  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29561  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29562
29563
29564
29565  # Check if the boot jdk is 32 or 64 bit
29566  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29567    BOOT_JDK_BITS="64"
29568  else
29569    BOOT_JDK_BITS="32"
29570  fi
29571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29572$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29574$as_echo "$BOOT_JDK_BITS" >&6; }
29575
29576
29577
29578###############################################################################
29579#
29580# Configure the sources to use. We can add or override individual directories.
29581#
29582###############################################################################
29583
29584
29585  # Where are the sources.
29586  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29587  CORBA_TOPDIR="$SRC_ROOT/corba"
29588  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29589  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29590  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29591  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29592  JDK_TOPDIR="$SRC_ROOT/jdk"
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602  # This feature is no longer supported.
29603
29604
29605
29606# Check whether --with-add-source-root was given.
29607if test "${with_add_source_root+set}" = set; then :
29608  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
29609$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29610fi
29611
29612
29613
29614
29615# Check whether --with-override-source-root was given.
29616if test "${with_override_source_root+set}" = set; then :
29617  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
29618$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29619fi
29620
29621
29622
29623
29624# Check whether --with-adds-and-overrides was given.
29625if test "${with_adds_and_overrides+set}" = set; then :
29626  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
29627$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29628fi
29629
29630
29631
29632
29633# Check whether --with-override-langtools was given.
29634if test "${with_override_langtools+set}" = set; then :
29635  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29636$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29637fi
29638
29639
29640
29641
29642# Check whether --with-override-corba was given.
29643if test "${with_override_corba+set}" = set; then :
29644  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29645$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29646fi
29647
29648
29649
29650
29651# Check whether --with-override-jaxp was given.
29652if test "${with_override_jaxp+set}" = set; then :
29653  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29654$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29655fi
29656
29657
29658
29659
29660# Check whether --with-override-jaxws was given.
29661if test "${with_override_jaxws+set}" = set; then :
29662  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29663$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29664fi
29665
29666
29667
29668
29669# Check whether --with-override-hotspot was given.
29670if test "${with_override_hotspot+set}" = set; then :
29671  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29672$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29673fi
29674
29675
29676
29677
29678# Check whether --with-override-nashorn was given.
29679if test "${with_override_nashorn+set}" = set; then :
29680  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29681$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29682fi
29683
29684
29685
29686
29687# Check whether --with-override-jdk was given.
29688if test "${with_override_jdk+set}" = set; then :
29689  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29690$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29691fi
29692
29693
29694
29695
29696  BUILD_OUTPUT="$OUTPUT_ROOT"
29697
29698
29699  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29700  BUILD_HOTSPOT=true
29701
29702
29703
29704# Check whether --with-import-hotspot was given.
29705if test "${with_import_hotspot+set}" = set; then :
29706  withval=$with_import_hotspot;
29707fi
29708
29709  if test "x$with_import_hotspot" != x; then
29710    CURDIR="$PWD"
29711    cd "$with_import_hotspot"
29712    HOTSPOT_DIST="`pwd`"
29713    cd "$CURDIR"
29714    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29715      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29716    fi
29717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29718$as_echo_n "checking if hotspot should be imported... " >&6; }
29719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29720$as_echo "yes from $HOTSPOT_DIST" >&6; }
29721    BUILD_HOTSPOT=false
29722  fi
29723
29724  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29725
29726
29727###############################################################################
29728#
29729# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29730# native code.
29731#
29732###############################################################################
29733
29734# See if we are doing a complete static build or not
29735
29736  # Check whether --enable-static-build was given.
29737if test "${enable_static_build+set}" = set; then :
29738  enableval=$enable_static_build;
29739fi
29740
29741  STATIC_BUILD=false
29742  if test "x$enable_static_build" = "xyes"; then
29743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29744$as_echo_n "checking if static build is enabled... " >&6; }
29745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29746$as_echo "yes" >&6; }
29747    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29748      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29749    fi
29750    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29751    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29752    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29753    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29754    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29755    STATIC_BUILD=true
29756  elif test "x$enable_static_build" = "xno"; then
29757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29758$as_echo_n "checking if static build is enabled... " >&6; }
29759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29760$as_echo "no" >&6; }
29761  elif test "x$enable_static_build" != "x"; then
29762    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29763  fi
29764
29765
29766
29767
29768# First determine the toolchain type (compiler family)
29769
29770
29771# Check whether --with-toolchain-type was given.
29772if test "${with_toolchain_type+set}" = set; then :
29773  withval=$with_toolchain_type;
29774fi
29775
29776
29777  # Use indirect variable referencing
29778  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29779  VALID_TOOLCHAINS=${!toolchain_var_name}
29780
29781  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29782    if test -n "$XCODEBUILD"; then
29783      # On Mac OS X, default toolchain to clang after Xcode 5
29784      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29785      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29786      if test $? -ne 0; then
29787        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29788      fi
29789      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29790          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29791          $CUT -f 1 -d .`
29792      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29793$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29794      if test $XCODE_MAJOR_VERSION -ge 5; then
29795          DEFAULT_TOOLCHAIN="clang"
29796      else
29797          DEFAULT_TOOLCHAIN="gcc"
29798      fi
29799    else
29800      # If Xcode is not installed, but the command line tools are
29801      # then we can't run xcodebuild. On these systems we should
29802      # default to clang
29803      DEFAULT_TOOLCHAIN="clang"
29804    fi
29805  else
29806    # First toolchain type in the list is the default
29807    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29808  fi
29809
29810  if test "x$with_toolchain_type" = xlist; then
29811    # List all toolchains
29812    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29813$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29814    for toolchain in $VALID_TOOLCHAINS; do
29815      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29816      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29817      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29818    done
29819
29820    exit 0
29821  elif test "x$with_toolchain_type" != x; then
29822    # User override; check that it is valid
29823    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29824      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29825$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29826      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29827$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29828      as_fn_error $? "Cannot continue." "$LINENO" 5
29829    fi
29830    TOOLCHAIN_TYPE=$with_toolchain_type
29831  else
29832    # No flag given, use default
29833    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29834  fi
29835
29836
29837  TOOLCHAIN_CC_BINARY_clang="clang"
29838  TOOLCHAIN_CC_BINARY_gcc="gcc"
29839  TOOLCHAIN_CC_BINARY_microsoft="cl"
29840  TOOLCHAIN_CC_BINARY_solstudio="cc"
29841  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29842
29843  TOOLCHAIN_CXX_BINARY_clang="clang++"
29844  TOOLCHAIN_CXX_BINARY_gcc="g++"
29845  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29846  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29847  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29848
29849  # Use indirect variable referencing
29850  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29851  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29852  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29853  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29854  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29855  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29856
29857
29858  # Define filename patterns
29859  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29860    LIBRARY_PREFIX=
29861    SHARED_LIBRARY_SUFFIX='.dll'
29862    STATIC_LIBRARY_SUFFIX='.lib'
29863    SHARED_LIBRARY='$1.dll'
29864    STATIC_LIBRARY='$1.lib'
29865    OBJ_SUFFIX='.obj'
29866    EXE_SUFFIX='.exe'
29867  else
29868    LIBRARY_PREFIX=lib
29869    SHARED_LIBRARY_SUFFIX='.so'
29870    STATIC_LIBRARY_SUFFIX='.a'
29871    SHARED_LIBRARY='lib$1.so'
29872    STATIC_LIBRARY='lib$1.a'
29873    OBJ_SUFFIX='.o'
29874    EXE_SUFFIX=''
29875    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29876      # For full static builds, we're overloading the SHARED_LIBRARY
29877      # variables in order to limit the amount of changes required.
29878      # It would be better to remove SHARED and just use LIBRARY and
29879      # LIBRARY_SUFFIX for libraries that can be built either
29880      # shared or static and use STATIC_* for libraries that are
29881      # always built statically.
29882      if test "x$STATIC_BUILD" = xtrue; then
29883        SHARED_LIBRARY='lib$1.a'
29884        SHARED_LIBRARY_SUFFIX='.a'
29885      else
29886        SHARED_LIBRARY='lib$1.dylib'
29887        SHARED_LIBRARY_SUFFIX='.dylib'
29888      fi
29889    fi
29890  fi
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29902    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29903$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29904  else
29905    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29906$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29907  fi
29908
29909
29910# User supplied flags should be used when configure detects compilers
29911
29912  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29913    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29914$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29915  fi
29916
29917  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29918    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29919$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29920  fi
29921
29922  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29923    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29924$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29925  fi
29926
29927
29928# Check whether --with-extra-cflags was given.
29929if test "${with_extra_cflags+set}" = set; then :
29930  withval=$with_extra_cflags;
29931fi
29932
29933
29934
29935# Check whether --with-extra-cxxflags was given.
29936if test "${with_extra_cxxflags+set}" = set; then :
29937  withval=$with_extra_cxxflags;
29938fi
29939
29940
29941
29942# Check whether --with-extra-ldflags was given.
29943if test "${with_extra_ldflags+set}" = set; then :
29944  withval=$with_extra_ldflags;
29945fi
29946
29947
29948  EXTRA_CFLAGS="$with_extra_cflags"
29949  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29950  EXTRA_LDFLAGS="$with_extra_ldflags"
29951
29952  # Hotspot needs these set in their legacy form
29953  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29954  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29955  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29956
29957
29958
29959
29960
29961  # The global CFLAGS and LDLAGS variables are used by configure tests and
29962  # should include the extra parameters
29963  CFLAGS="$EXTRA_CFLAGS"
29964  CXXFLAGS="$EXTRA_CXXFLAGS"
29965  LDFLAGS="$EXTRA_LDFLAGS"
29966  CPPFLAGS=""
29967
29968# The sysroot cflags are needed for configure to be able to run the compilers
29969
29970  if test "x$SYSROOT" != "x"; then
29971    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29972      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29973        # Solaris Studio does not have a concept of sysroot. Instead we must
29974        # make sure the default include and lib dirs are appended to each
29975        # compile and link command line.
29976        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29977        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29978            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29979            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29980      fi
29981    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29982      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29983      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29984    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29985      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29986      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29987    fi
29988    # Propagate the sysroot args to hotspot
29989    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29990    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29991    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29992    # The global CFLAGS and LDFLAGS variables need these for configure to function
29993    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29994    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29995    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29996    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29997  fi
29998
29999  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30000    # We also need -iframework<path>/System/Library/Frameworks
30001    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30002    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30003    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30004    # set this here so it doesn't have to be peppered throughout the forest
30005    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30006    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30007  fi
30008
30009
30010
30011
30012
30013# Then detect the actual binaries needed
30014
30015  # FIXME: Is this needed?
30016  ac_ext=cpp
30017ac_cpp='$CXXCPP $CPPFLAGS'
30018ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30019ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30020ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30021
30022
30023  # Store the CFLAGS etc passed to the configure script.
30024  ORG_CFLAGS="$CFLAGS"
30025  ORG_CXXFLAGS="$CXXFLAGS"
30026
30027  # autoconf magic only relies on PATH, so update it if tools dir is specified
30028  OLD_PATH="$PATH"
30029
30030  # On Windows, we need to detect the visual studio installation first.
30031  # This will change the PATH, but we need to keep that new PATH even
30032  # after toolchain detection is done, since the compiler (on x86) uses
30033  # it for DLL resolution in runtime.
30034  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30035      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30036
30037  # Store path to cygwin link.exe to help excluding it when searching for
30038  # VS linker. This must be done before changing the PATH when looking for VS.
30039  # Extract the first word of "link", so it can be a program name with args.
30040set dummy link; ac_word=$2
30041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30042$as_echo_n "checking for $ac_word... " >&6; }
30043if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30044  $as_echo_n "(cached) " >&6
30045else
30046  case $CYGWIN_LINK in
30047  [\\/]* | ?:[\\/]*)
30048  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30049  ;;
30050  *)
30051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30052for as_dir in $PATH
30053do
30054  IFS=$as_save_IFS
30055  test -z "$as_dir" && as_dir=.
30056    for ac_exec_ext in '' $ac_executable_extensions; do
30057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30058    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30060    break 2
30061  fi
30062done
30063  done
30064IFS=$as_save_IFS
30065
30066  ;;
30067esac
30068fi
30069CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30070if test -n "$CYGWIN_LINK"; then
30071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30072$as_echo "$CYGWIN_LINK" >&6; }
30073else
30074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30075$as_echo "no" >&6; }
30076fi
30077
30078
30079  if test "x$CYGWIN_LINK" != x; then
30080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30081$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30082    "$CYGWIN_LINK" --version > /dev/null
30083    if test $? -eq 0 ; then
30084      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30085$as_echo "yes" >&6; }
30086    else
30087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30088$as_echo "no" >&6; }
30089      # This might be the VS linker. Don't exclude it later on.
30090      CYGWIN_LINK=""
30091    fi
30092  fi
30093
30094  # First-hand choice is to locate and run the vsvars bat file.
30095
30096
30097# Check whether --with-toolchain-version was given.
30098if test "${with_toolchain_version+set}" = set; then :
30099  withval=$with_toolchain_version;
30100fi
30101
30102
30103  if test "x$with_toolchain_version" = xlist; then
30104    # List all toolchains
30105    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30106$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30107    for version in $VALID_VS_VERSIONS; do
30108      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30109      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30110    done
30111
30112    exit 0
30113  elif test "x$DEVKIT_VS_VERSION" != x; then
30114    VS_VERSION=$DEVKIT_VS_VERSION
30115    TOOLCHAIN_VERSION=$VS_VERSION
30116    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30117    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30118    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30119    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30120    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30121    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30122
30123    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30124    # can still be exported as INCLUDE for compiler invocations without
30125    # SYSROOT_CFLAGS
30126    OLDIFS="$IFS"
30127    IFS=";"
30128    for i in $DEVKIT_VS_INCLUDE; do
30129      ipath=$i
30130
30131  unix_path="$ipath"
30132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30133    windows_path=`$CYGPATH -m "$unix_path"`
30134    ipath="$windows_path"
30135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30136    windows_path=`cmd //c echo $unix_path`
30137    ipath="$windows_path"
30138  fi
30139
30140      VS_INCLUDE="$VS_INCLUDE;$ipath"
30141    done
30142    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30143    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30144    for i in $DEVKIT_VS_LIB; do
30145      libpath=$i
30146
30147  unix_path="$libpath"
30148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30149    windows_path=`$CYGPATH -m "$unix_path"`
30150    libpath="$windows_path"
30151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30152    windows_path=`cmd //c echo $unix_path`
30153    libpath="$windows_path"
30154  fi
30155
30156      VS_LIB="$VS_LIB;$libpath"
30157    done
30158    IFS="$OLDIFS"
30159
30160    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30161$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30162
30163  elif test "x$with_toolchain_version" != x; then
30164    # User override; check that it is valid
30165    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30166      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30167$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30168      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30169$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30170      as_fn_error $? "Cannot continue." "$LINENO" 5
30171    fi
30172    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30173  else
30174    # No flag given, use default
30175    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30176  fi
30177
30178  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30179
30180  VS_VERSION="$VS_VERSION"
30181  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30182  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30183  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30184  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30185
30186  # When using --with-tools-dir, assume it points to the correct and default
30187  # version of Visual Studio or that --with-toolchain-version was also set.
30188  if test "x$with_tools_dir" != x; then
30189
30190  if test "x$VS_ENV_CMD" = x; then
30191    VS_VERSION="${VS_VERSION}"
30192    VS_BASE="$with_tools_dir/../.."
30193    METHOD="--with-tools-dir"
30194
30195    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30196      VCVARSFILE="vc/bin/vcvars32.bat"
30197    else
30198      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30199    fi
30200
30201
30202  windows_path="$VS_BASE"
30203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30204    unix_path=`$CYGPATH -u "$windows_path"`
30205    VS_BASE="$unix_path"
30206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30208    VS_BASE="$unix_path"
30209  fi
30210
30211    if test -d "$VS_BASE"; then
30212      if test -f "$VS_BASE/$VCVARSFILE"; then
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30214$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30215        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30216        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30217        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30218        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30219      else
30220        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30221$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30222        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30223$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30224      fi
30225    fi
30226  fi
30227
30228
30229  if test "x$VS_ENV_CMD" = x; then
30230    VS_VERSION="${VS_VERSION}"
30231    VS_BASE="$with_tools_dir/../../.."
30232    METHOD="--with-tools-dir"
30233
30234    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30235      VCVARSFILE="vc/bin/vcvars32.bat"
30236    else
30237      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30238    fi
30239
30240
30241  windows_path="$VS_BASE"
30242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30243    unix_path=`$CYGPATH -u "$windows_path"`
30244    VS_BASE="$unix_path"
30245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30247    VS_BASE="$unix_path"
30248  fi
30249
30250    if test -d "$VS_BASE"; then
30251      if test -f "$VS_BASE/$VCVARSFILE"; then
30252        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30253$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30254        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30255        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30256        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30257        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30258      else
30259        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30260$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30261        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30262$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30263      fi
30264    fi
30265  fi
30266
30267    if test "x$VS_ENV_CMD" = x; then
30268      # Having specified an argument which is incorrect will produce an instant failure;
30269      # we should not go on looking
30270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30271$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30272      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30273$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30274      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30275$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30276      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30277    fi
30278  fi
30279
30280  VS_ENV_CMD=""
30281  VS_ENV_ARGS=""
30282
30283  if test "x$VS_COMNTOOLS" != x; then
30284
30285  if test "x$VS_ENV_CMD" = x; then
30286    VS_VERSION="${VS_VERSION}"
30287    VS_BASE="$VS_COMNTOOLS/../.."
30288    METHOD="$VS_COMNTOOLS_VAR variable"
30289
30290    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30291      VCVARSFILE="vc/bin/vcvars32.bat"
30292    else
30293      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30294    fi
30295
30296
30297  windows_path="$VS_BASE"
30298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30299    unix_path=`$CYGPATH -u "$windows_path"`
30300    VS_BASE="$unix_path"
30301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30303    VS_BASE="$unix_path"
30304  fi
30305
30306    if test -d "$VS_BASE"; then
30307      if test -f "$VS_BASE/$VCVARSFILE"; then
30308        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30309$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30310        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30311        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30312        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30313        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30314      else
30315        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30316$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30317        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30318$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30319      fi
30320    fi
30321  fi
30322
30323  fi
30324  if test "x$PROGRAMFILES" != x; then
30325
30326  if test "x$VS_ENV_CMD" = x; then
30327    VS_VERSION="${VS_VERSION}"
30328    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30329    METHOD="well-known name"
30330
30331    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30332      VCVARSFILE="vc/bin/vcvars32.bat"
30333    else
30334      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30335    fi
30336
30337
30338  windows_path="$VS_BASE"
30339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30340    unix_path=`$CYGPATH -u "$windows_path"`
30341    VS_BASE="$unix_path"
30342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30344    VS_BASE="$unix_path"
30345  fi
30346
30347    if test -d "$VS_BASE"; then
30348      if test -f "$VS_BASE/$VCVARSFILE"; then
30349        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30350$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30351        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30352        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30353        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30354        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30355      else
30356        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30357$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30358        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30359$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30360      fi
30361    fi
30362  fi
30363
30364  fi
30365  # Work around the insanely named ProgramFiles(x86) env variable
30366  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30367  if test "x$PROGRAMFILES_X86" != x; then
30368
30369  if test "x$VS_ENV_CMD" = x; then
30370    VS_VERSION="${VS_VERSION}"
30371    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30372    METHOD="well-known name"
30373
30374    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30375      VCVARSFILE="vc/bin/vcvars32.bat"
30376    else
30377      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30378    fi
30379
30380
30381  windows_path="$VS_BASE"
30382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30383    unix_path=`$CYGPATH -u "$windows_path"`
30384    VS_BASE="$unix_path"
30385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30387    VS_BASE="$unix_path"
30388  fi
30389
30390    if test -d "$VS_BASE"; then
30391      if test -f "$VS_BASE/$VCVARSFILE"; then
30392        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30393$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30394        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30395        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30396        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30397        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30398      else
30399        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30400$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30401        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30402$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30403      fi
30404    fi
30405  fi
30406
30407  fi
30408
30409  if test "x$VS_ENV_CMD" = x; then
30410    VS_VERSION="${VS_VERSION}"
30411    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30412    METHOD="well-known name"
30413
30414    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30415      VCVARSFILE="vc/bin/vcvars32.bat"
30416    else
30417      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30418    fi
30419
30420
30421  windows_path="$VS_BASE"
30422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30423    unix_path=`$CYGPATH -u "$windows_path"`
30424    VS_BASE="$unix_path"
30425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30427    VS_BASE="$unix_path"
30428  fi
30429
30430    if test -d "$VS_BASE"; then
30431      if test -f "$VS_BASE/$VCVARSFILE"; then
30432        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30433$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30434        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30435        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30436        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30437        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30438      else
30439        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30440$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30441        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30442$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30443      fi
30444    fi
30445  fi
30446
30447
30448  if test "x$VS_ENV_CMD" = x; then
30449    VS_VERSION="${VS_VERSION}"
30450    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30451    METHOD="well-known name"
30452
30453    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30454      VCVARSFILE="vc/bin/vcvars32.bat"
30455    else
30456      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30457    fi
30458
30459
30460  windows_path="$VS_BASE"
30461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30462    unix_path=`$CYGPATH -u "$windows_path"`
30463    VS_BASE="$unix_path"
30464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30466    VS_BASE="$unix_path"
30467  fi
30468
30469    if test -d "$VS_BASE"; then
30470      if test -f "$VS_BASE/$VCVARSFILE"; then
30471        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30472$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30473        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30474        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30475        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30476        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30477      else
30478        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30479$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30480        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30481$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30482      fi
30483    fi
30484  fi
30485
30486
30487  if test "x$SDK_INSTALL_DIR" != x; then
30488    if test "x$ProgramW6432" != x; then
30489
30490  if test "x$VS_ENV_CMD" = x; then
30491    VS_VERSION="${VS_VERSION}"
30492    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30493    METHOD="well-known name"
30494
30495  windows_path="$WIN_SDK_BASE"
30496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30497    unix_path=`$CYGPATH -u "$windows_path"`
30498    WIN_SDK_BASE="$unix_path"
30499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30501    WIN_SDK_BASE="$unix_path"
30502  fi
30503
30504    if test -d "$WIN_SDK_BASE"; then
30505      # There have been cases of partial or broken SDK installations. A missing
30506      # lib dir is not going to work.
30507      if test ! -d "$WIN_SDK_BASE/lib"; then
30508        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30509$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30510        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30511$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30512      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30513        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30514$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30515        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30516        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30517          VS_ENV_ARGS="/x86"
30518        else
30519          VS_ENV_ARGS="/x64"
30520        fi
30521        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30522        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30523        # TODO: improve detection for other versions of SDK
30524        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30525      else
30526        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30527$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30528        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30529$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30530      fi
30531    fi
30532  fi
30533
30534    fi
30535    if test "x$PROGRAMW6432" != x; then
30536
30537  if test "x$VS_ENV_CMD" = x; then
30538    VS_VERSION="${VS_VERSION}"
30539    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30540    METHOD="well-known name"
30541
30542  windows_path="$WIN_SDK_BASE"
30543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30544    unix_path=`$CYGPATH -u "$windows_path"`
30545    WIN_SDK_BASE="$unix_path"
30546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30548    WIN_SDK_BASE="$unix_path"
30549  fi
30550
30551    if test -d "$WIN_SDK_BASE"; then
30552      # There have been cases of partial or broken SDK installations. A missing
30553      # lib dir is not going to work.
30554      if test ! -d "$WIN_SDK_BASE/lib"; then
30555        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30556$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30557        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30558$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30559      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30560        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30561$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30562        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30563        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30564          VS_ENV_ARGS="/x86"
30565        else
30566          VS_ENV_ARGS="/x64"
30567        fi
30568        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30569        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30570        # TODO: improve detection for other versions of SDK
30571        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30572      else
30573        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30574$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30575        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30576$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30577      fi
30578    fi
30579  fi
30580
30581    fi
30582    if test "x$PROGRAMFILES" != x; then
30583
30584  if test "x$VS_ENV_CMD" = x; then
30585    VS_VERSION="${VS_VERSION}"
30586    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30587    METHOD="well-known name"
30588
30589  windows_path="$WIN_SDK_BASE"
30590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30591    unix_path=`$CYGPATH -u "$windows_path"`
30592    WIN_SDK_BASE="$unix_path"
30593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30595    WIN_SDK_BASE="$unix_path"
30596  fi
30597
30598    if test -d "$WIN_SDK_BASE"; then
30599      # There have been cases of partial or broken SDK installations. A missing
30600      # lib dir is not going to work.
30601      if test ! -d "$WIN_SDK_BASE/lib"; then
30602        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30603$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30604        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30605$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30606      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30607        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30608$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30609        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30610        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30611          VS_ENV_ARGS="/x86"
30612        else
30613          VS_ENV_ARGS="/x64"
30614        fi
30615        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30616        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30617        # TODO: improve detection for other versions of SDK
30618        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30619      else
30620        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30621$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30622        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30623$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30624      fi
30625    fi
30626  fi
30627
30628    fi
30629
30630  if test "x$VS_ENV_CMD" = x; then
30631    VS_VERSION="${VS_VERSION}"
30632    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30633    METHOD="well-known name"
30634
30635  windows_path="$WIN_SDK_BASE"
30636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30637    unix_path=`$CYGPATH -u "$windows_path"`
30638    WIN_SDK_BASE="$unix_path"
30639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30641    WIN_SDK_BASE="$unix_path"
30642  fi
30643
30644    if test -d "$WIN_SDK_BASE"; then
30645      # There have been cases of partial or broken SDK installations. A missing
30646      # lib dir is not going to work.
30647      if test ! -d "$WIN_SDK_BASE/lib"; then
30648        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30649$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30650        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30651$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30652      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30653        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30654$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30655        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30656        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30657          VS_ENV_ARGS="/x86"
30658        else
30659          VS_ENV_ARGS="/x64"
30660        fi
30661        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30662        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30663        # TODO: improve detection for other versions of SDK
30664        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30665      else
30666        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30667$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30668        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30669$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30670      fi
30671    fi
30672  fi
30673
30674
30675  if test "x$VS_ENV_CMD" = x; then
30676    VS_VERSION="${VS_VERSION}"
30677    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30678    METHOD="well-known name"
30679
30680  windows_path="$WIN_SDK_BASE"
30681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30682    unix_path=`$CYGPATH -u "$windows_path"`
30683    WIN_SDK_BASE="$unix_path"
30684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30686    WIN_SDK_BASE="$unix_path"
30687  fi
30688
30689    if test -d "$WIN_SDK_BASE"; then
30690      # There have been cases of partial or broken SDK installations. A missing
30691      # lib dir is not going to work.
30692      if test ! -d "$WIN_SDK_BASE/lib"; then
30693        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30694$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30695        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30696$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30697      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30698        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30699$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30700        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30701        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30702          VS_ENV_ARGS="/x86"
30703        else
30704          VS_ENV_ARGS="/x64"
30705        fi
30706        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30707        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30708        # TODO: improve detection for other versions of SDK
30709        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30710      else
30711        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30712$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30713        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30714$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30715      fi
30716    fi
30717  fi
30718
30719  fi
30720
30721    if test "x$VS_ENV_CMD" != x; then
30722      TOOLCHAIN_VERSION=$VS_VERSION
30723      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30724      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30725      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30726      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30727      # The rest of the variables are already evaled while probing
30728      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30729$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30730      break
30731    fi
30732  done
30733
30734
30735  # If we have a devkit, skip all of the below.
30736  if test "x$DEVKIT_VS_VERSION" = x; then
30737    if test "x$VS_ENV_CMD" != x; then
30738      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30739
30740  # Only process if variable expands to non-empty
30741
30742  if test "x$VS_ENV_CMD" != x; then
30743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30744
30745  # First separate the path from the arguments. This will split at the first
30746  # space.
30747  complete="$VS_ENV_CMD"
30748  path="${complete%% *}"
30749  tmp="$complete EOL"
30750  arguments="${tmp#* }"
30751
30752  # Input might be given as Windows format, start by converting to
30753  # unix format.
30754  new_path=`$CYGPATH -u "$path"`
30755
30756  # Now try to locate executable using which
30757  new_path=`$WHICH "$new_path" 2> /dev/null`
30758  # bat and cmd files are not always considered executable in cygwin causing which
30759  # to not find them
30760  if test "x$new_path" = x \
30761      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30762      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30763    new_path=`$CYGPATH -u "$path"`
30764  fi
30765  if test "x$new_path" = x; then
30766    # Oops. Which didn't find the executable.
30767    # The splitting of arguments from the executable at a space might have been incorrect,
30768    # since paths with space are more likely in Windows. Give it another try with the whole
30769    # argument.
30770    path="$complete"
30771    arguments="EOL"
30772    new_path=`$CYGPATH -u "$path"`
30773    new_path=`$WHICH "$new_path" 2> /dev/null`
30774    # bat and cmd files are not always considered executable in cygwin causing which
30775    # to not find them
30776    if test "x$new_path" = x \
30777        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30778        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30779      new_path=`$CYGPATH -u "$path"`
30780    fi
30781    if test "x$new_path" = x; then
30782      # It's still not found. Now this is an unrecoverable error.
30783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30784$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30785      has_space=`$ECHO "$complete" | $GREP " "`
30786      if test "x$has_space" != x; then
30787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30789      fi
30790      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30791    fi
30792  fi
30793
30794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30797  # "foo.exe" is OK but "foo" is an error.
30798  #
30799  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30800  # It is also a way to make sure we got the proper file name for the real test later on.
30801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30802  if test "x$test_shortpath" = x; then
30803    # Short path failed, file does not exist as specified.
30804    # Try adding .exe or .cmd
30805    if test -f "${new_path}.exe"; then
30806      input_to_shortpath="${new_path}.exe"
30807    elif test -f "${new_path}.cmd"; then
30808      input_to_shortpath="${new_path}.cmd"
30809    else
30810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30811$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30812      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30813$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30814      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30815    fi
30816  else
30817    input_to_shortpath="$new_path"
30818  fi
30819
30820  # Call helper function which possibly converts this using DOS-style short mode.
30821  # If so, the updated path is stored in $new_path.
30822  new_path="$input_to_shortpath"
30823
30824  input_path="$input_to_shortpath"
30825  # Check if we need to convert this using DOS-style short mode. If the path
30826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30827  # take no chances and rewrite it.
30828  # Note: m4 eats our [], so we need to use [ and ] instead.
30829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30830  if test "x$has_forbidden_chars" != x; then
30831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30835      # Going to short mode and back again did indeed matter. Since short mode is
30836      # case insensitive, let's make it lowercase to improve readability.
30837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30838      # Now convert it back to Unix-style (cygpath)
30839      input_path=`$CYGPATH -u "$shortmode_path"`
30840      new_path="$input_path"
30841    fi
30842  fi
30843
30844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30845  if test "x$test_cygdrive_prefix" = x; then
30846    # As a simple fix, exclude /usr/bin since it's not a real path.
30847    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30849      # a path prefixed by /cygdrive for fixpath to work.
30850      new_path="$CYGWIN_ROOT_PATH$input_path"
30851    fi
30852  fi
30853
30854  # remove trailing .exe if any
30855  new_path="${new_path/%.exe/}"
30856
30857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30858
30859  # First separate the path from the arguments. This will split at the first
30860  # space.
30861  complete="$VS_ENV_CMD"
30862  path="${complete%% *}"
30863  tmp="$complete EOL"
30864  arguments="${tmp#* }"
30865
30866  # Input might be given as Windows format, start by converting to
30867  # unix format.
30868  new_path="$path"
30869
30870  windows_path="$new_path"
30871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30872    unix_path=`$CYGPATH -u "$windows_path"`
30873    new_path="$unix_path"
30874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30876    new_path="$unix_path"
30877  fi
30878
30879
30880  # Now try to locate executable using which
30881  new_path=`$WHICH "$new_path" 2> /dev/null`
30882
30883  if test "x$new_path" = x; then
30884    # Oops. Which didn't find the executable.
30885    # The splitting of arguments from the executable at a space might have been incorrect,
30886    # since paths with space are more likely in Windows. Give it another try with the whole
30887    # argument.
30888    path="$complete"
30889    arguments="EOL"
30890    new_path="$path"
30891
30892  windows_path="$new_path"
30893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30894    unix_path=`$CYGPATH -u "$windows_path"`
30895    new_path="$unix_path"
30896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30898    new_path="$unix_path"
30899  fi
30900
30901
30902    new_path=`$WHICH "$new_path" 2> /dev/null`
30903    # bat and cmd files are not always considered executable in MSYS causing which
30904    # to not find them
30905    if test "x$new_path" = x \
30906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30908      new_path="$path"
30909
30910  windows_path="$new_path"
30911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30912    unix_path=`$CYGPATH -u "$windows_path"`
30913    new_path="$unix_path"
30914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30916    new_path="$unix_path"
30917  fi
30918
30919    fi
30920
30921    if test "x$new_path" = x; then
30922      # It's still not found. Now this is an unrecoverable error.
30923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30924$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30925      has_space=`$ECHO "$complete" | $GREP " "`
30926      if test "x$has_space" != x; then
30927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30929      fi
30930      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30931    fi
30932  fi
30933
30934  # Now new_path has a complete unix path to the binary
30935  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30936    # Keep paths in /bin as-is, but remove trailing .exe if any
30937    new_path="${new_path/%.exe/}"
30938    # Do not save /bin paths to all_fixpath_prefixes!
30939  else
30940    # Not in mixed or Windows style, start by that.
30941    new_path=`cmd //c echo $new_path`
30942
30943  input_path="$new_path"
30944  # Check if we need to convert this using DOS-style short mode. If the path
30945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30946  # take no chances and rewrite it.
30947  # Note: m4 eats our [], so we need to use [ and ] instead.
30948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30949  if test "x$has_forbidden_chars" != x; then
30950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30952  fi
30953
30954    # Output is in $new_path
30955
30956  windows_path="$new_path"
30957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30958    unix_path=`$CYGPATH -u "$windows_path"`
30959    new_path="$unix_path"
30960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30962    new_path="$unix_path"
30963  fi
30964
30965    # remove trailing .exe if any
30966    new_path="${new_path/%.exe/}"
30967
30968    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30969    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30970  fi
30971
30972    else
30973      # We're on a unix platform. Hooray! :)
30974      # First separate the path from the arguments. This will split at the first
30975      # space.
30976      complete="$VS_ENV_CMD"
30977      path="${complete%% *}"
30978      tmp="$complete EOL"
30979      arguments="${tmp#* }"
30980
30981      # Cannot rely on the command "which" here since it doesn't always work.
30982      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30983      if test -z "$is_absolute_path"; then
30984        # Path to executable is not absolute. Find it.
30985        IFS_save="$IFS"
30986        IFS=:
30987        for p in $PATH; do
30988          if test -f "$p/$path" && test -x "$p/$path"; then
30989            new_path="$p/$path"
30990            break
30991          fi
30992        done
30993        IFS="$IFS_save"
30994      else
30995        # This is an absolute path, we can use it without further modifications.
30996        new_path="$path"
30997      fi
30998
30999      if test "x$new_path" = x; then
31000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31001$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31002        has_space=`$ECHO "$complete" | $GREP " "`
31003        if test "x$has_space" != x; then
31004          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31005$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31006        fi
31007        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31008      fi
31009    fi
31010
31011    # Now join together the path and the arguments once again
31012    if test "x$arguments" != xEOL; then
31013      new_complete="$new_path ${arguments% *}"
31014    else
31015      new_complete="$new_path"
31016    fi
31017
31018    if test "x$complete" != "x$new_complete"; then
31019      VS_ENV_CMD="$new_complete"
31020      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31021$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31022    fi
31023  fi
31024
31025
31026      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31027      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31028$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31029
31030      # We need to create a couple of temporary files.
31031      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31032      $MKDIR -p $VS_ENV_TMP_DIR
31033
31034      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31035      # Instead create a shell script which will set the relevant variables when run.
31036      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31037
31038  unix_path="$WINPATH_VS_ENV_CMD"
31039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31040    windows_path=`$CYGPATH -m "$unix_path"`
31041    WINPATH_VS_ENV_CMD="$windows_path"
31042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31043    windows_path=`cmd //c echo $unix_path`
31044    WINPATH_VS_ENV_CMD="$windows_path"
31045  fi
31046
31047      WINPATH_BASH="$BASH"
31048
31049  unix_path="$WINPATH_BASH"
31050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31051    windows_path=`$CYGPATH -m "$unix_path"`
31052    WINPATH_BASH="$windows_path"
31053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31054    windows_path=`cmd //c echo $unix_path`
31055    WINPATH_BASH="$windows_path"
31056  fi
31057
31058
31059      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31060      # script (executable by bash) that will setup the important variables.
31061      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31062      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31063      # This will end up something like:
31064      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31065      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31066      # These will end up something like:
31067      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31068      # The trailing space for everyone except PATH is no typo, but is needed due
31069      # to trailing \ in the Windows paths. These will be stripped later.
31070      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31071          >> $EXTRACT_VC_ENV_BAT_FILE
31072      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31073          >> $EXTRACT_VC_ENV_BAT_FILE
31074      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31075          >> $EXTRACT_VC_ENV_BAT_FILE
31076      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31077          >> $EXTRACT_VC_ENV_BAT_FILE
31078      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31079          >> $EXTRACT_VC_ENV_BAT_FILE
31080      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31081          >> $EXTRACT_VC_ENV_BAT_FILE
31082
31083      # Now execute the newly created bat file.
31084      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31085      # Change directory so we don't need to mess with Windows paths in redirects.
31086      cd $VS_ENV_TMP_DIR
31087      cmd /c extract-vs-env.bat | $CAT
31088      cd $CURDIR
31089
31090      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31091        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31092$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31093        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31094$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31095        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31096$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31097        as_fn_error $? "Cannot continue" "$LINENO" 5
31098      fi
31099
31100      # Now set all paths and other env variables. This will allow the rest of
31101      # the configure script to find and run the compiler in the proper way.
31102      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31103$as_echo "$as_me: Setting extracted environment variables" >&6;}
31104      . $VS_ENV_TMP_DIR/set-vs-env.sh
31105      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31106      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31107    else
31108      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31109      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31110$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31111    fi
31112  fi
31113
31114  # At this point, we should have correct variables in the environment, or we can't continue.
31115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31116$as_echo_n "checking for Visual Studio variables... " >&6; }
31117
31118  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31119      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31120    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31122$as_echo "present but broken" >&6; }
31123      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31124    else
31125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31126$as_echo "ok" >&6; }
31127      # Remove any trailing "\" ";" and " " from the variables.
31128      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31129      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31130      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31131      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31132      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31133      # Remove any paths containing # (typically F#) as that messes up make. This
31134      # is needed if visual studio was installed with F# support.
31135      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31136
31137
31138
31139
31140
31141      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31142      OLDIFS="$IFS"
31143      IFS=";"
31144      for i in $VS_INCLUDE; do
31145        ipath=$i
31146        # Only process non-empty elements
31147        if test "x$ipath" != x; then
31148          IFS="$OLDIFS"
31149          # Check that directory exists before calling fixup_path
31150          testpath=$ipath
31151
31152  windows_path="$testpath"
31153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31154    unix_path=`$CYGPATH -u "$windows_path"`
31155    testpath="$unix_path"
31156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31158    testpath="$unix_path"
31159  fi
31160
31161          if test -d "$testpath"; then
31162
31163  # Only process if variable expands to non-empty
31164
31165  if test "x$ipath" != x; then
31166    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31167
31168  # Input might be given as Windows format, start by converting to
31169  # unix format.
31170  path="$ipath"
31171  new_path=`$CYGPATH -u "$path"`
31172
31173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31176  # "foo.exe" is OK but "foo" is an error.
31177  #
31178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31179  # It is also a way to make sure we got the proper file name for the real test later on.
31180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31181  if test "x$test_shortpath" = x; then
31182    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31183$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31184    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31185  fi
31186
31187  # Call helper function which possibly converts this using DOS-style short mode.
31188  # If so, the updated path is stored in $new_path.
31189
31190  input_path="$new_path"
31191  # Check if we need to convert this using DOS-style short mode. If the path
31192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31193  # take no chances and rewrite it.
31194  # Note: m4 eats our [], so we need to use [ and ] instead.
31195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31196  if test "x$has_forbidden_chars" != x; then
31197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31201      # Going to short mode and back again did indeed matter. Since short mode is
31202      # case insensitive, let's make it lowercase to improve readability.
31203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31204      # Now convert it back to Unix-style (cygpath)
31205      input_path=`$CYGPATH -u "$shortmode_path"`
31206      new_path="$input_path"
31207    fi
31208  fi
31209
31210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31211  if test "x$test_cygdrive_prefix" = x; then
31212    # As a simple fix, exclude /usr/bin since it's not a real path.
31213    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31215      # a path prefixed by /cygdrive for fixpath to work.
31216      new_path="$CYGWIN_ROOT_PATH$input_path"
31217    fi
31218  fi
31219
31220
31221  if test "x$path" != "x$new_path"; then
31222    ipath="$new_path"
31223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31224$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31225  fi
31226
31227    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31228
31229  path="$ipath"
31230  has_colon=`$ECHO $path | $GREP ^.:`
31231  new_path="$path"
31232  if test "x$has_colon" = x; then
31233    # Not in mixed or Windows style, start by that.
31234    new_path=`cmd //c echo $path`
31235  fi
31236
31237
31238  input_path="$new_path"
31239  # Check if we need to convert this using DOS-style short mode. If the path
31240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31241  # take no chances and rewrite it.
31242  # Note: m4 eats our [], so we need to use [ and ] instead.
31243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31244  if test "x$has_forbidden_chars" != x; then
31245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31247  fi
31248
31249
31250  windows_path="$new_path"
31251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31252    unix_path=`$CYGPATH -u "$windows_path"`
31253    new_path="$unix_path"
31254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31256    new_path="$unix_path"
31257  fi
31258
31259  if test "x$path" != "x$new_path"; then
31260    ipath="$new_path"
31261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31262$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31263  fi
31264
31265  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31266  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31267
31268    else
31269      # We're on a unix platform. Hooray! :)
31270      path="$ipath"
31271      has_space=`$ECHO "$path" | $GREP " "`
31272      if test "x$has_space" != x; then
31273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31274$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31275        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31276      fi
31277
31278      # Use eval to expand a potential ~
31279      eval path="$path"
31280      if test ! -f "$path" && test ! -d "$path"; then
31281        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31282      fi
31283
31284      if test -d "$path"; then
31285        ipath="`cd "$path"; $THEPWDCMD -L`"
31286      else
31287        dir="`$DIRNAME "$path"`"
31288        base="`$BASENAME "$path"`"
31289        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31290      fi
31291    fi
31292  fi
31293
31294            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31295          fi
31296          IFS=";"
31297        fi
31298      done
31299      # Convert VS_LIB into SYSROOT_LDFLAGS
31300      for i in $VS_LIB; do
31301        libpath=$i
31302        # Only process non-empty elements
31303        if test "x$libpath" != x; then
31304          IFS="$OLDIFS"
31305          # Check that directory exists before calling fixup_path
31306          testpath=$libpath
31307
31308  windows_path="$testpath"
31309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31310    unix_path=`$CYGPATH -u "$windows_path"`
31311    testpath="$unix_path"
31312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31314    testpath="$unix_path"
31315  fi
31316
31317          if test -d "$testpath"; then
31318
31319  # Only process if variable expands to non-empty
31320
31321  if test "x$libpath" != x; then
31322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31323
31324  # Input might be given as Windows format, start by converting to
31325  # unix format.
31326  path="$libpath"
31327  new_path=`$CYGPATH -u "$path"`
31328
31329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31332  # "foo.exe" is OK but "foo" is an error.
31333  #
31334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31335  # It is also a way to make sure we got the proper file name for the real test later on.
31336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31337  if test "x$test_shortpath" = x; then
31338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31339$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31340    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31341  fi
31342
31343  # Call helper function which possibly converts this using DOS-style short mode.
31344  # If so, the updated path is stored in $new_path.
31345
31346  input_path="$new_path"
31347  # Check if we need to convert this using DOS-style short mode. If the path
31348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31349  # take no chances and rewrite it.
31350  # Note: m4 eats our [], so we need to use [ and ] instead.
31351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31352  if test "x$has_forbidden_chars" != x; then
31353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31357      # Going to short mode and back again did indeed matter. Since short mode is
31358      # case insensitive, let's make it lowercase to improve readability.
31359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31360      # Now convert it back to Unix-style (cygpath)
31361      input_path=`$CYGPATH -u "$shortmode_path"`
31362      new_path="$input_path"
31363    fi
31364  fi
31365
31366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31367  if test "x$test_cygdrive_prefix" = x; then
31368    # As a simple fix, exclude /usr/bin since it's not a real path.
31369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31371      # a path prefixed by /cygdrive for fixpath to work.
31372      new_path="$CYGWIN_ROOT_PATH$input_path"
31373    fi
31374  fi
31375
31376
31377  if test "x$path" != "x$new_path"; then
31378    libpath="$new_path"
31379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31380$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31381  fi
31382
31383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31384
31385  path="$libpath"
31386  has_colon=`$ECHO $path | $GREP ^.:`
31387  new_path="$path"
31388  if test "x$has_colon" = x; then
31389    # Not in mixed or Windows style, start by that.
31390    new_path=`cmd //c echo $path`
31391  fi
31392
31393
31394  input_path="$new_path"
31395  # Check if we need to convert this using DOS-style short mode. If the path
31396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31397  # take no chances and rewrite it.
31398  # Note: m4 eats our [], so we need to use [ and ] instead.
31399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31400  if test "x$has_forbidden_chars" != x; then
31401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31403  fi
31404
31405
31406  windows_path="$new_path"
31407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31408    unix_path=`$CYGPATH -u "$windows_path"`
31409    new_path="$unix_path"
31410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31412    new_path="$unix_path"
31413  fi
31414
31415  if test "x$path" != "x$new_path"; then
31416    libpath="$new_path"
31417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31418$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31419  fi
31420
31421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31423
31424    else
31425      # We're on a unix platform. Hooray! :)
31426      path="$libpath"
31427      has_space=`$ECHO "$path" | $GREP " "`
31428      if test "x$has_space" != x; then
31429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31430$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31431        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31432      fi
31433
31434      # Use eval to expand a potential ~
31435      eval path="$path"
31436      if test ! -f "$path" && test ! -d "$path"; then
31437        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31438      fi
31439
31440      if test -d "$path"; then
31441        libpath="`cd "$path"; $THEPWDCMD -L`"
31442      else
31443        dir="`$DIRNAME "$path"`"
31444        base="`$BASENAME "$path"`"
31445        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31446      fi
31447    fi
31448  fi
31449
31450            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31451          fi
31452          IFS=";"
31453        fi
31454      done
31455      IFS="$OLDIFS"
31456    fi
31457  else
31458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31459$as_echo "not found" >&6; }
31460
31461    if test "x$VS_ENV_CMD" = x; then
31462      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31463$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31464      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31465$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31466    else
31467      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31468$as_echo "$as_me: Running the extraction script failed." >&6;}
31469    fi
31470    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31471$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31472    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31473$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31474    as_fn_error $? "Cannot continue" "$LINENO" 5
31475  fi
31476
31477    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31478    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31479    PATH="$VS_PATH"
31480    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31481    export INCLUDE="$VS_INCLUDE"
31482    export LIB="$VS_LIB"
31483  else
31484    # Currently we do not define this for other toolchains. This might change as the need arise.
31485    TOOLCHAIN_VERSION=
31486  fi
31487
31488
31489  # For solaris we really need solaris tools, and not the GNU equivalent.
31490  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31491  # so add that to path before starting to probe.
31492  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31493  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31494    PATH="/usr/ccs/bin:$PATH"
31495  fi
31496
31497  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31498  # override all other locations.
31499  if test "x$TOOLCHAIN_PATH" != x; then
31500    PATH=$TOOLCHAIN_PATH:$PATH
31501  fi
31502
31503
31504  #
31505  # Setup the compilers (CC and CXX)
31506  #
31507
31508  COMPILER_NAME=C
31509  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31510
31511  if test "x$CC" != x; then
31512    # User has supplied compiler name already, always let that override.
31513    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31514$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31515    if test "x`basename $CC`" = "x$CC"; then
31516      # A command without a complete path is provided, search $PATH.
31517
31518      for ac_prog in $CC
31519do
31520  # Extract the first word of "$ac_prog", so it can be a program name with args.
31521set dummy $ac_prog; ac_word=$2
31522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31523$as_echo_n "checking for $ac_word... " >&6; }
31524if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31525  $as_echo_n "(cached) " >&6
31526else
31527  case $POTENTIAL_CC in
31528  [\\/]* | ?:[\\/]*)
31529  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31530  ;;
31531  *)
31532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31533for as_dir in $PATH
31534do
31535  IFS=$as_save_IFS
31536  test -z "$as_dir" && as_dir=.
31537    for ac_exec_ext in '' $ac_executable_extensions; do
31538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31539    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31541    break 2
31542  fi
31543done
31544  done
31545IFS=$as_save_IFS
31546
31547  ;;
31548esac
31549fi
31550POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31551if test -n "$POTENTIAL_CC"; then
31552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31553$as_echo "$POTENTIAL_CC" >&6; }
31554else
31555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31556$as_echo "no" >&6; }
31557fi
31558
31559
31560  test -n "$POTENTIAL_CC" && break
31561done
31562
31563      if test "x$POTENTIAL_CC" != x; then
31564        CC=$POTENTIAL_CC
31565      else
31566        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31567      fi
31568    else
31569      # Otherwise it might already be a complete path
31570      if test ! -x "$CC"; then
31571        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31572      fi
31573    fi
31574  else
31575    # No user supplied value. Locate compiler ourselves.
31576
31577    # If we are cross compiling, assume cross compilation tools follows the
31578    # cross compilation standard where they are prefixed with the autoconf
31579    # standard name for the target. For example the binary
31580    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31581    # If we are not cross compiling, then the default compiler name will be
31582    # used.
31583
31584    CC=
31585    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31586    # before checking the rest of the PATH.
31587    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31588    # step, this should not be necessary.
31589    if test -n "$TOOLCHAIN_PATH"; then
31590      PATH_save="$PATH"
31591      PATH="$TOOLCHAIN_PATH"
31592      for ac_prog in $SEARCH_LIST
31593do
31594  # Extract the first word of "$ac_prog", so it can be a program name with args.
31595set dummy $ac_prog; ac_word=$2
31596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31597$as_echo_n "checking for $ac_word... " >&6; }
31598if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31599  $as_echo_n "(cached) " >&6
31600else
31601  case $TOOLCHAIN_PATH_CC in
31602  [\\/]* | ?:[\\/]*)
31603  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31604  ;;
31605  *)
31606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31607for as_dir in $PATH
31608do
31609  IFS=$as_save_IFS
31610  test -z "$as_dir" && as_dir=.
31611    for ac_exec_ext in '' $ac_executable_extensions; do
31612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31613    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31615    break 2
31616  fi
31617done
31618  done
31619IFS=$as_save_IFS
31620
31621  ;;
31622esac
31623fi
31624TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31625if test -n "$TOOLCHAIN_PATH_CC"; then
31626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31627$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31628else
31629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31630$as_echo "no" >&6; }
31631fi
31632
31633
31634  test -n "$TOOLCHAIN_PATH_CC" && break
31635done
31636
31637      CC=$TOOLCHAIN_PATH_CC
31638      PATH="$PATH_save"
31639    fi
31640
31641    # AC_PATH_PROGS can't be run multiple times with the same variable,
31642    # so create a new name for this run.
31643    if test "x$CC" = x; then
31644      for ac_prog in $SEARCH_LIST
31645do
31646  # Extract the first word of "$ac_prog", so it can be a program name with args.
31647set dummy $ac_prog; ac_word=$2
31648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31649$as_echo_n "checking for $ac_word... " >&6; }
31650if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31651  $as_echo_n "(cached) " >&6
31652else
31653  case $POTENTIAL_CC in
31654  [\\/]* | ?:[\\/]*)
31655  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31656  ;;
31657  *)
31658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31659for as_dir in $PATH
31660do
31661  IFS=$as_save_IFS
31662  test -z "$as_dir" && as_dir=.
31663    for ac_exec_ext in '' $ac_executable_extensions; do
31664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31665    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31667    break 2
31668  fi
31669done
31670  done
31671IFS=$as_save_IFS
31672
31673  ;;
31674esac
31675fi
31676POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31677if test -n "$POTENTIAL_CC"; then
31678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31679$as_echo "$POTENTIAL_CC" >&6; }
31680else
31681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31682$as_echo "no" >&6; }
31683fi
31684
31685
31686  test -n "$POTENTIAL_CC" && break
31687done
31688
31689      CC=$POTENTIAL_CC
31690    fi
31691
31692    if test "x$CC" = x; then
31693
31694  # Print a helpful message on how to acquire the necessary build dependency.
31695  # devkit is the help tag: freetype, cups, alsa etc
31696  MISSING_DEPENDENCY=devkit
31697
31698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31699    cygwin_help $MISSING_DEPENDENCY
31700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31701    msys_help $MISSING_DEPENDENCY
31702  else
31703    PKGHANDLER_COMMAND=
31704
31705    case $PKGHANDLER in
31706      apt-get)
31707        apt_help     $MISSING_DEPENDENCY ;;
31708      yum)
31709        yum_help     $MISSING_DEPENDENCY ;;
31710      port)
31711        port_help    $MISSING_DEPENDENCY ;;
31712      pkgutil)
31713        pkgutil_help $MISSING_DEPENDENCY ;;
31714      pkgadd)
31715        pkgadd_help  $MISSING_DEPENDENCY ;;
31716    esac
31717
31718    if test "x$PKGHANDLER_COMMAND" != x; then
31719      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31720    fi
31721  fi
31722
31723      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31724    fi
31725  fi
31726
31727  # Now we have a compiler binary in CC. Make sure it's okay.
31728
31729  # Only process if variable expands to non-empty
31730
31731  if test "x$CC" != x; then
31732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31733
31734  # First separate the path from the arguments. This will split at the first
31735  # space.
31736  complete="$CC"
31737  path="${complete%% *}"
31738  tmp="$complete EOL"
31739  arguments="${tmp#* }"
31740
31741  # Input might be given as Windows format, start by converting to
31742  # unix format.
31743  new_path=`$CYGPATH -u "$path"`
31744
31745  # Now try to locate executable using which
31746  new_path=`$WHICH "$new_path" 2> /dev/null`
31747  # bat and cmd files are not always considered executable in cygwin causing which
31748  # to not find them
31749  if test "x$new_path" = x \
31750      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31751      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31752    new_path=`$CYGPATH -u "$path"`
31753  fi
31754  if test "x$new_path" = x; then
31755    # Oops. Which didn't find the executable.
31756    # The splitting of arguments from the executable at a space might have been incorrect,
31757    # since paths with space are more likely in Windows. Give it another try with the whole
31758    # argument.
31759    path="$complete"
31760    arguments="EOL"
31761    new_path=`$CYGPATH -u "$path"`
31762    new_path=`$WHICH "$new_path" 2> /dev/null`
31763    # bat and cmd files are not always considered executable in cygwin causing which
31764    # to not find them
31765    if test "x$new_path" = x \
31766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31768      new_path=`$CYGPATH -u "$path"`
31769    fi
31770    if test "x$new_path" = x; then
31771      # It's still not found. Now this is an unrecoverable error.
31772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31773$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31774      has_space=`$ECHO "$complete" | $GREP " "`
31775      if test "x$has_space" != x; then
31776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31778      fi
31779      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31780    fi
31781  fi
31782
31783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31786  # "foo.exe" is OK but "foo" is an error.
31787  #
31788  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31789  # It is also a way to make sure we got the proper file name for the real test later on.
31790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31791  if test "x$test_shortpath" = x; then
31792    # Short path failed, file does not exist as specified.
31793    # Try adding .exe or .cmd
31794    if test -f "${new_path}.exe"; then
31795      input_to_shortpath="${new_path}.exe"
31796    elif test -f "${new_path}.cmd"; then
31797      input_to_shortpath="${new_path}.cmd"
31798    else
31799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31800$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31803      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31804    fi
31805  else
31806    input_to_shortpath="$new_path"
31807  fi
31808
31809  # Call helper function which possibly converts this using DOS-style short mode.
31810  # If so, the updated path is stored in $new_path.
31811  new_path="$input_to_shortpath"
31812
31813  input_path="$input_to_shortpath"
31814  # Check if we need to convert this using DOS-style short mode. If the path
31815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31816  # take no chances and rewrite it.
31817  # Note: m4 eats our [], so we need to use [ and ] instead.
31818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31819  if test "x$has_forbidden_chars" != x; then
31820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31824      # Going to short mode and back again did indeed matter. Since short mode is
31825      # case insensitive, let's make it lowercase to improve readability.
31826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31827      # Now convert it back to Unix-style (cygpath)
31828      input_path=`$CYGPATH -u "$shortmode_path"`
31829      new_path="$input_path"
31830    fi
31831  fi
31832
31833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31834  if test "x$test_cygdrive_prefix" = x; then
31835    # As a simple fix, exclude /usr/bin since it's not a real path.
31836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31838      # a path prefixed by /cygdrive for fixpath to work.
31839      new_path="$CYGWIN_ROOT_PATH$input_path"
31840    fi
31841  fi
31842
31843  # remove trailing .exe if any
31844  new_path="${new_path/%.exe/}"
31845
31846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31847
31848  # First separate the path from the arguments. This will split at the first
31849  # space.
31850  complete="$CC"
31851  path="${complete%% *}"
31852  tmp="$complete EOL"
31853  arguments="${tmp#* }"
31854
31855  # Input might be given as Windows format, start by converting to
31856  # unix format.
31857  new_path="$path"
31858
31859  windows_path="$new_path"
31860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31861    unix_path=`$CYGPATH -u "$windows_path"`
31862    new_path="$unix_path"
31863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31865    new_path="$unix_path"
31866  fi
31867
31868
31869  # Now try to locate executable using which
31870  new_path=`$WHICH "$new_path" 2> /dev/null`
31871
31872  if test "x$new_path" = x; then
31873    # Oops. Which didn't find the executable.
31874    # The splitting of arguments from the executable at a space might have been incorrect,
31875    # since paths with space are more likely in Windows. Give it another try with the whole
31876    # argument.
31877    path="$complete"
31878    arguments="EOL"
31879    new_path="$path"
31880
31881  windows_path="$new_path"
31882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31883    unix_path=`$CYGPATH -u "$windows_path"`
31884    new_path="$unix_path"
31885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31887    new_path="$unix_path"
31888  fi
31889
31890
31891    new_path=`$WHICH "$new_path" 2> /dev/null`
31892    # bat and cmd files are not always considered executable in MSYS causing which
31893    # to not find them
31894    if test "x$new_path" = x \
31895        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31896        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31897      new_path="$path"
31898
31899  windows_path="$new_path"
31900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31901    unix_path=`$CYGPATH -u "$windows_path"`
31902    new_path="$unix_path"
31903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31905    new_path="$unix_path"
31906  fi
31907
31908    fi
31909
31910    if test "x$new_path" = x; then
31911      # It's still not found. Now this is an unrecoverable error.
31912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31913$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31914      has_space=`$ECHO "$complete" | $GREP " "`
31915      if test "x$has_space" != x; then
31916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31918      fi
31919      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31920    fi
31921  fi
31922
31923  # Now new_path has a complete unix path to the binary
31924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31925    # Keep paths in /bin as-is, but remove trailing .exe if any
31926    new_path="${new_path/%.exe/}"
31927    # Do not save /bin paths to all_fixpath_prefixes!
31928  else
31929    # Not in mixed or Windows style, start by that.
31930    new_path=`cmd //c echo $new_path`
31931
31932  input_path="$new_path"
31933  # Check if we need to convert this using DOS-style short mode. If the path
31934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31935  # take no chances and rewrite it.
31936  # Note: m4 eats our [], so we need to use [ and ] instead.
31937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31938  if test "x$has_forbidden_chars" != x; then
31939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31941  fi
31942
31943    # Output is in $new_path
31944
31945  windows_path="$new_path"
31946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31947    unix_path=`$CYGPATH -u "$windows_path"`
31948    new_path="$unix_path"
31949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31951    new_path="$unix_path"
31952  fi
31953
31954    # remove trailing .exe if any
31955    new_path="${new_path/%.exe/}"
31956
31957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31959  fi
31960
31961    else
31962      # We're on a unix platform. Hooray! :)
31963      # First separate the path from the arguments. This will split at the first
31964      # space.
31965      complete="$CC"
31966      path="${complete%% *}"
31967      tmp="$complete EOL"
31968      arguments="${tmp#* }"
31969
31970      # Cannot rely on the command "which" here since it doesn't always work.
31971      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31972      if test -z "$is_absolute_path"; then
31973        # Path to executable is not absolute. Find it.
31974        IFS_save="$IFS"
31975        IFS=:
31976        for p in $PATH; do
31977          if test -f "$p/$path" && test -x "$p/$path"; then
31978            new_path="$p/$path"
31979            break
31980          fi
31981        done
31982        IFS="$IFS_save"
31983      else
31984        # This is an absolute path, we can use it without further modifications.
31985        new_path="$path"
31986      fi
31987
31988      if test "x$new_path" = x; then
31989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31990$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31991        has_space=`$ECHO "$complete" | $GREP " "`
31992        if test "x$has_space" != x; then
31993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31995        fi
31996        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31997      fi
31998    fi
31999
32000    # Now join together the path and the arguments once again
32001    if test "x$arguments" != xEOL; then
32002      new_complete="$new_path ${arguments% *}"
32003    else
32004      new_complete="$new_path"
32005    fi
32006
32007    if test "x$complete" != "x$new_complete"; then
32008      CC="$new_complete"
32009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32010$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32011    fi
32012  fi
32013
32014  TEST_COMPILER="$CC"
32015  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
32016  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
32017  if test "x$OPENJDK_BUILD_OS" != xaix; then
32018    # FIXME: This test should not be needed anymore; we don't do that for any platform.
32019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32020$as_echo_n "checking resolved symbolic links for CC... " >&6; }
32021
32022  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32023    # Follow a chain of symbolic links. Use readlink
32024    # where it exists, else fall back to horribly
32025    # complicated shell code.
32026    if test "x$READLINK_TESTED" != yes; then
32027      # On MacOSX there is a readlink tool with a different
32028      # purpose than the GNU readlink tool. Check the found readlink.
32029      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32030      if test "x$ISGNU" = x; then
32031        # A readlink that we do not know how to use.
32032        # Are there other non-GNU readlinks out there?
32033        READLINK_TESTED=yes
32034        READLINK=
32035      fi
32036    fi
32037
32038    if test "x$READLINK" != x; then
32039      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
32040    else
32041      # Save the current directory for restoring afterwards
32042      STARTDIR=$PWD
32043      COUNTER=0
32044      sym_link_dir=`$DIRNAME $TEST_COMPILER`
32045      sym_link_file=`$BASENAME $TEST_COMPILER`
32046      cd $sym_link_dir
32047      # Use -P flag to resolve symlinks in directories.
32048      cd `$THEPWDCMD -P`
32049      sym_link_dir=`$THEPWDCMD -P`
32050      # Resolve file symlinks
32051      while test $COUNTER -lt 20; do
32052        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32053        if test "x$ISLINK" == x; then
32054          # This is not a symbolic link! We are done!
32055          break
32056        fi
32057        # Again resolve directory symlinks since the target of the just found
32058        # link could be in a different directory
32059        cd `$DIRNAME $ISLINK`
32060        sym_link_dir=`$THEPWDCMD -P`
32061        sym_link_file=`$BASENAME $ISLINK`
32062        let COUNTER=COUNTER+1
32063      done
32064      cd $STARTDIR
32065      TEST_COMPILER=$sym_link_dir/$sym_link_file
32066    fi
32067  fi
32068
32069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
32070$as_echo "$TEST_COMPILER" >&6; }
32071  fi
32072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
32073$as_echo_n "checking if CC is disguised ccache... " >&6; }
32074
32075  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
32076  if test "x$COMPILER_BASENAME" = "xccache"; then
32077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
32078$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
32079    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
32080    # We want to control ccache invocation ourselves, so ignore this cc and try
32081    # searching again.
32082
32083    # Remove the path to the fake ccache cc from the PATH
32084    RETRY_COMPILER_SAVED_PATH="$PATH"
32085    COMPILER_DIRNAME=`$DIRNAME $CC`
32086    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
32087
32088    # Try again looking for our compiler
32089    if test -n "$ac_tool_prefix"; then
32090  for ac_prog in $TOOLCHAIN_CC_BINARY
32091  do
32092    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32093set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32095$as_echo_n "checking for $ac_word... " >&6; }
32096if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
32097  $as_echo_n "(cached) " >&6
32098else
32099  if test -n "$PROPER_COMPILER_CC"; then
32100  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
32101else
32102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32103for as_dir in $PATH
32104do
32105  IFS=$as_save_IFS
32106  test -z "$as_dir" && as_dir=.
32107    for ac_exec_ext in '' $ac_executable_extensions; do
32108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32109    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
32110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32111    break 2
32112  fi
32113done
32114  done
32115IFS=$as_save_IFS
32116
32117fi
32118fi
32119PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
32120if test -n "$PROPER_COMPILER_CC"; then
32121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32122$as_echo "$PROPER_COMPILER_CC" >&6; }
32123else
32124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32125$as_echo "no" >&6; }
32126fi
32127
32128
32129    test -n "$PROPER_COMPILER_CC" && break
32130  done
32131fi
32132if test -z "$PROPER_COMPILER_CC"; then
32133  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
32134  for ac_prog in $TOOLCHAIN_CC_BINARY
32135do
32136  # Extract the first word of "$ac_prog", so it can be a program name with args.
32137set dummy $ac_prog; ac_word=$2
32138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32139$as_echo_n "checking for $ac_word... " >&6; }
32140if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
32141  $as_echo_n "(cached) " >&6
32142else
32143  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32144  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
32145else
32146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32147for as_dir in $PATH
32148do
32149  IFS=$as_save_IFS
32150  test -z "$as_dir" && as_dir=.
32151    for ac_exec_ext in '' $ac_executable_extensions; do
32152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32153    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
32154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32155    break 2
32156  fi
32157done
32158  done
32159IFS=$as_save_IFS
32160
32161fi
32162fi
32163ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
32164if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
32166$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
32167else
32168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32169$as_echo "no" >&6; }
32170fi
32171
32172
32173  test -n "$ac_ct_PROPER_COMPILER_CC" && break
32174done
32175
32176  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
32177    PROPER_COMPILER_CC=""
32178  else
32179    case $cross_compiling:$ac_tool_warned in
32180yes:)
32181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32183ac_tool_warned=yes ;;
32184esac
32185    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
32186  fi
32187fi
32188
32189
32190  # Only process if variable expands to non-empty
32191
32192  if test "x$PROPER_COMPILER_CC" != x; then
32193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32194
32195  # First separate the path from the arguments. This will split at the first
32196  # space.
32197  complete="$PROPER_COMPILER_CC"
32198  path="${complete%% *}"
32199  tmp="$complete EOL"
32200  arguments="${tmp#* }"
32201
32202  # Input might be given as Windows format, start by converting to
32203  # unix format.
32204  new_path=`$CYGPATH -u "$path"`
32205
32206  # Now try to locate executable using which
32207  new_path=`$WHICH "$new_path" 2> /dev/null`
32208  # bat and cmd files are not always considered executable in cygwin causing which
32209  # to not find them
32210  if test "x$new_path" = x \
32211      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32212      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32213    new_path=`$CYGPATH -u "$path"`
32214  fi
32215  if test "x$new_path" = x; then
32216    # Oops. Which didn't find the executable.
32217    # The splitting of arguments from the executable at a space might have been incorrect,
32218    # since paths with space are more likely in Windows. Give it another try with the whole
32219    # argument.
32220    path="$complete"
32221    arguments="EOL"
32222    new_path=`$CYGPATH -u "$path"`
32223    new_path=`$WHICH "$new_path" 2> /dev/null`
32224    # bat and cmd files are not always considered executable in cygwin causing which
32225    # to not find them
32226    if test "x$new_path" = x \
32227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32229      new_path=`$CYGPATH -u "$path"`
32230    fi
32231    if test "x$new_path" = x; then
32232      # It's still not found. Now this is an unrecoverable error.
32233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32234$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32235      has_space=`$ECHO "$complete" | $GREP " "`
32236      if test "x$has_space" != x; then
32237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32239      fi
32240      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32241    fi
32242  fi
32243
32244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32247  # "foo.exe" is OK but "foo" is an error.
32248  #
32249  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32250  # It is also a way to make sure we got the proper file name for the real test later on.
32251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32252  if test "x$test_shortpath" = x; then
32253    # Short path failed, file does not exist as specified.
32254    # Try adding .exe or .cmd
32255    if test -f "${new_path}.exe"; then
32256      input_to_shortpath="${new_path}.exe"
32257    elif test -f "${new_path}.cmd"; then
32258      input_to_shortpath="${new_path}.cmd"
32259    else
32260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
32261$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
32262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32264      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32265    fi
32266  else
32267    input_to_shortpath="$new_path"
32268  fi
32269
32270  # Call helper function which possibly converts this using DOS-style short mode.
32271  # If so, the updated path is stored in $new_path.
32272  new_path="$input_to_shortpath"
32273
32274  input_path="$input_to_shortpath"
32275  # Check if we need to convert this using DOS-style short mode. If the path
32276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32277  # take no chances and rewrite it.
32278  # Note: m4 eats our [], so we need to use [ and ] instead.
32279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32280  if test "x$has_forbidden_chars" != x; then
32281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32285      # Going to short mode and back again did indeed matter. Since short mode is
32286      # case insensitive, let's make it lowercase to improve readability.
32287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32288      # Now convert it back to Unix-style (cygpath)
32289      input_path=`$CYGPATH -u "$shortmode_path"`
32290      new_path="$input_path"
32291    fi
32292  fi
32293
32294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32295  if test "x$test_cygdrive_prefix" = x; then
32296    # As a simple fix, exclude /usr/bin since it's not a real path.
32297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32299      # a path prefixed by /cygdrive for fixpath to work.
32300      new_path="$CYGWIN_ROOT_PATH$input_path"
32301    fi
32302  fi
32303
32304  # remove trailing .exe if any
32305  new_path="${new_path/%.exe/}"
32306
32307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32308
32309  # First separate the path from the arguments. This will split at the first
32310  # space.
32311  complete="$PROPER_COMPILER_CC"
32312  path="${complete%% *}"
32313  tmp="$complete EOL"
32314  arguments="${tmp#* }"
32315
32316  # Input might be given as Windows format, start by converting to
32317  # unix format.
32318  new_path="$path"
32319
32320  windows_path="$new_path"
32321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32322    unix_path=`$CYGPATH -u "$windows_path"`
32323    new_path="$unix_path"
32324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32326    new_path="$unix_path"
32327  fi
32328
32329
32330  # Now try to locate executable using which
32331  new_path=`$WHICH "$new_path" 2> /dev/null`
32332
32333  if test "x$new_path" = x; then
32334    # Oops. Which didn't find the executable.
32335    # The splitting of arguments from the executable at a space might have been incorrect,
32336    # since paths with space are more likely in Windows. Give it another try with the whole
32337    # argument.
32338    path="$complete"
32339    arguments="EOL"
32340    new_path="$path"
32341
32342  windows_path="$new_path"
32343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32344    unix_path=`$CYGPATH -u "$windows_path"`
32345    new_path="$unix_path"
32346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32348    new_path="$unix_path"
32349  fi
32350
32351
32352    new_path=`$WHICH "$new_path" 2> /dev/null`
32353    # bat and cmd files are not always considered executable in MSYS causing which
32354    # to not find them
32355    if test "x$new_path" = x \
32356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32358      new_path="$path"
32359
32360  windows_path="$new_path"
32361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32362    unix_path=`$CYGPATH -u "$windows_path"`
32363    new_path="$unix_path"
32364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32366    new_path="$unix_path"
32367  fi
32368
32369    fi
32370
32371    if test "x$new_path" = x; then
32372      # It's still not found. Now this is an unrecoverable error.
32373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32374$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32375      has_space=`$ECHO "$complete" | $GREP " "`
32376      if test "x$has_space" != x; then
32377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32379      fi
32380      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32381    fi
32382  fi
32383
32384  # Now new_path has a complete unix path to the binary
32385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32386    # Keep paths in /bin as-is, but remove trailing .exe if any
32387    new_path="${new_path/%.exe/}"
32388    # Do not save /bin paths to all_fixpath_prefixes!
32389  else
32390    # Not in mixed or Windows style, start by that.
32391    new_path=`cmd //c echo $new_path`
32392
32393  input_path="$new_path"
32394  # Check if we need to convert this using DOS-style short mode. If the path
32395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32396  # take no chances and rewrite it.
32397  # Note: m4 eats our [], so we need to use [ and ] instead.
32398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32399  if test "x$has_forbidden_chars" != x; then
32400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32402  fi
32403
32404    # Output is in $new_path
32405
32406  windows_path="$new_path"
32407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32408    unix_path=`$CYGPATH -u "$windows_path"`
32409    new_path="$unix_path"
32410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32412    new_path="$unix_path"
32413  fi
32414
32415    # remove trailing .exe if any
32416    new_path="${new_path/%.exe/}"
32417
32418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32420  fi
32421
32422    else
32423      # We're on a unix platform. Hooray! :)
32424      # First separate the path from the arguments. This will split at the first
32425      # space.
32426      complete="$PROPER_COMPILER_CC"
32427      path="${complete%% *}"
32428      tmp="$complete EOL"
32429      arguments="${tmp#* }"
32430
32431      # Cannot rely on the command "which" here since it doesn't always work.
32432      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32433      if test -z "$is_absolute_path"; then
32434        # Path to executable is not absolute. Find it.
32435        IFS_save="$IFS"
32436        IFS=:
32437        for p in $PATH; do
32438          if test -f "$p/$path" && test -x "$p/$path"; then
32439            new_path="$p/$path"
32440            break
32441          fi
32442        done
32443        IFS="$IFS_save"
32444      else
32445        # This is an absolute path, we can use it without further modifications.
32446        new_path="$path"
32447      fi
32448
32449      if test "x$new_path" = x; then
32450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32451$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32452        has_space=`$ECHO "$complete" | $GREP " "`
32453        if test "x$has_space" != x; then
32454          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32456        fi
32457        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32458      fi
32459    fi
32460
32461    # Now join together the path and the arguments once again
32462    if test "x$arguments" != xEOL; then
32463      new_complete="$new_path ${arguments% *}"
32464    else
32465      new_complete="$new_path"
32466    fi
32467
32468    if test "x$complete" != "x$new_complete"; then
32469      PROPER_COMPILER_CC="$new_complete"
32470      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32471$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32472    fi
32473  fi
32474
32475    PATH="$RETRY_COMPILER_SAVED_PATH"
32476
32477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32478$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32479
32480  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32481    # Follow a chain of symbolic links. Use readlink
32482    # where it exists, else fall back to horribly
32483    # complicated shell code.
32484    if test "x$READLINK_TESTED" != yes; then
32485      # On MacOSX there is a readlink tool with a different
32486      # purpose than the GNU readlink tool. Check the found readlink.
32487      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32488      if test "x$ISGNU" = x; then
32489        # A readlink that we do not know how to use.
32490        # Are there other non-GNU readlinks out there?
32491        READLINK_TESTED=yes
32492        READLINK=
32493      fi
32494    fi
32495
32496    if test "x$READLINK" != x; then
32497      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32498    else
32499      # Save the current directory for restoring afterwards
32500      STARTDIR=$PWD
32501      COUNTER=0
32502      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32503      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32504      cd $sym_link_dir
32505      # Use -P flag to resolve symlinks in directories.
32506      cd `$THEPWDCMD -P`
32507      sym_link_dir=`$THEPWDCMD -P`
32508      # Resolve file symlinks
32509      while test $COUNTER -lt 20; do
32510        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32511        if test "x$ISLINK" == x; then
32512          # This is not a symbolic link! We are done!
32513          break
32514        fi
32515        # Again resolve directory symlinks since the target of the just found
32516        # link could be in a different directory
32517        cd `$DIRNAME $ISLINK`
32518        sym_link_dir=`$THEPWDCMD -P`
32519        sym_link_file=`$BASENAME $ISLINK`
32520        let COUNTER=COUNTER+1
32521      done
32522      cd $STARTDIR
32523      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32524    fi
32525  fi
32526
32527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32528$as_echo "$PROPER_COMPILER_CC" >&6; }
32529    CC="$PROPER_COMPILER_CC"
32530  else
32531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32532$as_echo "no, keeping CC" >&6; }
32533  fi
32534
32535
32536  COMPILER=$CC
32537  COMPILER_NAME=$COMPILER_NAME
32538
32539  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32540    # cc -V output typically looks like
32541    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32542    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32543    # Check that this is likely to be the Solaris Studio cc.
32544    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32545    if test $? -ne 0; then
32546      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32547      { $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
32548$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32549      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32550$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32551      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32552$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32553      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32554    fi
32555    # Remove usage instructions (if present), and
32556    # collapse compiler output into a single line
32557    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32558        $SED -e 's/ *[Uu]sage:.*//'`
32559    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32560        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32561  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32562    # xlc -qversion output typically looks like
32563    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32564    #     Version: 11.01.0000.0015
32565    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32566    # Check that this is likely to be the IBM XL C compiler.
32567    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32568    if test $? -ne 0; then
32569      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32570      { $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
32571$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32572      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32573$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32574      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32575$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32576      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32577    fi
32578    # Collapse compiler output into a single line
32579    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32580    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32581        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32582  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32583    # There is no specific version flag, but all output starts with a version string.
32584    # First line typically looks something like:
32585    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32586    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32587    # Check that this is likely to be Microsoft CL.EXE.
32588    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32589    if test $? -ne 0; then
32590      { $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
32591$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32592      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32593$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32594      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32595    fi
32596    # Collapse compiler output into a single line
32597    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32598    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32599        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32600  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32601    # gcc --version output typically looks like
32602    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32603    #     Copyright (C) 2013 Free Software Foundation, Inc.
32604    #     This is free software; see the source for copying conditions.  There is NO
32605    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32606    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32607    # Check that this is likely to be GCC.
32608    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32609    if test $? -ne 0; then
32610      { $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
32611$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32612      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32613$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32614      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32615    fi
32616    # Remove Copyright and legalese from version string, and
32617    # collapse into a single line
32618    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32619        $SED -e 's/ *Copyright .*//'`
32620    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32621        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32622  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32623    # clang --version output typically looks like
32624    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32625    #    clang version 3.3 (tags/RELEASE_33/final)
32626    # or
32627    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32628    #    Target: x86_64-pc-linux-gnu
32629    #    Thread model: posix
32630    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32631    # Check that this is likely to be clang
32632    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32633    if test $? -ne 0; then
32634      { $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
32635$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32636      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32637$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32638      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32639    fi
32640    # Collapse compiler output into a single line
32641    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32642    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32643        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32644  else
32645      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32646  fi
32647  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32648  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32649  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32650  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32651
32652  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32653$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32654
32655
32656  # Now that we have resolved CC ourself, let autoconf have its go at it
32657  ac_ext=c
32658ac_cpp='$CPP $CPPFLAGS'
32659ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32660ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32661ac_compiler_gnu=$ac_cv_c_compiler_gnu
32662if test -n "$ac_tool_prefix"; then
32663  for ac_prog in $CC
32664  do
32665    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32666set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32668$as_echo_n "checking for $ac_word... " >&6; }
32669if ${ac_cv_prog_CC+:} false; then :
32670  $as_echo_n "(cached) " >&6
32671else
32672  if test -n "$CC"; then
32673  ac_cv_prog_CC="$CC" # Let the user override the test.
32674else
32675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32676for as_dir in $PATH
32677do
32678  IFS=$as_save_IFS
32679  test -z "$as_dir" && as_dir=.
32680    for ac_exec_ext in '' $ac_executable_extensions; do
32681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32682    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32684    break 2
32685  fi
32686done
32687  done
32688IFS=$as_save_IFS
32689
32690fi
32691fi
32692CC=$ac_cv_prog_CC
32693if test -n "$CC"; then
32694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32695$as_echo "$CC" >&6; }
32696else
32697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32698$as_echo "no" >&6; }
32699fi
32700
32701
32702    test -n "$CC" && break
32703  done
32704fi
32705if test -z "$CC"; then
32706  ac_ct_CC=$CC
32707  for ac_prog in $CC
32708do
32709  # Extract the first word of "$ac_prog", so it can be a program name with args.
32710set dummy $ac_prog; ac_word=$2
32711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32712$as_echo_n "checking for $ac_word... " >&6; }
32713if ${ac_cv_prog_ac_ct_CC+:} false; then :
32714  $as_echo_n "(cached) " >&6
32715else
32716  if test -n "$ac_ct_CC"; then
32717  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32718else
32719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32720for as_dir in $PATH
32721do
32722  IFS=$as_save_IFS
32723  test -z "$as_dir" && as_dir=.
32724    for ac_exec_ext in '' $ac_executable_extensions; do
32725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32726    ac_cv_prog_ac_ct_CC="$ac_prog"
32727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32728    break 2
32729  fi
32730done
32731  done
32732IFS=$as_save_IFS
32733
32734fi
32735fi
32736ac_ct_CC=$ac_cv_prog_ac_ct_CC
32737if test -n "$ac_ct_CC"; then
32738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32739$as_echo "$ac_ct_CC" >&6; }
32740else
32741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32742$as_echo "no" >&6; }
32743fi
32744
32745
32746  test -n "$ac_ct_CC" && break
32747done
32748
32749  if test "x$ac_ct_CC" = x; then
32750    CC=""
32751  else
32752    case $cross_compiling:$ac_tool_warned in
32753yes:)
32754{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32755$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32756ac_tool_warned=yes ;;
32757esac
32758    CC=$ac_ct_CC
32759  fi
32760fi
32761
32762
32763test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32765as_fn_error $? "no acceptable C compiler found in \$PATH
32766See \`config.log' for more details" "$LINENO" 5; }
32767
32768# Provide some information about the compiler.
32769$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32770set X $ac_compile
32771ac_compiler=$2
32772for ac_option in --version -v -V -qversion; do
32773  { { ac_try="$ac_compiler $ac_option >&5"
32774case "(($ac_try" in
32775  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32776  *) ac_try_echo=$ac_try;;
32777esac
32778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32779$as_echo "$ac_try_echo"; } >&5
32780  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32781  ac_status=$?
32782  if test -s conftest.err; then
32783    sed '10a\
32784... rest of stderr output deleted ...
32785         10q' conftest.err >conftest.er1
32786    cat conftest.er1 >&5
32787  fi
32788  rm -f conftest.er1 conftest.err
32789  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32790  test $ac_status = 0; }
32791done
32792
32793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32794/* end confdefs.h.  */
32795
32796int
32797main ()
32798{
32799
32800  ;
32801  return 0;
32802}
32803_ACEOF
32804ac_clean_files_save=$ac_clean_files
32805ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32806# Try to create an executable without -o first, disregard a.out.
32807# It will help us diagnose broken compilers, and finding out an intuition
32808# of exeext.
32809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32810$as_echo_n "checking whether the C compiler works... " >&6; }
32811ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32812
32813# The possible output files:
32814ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32815
32816ac_rmfiles=
32817for ac_file in $ac_files
32818do
32819  case $ac_file in
32820    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32821    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32822  esac
32823done
32824rm -f $ac_rmfiles
32825
32826if { { ac_try="$ac_link_default"
32827case "(($ac_try" in
32828  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32829  *) ac_try_echo=$ac_try;;
32830esac
32831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32832$as_echo "$ac_try_echo"; } >&5
32833  (eval "$ac_link_default") 2>&5
32834  ac_status=$?
32835  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32836  test $ac_status = 0; }; then :
32837  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32838# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32839# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32840# so that the user can short-circuit this test for compilers unknown to
32841# Autoconf.
32842for ac_file in $ac_files ''
32843do
32844  test -f "$ac_file" || continue
32845  case $ac_file in
32846    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32847	;;
32848    [ab].out )
32849	# We found the default executable, but exeext='' is most
32850	# certainly right.
32851	break;;
32852    *.* )
32853	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32854	then :; else
32855	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32856	fi
32857	# We set ac_cv_exeext here because the later test for it is not
32858	# safe: cross compilers may not add the suffix if given an `-o'
32859	# argument, so we may need to know it at that point already.
32860	# Even if this section looks crufty: it has the advantage of
32861	# actually working.
32862	break;;
32863    * )
32864	break;;
32865  esac
32866done
32867test "$ac_cv_exeext" = no && ac_cv_exeext=
32868
32869else
32870  ac_file=''
32871fi
32872if test -z "$ac_file"; then :
32873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32874$as_echo "no" >&6; }
32875$as_echo "$as_me: failed program was:" >&5
32876sed 's/^/| /' conftest.$ac_ext >&5
32877
32878{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32880as_fn_error 77 "C compiler cannot create executables
32881See \`config.log' for more details" "$LINENO" 5; }
32882else
32883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32884$as_echo "yes" >&6; }
32885fi
32886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32887$as_echo_n "checking for C compiler default output file name... " >&6; }
32888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32889$as_echo "$ac_file" >&6; }
32890ac_exeext=$ac_cv_exeext
32891
32892rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32893ac_clean_files=$ac_clean_files_save
32894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32895$as_echo_n "checking for suffix of executables... " >&6; }
32896if { { ac_try="$ac_link"
32897case "(($ac_try" in
32898  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32899  *) ac_try_echo=$ac_try;;
32900esac
32901eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32902$as_echo "$ac_try_echo"; } >&5
32903  (eval "$ac_link") 2>&5
32904  ac_status=$?
32905  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32906  test $ac_status = 0; }; then :
32907  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32908# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32909# work properly (i.e., refer to `conftest.exe'), while it won't with
32910# `rm'.
32911for ac_file in conftest.exe conftest conftest.*; do
32912  test -f "$ac_file" || continue
32913  case $ac_file in
32914    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32915    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32916	  break;;
32917    * ) break;;
32918  esac
32919done
32920else
32921  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32923as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32924See \`config.log' for more details" "$LINENO" 5; }
32925fi
32926rm -f conftest conftest$ac_cv_exeext
32927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32928$as_echo "$ac_cv_exeext" >&6; }
32929
32930rm -f conftest.$ac_ext
32931EXEEXT=$ac_cv_exeext
32932ac_exeext=$EXEEXT
32933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32934/* end confdefs.h.  */
32935#include <stdio.h>
32936int
32937main ()
32938{
32939FILE *f = fopen ("conftest.out", "w");
32940 return ferror (f) || fclose (f) != 0;
32941
32942  ;
32943  return 0;
32944}
32945_ACEOF
32946ac_clean_files="$ac_clean_files conftest.out"
32947# Check that the compiler produces executables we can run.  If not, either
32948# the compiler is broken, or we cross compile.
32949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32950$as_echo_n "checking whether we are cross compiling... " >&6; }
32951if test "$cross_compiling" != yes; then
32952  { { ac_try="$ac_link"
32953case "(($ac_try" in
32954  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32955  *) ac_try_echo=$ac_try;;
32956esac
32957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32958$as_echo "$ac_try_echo"; } >&5
32959  (eval "$ac_link") 2>&5
32960  ac_status=$?
32961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32962  test $ac_status = 0; }
32963  if { ac_try='./conftest$ac_cv_exeext'
32964  { { case "(($ac_try" in
32965  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32966  *) ac_try_echo=$ac_try;;
32967esac
32968eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32969$as_echo "$ac_try_echo"; } >&5
32970  (eval "$ac_try") 2>&5
32971  ac_status=$?
32972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32973  test $ac_status = 0; }; }; then
32974    cross_compiling=no
32975  else
32976    if test "$cross_compiling" = maybe; then
32977	cross_compiling=yes
32978    else
32979	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32980$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32981as_fn_error $? "cannot run C compiled programs.
32982If you meant to cross compile, use \`--host'.
32983See \`config.log' for more details" "$LINENO" 5; }
32984    fi
32985  fi
32986fi
32987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32988$as_echo "$cross_compiling" >&6; }
32989
32990rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32991ac_clean_files=$ac_clean_files_save
32992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32993$as_echo_n "checking for suffix of object files... " >&6; }
32994if ${ac_cv_objext+:} false; then :
32995  $as_echo_n "(cached) " >&6
32996else
32997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32998/* end confdefs.h.  */
32999
33000int
33001main ()
33002{
33003
33004  ;
33005  return 0;
33006}
33007_ACEOF
33008rm -f conftest.o conftest.obj
33009if { { ac_try="$ac_compile"
33010case "(($ac_try" in
33011  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33012  *) ac_try_echo=$ac_try;;
33013esac
33014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33015$as_echo "$ac_try_echo"; } >&5
33016  (eval "$ac_compile") 2>&5
33017  ac_status=$?
33018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33019  test $ac_status = 0; }; then :
33020  for ac_file in conftest.o conftest.obj conftest.*; do
33021  test -f "$ac_file" || continue;
33022  case $ac_file in
33023    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33024    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33025       break;;
33026  esac
33027done
33028else
33029  $as_echo "$as_me: failed program was:" >&5
33030sed 's/^/| /' conftest.$ac_ext >&5
33031
33032{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33034as_fn_error $? "cannot compute suffix of object files: cannot compile
33035See \`config.log' for more details" "$LINENO" 5; }
33036fi
33037rm -f conftest.$ac_cv_objext conftest.$ac_ext
33038fi
33039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33040$as_echo "$ac_cv_objext" >&6; }
33041OBJEXT=$ac_cv_objext
33042ac_objext=$OBJEXT
33043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33044$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33045if ${ac_cv_c_compiler_gnu+:} false; then :
33046  $as_echo_n "(cached) " >&6
33047else
33048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33049/* end confdefs.h.  */
33050
33051int
33052main ()
33053{
33054#ifndef __GNUC__
33055       choke me
33056#endif
33057
33058  ;
33059  return 0;
33060}
33061_ACEOF
33062if ac_fn_c_try_compile "$LINENO"; then :
33063  ac_compiler_gnu=yes
33064else
33065  ac_compiler_gnu=no
33066fi
33067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33068ac_cv_c_compiler_gnu=$ac_compiler_gnu
33069
33070fi
33071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33072$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33073if test $ac_compiler_gnu = yes; then
33074  GCC=yes
33075else
33076  GCC=
33077fi
33078ac_test_CFLAGS=${CFLAGS+set}
33079ac_save_CFLAGS=$CFLAGS
33080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33081$as_echo_n "checking whether $CC accepts -g... " >&6; }
33082if ${ac_cv_prog_cc_g+:} false; then :
33083  $as_echo_n "(cached) " >&6
33084else
33085  ac_save_c_werror_flag=$ac_c_werror_flag
33086   ac_c_werror_flag=yes
33087   ac_cv_prog_cc_g=no
33088   CFLAGS="-g"
33089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33090/* end confdefs.h.  */
33091
33092int
33093main ()
33094{
33095
33096  ;
33097  return 0;
33098}
33099_ACEOF
33100if ac_fn_c_try_compile "$LINENO"; then :
33101  ac_cv_prog_cc_g=yes
33102else
33103  CFLAGS=""
33104      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33105/* end confdefs.h.  */
33106
33107int
33108main ()
33109{
33110
33111  ;
33112  return 0;
33113}
33114_ACEOF
33115if ac_fn_c_try_compile "$LINENO"; then :
33116
33117else
33118  ac_c_werror_flag=$ac_save_c_werror_flag
33119	 CFLAGS="-g"
33120	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33121/* end confdefs.h.  */
33122
33123int
33124main ()
33125{
33126
33127  ;
33128  return 0;
33129}
33130_ACEOF
33131if ac_fn_c_try_compile "$LINENO"; then :
33132  ac_cv_prog_cc_g=yes
33133fi
33134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33135fi
33136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33137fi
33138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33139   ac_c_werror_flag=$ac_save_c_werror_flag
33140fi
33141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33142$as_echo "$ac_cv_prog_cc_g" >&6; }
33143if test "$ac_test_CFLAGS" = set; then
33144  CFLAGS=$ac_save_CFLAGS
33145elif test $ac_cv_prog_cc_g = yes; then
33146  if test "$GCC" = yes; then
33147    CFLAGS="-g -O2"
33148  else
33149    CFLAGS="-g"
33150  fi
33151else
33152  if test "$GCC" = yes; then
33153    CFLAGS="-O2"
33154  else
33155    CFLAGS=
33156  fi
33157fi
33158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33159$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33160if ${ac_cv_prog_cc_c89+:} false; then :
33161  $as_echo_n "(cached) " >&6
33162else
33163  ac_cv_prog_cc_c89=no
33164ac_save_CC=$CC
33165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33166/* end confdefs.h.  */
33167#include <stdarg.h>
33168#include <stdio.h>
33169struct stat;
33170/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33171struct buf { int x; };
33172FILE * (*rcsopen) (struct buf *, struct stat *, int);
33173static char *e (p, i)
33174     char **p;
33175     int i;
33176{
33177  return p[i];
33178}
33179static char *f (char * (*g) (char **, int), char **p, ...)
33180{
33181  char *s;
33182  va_list v;
33183  va_start (v,p);
33184  s = g (p, va_arg (v,int));
33185  va_end (v);
33186  return s;
33187}
33188
33189/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33190   function prototypes and stuff, but not '\xHH' hex character constants.
33191   These don't provoke an error unfortunately, instead are silently treated
33192   as 'x'.  The following induces an error, until -std is added to get
33193   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33194   array size at least.  It's necessary to write '\x00'==0 to get something
33195   that's true only with -std.  */
33196int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33197
33198/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33199   inside strings and character constants.  */
33200#define FOO(x) 'x'
33201int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33202
33203int test (int i, double x);
33204struct s1 {int (*f) (int a);};
33205struct s2 {int (*f) (double a);};
33206int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33207int argc;
33208char **argv;
33209int
33210main ()
33211{
33212return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33213  ;
33214  return 0;
33215}
33216_ACEOF
33217for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33218	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33219do
33220  CC="$ac_save_CC $ac_arg"
33221  if ac_fn_c_try_compile "$LINENO"; then :
33222  ac_cv_prog_cc_c89=$ac_arg
33223fi
33224rm -f core conftest.err conftest.$ac_objext
33225  test "x$ac_cv_prog_cc_c89" != "xno" && break
33226done
33227rm -f conftest.$ac_ext
33228CC=$ac_save_CC
33229
33230fi
33231# AC_CACHE_VAL
33232case "x$ac_cv_prog_cc_c89" in
33233  x)
33234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33235$as_echo "none needed" >&6; } ;;
33236  xno)
33237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33238$as_echo "unsupported" >&6; } ;;
33239  *)
33240    CC="$CC $ac_cv_prog_cc_c89"
33241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33242$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33243esac
33244if test "x$ac_cv_prog_cc_c89" != xno; then :
33245
33246fi
33247
33248ac_ext=cpp
33249ac_cpp='$CXXCPP $CPPFLAGS'
33250ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33251ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33252ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33253
33254
33255
33256  COMPILER_NAME=C++
33257  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33258
33259  if test "x$CXX" != x; then
33260    # User has supplied compiler name already, always let that override.
33261    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33262$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33263    if test "x`basename $CXX`" = "x$CXX"; then
33264      # A command without a complete path is provided, search $PATH.
33265
33266      for ac_prog in $CXX
33267do
33268  # Extract the first word of "$ac_prog", so it can be a program name with args.
33269set dummy $ac_prog; ac_word=$2
33270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33271$as_echo_n "checking for $ac_word... " >&6; }
33272if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33273  $as_echo_n "(cached) " >&6
33274else
33275  case $POTENTIAL_CXX in
33276  [\\/]* | ?:[\\/]*)
33277  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33278  ;;
33279  *)
33280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33281for as_dir in $PATH
33282do
33283  IFS=$as_save_IFS
33284  test -z "$as_dir" && as_dir=.
33285    for ac_exec_ext in '' $ac_executable_extensions; do
33286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33287    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33289    break 2
33290  fi
33291done
33292  done
33293IFS=$as_save_IFS
33294
33295  ;;
33296esac
33297fi
33298POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33299if test -n "$POTENTIAL_CXX"; then
33300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33301$as_echo "$POTENTIAL_CXX" >&6; }
33302else
33303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33304$as_echo "no" >&6; }
33305fi
33306
33307
33308  test -n "$POTENTIAL_CXX" && break
33309done
33310
33311      if test "x$POTENTIAL_CXX" != x; then
33312        CXX=$POTENTIAL_CXX
33313      else
33314        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33315      fi
33316    else
33317      # Otherwise it might already be a complete path
33318      if test ! -x "$CXX"; then
33319        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33320      fi
33321    fi
33322  else
33323    # No user supplied value. Locate compiler ourselves.
33324
33325    # If we are cross compiling, assume cross compilation tools follows the
33326    # cross compilation standard where they are prefixed with the autoconf
33327    # standard name for the target. For example the binary
33328    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33329    # If we are not cross compiling, then the default compiler name will be
33330    # used.
33331
33332    CXX=
33333    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33334    # before checking the rest of the PATH.
33335    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33336    # step, this should not be necessary.
33337    if test -n "$TOOLCHAIN_PATH"; then
33338      PATH_save="$PATH"
33339      PATH="$TOOLCHAIN_PATH"
33340      for ac_prog in $SEARCH_LIST
33341do
33342  # Extract the first word of "$ac_prog", so it can be a program name with args.
33343set dummy $ac_prog; ac_word=$2
33344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33345$as_echo_n "checking for $ac_word... " >&6; }
33346if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33347  $as_echo_n "(cached) " >&6
33348else
33349  case $TOOLCHAIN_PATH_CXX in
33350  [\\/]* | ?:[\\/]*)
33351  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33352  ;;
33353  *)
33354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33355for as_dir in $PATH
33356do
33357  IFS=$as_save_IFS
33358  test -z "$as_dir" && as_dir=.
33359    for ac_exec_ext in '' $ac_executable_extensions; do
33360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33361    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33363    break 2
33364  fi
33365done
33366  done
33367IFS=$as_save_IFS
33368
33369  ;;
33370esac
33371fi
33372TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33373if test -n "$TOOLCHAIN_PATH_CXX"; then
33374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33375$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33376else
33377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33378$as_echo "no" >&6; }
33379fi
33380
33381
33382  test -n "$TOOLCHAIN_PATH_CXX" && break
33383done
33384
33385      CXX=$TOOLCHAIN_PATH_CXX
33386      PATH="$PATH_save"
33387    fi
33388
33389    # AC_PATH_PROGS can't be run multiple times with the same variable,
33390    # so create a new name for this run.
33391    if test "x$CXX" = x; then
33392      for ac_prog in $SEARCH_LIST
33393do
33394  # Extract the first word of "$ac_prog", so it can be a program name with args.
33395set dummy $ac_prog; ac_word=$2
33396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33397$as_echo_n "checking for $ac_word... " >&6; }
33398if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33399  $as_echo_n "(cached) " >&6
33400else
33401  case $POTENTIAL_CXX in
33402  [\\/]* | ?:[\\/]*)
33403  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33404  ;;
33405  *)
33406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33407for as_dir in $PATH
33408do
33409  IFS=$as_save_IFS
33410  test -z "$as_dir" && as_dir=.
33411    for ac_exec_ext in '' $ac_executable_extensions; do
33412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33413    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33415    break 2
33416  fi
33417done
33418  done
33419IFS=$as_save_IFS
33420
33421  ;;
33422esac
33423fi
33424POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33425if test -n "$POTENTIAL_CXX"; then
33426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33427$as_echo "$POTENTIAL_CXX" >&6; }
33428else
33429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33430$as_echo "no" >&6; }
33431fi
33432
33433
33434  test -n "$POTENTIAL_CXX" && break
33435done
33436
33437      CXX=$POTENTIAL_CXX
33438    fi
33439
33440    if test "x$CXX" = x; then
33441
33442  # Print a helpful message on how to acquire the necessary build dependency.
33443  # devkit is the help tag: freetype, cups, alsa etc
33444  MISSING_DEPENDENCY=devkit
33445
33446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33447    cygwin_help $MISSING_DEPENDENCY
33448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33449    msys_help $MISSING_DEPENDENCY
33450  else
33451    PKGHANDLER_COMMAND=
33452
33453    case $PKGHANDLER in
33454      apt-get)
33455        apt_help     $MISSING_DEPENDENCY ;;
33456      yum)
33457        yum_help     $MISSING_DEPENDENCY ;;
33458      port)
33459        port_help    $MISSING_DEPENDENCY ;;
33460      pkgutil)
33461        pkgutil_help $MISSING_DEPENDENCY ;;
33462      pkgadd)
33463        pkgadd_help  $MISSING_DEPENDENCY ;;
33464    esac
33465
33466    if test "x$PKGHANDLER_COMMAND" != x; then
33467      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33468    fi
33469  fi
33470
33471      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33472    fi
33473  fi
33474
33475  # Now we have a compiler binary in CXX. Make sure it's okay.
33476
33477  # Only process if variable expands to non-empty
33478
33479  if test "x$CXX" != x; then
33480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33481
33482  # First separate the path from the arguments. This will split at the first
33483  # space.
33484  complete="$CXX"
33485  path="${complete%% *}"
33486  tmp="$complete EOL"
33487  arguments="${tmp#* }"
33488
33489  # Input might be given as Windows format, start by converting to
33490  # unix format.
33491  new_path=`$CYGPATH -u "$path"`
33492
33493  # Now try to locate executable using which
33494  new_path=`$WHICH "$new_path" 2> /dev/null`
33495  # bat and cmd files are not always considered executable in cygwin causing which
33496  # to not find them
33497  if test "x$new_path" = x \
33498      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33499      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33500    new_path=`$CYGPATH -u "$path"`
33501  fi
33502  if test "x$new_path" = x; then
33503    # Oops. Which didn't find the executable.
33504    # The splitting of arguments from the executable at a space might have been incorrect,
33505    # since paths with space are more likely in Windows. Give it another try with the whole
33506    # argument.
33507    path="$complete"
33508    arguments="EOL"
33509    new_path=`$CYGPATH -u "$path"`
33510    new_path=`$WHICH "$new_path" 2> /dev/null`
33511    # bat and cmd files are not always considered executable in cygwin causing which
33512    # to not find them
33513    if test "x$new_path" = x \
33514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33516      new_path=`$CYGPATH -u "$path"`
33517    fi
33518    if test "x$new_path" = x; then
33519      # It's still not found. Now this is an unrecoverable error.
33520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33521$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33522      has_space=`$ECHO "$complete" | $GREP " "`
33523      if test "x$has_space" != x; then
33524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33526      fi
33527      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33528    fi
33529  fi
33530
33531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33534  # "foo.exe" is OK but "foo" is an error.
33535  #
33536  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33537  # It is also a way to make sure we got the proper file name for the real test later on.
33538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33539  if test "x$test_shortpath" = x; then
33540    # Short path failed, file does not exist as specified.
33541    # Try adding .exe or .cmd
33542    if test -f "${new_path}.exe"; then
33543      input_to_shortpath="${new_path}.exe"
33544    elif test -f "${new_path}.cmd"; then
33545      input_to_shortpath="${new_path}.cmd"
33546    else
33547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33548$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33549      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33550$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33551      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33552    fi
33553  else
33554    input_to_shortpath="$new_path"
33555  fi
33556
33557  # Call helper function which possibly converts this using DOS-style short mode.
33558  # If so, the updated path is stored in $new_path.
33559  new_path="$input_to_shortpath"
33560
33561  input_path="$input_to_shortpath"
33562  # Check if we need to convert this using DOS-style short mode. If the path
33563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33564  # take no chances and rewrite it.
33565  # Note: m4 eats our [], so we need to use [ and ] instead.
33566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33567  if test "x$has_forbidden_chars" != x; then
33568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33572      # Going to short mode and back again did indeed matter. Since short mode is
33573      # case insensitive, let's make it lowercase to improve readability.
33574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33575      # Now convert it back to Unix-style (cygpath)
33576      input_path=`$CYGPATH -u "$shortmode_path"`
33577      new_path="$input_path"
33578    fi
33579  fi
33580
33581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33582  if test "x$test_cygdrive_prefix" = x; then
33583    # As a simple fix, exclude /usr/bin since it's not a real path.
33584    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33586      # a path prefixed by /cygdrive for fixpath to work.
33587      new_path="$CYGWIN_ROOT_PATH$input_path"
33588    fi
33589  fi
33590
33591  # remove trailing .exe if any
33592  new_path="${new_path/%.exe/}"
33593
33594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33595
33596  # First separate the path from the arguments. This will split at the first
33597  # space.
33598  complete="$CXX"
33599  path="${complete%% *}"
33600  tmp="$complete EOL"
33601  arguments="${tmp#* }"
33602
33603  # Input might be given as Windows format, start by converting to
33604  # unix format.
33605  new_path="$path"
33606
33607  windows_path="$new_path"
33608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33609    unix_path=`$CYGPATH -u "$windows_path"`
33610    new_path="$unix_path"
33611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33613    new_path="$unix_path"
33614  fi
33615
33616
33617  # Now try to locate executable using which
33618  new_path=`$WHICH "$new_path" 2> /dev/null`
33619
33620  if test "x$new_path" = x; then
33621    # Oops. Which didn't find the executable.
33622    # The splitting of arguments from the executable at a space might have been incorrect,
33623    # since paths with space are more likely in Windows. Give it another try with the whole
33624    # argument.
33625    path="$complete"
33626    arguments="EOL"
33627    new_path="$path"
33628
33629  windows_path="$new_path"
33630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33631    unix_path=`$CYGPATH -u "$windows_path"`
33632    new_path="$unix_path"
33633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33635    new_path="$unix_path"
33636  fi
33637
33638
33639    new_path=`$WHICH "$new_path" 2> /dev/null`
33640    # bat and cmd files are not always considered executable in MSYS causing which
33641    # to not find them
33642    if test "x$new_path" = x \
33643        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33644        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33645      new_path="$path"
33646
33647  windows_path="$new_path"
33648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33649    unix_path=`$CYGPATH -u "$windows_path"`
33650    new_path="$unix_path"
33651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33653    new_path="$unix_path"
33654  fi
33655
33656    fi
33657
33658    if test "x$new_path" = x; then
33659      # It's still not found. Now this is an unrecoverable error.
33660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33661$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33662      has_space=`$ECHO "$complete" | $GREP " "`
33663      if test "x$has_space" != x; then
33664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33666      fi
33667      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33668    fi
33669  fi
33670
33671  # Now new_path has a complete unix path to the binary
33672  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33673    # Keep paths in /bin as-is, but remove trailing .exe if any
33674    new_path="${new_path/%.exe/}"
33675    # Do not save /bin paths to all_fixpath_prefixes!
33676  else
33677    # Not in mixed or Windows style, start by that.
33678    new_path=`cmd //c echo $new_path`
33679
33680  input_path="$new_path"
33681  # Check if we need to convert this using DOS-style short mode. If the path
33682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33683  # take no chances and rewrite it.
33684  # Note: m4 eats our [], so we need to use [ and ] instead.
33685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33686  if test "x$has_forbidden_chars" != x; then
33687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33689  fi
33690
33691    # Output is in $new_path
33692
33693  windows_path="$new_path"
33694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33695    unix_path=`$CYGPATH -u "$windows_path"`
33696    new_path="$unix_path"
33697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33699    new_path="$unix_path"
33700  fi
33701
33702    # remove trailing .exe if any
33703    new_path="${new_path/%.exe/}"
33704
33705    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33706    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33707  fi
33708
33709    else
33710      # We're on a unix platform. Hooray! :)
33711      # First separate the path from the arguments. This will split at the first
33712      # space.
33713      complete="$CXX"
33714      path="${complete%% *}"
33715      tmp="$complete EOL"
33716      arguments="${tmp#* }"
33717
33718      # Cannot rely on the command "which" here since it doesn't always work.
33719      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33720      if test -z "$is_absolute_path"; then
33721        # Path to executable is not absolute. Find it.
33722        IFS_save="$IFS"
33723        IFS=:
33724        for p in $PATH; do
33725          if test -f "$p/$path" && test -x "$p/$path"; then
33726            new_path="$p/$path"
33727            break
33728          fi
33729        done
33730        IFS="$IFS_save"
33731      else
33732        # This is an absolute path, we can use it without further modifications.
33733        new_path="$path"
33734      fi
33735
33736      if test "x$new_path" = x; then
33737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33738$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33739        has_space=`$ECHO "$complete" | $GREP " "`
33740        if test "x$has_space" != x; then
33741          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33742$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33743        fi
33744        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33745      fi
33746    fi
33747
33748    # Now join together the path and the arguments once again
33749    if test "x$arguments" != xEOL; then
33750      new_complete="$new_path ${arguments% *}"
33751    else
33752      new_complete="$new_path"
33753    fi
33754
33755    if test "x$complete" != "x$new_complete"; then
33756      CXX="$new_complete"
33757      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33758$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33759    fi
33760  fi
33761
33762  TEST_COMPILER="$CXX"
33763  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33764  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33765  if test "x$OPENJDK_BUILD_OS" != xaix; then
33766    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33768$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33769
33770  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33771    # Follow a chain of symbolic links. Use readlink
33772    # where it exists, else fall back to horribly
33773    # complicated shell code.
33774    if test "x$READLINK_TESTED" != yes; then
33775      # On MacOSX there is a readlink tool with a different
33776      # purpose than the GNU readlink tool. Check the found readlink.
33777      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33778      if test "x$ISGNU" = x; then
33779        # A readlink that we do not know how to use.
33780        # Are there other non-GNU readlinks out there?
33781        READLINK_TESTED=yes
33782        READLINK=
33783      fi
33784    fi
33785
33786    if test "x$READLINK" != x; then
33787      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33788    else
33789      # Save the current directory for restoring afterwards
33790      STARTDIR=$PWD
33791      COUNTER=0
33792      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33793      sym_link_file=`$BASENAME $TEST_COMPILER`
33794      cd $sym_link_dir
33795      # Use -P flag to resolve symlinks in directories.
33796      cd `$THEPWDCMD -P`
33797      sym_link_dir=`$THEPWDCMD -P`
33798      # Resolve file symlinks
33799      while test $COUNTER -lt 20; do
33800        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33801        if test "x$ISLINK" == x; then
33802          # This is not a symbolic link! We are done!
33803          break
33804        fi
33805        # Again resolve directory symlinks since the target of the just found
33806        # link could be in a different directory
33807        cd `$DIRNAME $ISLINK`
33808        sym_link_dir=`$THEPWDCMD -P`
33809        sym_link_file=`$BASENAME $ISLINK`
33810        let COUNTER=COUNTER+1
33811      done
33812      cd $STARTDIR
33813      TEST_COMPILER=$sym_link_dir/$sym_link_file
33814    fi
33815  fi
33816
33817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33818$as_echo "$TEST_COMPILER" >&6; }
33819  fi
33820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33821$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33822
33823  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33824  if test "x$COMPILER_BASENAME" = "xccache"; then
33825    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33826$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33827    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33828    # We want to control ccache invocation ourselves, so ignore this cc and try
33829    # searching again.
33830
33831    # Remove the path to the fake ccache cc from the PATH
33832    RETRY_COMPILER_SAVED_PATH="$PATH"
33833    COMPILER_DIRNAME=`$DIRNAME $CXX`
33834    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33835
33836    # Try again looking for our compiler
33837    if test -n "$ac_tool_prefix"; then
33838  for ac_prog in $TOOLCHAIN_CXX_BINARY
33839  do
33840    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33841set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33843$as_echo_n "checking for $ac_word... " >&6; }
33844if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33845  $as_echo_n "(cached) " >&6
33846else
33847  if test -n "$PROPER_COMPILER_CXX"; then
33848  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33849else
33850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33851for as_dir in $PATH
33852do
33853  IFS=$as_save_IFS
33854  test -z "$as_dir" && as_dir=.
33855    for ac_exec_ext in '' $ac_executable_extensions; do
33856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33857    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33859    break 2
33860  fi
33861done
33862  done
33863IFS=$as_save_IFS
33864
33865fi
33866fi
33867PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33868if test -n "$PROPER_COMPILER_CXX"; then
33869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33870$as_echo "$PROPER_COMPILER_CXX" >&6; }
33871else
33872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33873$as_echo "no" >&6; }
33874fi
33875
33876
33877    test -n "$PROPER_COMPILER_CXX" && break
33878  done
33879fi
33880if test -z "$PROPER_COMPILER_CXX"; then
33881  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33882  for ac_prog in $TOOLCHAIN_CXX_BINARY
33883do
33884  # Extract the first word of "$ac_prog", so it can be a program name with args.
33885set dummy $ac_prog; ac_word=$2
33886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33887$as_echo_n "checking for $ac_word... " >&6; }
33888if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33889  $as_echo_n "(cached) " >&6
33890else
33891  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33892  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33893else
33894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33895for as_dir in $PATH
33896do
33897  IFS=$as_save_IFS
33898  test -z "$as_dir" && as_dir=.
33899    for ac_exec_ext in '' $ac_executable_extensions; do
33900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33901    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33903    break 2
33904  fi
33905done
33906  done
33907IFS=$as_save_IFS
33908
33909fi
33910fi
33911ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33912if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33914$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33915else
33916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33917$as_echo "no" >&6; }
33918fi
33919
33920
33921  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33922done
33923
33924  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33925    PROPER_COMPILER_CXX=""
33926  else
33927    case $cross_compiling:$ac_tool_warned in
33928yes:)
33929{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33930$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33931ac_tool_warned=yes ;;
33932esac
33933    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33934  fi
33935fi
33936
33937
33938  # Only process if variable expands to non-empty
33939
33940  if test "x$PROPER_COMPILER_CXX" != x; then
33941    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33942
33943  # First separate the path from the arguments. This will split at the first
33944  # space.
33945  complete="$PROPER_COMPILER_CXX"
33946  path="${complete%% *}"
33947  tmp="$complete EOL"
33948  arguments="${tmp#* }"
33949
33950  # Input might be given as Windows format, start by converting to
33951  # unix format.
33952  new_path=`$CYGPATH -u "$path"`
33953
33954  # Now try to locate executable using which
33955  new_path=`$WHICH "$new_path" 2> /dev/null`
33956  # bat and cmd files are not always considered executable in cygwin causing which
33957  # to not find them
33958  if test "x$new_path" = x \
33959      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33960      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33961    new_path=`$CYGPATH -u "$path"`
33962  fi
33963  if test "x$new_path" = x; then
33964    # Oops. Which didn't find the executable.
33965    # The splitting of arguments from the executable at a space might have been incorrect,
33966    # since paths with space are more likely in Windows. Give it another try with the whole
33967    # argument.
33968    path="$complete"
33969    arguments="EOL"
33970    new_path=`$CYGPATH -u "$path"`
33971    new_path=`$WHICH "$new_path" 2> /dev/null`
33972    # bat and cmd files are not always considered executable in cygwin causing which
33973    # to not find them
33974    if test "x$new_path" = x \
33975        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33976        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33977      new_path=`$CYGPATH -u "$path"`
33978    fi
33979    if test "x$new_path" = x; then
33980      # It's still not found. Now this is an unrecoverable error.
33981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33982$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33983      has_space=`$ECHO "$complete" | $GREP " "`
33984      if test "x$has_space" != x; then
33985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33987      fi
33988      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33989    fi
33990  fi
33991
33992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33995  # "foo.exe" is OK but "foo" is an error.
33996  #
33997  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33998  # It is also a way to make sure we got the proper file name for the real test later on.
33999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34000  if test "x$test_shortpath" = x; then
34001    # Short path failed, file does not exist as specified.
34002    # Try adding .exe or .cmd
34003    if test -f "${new_path}.exe"; then
34004      input_to_shortpath="${new_path}.exe"
34005    elif test -f "${new_path}.cmd"; then
34006      input_to_shortpath="${new_path}.cmd"
34007    else
34008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
34009$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
34010      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34011$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34012      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34013    fi
34014  else
34015    input_to_shortpath="$new_path"
34016  fi
34017
34018  # Call helper function which possibly converts this using DOS-style short mode.
34019  # If so, the updated path is stored in $new_path.
34020  new_path="$input_to_shortpath"
34021
34022  input_path="$input_to_shortpath"
34023  # Check if we need to convert this using DOS-style short mode. If the path
34024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34025  # take no chances and rewrite it.
34026  # Note: m4 eats our [], so we need to use [ and ] instead.
34027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34028  if test "x$has_forbidden_chars" != x; then
34029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34033      # Going to short mode and back again did indeed matter. Since short mode is
34034      # case insensitive, let's make it lowercase to improve readability.
34035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34036      # Now convert it back to Unix-style (cygpath)
34037      input_path=`$CYGPATH -u "$shortmode_path"`
34038      new_path="$input_path"
34039    fi
34040  fi
34041
34042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34043  if test "x$test_cygdrive_prefix" = x; then
34044    # As a simple fix, exclude /usr/bin since it's not a real path.
34045    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34047      # a path prefixed by /cygdrive for fixpath to work.
34048      new_path="$CYGWIN_ROOT_PATH$input_path"
34049    fi
34050  fi
34051
34052  # remove trailing .exe if any
34053  new_path="${new_path/%.exe/}"
34054
34055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34056
34057  # First separate the path from the arguments. This will split at the first
34058  # space.
34059  complete="$PROPER_COMPILER_CXX"
34060  path="${complete%% *}"
34061  tmp="$complete EOL"
34062  arguments="${tmp#* }"
34063
34064  # Input might be given as Windows format, start by converting to
34065  # unix format.
34066  new_path="$path"
34067
34068  windows_path="$new_path"
34069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34070    unix_path=`$CYGPATH -u "$windows_path"`
34071    new_path="$unix_path"
34072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34074    new_path="$unix_path"
34075  fi
34076
34077
34078  # Now try to locate executable using which
34079  new_path=`$WHICH "$new_path" 2> /dev/null`
34080
34081  if test "x$new_path" = x; then
34082    # Oops. Which didn't find the executable.
34083    # The splitting of arguments from the executable at a space might have been incorrect,
34084    # since paths with space are more likely in Windows. Give it another try with the whole
34085    # argument.
34086    path="$complete"
34087    arguments="EOL"
34088    new_path="$path"
34089
34090  windows_path="$new_path"
34091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34092    unix_path=`$CYGPATH -u "$windows_path"`
34093    new_path="$unix_path"
34094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34096    new_path="$unix_path"
34097  fi
34098
34099
34100    new_path=`$WHICH "$new_path" 2> /dev/null`
34101    # bat and cmd files are not always considered executable in MSYS causing which
34102    # to not find them
34103    if test "x$new_path" = x \
34104        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34105        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34106      new_path="$path"
34107
34108  windows_path="$new_path"
34109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34110    unix_path=`$CYGPATH -u "$windows_path"`
34111    new_path="$unix_path"
34112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34114    new_path="$unix_path"
34115  fi
34116
34117    fi
34118
34119    if test "x$new_path" = x; then
34120      # It's still not found. Now this is an unrecoverable error.
34121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34122$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34123      has_space=`$ECHO "$complete" | $GREP " "`
34124      if test "x$has_space" != x; then
34125        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34126$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34127      fi
34128      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34129    fi
34130  fi
34131
34132  # Now new_path has a complete unix path to the binary
34133  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34134    # Keep paths in /bin as-is, but remove trailing .exe if any
34135    new_path="${new_path/%.exe/}"
34136    # Do not save /bin paths to all_fixpath_prefixes!
34137  else
34138    # Not in mixed or Windows style, start by that.
34139    new_path=`cmd //c echo $new_path`
34140
34141  input_path="$new_path"
34142  # Check if we need to convert this using DOS-style short mode. If the path
34143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34144  # take no chances and rewrite it.
34145  # Note: m4 eats our [], so we need to use [ and ] instead.
34146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34147  if test "x$has_forbidden_chars" != x; then
34148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34150  fi
34151
34152    # Output is in $new_path
34153
34154  windows_path="$new_path"
34155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34156    unix_path=`$CYGPATH -u "$windows_path"`
34157    new_path="$unix_path"
34158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34160    new_path="$unix_path"
34161  fi
34162
34163    # remove trailing .exe if any
34164    new_path="${new_path/%.exe/}"
34165
34166    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34167    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34168  fi
34169
34170    else
34171      # We're on a unix platform. Hooray! :)
34172      # First separate the path from the arguments. This will split at the first
34173      # space.
34174      complete="$PROPER_COMPILER_CXX"
34175      path="${complete%% *}"
34176      tmp="$complete EOL"
34177      arguments="${tmp#* }"
34178
34179      # Cannot rely on the command "which" here since it doesn't always work.
34180      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34181      if test -z "$is_absolute_path"; then
34182        # Path to executable is not absolute. Find it.
34183        IFS_save="$IFS"
34184        IFS=:
34185        for p in $PATH; do
34186          if test -f "$p/$path" && test -x "$p/$path"; then
34187            new_path="$p/$path"
34188            break
34189          fi
34190        done
34191        IFS="$IFS_save"
34192      else
34193        # This is an absolute path, we can use it without further modifications.
34194        new_path="$path"
34195      fi
34196
34197      if test "x$new_path" = x; then
34198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34199$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34200        has_space=`$ECHO "$complete" | $GREP " "`
34201        if test "x$has_space" != x; then
34202          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34203$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34204        fi
34205        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34206      fi
34207    fi
34208
34209    # Now join together the path and the arguments once again
34210    if test "x$arguments" != xEOL; then
34211      new_complete="$new_path ${arguments% *}"
34212    else
34213      new_complete="$new_path"
34214    fi
34215
34216    if test "x$complete" != "x$new_complete"; then
34217      PROPER_COMPILER_CXX="$new_complete"
34218      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
34219$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
34220    fi
34221  fi
34222
34223    PATH="$RETRY_COMPILER_SAVED_PATH"
34224
34225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
34226$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
34227
34228  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34229    # Follow a chain of symbolic links. Use readlink
34230    # where it exists, else fall back to horribly
34231    # complicated shell code.
34232    if test "x$READLINK_TESTED" != yes; then
34233      # On MacOSX there is a readlink tool with a different
34234      # purpose than the GNU readlink tool. Check the found readlink.
34235      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34236      if test "x$ISGNU" = x; then
34237        # A readlink that we do not know how to use.
34238        # Are there other non-GNU readlinks out there?
34239        READLINK_TESTED=yes
34240        READLINK=
34241      fi
34242    fi
34243
34244    if test "x$READLINK" != x; then
34245      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
34246    else
34247      # Save the current directory for restoring afterwards
34248      STARTDIR=$PWD
34249      COUNTER=0
34250      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
34251      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
34252      cd $sym_link_dir
34253      # Use -P flag to resolve symlinks in directories.
34254      cd `$THEPWDCMD -P`
34255      sym_link_dir=`$THEPWDCMD -P`
34256      # Resolve file symlinks
34257      while test $COUNTER -lt 20; do
34258        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34259        if test "x$ISLINK" == x; then
34260          # This is not a symbolic link! We are done!
34261          break
34262        fi
34263        # Again resolve directory symlinks since the target of the just found
34264        # link could be in a different directory
34265        cd `$DIRNAME $ISLINK`
34266        sym_link_dir=`$THEPWDCMD -P`
34267        sym_link_file=`$BASENAME $ISLINK`
34268        let COUNTER=COUNTER+1
34269      done
34270      cd $STARTDIR
34271      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
34272    fi
34273  fi
34274
34275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
34276$as_echo "$PROPER_COMPILER_CXX" >&6; }
34277    CXX="$PROPER_COMPILER_CXX"
34278  else
34279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
34280$as_echo "no, keeping CXX" >&6; }
34281  fi
34282
34283
34284  COMPILER=$CXX
34285  COMPILER_NAME=$COMPILER_NAME
34286
34287  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34288    # cc -V output typically looks like
34289    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34290    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34291    # Check that this is likely to be the Solaris Studio cc.
34292    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34293    if test $? -ne 0; then
34294      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34295      { $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
34296$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34297      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34298$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34299      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34300$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34301      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34302    fi
34303    # Remove usage instructions (if present), and
34304    # collapse compiler output into a single line
34305    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34306        $SED -e 's/ *[Uu]sage:.*//'`
34307    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34308        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34309  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34310    # xlc -qversion output typically looks like
34311    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34312    #     Version: 11.01.0000.0015
34313    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34314    # Check that this is likely to be the IBM XL C compiler.
34315    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34316    if test $? -ne 0; then
34317      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34318      { $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
34319$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34320      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34321$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34322      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34323$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34324      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34325    fi
34326    # Collapse compiler output into a single line
34327    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34328    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34329        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34330  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34331    # There is no specific version flag, but all output starts with a version string.
34332    # First line typically looks something like:
34333    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34334    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34335    # Check that this is likely to be Microsoft CL.EXE.
34336    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34337    if test $? -ne 0; then
34338      { $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
34339$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34340      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34341$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34342      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34343    fi
34344    # Collapse compiler output into a single line
34345    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34346    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34347        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34348  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34349    # gcc --version output typically looks like
34350    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34351    #     Copyright (C) 2013 Free Software Foundation, Inc.
34352    #     This is free software; see the source for copying conditions.  There is NO
34353    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34354    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34355    # Check that this is likely to be GCC.
34356    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34357    if test $? -ne 0; then
34358      { $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
34359$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34360      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34361$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34362      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34363    fi
34364    # Remove Copyright and legalese from version string, and
34365    # collapse into a single line
34366    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34367        $SED -e 's/ *Copyright .*//'`
34368    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34369        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34370  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34371    # clang --version output typically looks like
34372    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34373    #    clang version 3.3 (tags/RELEASE_33/final)
34374    # or
34375    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34376    #    Target: x86_64-pc-linux-gnu
34377    #    Thread model: posix
34378    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34379    # Check that this is likely to be clang
34380    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34381    if test $? -ne 0; then
34382      { $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
34383$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34384      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34385$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34386      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34387    fi
34388    # Collapse compiler output into a single line
34389    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34390    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34391        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34392  else
34393      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34394  fi
34395  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34396  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34397  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34398  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34399
34400  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34401$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34402
34403
34404  # Now that we have resolved CXX ourself, let autoconf have its go at it
34405  ac_ext=cpp
34406ac_cpp='$CXXCPP $CPPFLAGS'
34407ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34408ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34409ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34410if test -z "$CXX"; then
34411  if test -n "$CCC"; then
34412    CXX=$CCC
34413  else
34414    if test -n "$ac_tool_prefix"; then
34415  for ac_prog in $CXX
34416  do
34417    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34418set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34420$as_echo_n "checking for $ac_word... " >&6; }
34421if ${ac_cv_prog_CXX+:} false; then :
34422  $as_echo_n "(cached) " >&6
34423else
34424  if test -n "$CXX"; then
34425  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34426else
34427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34428for as_dir in $PATH
34429do
34430  IFS=$as_save_IFS
34431  test -z "$as_dir" && as_dir=.
34432    for ac_exec_ext in '' $ac_executable_extensions; do
34433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34434    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34436    break 2
34437  fi
34438done
34439  done
34440IFS=$as_save_IFS
34441
34442fi
34443fi
34444CXX=$ac_cv_prog_CXX
34445if test -n "$CXX"; then
34446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34447$as_echo "$CXX" >&6; }
34448else
34449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34450$as_echo "no" >&6; }
34451fi
34452
34453
34454    test -n "$CXX" && break
34455  done
34456fi
34457if test -z "$CXX"; then
34458  ac_ct_CXX=$CXX
34459  for ac_prog in $CXX
34460do
34461  # Extract the first word of "$ac_prog", so it can be a program name with args.
34462set dummy $ac_prog; ac_word=$2
34463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34464$as_echo_n "checking for $ac_word... " >&6; }
34465if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34466  $as_echo_n "(cached) " >&6
34467else
34468  if test -n "$ac_ct_CXX"; then
34469  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34470else
34471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34472for as_dir in $PATH
34473do
34474  IFS=$as_save_IFS
34475  test -z "$as_dir" && as_dir=.
34476    for ac_exec_ext in '' $ac_executable_extensions; do
34477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34478    ac_cv_prog_ac_ct_CXX="$ac_prog"
34479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34480    break 2
34481  fi
34482done
34483  done
34484IFS=$as_save_IFS
34485
34486fi
34487fi
34488ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34489if test -n "$ac_ct_CXX"; then
34490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34491$as_echo "$ac_ct_CXX" >&6; }
34492else
34493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34494$as_echo "no" >&6; }
34495fi
34496
34497
34498  test -n "$ac_ct_CXX" && break
34499done
34500
34501  if test "x$ac_ct_CXX" = x; then
34502    CXX="g++"
34503  else
34504    case $cross_compiling:$ac_tool_warned in
34505yes:)
34506{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34507$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34508ac_tool_warned=yes ;;
34509esac
34510    CXX=$ac_ct_CXX
34511  fi
34512fi
34513
34514  fi
34515fi
34516# Provide some information about the compiler.
34517$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34518set X $ac_compile
34519ac_compiler=$2
34520for ac_option in --version -v -V -qversion; do
34521  { { ac_try="$ac_compiler $ac_option >&5"
34522case "(($ac_try" in
34523  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34524  *) ac_try_echo=$ac_try;;
34525esac
34526eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34527$as_echo "$ac_try_echo"; } >&5
34528  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34529  ac_status=$?
34530  if test -s conftest.err; then
34531    sed '10a\
34532... rest of stderr output deleted ...
34533         10q' conftest.err >conftest.er1
34534    cat conftest.er1 >&5
34535  fi
34536  rm -f conftest.er1 conftest.err
34537  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34538  test $ac_status = 0; }
34539done
34540
34541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34542$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34543if ${ac_cv_cxx_compiler_gnu+:} false; then :
34544  $as_echo_n "(cached) " >&6
34545else
34546  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34547/* end confdefs.h.  */
34548
34549int
34550main ()
34551{
34552#ifndef __GNUC__
34553       choke me
34554#endif
34555
34556  ;
34557  return 0;
34558}
34559_ACEOF
34560if ac_fn_cxx_try_compile "$LINENO"; then :
34561  ac_compiler_gnu=yes
34562else
34563  ac_compiler_gnu=no
34564fi
34565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34566ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34567
34568fi
34569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34570$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34571if test $ac_compiler_gnu = yes; then
34572  GXX=yes
34573else
34574  GXX=
34575fi
34576ac_test_CXXFLAGS=${CXXFLAGS+set}
34577ac_save_CXXFLAGS=$CXXFLAGS
34578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34579$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34580if ${ac_cv_prog_cxx_g+:} false; then :
34581  $as_echo_n "(cached) " >&6
34582else
34583  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34584   ac_cxx_werror_flag=yes
34585   ac_cv_prog_cxx_g=no
34586   CXXFLAGS="-g"
34587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34588/* end confdefs.h.  */
34589
34590int
34591main ()
34592{
34593
34594  ;
34595  return 0;
34596}
34597_ACEOF
34598if ac_fn_cxx_try_compile "$LINENO"; then :
34599  ac_cv_prog_cxx_g=yes
34600else
34601  CXXFLAGS=""
34602      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34603/* end confdefs.h.  */
34604
34605int
34606main ()
34607{
34608
34609  ;
34610  return 0;
34611}
34612_ACEOF
34613if ac_fn_cxx_try_compile "$LINENO"; then :
34614
34615else
34616  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34617	 CXXFLAGS="-g"
34618	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34619/* end confdefs.h.  */
34620
34621int
34622main ()
34623{
34624
34625  ;
34626  return 0;
34627}
34628_ACEOF
34629if ac_fn_cxx_try_compile "$LINENO"; then :
34630  ac_cv_prog_cxx_g=yes
34631fi
34632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34633fi
34634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34635fi
34636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34637   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34638fi
34639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34640$as_echo "$ac_cv_prog_cxx_g" >&6; }
34641if test "$ac_test_CXXFLAGS" = set; then
34642  CXXFLAGS=$ac_save_CXXFLAGS
34643elif test $ac_cv_prog_cxx_g = yes; then
34644  if test "$GXX" = yes; then
34645    CXXFLAGS="-g -O2"
34646  else
34647    CXXFLAGS="-g"
34648  fi
34649else
34650  if test "$GXX" = yes; then
34651    CXXFLAGS="-O2"
34652  else
34653    CXXFLAGS=
34654  fi
34655fi
34656ac_ext=cpp
34657ac_cpp='$CXXCPP $CPPFLAGS'
34658ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34659ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34660ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34661
34662
34663  #
34664  # Setup the preprocessor (CPP and CXXCPP)
34665  #
34666  ac_ext=c
34667ac_cpp='$CPP $CPPFLAGS'
34668ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34669ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34670ac_compiler_gnu=$ac_cv_c_compiler_gnu
34671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34672$as_echo_n "checking how to run the C preprocessor... " >&6; }
34673# On Suns, sometimes $CPP names a directory.
34674if test -n "$CPP" && test -d "$CPP"; then
34675  CPP=
34676fi
34677if test -z "$CPP"; then
34678  if ${ac_cv_prog_CPP+:} false; then :
34679  $as_echo_n "(cached) " >&6
34680else
34681      # Double quotes because CPP needs to be expanded
34682    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34683    do
34684      ac_preproc_ok=false
34685for ac_c_preproc_warn_flag in '' yes
34686do
34687  # Use a header file that comes with gcc, so configuring glibc
34688  # with a fresh cross-compiler works.
34689  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34690  # <limits.h> exists even on freestanding compilers.
34691  # On the NeXT, cc -E runs the code through the compiler's parser,
34692  # not just through cpp. "Syntax error" is here to catch this case.
34693  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34694/* end confdefs.h.  */
34695#ifdef __STDC__
34696# include <limits.h>
34697#else
34698# include <assert.h>
34699#endif
34700		     Syntax error
34701_ACEOF
34702if ac_fn_c_try_cpp "$LINENO"; then :
34703
34704else
34705  # Broken: fails on valid input.
34706continue
34707fi
34708rm -f conftest.err conftest.i conftest.$ac_ext
34709
34710  # OK, works on sane cases.  Now check whether nonexistent headers
34711  # can be detected and how.
34712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34713/* end confdefs.h.  */
34714#include <ac_nonexistent.h>
34715_ACEOF
34716if ac_fn_c_try_cpp "$LINENO"; then :
34717  # Broken: success on invalid input.
34718continue
34719else
34720  # Passes both tests.
34721ac_preproc_ok=:
34722break
34723fi
34724rm -f conftest.err conftest.i conftest.$ac_ext
34725
34726done
34727# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34728rm -f conftest.i conftest.err conftest.$ac_ext
34729if $ac_preproc_ok; then :
34730  break
34731fi
34732
34733    done
34734    ac_cv_prog_CPP=$CPP
34735
34736fi
34737  CPP=$ac_cv_prog_CPP
34738else
34739  ac_cv_prog_CPP=$CPP
34740fi
34741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34742$as_echo "$CPP" >&6; }
34743ac_preproc_ok=false
34744for ac_c_preproc_warn_flag in '' yes
34745do
34746  # Use a header file that comes with gcc, so configuring glibc
34747  # with a fresh cross-compiler works.
34748  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34749  # <limits.h> exists even on freestanding compilers.
34750  # On the NeXT, cc -E runs the code through the compiler's parser,
34751  # not just through cpp. "Syntax error" is here to catch this case.
34752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34753/* end confdefs.h.  */
34754#ifdef __STDC__
34755# include <limits.h>
34756#else
34757# include <assert.h>
34758#endif
34759		     Syntax error
34760_ACEOF
34761if ac_fn_c_try_cpp "$LINENO"; then :
34762
34763else
34764  # Broken: fails on valid input.
34765continue
34766fi
34767rm -f conftest.err conftest.i conftest.$ac_ext
34768
34769  # OK, works on sane cases.  Now check whether nonexistent headers
34770  # can be detected and how.
34771  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34772/* end confdefs.h.  */
34773#include <ac_nonexistent.h>
34774_ACEOF
34775if ac_fn_c_try_cpp "$LINENO"; then :
34776  # Broken: success on invalid input.
34777continue
34778else
34779  # Passes both tests.
34780ac_preproc_ok=:
34781break
34782fi
34783rm -f conftest.err conftest.i conftest.$ac_ext
34784
34785done
34786# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34787rm -f conftest.i conftest.err conftest.$ac_ext
34788if $ac_preproc_ok; then :
34789
34790else
34791  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34793as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34794See \`config.log' for more details" "$LINENO" 5; }
34795fi
34796
34797ac_ext=cpp
34798ac_cpp='$CXXCPP $CPPFLAGS'
34799ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34800ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34801ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34802
34803
34804  # Only process if variable expands to non-empty
34805
34806  if test "x$CPP" != x; then
34807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34808
34809  # First separate the path from the arguments. This will split at the first
34810  # space.
34811  complete="$CPP"
34812  path="${complete%% *}"
34813  tmp="$complete EOL"
34814  arguments="${tmp#* }"
34815
34816  # Input might be given as Windows format, start by converting to
34817  # unix format.
34818  new_path=`$CYGPATH -u "$path"`
34819
34820  # Now try to locate executable using which
34821  new_path=`$WHICH "$new_path" 2> /dev/null`
34822  # bat and cmd files are not always considered executable in cygwin causing which
34823  # to not find them
34824  if test "x$new_path" = x \
34825      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34826      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34827    new_path=`$CYGPATH -u "$path"`
34828  fi
34829  if test "x$new_path" = x; then
34830    # Oops. Which didn't find the executable.
34831    # The splitting of arguments from the executable at a space might have been incorrect,
34832    # since paths with space are more likely in Windows. Give it another try with the whole
34833    # argument.
34834    path="$complete"
34835    arguments="EOL"
34836    new_path=`$CYGPATH -u "$path"`
34837    new_path=`$WHICH "$new_path" 2> /dev/null`
34838    # bat and cmd files are not always considered executable in cygwin causing which
34839    # to not find them
34840    if test "x$new_path" = x \
34841        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34842        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34843      new_path=`$CYGPATH -u "$path"`
34844    fi
34845    if test "x$new_path" = x; then
34846      # It's still not found. Now this is an unrecoverable error.
34847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34848$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34849      has_space=`$ECHO "$complete" | $GREP " "`
34850      if test "x$has_space" != x; then
34851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34853      fi
34854      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34855    fi
34856  fi
34857
34858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34861  # "foo.exe" is OK but "foo" is an error.
34862  #
34863  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34864  # It is also a way to make sure we got the proper file name for the real test later on.
34865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34866  if test "x$test_shortpath" = x; then
34867    # Short path failed, file does not exist as specified.
34868    # Try adding .exe or .cmd
34869    if test -f "${new_path}.exe"; then
34870      input_to_shortpath="${new_path}.exe"
34871    elif test -f "${new_path}.cmd"; then
34872      input_to_shortpath="${new_path}.cmd"
34873    else
34874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34875$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34876      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34877$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34878      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34879    fi
34880  else
34881    input_to_shortpath="$new_path"
34882  fi
34883
34884  # Call helper function which possibly converts this using DOS-style short mode.
34885  # If so, the updated path is stored in $new_path.
34886  new_path="$input_to_shortpath"
34887
34888  input_path="$input_to_shortpath"
34889  # Check if we need to convert this using DOS-style short mode. If the path
34890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34891  # take no chances and rewrite it.
34892  # Note: m4 eats our [], so we need to use [ and ] instead.
34893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34894  if test "x$has_forbidden_chars" != x; then
34895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34899      # Going to short mode and back again did indeed matter. Since short mode is
34900      # case insensitive, let's make it lowercase to improve readability.
34901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34902      # Now convert it back to Unix-style (cygpath)
34903      input_path=`$CYGPATH -u "$shortmode_path"`
34904      new_path="$input_path"
34905    fi
34906  fi
34907
34908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34909  if test "x$test_cygdrive_prefix" = x; then
34910    # As a simple fix, exclude /usr/bin since it's not a real path.
34911    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34913      # a path prefixed by /cygdrive for fixpath to work.
34914      new_path="$CYGWIN_ROOT_PATH$input_path"
34915    fi
34916  fi
34917
34918  # remove trailing .exe if any
34919  new_path="${new_path/%.exe/}"
34920
34921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34922
34923  # First separate the path from the arguments. This will split at the first
34924  # space.
34925  complete="$CPP"
34926  path="${complete%% *}"
34927  tmp="$complete EOL"
34928  arguments="${tmp#* }"
34929
34930  # Input might be given as Windows format, start by converting to
34931  # unix format.
34932  new_path="$path"
34933
34934  windows_path="$new_path"
34935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34936    unix_path=`$CYGPATH -u "$windows_path"`
34937    new_path="$unix_path"
34938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34940    new_path="$unix_path"
34941  fi
34942
34943
34944  # Now try to locate executable using which
34945  new_path=`$WHICH "$new_path" 2> /dev/null`
34946
34947  if test "x$new_path" = x; then
34948    # Oops. Which didn't find the executable.
34949    # The splitting of arguments from the executable at a space might have been incorrect,
34950    # since paths with space are more likely in Windows. Give it another try with the whole
34951    # argument.
34952    path="$complete"
34953    arguments="EOL"
34954    new_path="$path"
34955
34956  windows_path="$new_path"
34957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34958    unix_path=`$CYGPATH -u "$windows_path"`
34959    new_path="$unix_path"
34960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34962    new_path="$unix_path"
34963  fi
34964
34965
34966    new_path=`$WHICH "$new_path" 2> /dev/null`
34967    # bat and cmd files are not always considered executable in MSYS causing which
34968    # to not find them
34969    if test "x$new_path" = x \
34970        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34971        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34972      new_path="$path"
34973
34974  windows_path="$new_path"
34975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34976    unix_path=`$CYGPATH -u "$windows_path"`
34977    new_path="$unix_path"
34978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34980    new_path="$unix_path"
34981  fi
34982
34983    fi
34984
34985    if test "x$new_path" = x; then
34986      # It's still not found. Now this is an unrecoverable error.
34987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34988$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34989      has_space=`$ECHO "$complete" | $GREP " "`
34990      if test "x$has_space" != x; then
34991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34993      fi
34994      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34995    fi
34996  fi
34997
34998  # Now new_path has a complete unix path to the binary
34999  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35000    # Keep paths in /bin as-is, but remove trailing .exe if any
35001    new_path="${new_path/%.exe/}"
35002    # Do not save /bin paths to all_fixpath_prefixes!
35003  else
35004    # Not in mixed or Windows style, start by that.
35005    new_path=`cmd //c echo $new_path`
35006
35007  input_path="$new_path"
35008  # Check if we need to convert this using DOS-style short mode. If the path
35009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35010  # take no chances and rewrite it.
35011  # Note: m4 eats our [], so we need to use [ and ] instead.
35012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35013  if test "x$has_forbidden_chars" != x; then
35014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35016  fi
35017
35018    # Output is in $new_path
35019
35020  windows_path="$new_path"
35021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35022    unix_path=`$CYGPATH -u "$windows_path"`
35023    new_path="$unix_path"
35024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35026    new_path="$unix_path"
35027  fi
35028
35029    # remove trailing .exe if any
35030    new_path="${new_path/%.exe/}"
35031
35032    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35033    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35034  fi
35035
35036    else
35037      # We're on a unix platform. Hooray! :)
35038      # First separate the path from the arguments. This will split at the first
35039      # space.
35040      complete="$CPP"
35041      path="${complete%% *}"
35042      tmp="$complete EOL"
35043      arguments="${tmp#* }"
35044
35045      # Cannot rely on the command "which" here since it doesn't always work.
35046      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35047      if test -z "$is_absolute_path"; then
35048        # Path to executable is not absolute. Find it.
35049        IFS_save="$IFS"
35050        IFS=:
35051        for p in $PATH; do
35052          if test -f "$p/$path" && test -x "$p/$path"; then
35053            new_path="$p/$path"
35054            break
35055          fi
35056        done
35057        IFS="$IFS_save"
35058      else
35059        # This is an absolute path, we can use it without further modifications.
35060        new_path="$path"
35061      fi
35062
35063      if test "x$new_path" = x; then
35064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35065$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35066        has_space=`$ECHO "$complete" | $GREP " "`
35067        if test "x$has_space" != x; then
35068          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35069$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35070        fi
35071        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35072      fi
35073    fi
35074
35075    # Now join together the path and the arguments once again
35076    if test "x$arguments" != xEOL; then
35077      new_complete="$new_path ${arguments% *}"
35078    else
35079      new_complete="$new_path"
35080    fi
35081
35082    if test "x$complete" != "x$new_complete"; then
35083      CPP="$new_complete"
35084      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35085$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35086    fi
35087  fi
35088
35089  ac_ext=cpp
35090ac_cpp='$CXXCPP $CPPFLAGS'
35091ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35092ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35093ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35095$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35096if test -z "$CXXCPP"; then
35097  if ${ac_cv_prog_CXXCPP+:} false; then :
35098  $as_echo_n "(cached) " >&6
35099else
35100      # Double quotes because CXXCPP needs to be expanded
35101    for CXXCPP in "$CXX -E" "/lib/cpp"
35102    do
35103      ac_preproc_ok=false
35104for ac_cxx_preproc_warn_flag in '' yes
35105do
35106  # Use a header file that comes with gcc, so configuring glibc
35107  # with a fresh cross-compiler works.
35108  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35109  # <limits.h> exists even on freestanding compilers.
35110  # On the NeXT, cc -E runs the code through the compiler's parser,
35111  # not just through cpp. "Syntax error" is here to catch this case.
35112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35113/* end confdefs.h.  */
35114#ifdef __STDC__
35115# include <limits.h>
35116#else
35117# include <assert.h>
35118#endif
35119		     Syntax error
35120_ACEOF
35121if ac_fn_cxx_try_cpp "$LINENO"; then :
35122
35123else
35124  # Broken: fails on valid input.
35125continue
35126fi
35127rm -f conftest.err conftest.i conftest.$ac_ext
35128
35129  # OK, works on sane cases.  Now check whether nonexistent headers
35130  # can be detected and how.
35131  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35132/* end confdefs.h.  */
35133#include <ac_nonexistent.h>
35134_ACEOF
35135if ac_fn_cxx_try_cpp "$LINENO"; then :
35136  # Broken: success on invalid input.
35137continue
35138else
35139  # Passes both tests.
35140ac_preproc_ok=:
35141break
35142fi
35143rm -f conftest.err conftest.i conftest.$ac_ext
35144
35145done
35146# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35147rm -f conftest.i conftest.err conftest.$ac_ext
35148if $ac_preproc_ok; then :
35149  break
35150fi
35151
35152    done
35153    ac_cv_prog_CXXCPP=$CXXCPP
35154
35155fi
35156  CXXCPP=$ac_cv_prog_CXXCPP
35157else
35158  ac_cv_prog_CXXCPP=$CXXCPP
35159fi
35160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35161$as_echo "$CXXCPP" >&6; }
35162ac_preproc_ok=false
35163for ac_cxx_preproc_warn_flag in '' yes
35164do
35165  # Use a header file that comes with gcc, so configuring glibc
35166  # with a fresh cross-compiler works.
35167  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35168  # <limits.h> exists even on freestanding compilers.
35169  # On the NeXT, cc -E runs the code through the compiler's parser,
35170  # not just through cpp. "Syntax error" is here to catch this case.
35171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35172/* end confdefs.h.  */
35173#ifdef __STDC__
35174# include <limits.h>
35175#else
35176# include <assert.h>
35177#endif
35178		     Syntax error
35179_ACEOF
35180if ac_fn_cxx_try_cpp "$LINENO"; then :
35181
35182else
35183  # Broken: fails on valid input.
35184continue
35185fi
35186rm -f conftest.err conftest.i conftest.$ac_ext
35187
35188  # OK, works on sane cases.  Now check whether nonexistent headers
35189  # can be detected and how.
35190  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35191/* end confdefs.h.  */
35192#include <ac_nonexistent.h>
35193_ACEOF
35194if ac_fn_cxx_try_cpp "$LINENO"; then :
35195  # Broken: success on invalid input.
35196continue
35197else
35198  # Passes both tests.
35199ac_preproc_ok=:
35200break
35201fi
35202rm -f conftest.err conftest.i conftest.$ac_ext
35203
35204done
35205# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35206rm -f conftest.i conftest.err conftest.$ac_ext
35207if $ac_preproc_ok; then :
35208
35209else
35210  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35211$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35212as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35213See \`config.log' for more details" "$LINENO" 5; }
35214fi
35215
35216ac_ext=cpp
35217ac_cpp='$CXXCPP $CPPFLAGS'
35218ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35219ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35220ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35221
35222
35223  # Only process if variable expands to non-empty
35224
35225  if test "x$CXXCPP" != x; then
35226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35227
35228  # First separate the path from the arguments. This will split at the first
35229  # space.
35230  complete="$CXXCPP"
35231  path="${complete%% *}"
35232  tmp="$complete EOL"
35233  arguments="${tmp#* }"
35234
35235  # Input might be given as Windows format, start by converting to
35236  # unix format.
35237  new_path=`$CYGPATH -u "$path"`
35238
35239  # Now try to locate executable using which
35240  new_path=`$WHICH "$new_path" 2> /dev/null`
35241  # bat and cmd files are not always considered executable in cygwin causing which
35242  # to not find them
35243  if test "x$new_path" = x \
35244      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35245      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35246    new_path=`$CYGPATH -u "$path"`
35247  fi
35248  if test "x$new_path" = x; then
35249    # Oops. Which didn't find the executable.
35250    # The splitting of arguments from the executable at a space might have been incorrect,
35251    # since paths with space are more likely in Windows. Give it another try with the whole
35252    # argument.
35253    path="$complete"
35254    arguments="EOL"
35255    new_path=`$CYGPATH -u "$path"`
35256    new_path=`$WHICH "$new_path" 2> /dev/null`
35257    # bat and cmd files are not always considered executable in cygwin causing which
35258    # to not find them
35259    if test "x$new_path" = x \
35260        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35261        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35262      new_path=`$CYGPATH -u "$path"`
35263    fi
35264    if test "x$new_path" = x; then
35265      # It's still not found. Now this is an unrecoverable error.
35266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35267$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35268      has_space=`$ECHO "$complete" | $GREP " "`
35269      if test "x$has_space" != x; then
35270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35272      fi
35273      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35274    fi
35275  fi
35276
35277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35280  # "foo.exe" is OK but "foo" is an error.
35281  #
35282  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35283  # It is also a way to make sure we got the proper file name for the real test later on.
35284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35285  if test "x$test_shortpath" = x; then
35286    # Short path failed, file does not exist as specified.
35287    # Try adding .exe or .cmd
35288    if test -f "${new_path}.exe"; then
35289      input_to_shortpath="${new_path}.exe"
35290    elif test -f "${new_path}.cmd"; then
35291      input_to_shortpath="${new_path}.cmd"
35292    else
35293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35294$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35295      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35296$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35297      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35298    fi
35299  else
35300    input_to_shortpath="$new_path"
35301  fi
35302
35303  # Call helper function which possibly converts this using DOS-style short mode.
35304  # If so, the updated path is stored in $new_path.
35305  new_path="$input_to_shortpath"
35306
35307  input_path="$input_to_shortpath"
35308  # Check if we need to convert this using DOS-style short mode. If the path
35309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35310  # take no chances and rewrite it.
35311  # Note: m4 eats our [], so we need to use [ and ] instead.
35312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35313  if test "x$has_forbidden_chars" != x; then
35314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35318      # Going to short mode and back again did indeed matter. Since short mode is
35319      # case insensitive, let's make it lowercase to improve readability.
35320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35321      # Now convert it back to Unix-style (cygpath)
35322      input_path=`$CYGPATH -u "$shortmode_path"`
35323      new_path="$input_path"
35324    fi
35325  fi
35326
35327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35328  if test "x$test_cygdrive_prefix" = x; then
35329    # As a simple fix, exclude /usr/bin since it's not a real path.
35330    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35332      # a path prefixed by /cygdrive for fixpath to work.
35333      new_path="$CYGWIN_ROOT_PATH$input_path"
35334    fi
35335  fi
35336
35337  # remove trailing .exe if any
35338  new_path="${new_path/%.exe/}"
35339
35340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35341
35342  # First separate the path from the arguments. This will split at the first
35343  # space.
35344  complete="$CXXCPP"
35345  path="${complete%% *}"
35346  tmp="$complete EOL"
35347  arguments="${tmp#* }"
35348
35349  # Input might be given as Windows format, start by converting to
35350  # unix format.
35351  new_path="$path"
35352
35353  windows_path="$new_path"
35354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35355    unix_path=`$CYGPATH -u "$windows_path"`
35356    new_path="$unix_path"
35357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35359    new_path="$unix_path"
35360  fi
35361
35362
35363  # Now try to locate executable using which
35364  new_path=`$WHICH "$new_path" 2> /dev/null`
35365
35366  if test "x$new_path" = x; then
35367    # Oops. Which didn't find the executable.
35368    # The splitting of arguments from the executable at a space might have been incorrect,
35369    # since paths with space are more likely in Windows. Give it another try with the whole
35370    # argument.
35371    path="$complete"
35372    arguments="EOL"
35373    new_path="$path"
35374
35375  windows_path="$new_path"
35376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35377    unix_path=`$CYGPATH -u "$windows_path"`
35378    new_path="$unix_path"
35379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35381    new_path="$unix_path"
35382  fi
35383
35384
35385    new_path=`$WHICH "$new_path" 2> /dev/null`
35386    # bat and cmd files are not always considered executable in MSYS causing which
35387    # to not find them
35388    if test "x$new_path" = x \
35389        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35390        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35391      new_path="$path"
35392
35393  windows_path="$new_path"
35394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35395    unix_path=`$CYGPATH -u "$windows_path"`
35396    new_path="$unix_path"
35397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35399    new_path="$unix_path"
35400  fi
35401
35402    fi
35403
35404    if test "x$new_path" = x; then
35405      # It's still not found. Now this is an unrecoverable error.
35406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35407$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35408      has_space=`$ECHO "$complete" | $GREP " "`
35409      if test "x$has_space" != x; then
35410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35412      fi
35413      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35414    fi
35415  fi
35416
35417  # Now new_path has a complete unix path to the binary
35418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35419    # Keep paths in /bin as-is, but remove trailing .exe if any
35420    new_path="${new_path/%.exe/}"
35421    # Do not save /bin paths to all_fixpath_prefixes!
35422  else
35423    # Not in mixed or Windows style, start by that.
35424    new_path=`cmd //c echo $new_path`
35425
35426  input_path="$new_path"
35427  # Check if we need to convert this using DOS-style short mode. If the path
35428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35429  # take no chances and rewrite it.
35430  # Note: m4 eats our [], so we need to use [ and ] instead.
35431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35432  if test "x$has_forbidden_chars" != x; then
35433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35435  fi
35436
35437    # Output is in $new_path
35438
35439  windows_path="$new_path"
35440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35441    unix_path=`$CYGPATH -u "$windows_path"`
35442    new_path="$unix_path"
35443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35445    new_path="$unix_path"
35446  fi
35447
35448    # remove trailing .exe if any
35449    new_path="${new_path/%.exe/}"
35450
35451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35453  fi
35454
35455    else
35456      # We're on a unix platform. Hooray! :)
35457      # First separate the path from the arguments. This will split at the first
35458      # space.
35459      complete="$CXXCPP"
35460      path="${complete%% *}"
35461      tmp="$complete EOL"
35462      arguments="${tmp#* }"
35463
35464      # Cannot rely on the command "which" here since it doesn't always work.
35465      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35466      if test -z "$is_absolute_path"; then
35467        # Path to executable is not absolute. Find it.
35468        IFS_save="$IFS"
35469        IFS=:
35470        for p in $PATH; do
35471          if test -f "$p/$path" && test -x "$p/$path"; then
35472            new_path="$p/$path"
35473            break
35474          fi
35475        done
35476        IFS="$IFS_save"
35477      else
35478        # This is an absolute path, we can use it without further modifications.
35479        new_path="$path"
35480      fi
35481
35482      if test "x$new_path" = x; then
35483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35484$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35485        has_space=`$ECHO "$complete" | $GREP " "`
35486        if test "x$has_space" != x; then
35487          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35489        fi
35490        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35491      fi
35492    fi
35493
35494    # Now join together the path and the arguments once again
35495    if test "x$arguments" != xEOL; then
35496      new_complete="$new_path ${arguments% *}"
35497    else
35498      new_complete="$new_path"
35499    fi
35500
35501    if test "x$complete" != "x$new_complete"; then
35502      CXXCPP="$new_complete"
35503      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35504$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35505    fi
35506  fi
35507
35508
35509  #
35510  # Setup the linker (LD)
35511  #
35512  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35513    # In the Microsoft toolchain we have a separate LD command "link".
35514    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35515    # a cygwin program for something completely different.
35516    # Extract the first word of "link", so it can be a program name with args.
35517set dummy link; ac_word=$2
35518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35519$as_echo_n "checking for $ac_word... " >&6; }
35520if ${ac_cv_prog_LD+:} false; then :
35521  $as_echo_n "(cached) " >&6
35522else
35523  if test -n "$LD"; then
35524  ac_cv_prog_LD="$LD" # Let the user override the test.
35525else
35526  ac_prog_rejected=no
35527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35528for as_dir in $PATH
35529do
35530  IFS=$as_save_IFS
35531  test -z "$as_dir" && as_dir=.
35532    for ac_exec_ext in '' $ac_executable_extensions; do
35533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35534    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35535       ac_prog_rejected=yes
35536       continue
35537     fi
35538    ac_cv_prog_LD="link"
35539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35540    break 2
35541  fi
35542done
35543  done
35544IFS=$as_save_IFS
35545
35546if test $ac_prog_rejected = yes; then
35547  # We found a bogon in the path, so make sure we never use it.
35548  set dummy $ac_cv_prog_LD
35549  shift
35550  if test $# != 0; then
35551    # We chose a different compiler from the bogus one.
35552    # However, it has the same basename, so the bogon will be chosen
35553    # first if we set LD to just the basename; use the full file name.
35554    shift
35555    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35556  fi
35557fi
35558fi
35559fi
35560LD=$ac_cv_prog_LD
35561if test -n "$LD"; then
35562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35563$as_echo "$LD" >&6; }
35564else
35565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35566$as_echo "no" >&6; }
35567fi
35568
35569
35570
35571  # Only process if variable expands to non-empty
35572
35573  if test "x$LD" != x; then
35574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35575
35576  # First separate the path from the arguments. This will split at the first
35577  # space.
35578  complete="$LD"
35579  path="${complete%% *}"
35580  tmp="$complete EOL"
35581  arguments="${tmp#* }"
35582
35583  # Input might be given as Windows format, start by converting to
35584  # unix format.
35585  new_path=`$CYGPATH -u "$path"`
35586
35587  # Now try to locate executable using which
35588  new_path=`$WHICH "$new_path" 2> /dev/null`
35589  # bat and cmd files are not always considered executable in cygwin causing which
35590  # to not find them
35591  if test "x$new_path" = x \
35592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35594    new_path=`$CYGPATH -u "$path"`
35595  fi
35596  if test "x$new_path" = x; then
35597    # Oops. Which didn't find the executable.
35598    # The splitting of arguments from the executable at a space might have been incorrect,
35599    # since paths with space are more likely in Windows. Give it another try with the whole
35600    # argument.
35601    path="$complete"
35602    arguments="EOL"
35603    new_path=`$CYGPATH -u "$path"`
35604    new_path=`$WHICH "$new_path" 2> /dev/null`
35605    # bat and cmd files are not always considered executable in cygwin causing which
35606    # to not find them
35607    if test "x$new_path" = x \
35608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35610      new_path=`$CYGPATH -u "$path"`
35611    fi
35612    if test "x$new_path" = x; then
35613      # It's still not found. Now this is an unrecoverable error.
35614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35615$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35616      has_space=`$ECHO "$complete" | $GREP " "`
35617      if test "x$has_space" != x; then
35618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35620      fi
35621      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35622    fi
35623  fi
35624
35625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35628  # "foo.exe" is OK but "foo" is an error.
35629  #
35630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35631  # It is also a way to make sure we got the proper file name for the real test later on.
35632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35633  if test "x$test_shortpath" = x; then
35634    # Short path failed, file does not exist as specified.
35635    # Try adding .exe or .cmd
35636    if test -f "${new_path}.exe"; then
35637      input_to_shortpath="${new_path}.exe"
35638    elif test -f "${new_path}.cmd"; then
35639      input_to_shortpath="${new_path}.cmd"
35640    else
35641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35642$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35645      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35646    fi
35647  else
35648    input_to_shortpath="$new_path"
35649  fi
35650
35651  # Call helper function which possibly converts this using DOS-style short mode.
35652  # If so, the updated path is stored in $new_path.
35653  new_path="$input_to_shortpath"
35654
35655  input_path="$input_to_shortpath"
35656  # Check if we need to convert this using DOS-style short mode. If the path
35657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35658  # take no chances and rewrite it.
35659  # Note: m4 eats our [], so we need to use [ and ] instead.
35660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35661  if test "x$has_forbidden_chars" != x; then
35662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35666      # Going to short mode and back again did indeed matter. Since short mode is
35667      # case insensitive, let's make it lowercase to improve readability.
35668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35669      # Now convert it back to Unix-style (cygpath)
35670      input_path=`$CYGPATH -u "$shortmode_path"`
35671      new_path="$input_path"
35672    fi
35673  fi
35674
35675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35676  if test "x$test_cygdrive_prefix" = x; then
35677    # As a simple fix, exclude /usr/bin since it's not a real path.
35678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35680      # a path prefixed by /cygdrive for fixpath to work.
35681      new_path="$CYGWIN_ROOT_PATH$input_path"
35682    fi
35683  fi
35684
35685  # remove trailing .exe if any
35686  new_path="${new_path/%.exe/}"
35687
35688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35689
35690  # First separate the path from the arguments. This will split at the first
35691  # space.
35692  complete="$LD"
35693  path="${complete%% *}"
35694  tmp="$complete EOL"
35695  arguments="${tmp#* }"
35696
35697  # Input might be given as Windows format, start by converting to
35698  # unix format.
35699  new_path="$path"
35700
35701  windows_path="$new_path"
35702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35703    unix_path=`$CYGPATH -u "$windows_path"`
35704    new_path="$unix_path"
35705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35707    new_path="$unix_path"
35708  fi
35709
35710
35711  # Now try to locate executable using which
35712  new_path=`$WHICH "$new_path" 2> /dev/null`
35713
35714  if test "x$new_path" = x; then
35715    # Oops. Which didn't find the executable.
35716    # The splitting of arguments from the executable at a space might have been incorrect,
35717    # since paths with space are more likely in Windows. Give it another try with the whole
35718    # argument.
35719    path="$complete"
35720    arguments="EOL"
35721    new_path="$path"
35722
35723  windows_path="$new_path"
35724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35725    unix_path=`$CYGPATH -u "$windows_path"`
35726    new_path="$unix_path"
35727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35729    new_path="$unix_path"
35730  fi
35731
35732
35733    new_path=`$WHICH "$new_path" 2> /dev/null`
35734    # bat and cmd files are not always considered executable in MSYS causing which
35735    # to not find them
35736    if test "x$new_path" = x \
35737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35739      new_path="$path"
35740
35741  windows_path="$new_path"
35742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35743    unix_path=`$CYGPATH -u "$windows_path"`
35744    new_path="$unix_path"
35745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35747    new_path="$unix_path"
35748  fi
35749
35750    fi
35751
35752    if test "x$new_path" = x; then
35753      # It's still not found. Now this is an unrecoverable error.
35754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35755$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35756      has_space=`$ECHO "$complete" | $GREP " "`
35757      if test "x$has_space" != x; then
35758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35760      fi
35761      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35762    fi
35763  fi
35764
35765  # Now new_path has a complete unix path to the binary
35766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35767    # Keep paths in /bin as-is, but remove trailing .exe if any
35768    new_path="${new_path/%.exe/}"
35769    # Do not save /bin paths to all_fixpath_prefixes!
35770  else
35771    # Not in mixed or Windows style, start by that.
35772    new_path=`cmd //c echo $new_path`
35773
35774  input_path="$new_path"
35775  # Check if we need to convert this using DOS-style short mode. If the path
35776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35777  # take no chances and rewrite it.
35778  # Note: m4 eats our [], so we need to use [ and ] instead.
35779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35780  if test "x$has_forbidden_chars" != x; then
35781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35783  fi
35784
35785    # Output is in $new_path
35786
35787  windows_path="$new_path"
35788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35789    unix_path=`$CYGPATH -u "$windows_path"`
35790    new_path="$unix_path"
35791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35793    new_path="$unix_path"
35794  fi
35795
35796    # remove trailing .exe if any
35797    new_path="${new_path/%.exe/}"
35798
35799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35801  fi
35802
35803    else
35804      # We're on a unix platform. Hooray! :)
35805      # First separate the path from the arguments. This will split at the first
35806      # space.
35807      complete="$LD"
35808      path="${complete%% *}"
35809      tmp="$complete EOL"
35810      arguments="${tmp#* }"
35811
35812      # Cannot rely on the command "which" here since it doesn't always work.
35813      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35814      if test -z "$is_absolute_path"; then
35815        # Path to executable is not absolute. Find it.
35816        IFS_save="$IFS"
35817        IFS=:
35818        for p in $PATH; do
35819          if test -f "$p/$path" && test -x "$p/$path"; then
35820            new_path="$p/$path"
35821            break
35822          fi
35823        done
35824        IFS="$IFS_save"
35825      else
35826        # This is an absolute path, we can use it without further modifications.
35827        new_path="$path"
35828      fi
35829
35830      if test "x$new_path" = x; then
35831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35832$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35833        has_space=`$ECHO "$complete" | $GREP " "`
35834        if test "x$has_space" != x; then
35835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35837        fi
35838        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35839      fi
35840    fi
35841
35842    # Now join together the path and the arguments once again
35843    if test "x$arguments" != xEOL; then
35844      new_complete="$new_path ${arguments% *}"
35845    else
35846      new_complete="$new_path"
35847    fi
35848
35849    if test "x$complete" != "x$new_complete"; then
35850      LD="$new_complete"
35851      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35852$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35853    fi
35854  fi
35855
35856    # Verify that we indeed succeeded with this trick.
35857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35858$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35859    "$LD" --version > /dev/null
35860    if test $? -eq 0 ; then
35861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35862$as_echo "no" >&6; }
35863      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35864    else
35865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35866$as_echo "yes" >&6; }
35867    fi
35868    LDCXX="$LD"
35869  else
35870    # All other toolchains use the compiler to link.
35871    LD="$CC"
35872    LDCXX="$CXX"
35873  fi
35874
35875  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35876
35877
35878  #
35879  # Setup the assembler (AS)
35880  #
35881  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35882    # FIXME: should this really be solaris, or solstudio?
35883
35884
35885  # Publish this variable in the help.
35886
35887
35888  if [ -z "${AS+x}" ]; then
35889    # The variable is not set by user, try to locate tool using the code snippet
35890    for ac_prog in as
35891do
35892  # Extract the first word of "$ac_prog", so it can be a program name with args.
35893set dummy $ac_prog; ac_word=$2
35894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35895$as_echo_n "checking for $ac_word... " >&6; }
35896if ${ac_cv_path_AS+:} false; then :
35897  $as_echo_n "(cached) " >&6
35898else
35899  case $AS in
35900  [\\/]* | ?:[\\/]*)
35901  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35902  ;;
35903  *)
35904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35905for as_dir in $PATH
35906do
35907  IFS=$as_save_IFS
35908  test -z "$as_dir" && as_dir=.
35909    for ac_exec_ext in '' $ac_executable_extensions; do
35910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35911    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35913    break 2
35914  fi
35915done
35916  done
35917IFS=$as_save_IFS
35918
35919  ;;
35920esac
35921fi
35922AS=$ac_cv_path_AS
35923if test -n "$AS"; then
35924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35925$as_echo "$AS" >&6; }
35926else
35927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35928$as_echo "no" >&6; }
35929fi
35930
35931
35932  test -n "$AS" && break
35933done
35934
35935  else
35936    # The variable is set, but is it from the command line or the environment?
35937
35938    # Try to remove the string !AS! from our list.
35939    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35940    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35941      # If it failed, the variable was not from the command line. Ignore it,
35942      # but warn the user (except for BASH, which is always set by the calling BASH).
35943      if test "xAS" != xBASH; then
35944        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35945$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35946      fi
35947      # Try to locate tool using the code snippet
35948      for ac_prog in as
35949do
35950  # Extract the first word of "$ac_prog", so it can be a program name with args.
35951set dummy $ac_prog; ac_word=$2
35952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35953$as_echo_n "checking for $ac_word... " >&6; }
35954if ${ac_cv_path_AS+:} false; then :
35955  $as_echo_n "(cached) " >&6
35956else
35957  case $AS in
35958  [\\/]* | ?:[\\/]*)
35959  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35960  ;;
35961  *)
35962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35963for as_dir in $PATH
35964do
35965  IFS=$as_save_IFS
35966  test -z "$as_dir" && as_dir=.
35967    for ac_exec_ext in '' $ac_executable_extensions; do
35968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35969    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35971    break 2
35972  fi
35973done
35974  done
35975IFS=$as_save_IFS
35976
35977  ;;
35978esac
35979fi
35980AS=$ac_cv_path_AS
35981if test -n "$AS"; then
35982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35983$as_echo "$AS" >&6; }
35984else
35985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35986$as_echo "no" >&6; }
35987fi
35988
35989
35990  test -n "$AS" && break
35991done
35992
35993    else
35994      # If it succeeded, then it was overridden by the user. We will use it
35995      # for the tool.
35996
35997      # First remove it from the list of overridden variables, so we can test
35998      # for unknown variables in the end.
35999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36000
36001      # Check if we try to supply an empty value
36002      if test "x$AS" = x; then
36003        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36004$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36006$as_echo_n "checking for AS... " >&6; }
36007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36008$as_echo "disabled" >&6; }
36009      else
36010        # Check if the provided tool contains a complete path.
36011        tool_specified="$AS"
36012        tool_basename="${tool_specified##*/}"
36013        if test "x$tool_basename" = "x$tool_specified"; then
36014          # A command without a complete path is provided, search $PATH.
36015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36016$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36017          # Extract the first word of "$tool_basename", so it can be a program name with args.
36018set dummy $tool_basename; ac_word=$2
36019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36020$as_echo_n "checking for $ac_word... " >&6; }
36021if ${ac_cv_path_AS+:} false; then :
36022  $as_echo_n "(cached) " >&6
36023else
36024  case $AS in
36025  [\\/]* | ?:[\\/]*)
36026  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36027  ;;
36028  *)
36029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36030for as_dir in $PATH
36031do
36032  IFS=$as_save_IFS
36033  test -z "$as_dir" && as_dir=.
36034    for ac_exec_ext in '' $ac_executable_extensions; do
36035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36036    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36038    break 2
36039  fi
36040done
36041  done
36042IFS=$as_save_IFS
36043
36044  ;;
36045esac
36046fi
36047AS=$ac_cv_path_AS
36048if test -n "$AS"; then
36049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36050$as_echo "$AS" >&6; }
36051else
36052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36053$as_echo "no" >&6; }
36054fi
36055
36056
36057          if test "x$AS" = x; then
36058            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36059          fi
36060        else
36061          # Otherwise we believe it is a complete path. Use it as it is.
36062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36063$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36064          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36065$as_echo_n "checking for AS... " >&6; }
36066          if test ! -x "$tool_specified"; then
36067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36068$as_echo "not found" >&6; }
36069            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36070          fi
36071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36072$as_echo "$tool_specified" >&6; }
36073        fi
36074      fi
36075    fi
36076
36077  fi
36078
36079
36080
36081  # Only process if variable expands to non-empty
36082
36083  if test "x$AS" != x; then
36084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36085
36086  # First separate the path from the arguments. This will split at the first
36087  # space.
36088  complete="$AS"
36089  path="${complete%% *}"
36090  tmp="$complete EOL"
36091  arguments="${tmp#* }"
36092
36093  # Input might be given as Windows format, start by converting to
36094  # unix format.
36095  new_path=`$CYGPATH -u "$path"`
36096
36097  # Now try to locate executable using which
36098  new_path=`$WHICH "$new_path" 2> /dev/null`
36099  # bat and cmd files are not always considered executable in cygwin causing which
36100  # to not find them
36101  if test "x$new_path" = x \
36102      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36103      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36104    new_path=`$CYGPATH -u "$path"`
36105  fi
36106  if test "x$new_path" = x; then
36107    # Oops. Which didn't find the executable.
36108    # The splitting of arguments from the executable at a space might have been incorrect,
36109    # since paths with space are more likely in Windows. Give it another try with the whole
36110    # argument.
36111    path="$complete"
36112    arguments="EOL"
36113    new_path=`$CYGPATH -u "$path"`
36114    new_path=`$WHICH "$new_path" 2> /dev/null`
36115    # bat and cmd files are not always considered executable in cygwin causing which
36116    # to not find them
36117    if test "x$new_path" = x \
36118        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36119        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36120      new_path=`$CYGPATH -u "$path"`
36121    fi
36122    if test "x$new_path" = x; then
36123      # It's still not found. Now this is an unrecoverable error.
36124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36125$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36126      has_space=`$ECHO "$complete" | $GREP " "`
36127      if test "x$has_space" != x; then
36128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36130      fi
36131      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36132    fi
36133  fi
36134
36135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36138  # "foo.exe" is OK but "foo" is an error.
36139  #
36140  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36141  # It is also a way to make sure we got the proper file name for the real test later on.
36142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36143  if test "x$test_shortpath" = x; then
36144    # Short path failed, file does not exist as specified.
36145    # Try adding .exe or .cmd
36146    if test -f "${new_path}.exe"; then
36147      input_to_shortpath="${new_path}.exe"
36148    elif test -f "${new_path}.cmd"; then
36149      input_to_shortpath="${new_path}.cmd"
36150    else
36151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36152$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36153      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36154$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36155      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36156    fi
36157  else
36158    input_to_shortpath="$new_path"
36159  fi
36160
36161  # Call helper function which possibly converts this using DOS-style short mode.
36162  # If so, the updated path is stored in $new_path.
36163  new_path="$input_to_shortpath"
36164
36165  input_path="$input_to_shortpath"
36166  # Check if we need to convert this using DOS-style short mode. If the path
36167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36168  # take no chances and rewrite it.
36169  # Note: m4 eats our [], so we need to use [ and ] instead.
36170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36171  if test "x$has_forbidden_chars" != x; then
36172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36176      # Going to short mode and back again did indeed matter. Since short mode is
36177      # case insensitive, let's make it lowercase to improve readability.
36178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36179      # Now convert it back to Unix-style (cygpath)
36180      input_path=`$CYGPATH -u "$shortmode_path"`
36181      new_path="$input_path"
36182    fi
36183  fi
36184
36185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36186  if test "x$test_cygdrive_prefix" = x; then
36187    # As a simple fix, exclude /usr/bin since it's not a real path.
36188    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36190      # a path prefixed by /cygdrive for fixpath to work.
36191      new_path="$CYGWIN_ROOT_PATH$input_path"
36192    fi
36193  fi
36194
36195  # remove trailing .exe if any
36196  new_path="${new_path/%.exe/}"
36197
36198    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36199
36200  # First separate the path from the arguments. This will split at the first
36201  # space.
36202  complete="$AS"
36203  path="${complete%% *}"
36204  tmp="$complete EOL"
36205  arguments="${tmp#* }"
36206
36207  # Input might be given as Windows format, start by converting to
36208  # unix format.
36209  new_path="$path"
36210
36211  windows_path="$new_path"
36212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36213    unix_path=`$CYGPATH -u "$windows_path"`
36214    new_path="$unix_path"
36215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36217    new_path="$unix_path"
36218  fi
36219
36220
36221  # Now try to locate executable using which
36222  new_path=`$WHICH "$new_path" 2> /dev/null`
36223
36224  if test "x$new_path" = x; then
36225    # Oops. Which didn't find the executable.
36226    # The splitting of arguments from the executable at a space might have been incorrect,
36227    # since paths with space are more likely in Windows. Give it another try with the whole
36228    # argument.
36229    path="$complete"
36230    arguments="EOL"
36231    new_path="$path"
36232
36233  windows_path="$new_path"
36234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36235    unix_path=`$CYGPATH -u "$windows_path"`
36236    new_path="$unix_path"
36237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36239    new_path="$unix_path"
36240  fi
36241
36242
36243    new_path=`$WHICH "$new_path" 2> /dev/null`
36244    # bat and cmd files are not always considered executable in MSYS causing which
36245    # to not find them
36246    if test "x$new_path" = x \
36247        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36248        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36249      new_path="$path"
36250
36251  windows_path="$new_path"
36252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36253    unix_path=`$CYGPATH -u "$windows_path"`
36254    new_path="$unix_path"
36255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36257    new_path="$unix_path"
36258  fi
36259
36260    fi
36261
36262    if test "x$new_path" = x; then
36263      # It's still not found. Now this is an unrecoverable error.
36264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36265$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36266      has_space=`$ECHO "$complete" | $GREP " "`
36267      if test "x$has_space" != x; then
36268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36270      fi
36271      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36272    fi
36273  fi
36274
36275  # Now new_path has a complete unix path to the binary
36276  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36277    # Keep paths in /bin as-is, but remove trailing .exe if any
36278    new_path="${new_path/%.exe/}"
36279    # Do not save /bin paths to all_fixpath_prefixes!
36280  else
36281    # Not in mixed or Windows style, start by that.
36282    new_path=`cmd //c echo $new_path`
36283
36284  input_path="$new_path"
36285  # Check if we need to convert this using DOS-style short mode. If the path
36286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36287  # take no chances and rewrite it.
36288  # Note: m4 eats our [], so we need to use [ and ] instead.
36289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36290  if test "x$has_forbidden_chars" != x; then
36291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36293  fi
36294
36295    # Output is in $new_path
36296
36297  windows_path="$new_path"
36298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36299    unix_path=`$CYGPATH -u "$windows_path"`
36300    new_path="$unix_path"
36301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36303    new_path="$unix_path"
36304  fi
36305
36306    # remove trailing .exe if any
36307    new_path="${new_path/%.exe/}"
36308
36309    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36310    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36311  fi
36312
36313    else
36314      # We're on a unix platform. Hooray! :)
36315      # First separate the path from the arguments. This will split at the first
36316      # space.
36317      complete="$AS"
36318      path="${complete%% *}"
36319      tmp="$complete EOL"
36320      arguments="${tmp#* }"
36321
36322      # Cannot rely on the command "which" here since it doesn't always work.
36323      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36324      if test -z "$is_absolute_path"; then
36325        # Path to executable is not absolute. Find it.
36326        IFS_save="$IFS"
36327        IFS=:
36328        for p in $PATH; do
36329          if test -f "$p/$path" && test -x "$p/$path"; then
36330            new_path="$p/$path"
36331            break
36332          fi
36333        done
36334        IFS="$IFS_save"
36335      else
36336        # This is an absolute path, we can use it without further modifications.
36337        new_path="$path"
36338      fi
36339
36340      if test "x$new_path" = x; then
36341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36342$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36343        has_space=`$ECHO "$complete" | $GREP " "`
36344        if test "x$has_space" != x; then
36345          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36346$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36347        fi
36348        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36349      fi
36350    fi
36351
36352    # Now join together the path and the arguments once again
36353    if test "x$arguments" != xEOL; then
36354      new_complete="$new_path ${arguments% *}"
36355    else
36356      new_complete="$new_path"
36357    fi
36358
36359    if test "x$complete" != "x$new_complete"; then
36360      AS="$new_complete"
36361      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36362$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36363    fi
36364  fi
36365
36366  else
36367    # FIXME: is this correct for microsoft?
36368    AS="$CC -c"
36369  fi
36370
36371
36372  #
36373  # Setup the archiver (AR)
36374  #
36375  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36376    # The corresponding ar tool is lib.exe (used to create static libraries)
36377    # Extract the first word of "lib", so it can be a program name with args.
36378set dummy lib; ac_word=$2
36379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36380$as_echo_n "checking for $ac_word... " >&6; }
36381if ${ac_cv_prog_AR+:} false; then :
36382  $as_echo_n "(cached) " >&6
36383else
36384  if test -n "$AR"; then
36385  ac_cv_prog_AR="$AR" # Let the user override the test.
36386else
36387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36388for as_dir in $PATH
36389do
36390  IFS=$as_save_IFS
36391  test -z "$as_dir" && as_dir=.
36392    for ac_exec_ext in '' $ac_executable_extensions; do
36393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36394    ac_cv_prog_AR="lib"
36395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36396    break 2
36397  fi
36398done
36399  done
36400IFS=$as_save_IFS
36401
36402fi
36403fi
36404AR=$ac_cv_prog_AR
36405if test -n "$AR"; then
36406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36407$as_echo "$AR" >&6; }
36408else
36409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36410$as_echo "no" >&6; }
36411fi
36412
36413
36414  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36415
36416
36417  # Publish this variable in the help.
36418
36419
36420  if [ -z "${AR+x}" ]; then
36421    # The variable is not set by user, try to locate tool using the code snippet
36422    if test -n "$ac_tool_prefix"; then
36423  for ac_prog in ar gcc-ar
36424  do
36425    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36426set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36428$as_echo_n "checking for $ac_word... " >&6; }
36429if ${ac_cv_prog_AR+:} false; then :
36430  $as_echo_n "(cached) " >&6
36431else
36432  if test -n "$AR"; then
36433  ac_cv_prog_AR="$AR" # Let the user override the test.
36434else
36435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36436for as_dir in $PATH
36437do
36438  IFS=$as_save_IFS
36439  test -z "$as_dir" && as_dir=.
36440    for ac_exec_ext in '' $ac_executable_extensions; do
36441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36442    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36444    break 2
36445  fi
36446done
36447  done
36448IFS=$as_save_IFS
36449
36450fi
36451fi
36452AR=$ac_cv_prog_AR
36453if test -n "$AR"; then
36454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36455$as_echo "$AR" >&6; }
36456else
36457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36458$as_echo "no" >&6; }
36459fi
36460
36461
36462    test -n "$AR" && break
36463  done
36464fi
36465if test -z "$AR"; then
36466  ac_ct_AR=$AR
36467  for ac_prog in ar gcc-ar
36468do
36469  # Extract the first word of "$ac_prog", so it can be a program name with args.
36470set dummy $ac_prog; ac_word=$2
36471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36472$as_echo_n "checking for $ac_word... " >&6; }
36473if ${ac_cv_prog_ac_ct_AR+:} false; then :
36474  $as_echo_n "(cached) " >&6
36475else
36476  if test -n "$ac_ct_AR"; then
36477  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36478else
36479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36480for as_dir in $PATH
36481do
36482  IFS=$as_save_IFS
36483  test -z "$as_dir" && as_dir=.
36484    for ac_exec_ext in '' $ac_executable_extensions; do
36485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36486    ac_cv_prog_ac_ct_AR="$ac_prog"
36487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36488    break 2
36489  fi
36490done
36491  done
36492IFS=$as_save_IFS
36493
36494fi
36495fi
36496ac_ct_AR=$ac_cv_prog_ac_ct_AR
36497if test -n "$ac_ct_AR"; then
36498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36499$as_echo "$ac_ct_AR" >&6; }
36500else
36501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36502$as_echo "no" >&6; }
36503fi
36504
36505
36506  test -n "$ac_ct_AR" && break
36507done
36508
36509  if test "x$ac_ct_AR" = x; then
36510    AR=""
36511  else
36512    case $cross_compiling:$ac_tool_warned in
36513yes:)
36514{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36515$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36516ac_tool_warned=yes ;;
36517esac
36518    AR=$ac_ct_AR
36519  fi
36520fi
36521
36522  else
36523    # The variable is set, but is it from the command line or the environment?
36524
36525    # Try to remove the string !AR! from our list.
36526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36528      # If it failed, the variable was not from the command line. Ignore it,
36529      # but warn the user (except for BASH, which is always set by the calling BASH).
36530      if test "xAR" != xBASH; then
36531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36532$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36533      fi
36534      # Try to locate tool using the code snippet
36535      if test -n "$ac_tool_prefix"; then
36536  for ac_prog in ar gcc-ar
36537  do
36538    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36539set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36541$as_echo_n "checking for $ac_word... " >&6; }
36542if ${ac_cv_prog_AR+:} false; then :
36543  $as_echo_n "(cached) " >&6
36544else
36545  if test -n "$AR"; then
36546  ac_cv_prog_AR="$AR" # Let the user override the test.
36547else
36548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36549for as_dir in $PATH
36550do
36551  IFS=$as_save_IFS
36552  test -z "$as_dir" && as_dir=.
36553    for ac_exec_ext in '' $ac_executable_extensions; do
36554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36555    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36557    break 2
36558  fi
36559done
36560  done
36561IFS=$as_save_IFS
36562
36563fi
36564fi
36565AR=$ac_cv_prog_AR
36566if test -n "$AR"; then
36567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36568$as_echo "$AR" >&6; }
36569else
36570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36571$as_echo "no" >&6; }
36572fi
36573
36574
36575    test -n "$AR" && break
36576  done
36577fi
36578if test -z "$AR"; then
36579  ac_ct_AR=$AR
36580  for ac_prog in ar gcc-ar
36581do
36582  # Extract the first word of "$ac_prog", so it can be a program name with args.
36583set dummy $ac_prog; ac_word=$2
36584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36585$as_echo_n "checking for $ac_word... " >&6; }
36586if ${ac_cv_prog_ac_ct_AR+:} false; then :
36587  $as_echo_n "(cached) " >&6
36588else
36589  if test -n "$ac_ct_AR"; then
36590  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36591else
36592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36593for as_dir in $PATH
36594do
36595  IFS=$as_save_IFS
36596  test -z "$as_dir" && as_dir=.
36597    for ac_exec_ext in '' $ac_executable_extensions; do
36598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36599    ac_cv_prog_ac_ct_AR="$ac_prog"
36600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36601    break 2
36602  fi
36603done
36604  done
36605IFS=$as_save_IFS
36606
36607fi
36608fi
36609ac_ct_AR=$ac_cv_prog_ac_ct_AR
36610if test -n "$ac_ct_AR"; then
36611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36612$as_echo "$ac_ct_AR" >&6; }
36613else
36614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36615$as_echo "no" >&6; }
36616fi
36617
36618
36619  test -n "$ac_ct_AR" && break
36620done
36621
36622  if test "x$ac_ct_AR" = x; then
36623    AR=""
36624  else
36625    case $cross_compiling:$ac_tool_warned in
36626yes:)
36627{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36628$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36629ac_tool_warned=yes ;;
36630esac
36631    AR=$ac_ct_AR
36632  fi
36633fi
36634
36635    else
36636      # If it succeeded, then it was overridden by the user. We will use it
36637      # for the tool.
36638
36639      # First remove it from the list of overridden variables, so we can test
36640      # for unknown variables in the end.
36641      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36642
36643      # Check if we try to supply an empty value
36644      if test "x$AR" = x; then
36645        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36646$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36648$as_echo_n "checking for AR... " >&6; }
36649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36650$as_echo "disabled" >&6; }
36651      else
36652        # Check if the provided tool contains a complete path.
36653        tool_specified="$AR"
36654        tool_basename="${tool_specified##*/}"
36655        if test "x$tool_basename" = "x$tool_specified"; then
36656          # A command without a complete path is provided, search $PATH.
36657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36658$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36659          # Extract the first word of "$tool_basename", so it can be a program name with args.
36660set dummy $tool_basename; ac_word=$2
36661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36662$as_echo_n "checking for $ac_word... " >&6; }
36663if ${ac_cv_path_AR+:} false; then :
36664  $as_echo_n "(cached) " >&6
36665else
36666  case $AR in
36667  [\\/]* | ?:[\\/]*)
36668  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36669  ;;
36670  *)
36671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36672for as_dir in $PATH
36673do
36674  IFS=$as_save_IFS
36675  test -z "$as_dir" && as_dir=.
36676    for ac_exec_ext in '' $ac_executable_extensions; do
36677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36678    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36680    break 2
36681  fi
36682done
36683  done
36684IFS=$as_save_IFS
36685
36686  ;;
36687esac
36688fi
36689AR=$ac_cv_path_AR
36690if test -n "$AR"; then
36691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36692$as_echo "$AR" >&6; }
36693else
36694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36695$as_echo "no" >&6; }
36696fi
36697
36698
36699          if test "x$AR" = x; then
36700            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36701          fi
36702        else
36703          # Otherwise we believe it is a complete path. Use it as it is.
36704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36705$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36706          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36707$as_echo_n "checking for AR... " >&6; }
36708          if test ! -x "$tool_specified"; then
36709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36710$as_echo "not found" >&6; }
36711            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36712          fi
36713          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36714$as_echo "$tool_specified" >&6; }
36715        fi
36716      fi
36717    fi
36718
36719  fi
36720
36721
36722  else
36723
36724
36725  # Publish this variable in the help.
36726
36727
36728  if [ -z "${AR+x}" ]; then
36729    # The variable is not set by user, try to locate tool using the code snippet
36730    if test -n "$ac_tool_prefix"; then
36731  for ac_prog in ar
36732  do
36733    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36734set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36736$as_echo_n "checking for $ac_word... " >&6; }
36737if ${ac_cv_prog_AR+:} false; then :
36738  $as_echo_n "(cached) " >&6
36739else
36740  if test -n "$AR"; then
36741  ac_cv_prog_AR="$AR" # Let the user override the test.
36742else
36743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36744for as_dir in $PATH
36745do
36746  IFS=$as_save_IFS
36747  test -z "$as_dir" && as_dir=.
36748    for ac_exec_ext in '' $ac_executable_extensions; do
36749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36750    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36752    break 2
36753  fi
36754done
36755  done
36756IFS=$as_save_IFS
36757
36758fi
36759fi
36760AR=$ac_cv_prog_AR
36761if test -n "$AR"; then
36762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36763$as_echo "$AR" >&6; }
36764else
36765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36766$as_echo "no" >&6; }
36767fi
36768
36769
36770    test -n "$AR" && break
36771  done
36772fi
36773if test -z "$AR"; then
36774  ac_ct_AR=$AR
36775  for ac_prog in ar
36776do
36777  # Extract the first word of "$ac_prog", so it can be a program name with args.
36778set dummy $ac_prog; ac_word=$2
36779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36780$as_echo_n "checking for $ac_word... " >&6; }
36781if ${ac_cv_prog_ac_ct_AR+:} false; then :
36782  $as_echo_n "(cached) " >&6
36783else
36784  if test -n "$ac_ct_AR"; then
36785  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36786else
36787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36788for as_dir in $PATH
36789do
36790  IFS=$as_save_IFS
36791  test -z "$as_dir" && as_dir=.
36792    for ac_exec_ext in '' $ac_executable_extensions; do
36793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36794    ac_cv_prog_ac_ct_AR="$ac_prog"
36795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36796    break 2
36797  fi
36798done
36799  done
36800IFS=$as_save_IFS
36801
36802fi
36803fi
36804ac_ct_AR=$ac_cv_prog_ac_ct_AR
36805if test -n "$ac_ct_AR"; then
36806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36807$as_echo "$ac_ct_AR" >&6; }
36808else
36809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36810$as_echo "no" >&6; }
36811fi
36812
36813
36814  test -n "$ac_ct_AR" && break
36815done
36816
36817  if test "x$ac_ct_AR" = x; then
36818    AR=""
36819  else
36820    case $cross_compiling:$ac_tool_warned in
36821yes:)
36822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36824ac_tool_warned=yes ;;
36825esac
36826    AR=$ac_ct_AR
36827  fi
36828fi
36829
36830  else
36831    # The variable is set, but is it from the command line or the environment?
36832
36833    # Try to remove the string !AR! from our list.
36834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36836      # If it failed, the variable was not from the command line. Ignore it,
36837      # but warn the user (except for BASH, which is always set by the calling BASH).
36838      if test "xAR" != xBASH; then
36839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36840$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36841      fi
36842      # Try to locate tool using the code snippet
36843      if test -n "$ac_tool_prefix"; then
36844  for ac_prog in ar
36845  do
36846    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36847set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36849$as_echo_n "checking for $ac_word... " >&6; }
36850if ${ac_cv_prog_AR+:} false; then :
36851  $as_echo_n "(cached) " >&6
36852else
36853  if test -n "$AR"; then
36854  ac_cv_prog_AR="$AR" # Let the user override the test.
36855else
36856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36857for as_dir in $PATH
36858do
36859  IFS=$as_save_IFS
36860  test -z "$as_dir" && as_dir=.
36861    for ac_exec_ext in '' $ac_executable_extensions; do
36862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36863    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36865    break 2
36866  fi
36867done
36868  done
36869IFS=$as_save_IFS
36870
36871fi
36872fi
36873AR=$ac_cv_prog_AR
36874if test -n "$AR"; then
36875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36876$as_echo "$AR" >&6; }
36877else
36878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36879$as_echo "no" >&6; }
36880fi
36881
36882
36883    test -n "$AR" && break
36884  done
36885fi
36886if test -z "$AR"; then
36887  ac_ct_AR=$AR
36888  for ac_prog in ar
36889do
36890  # Extract the first word of "$ac_prog", so it can be a program name with args.
36891set dummy $ac_prog; ac_word=$2
36892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36893$as_echo_n "checking for $ac_word... " >&6; }
36894if ${ac_cv_prog_ac_ct_AR+:} false; then :
36895  $as_echo_n "(cached) " >&6
36896else
36897  if test -n "$ac_ct_AR"; then
36898  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36899else
36900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36901for as_dir in $PATH
36902do
36903  IFS=$as_save_IFS
36904  test -z "$as_dir" && as_dir=.
36905    for ac_exec_ext in '' $ac_executable_extensions; do
36906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36907    ac_cv_prog_ac_ct_AR="$ac_prog"
36908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36909    break 2
36910  fi
36911done
36912  done
36913IFS=$as_save_IFS
36914
36915fi
36916fi
36917ac_ct_AR=$ac_cv_prog_ac_ct_AR
36918if test -n "$ac_ct_AR"; then
36919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36920$as_echo "$ac_ct_AR" >&6; }
36921else
36922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36923$as_echo "no" >&6; }
36924fi
36925
36926
36927  test -n "$ac_ct_AR" && break
36928done
36929
36930  if test "x$ac_ct_AR" = x; then
36931    AR=""
36932  else
36933    case $cross_compiling:$ac_tool_warned in
36934yes:)
36935{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36936$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36937ac_tool_warned=yes ;;
36938esac
36939    AR=$ac_ct_AR
36940  fi
36941fi
36942
36943    else
36944      # If it succeeded, then it was overridden by the user. We will use it
36945      # for the tool.
36946
36947      # First remove it from the list of overridden variables, so we can test
36948      # for unknown variables in the end.
36949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36950
36951      # Check if we try to supply an empty value
36952      if test "x$AR" = x; then
36953        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36954$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36956$as_echo_n "checking for AR... " >&6; }
36957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36958$as_echo "disabled" >&6; }
36959      else
36960        # Check if the provided tool contains a complete path.
36961        tool_specified="$AR"
36962        tool_basename="${tool_specified##*/}"
36963        if test "x$tool_basename" = "x$tool_specified"; then
36964          # A command without a complete path is provided, search $PATH.
36965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36966$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36967          # Extract the first word of "$tool_basename", so it can be a program name with args.
36968set dummy $tool_basename; ac_word=$2
36969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36970$as_echo_n "checking for $ac_word... " >&6; }
36971if ${ac_cv_path_AR+:} false; then :
36972  $as_echo_n "(cached) " >&6
36973else
36974  case $AR in
36975  [\\/]* | ?:[\\/]*)
36976  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36977  ;;
36978  *)
36979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36980for as_dir in $PATH
36981do
36982  IFS=$as_save_IFS
36983  test -z "$as_dir" && as_dir=.
36984    for ac_exec_ext in '' $ac_executable_extensions; do
36985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36986    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36988    break 2
36989  fi
36990done
36991  done
36992IFS=$as_save_IFS
36993
36994  ;;
36995esac
36996fi
36997AR=$ac_cv_path_AR
36998if test -n "$AR"; then
36999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37000$as_echo "$AR" >&6; }
37001else
37002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37003$as_echo "no" >&6; }
37004fi
37005
37006
37007          if test "x$AR" = x; then
37008            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37009          fi
37010        else
37011          # Otherwise we believe it is a complete path. Use it as it is.
37012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37013$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37014          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37015$as_echo_n "checking for AR... " >&6; }
37016          if test ! -x "$tool_specified"; then
37017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37018$as_echo "not found" >&6; }
37019            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37020          fi
37021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37022$as_echo "$tool_specified" >&6; }
37023        fi
37024      fi
37025    fi
37026
37027  fi
37028
37029
37030  fi
37031
37032  # Only process if variable expands to non-empty
37033
37034  if test "x$AR" != x; then
37035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37036
37037  # First separate the path from the arguments. This will split at the first
37038  # space.
37039  complete="$AR"
37040  path="${complete%% *}"
37041  tmp="$complete EOL"
37042  arguments="${tmp#* }"
37043
37044  # Input might be given as Windows format, start by converting to
37045  # unix format.
37046  new_path=`$CYGPATH -u "$path"`
37047
37048  # Now try to locate executable using which
37049  new_path=`$WHICH "$new_path" 2> /dev/null`
37050  # bat and cmd files are not always considered executable in cygwin causing which
37051  # to not find them
37052  if test "x$new_path" = x \
37053      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37054      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37055    new_path=`$CYGPATH -u "$path"`
37056  fi
37057  if test "x$new_path" = x; then
37058    # Oops. Which didn't find the executable.
37059    # The splitting of arguments from the executable at a space might have been incorrect,
37060    # since paths with space are more likely in Windows. Give it another try with the whole
37061    # argument.
37062    path="$complete"
37063    arguments="EOL"
37064    new_path=`$CYGPATH -u "$path"`
37065    new_path=`$WHICH "$new_path" 2> /dev/null`
37066    # bat and cmd files are not always considered executable in cygwin causing which
37067    # to not find them
37068    if test "x$new_path" = x \
37069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37071      new_path=`$CYGPATH -u "$path"`
37072    fi
37073    if test "x$new_path" = x; then
37074      # It's still not found. Now this is an unrecoverable error.
37075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37076$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37077      has_space=`$ECHO "$complete" | $GREP " "`
37078      if test "x$has_space" != x; then
37079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37081      fi
37082      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37083    fi
37084  fi
37085
37086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37089  # "foo.exe" is OK but "foo" is an error.
37090  #
37091  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37092  # It is also a way to make sure we got the proper file name for the real test later on.
37093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37094  if test "x$test_shortpath" = x; then
37095    # Short path failed, file does not exist as specified.
37096    # Try adding .exe or .cmd
37097    if test -f "${new_path}.exe"; then
37098      input_to_shortpath="${new_path}.exe"
37099    elif test -f "${new_path}.cmd"; then
37100      input_to_shortpath="${new_path}.cmd"
37101    else
37102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37103$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37104      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37105$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37106      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37107    fi
37108  else
37109    input_to_shortpath="$new_path"
37110  fi
37111
37112  # Call helper function which possibly converts this using DOS-style short mode.
37113  # If so, the updated path is stored in $new_path.
37114  new_path="$input_to_shortpath"
37115
37116  input_path="$input_to_shortpath"
37117  # Check if we need to convert this using DOS-style short mode. If the path
37118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37119  # take no chances and rewrite it.
37120  # Note: m4 eats our [], so we need to use [ and ] instead.
37121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37122  if test "x$has_forbidden_chars" != x; then
37123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37127      # Going to short mode and back again did indeed matter. Since short mode is
37128      # case insensitive, let's make it lowercase to improve readability.
37129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37130      # Now convert it back to Unix-style (cygpath)
37131      input_path=`$CYGPATH -u "$shortmode_path"`
37132      new_path="$input_path"
37133    fi
37134  fi
37135
37136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37137  if test "x$test_cygdrive_prefix" = x; then
37138    # As a simple fix, exclude /usr/bin since it's not a real path.
37139    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37141      # a path prefixed by /cygdrive for fixpath to work.
37142      new_path="$CYGWIN_ROOT_PATH$input_path"
37143    fi
37144  fi
37145
37146  # remove trailing .exe if any
37147  new_path="${new_path/%.exe/}"
37148
37149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37150
37151  # First separate the path from the arguments. This will split at the first
37152  # space.
37153  complete="$AR"
37154  path="${complete%% *}"
37155  tmp="$complete EOL"
37156  arguments="${tmp#* }"
37157
37158  # Input might be given as Windows format, start by converting to
37159  # unix format.
37160  new_path="$path"
37161
37162  windows_path="$new_path"
37163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37164    unix_path=`$CYGPATH -u "$windows_path"`
37165    new_path="$unix_path"
37166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37168    new_path="$unix_path"
37169  fi
37170
37171
37172  # Now try to locate executable using which
37173  new_path=`$WHICH "$new_path" 2> /dev/null`
37174
37175  if test "x$new_path" = x; then
37176    # Oops. Which didn't find the executable.
37177    # The splitting of arguments from the executable at a space might have been incorrect,
37178    # since paths with space are more likely in Windows. Give it another try with the whole
37179    # argument.
37180    path="$complete"
37181    arguments="EOL"
37182    new_path="$path"
37183
37184  windows_path="$new_path"
37185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37186    unix_path=`$CYGPATH -u "$windows_path"`
37187    new_path="$unix_path"
37188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37190    new_path="$unix_path"
37191  fi
37192
37193
37194    new_path=`$WHICH "$new_path" 2> /dev/null`
37195    # bat and cmd files are not always considered executable in MSYS causing which
37196    # to not find them
37197    if test "x$new_path" = x \
37198        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37199        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37200      new_path="$path"
37201
37202  windows_path="$new_path"
37203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37204    unix_path=`$CYGPATH -u "$windows_path"`
37205    new_path="$unix_path"
37206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37208    new_path="$unix_path"
37209  fi
37210
37211    fi
37212
37213    if test "x$new_path" = x; then
37214      # It's still not found. Now this is an unrecoverable error.
37215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37216$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37217      has_space=`$ECHO "$complete" | $GREP " "`
37218      if test "x$has_space" != x; then
37219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37221      fi
37222      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37223    fi
37224  fi
37225
37226  # Now new_path has a complete unix path to the binary
37227  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37228    # Keep paths in /bin as-is, but remove trailing .exe if any
37229    new_path="${new_path/%.exe/}"
37230    # Do not save /bin paths to all_fixpath_prefixes!
37231  else
37232    # Not in mixed or Windows style, start by that.
37233    new_path=`cmd //c echo $new_path`
37234
37235  input_path="$new_path"
37236  # Check if we need to convert this using DOS-style short mode. If the path
37237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37238  # take no chances and rewrite it.
37239  # Note: m4 eats our [], so we need to use [ and ] instead.
37240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37241  if test "x$has_forbidden_chars" != x; then
37242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37244  fi
37245
37246    # Output is in $new_path
37247
37248  windows_path="$new_path"
37249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37250    unix_path=`$CYGPATH -u "$windows_path"`
37251    new_path="$unix_path"
37252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37254    new_path="$unix_path"
37255  fi
37256
37257    # remove trailing .exe if any
37258    new_path="${new_path/%.exe/}"
37259
37260    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37261    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37262  fi
37263
37264    else
37265      # We're on a unix platform. Hooray! :)
37266      # First separate the path from the arguments. This will split at the first
37267      # space.
37268      complete="$AR"
37269      path="${complete%% *}"
37270      tmp="$complete EOL"
37271      arguments="${tmp#* }"
37272
37273      # Cannot rely on the command "which" here since it doesn't always work.
37274      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37275      if test -z "$is_absolute_path"; then
37276        # Path to executable is not absolute. Find it.
37277        IFS_save="$IFS"
37278        IFS=:
37279        for p in $PATH; do
37280          if test -f "$p/$path" && test -x "$p/$path"; then
37281            new_path="$p/$path"
37282            break
37283          fi
37284        done
37285        IFS="$IFS_save"
37286      else
37287        # This is an absolute path, we can use it without further modifications.
37288        new_path="$path"
37289      fi
37290
37291      if test "x$new_path" = x; then
37292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37293$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37294        has_space=`$ECHO "$complete" | $GREP " "`
37295        if test "x$has_space" != x; then
37296          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37297$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37298        fi
37299        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37300      fi
37301    fi
37302
37303    # Now join together the path and the arguments once again
37304    if test "x$arguments" != xEOL; then
37305      new_complete="$new_path ${arguments% *}"
37306    else
37307      new_complete="$new_path"
37308    fi
37309
37310    if test "x$complete" != "x$new_complete"; then
37311      AR="$new_complete"
37312      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37313$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37314    fi
37315  fi
37316
37317
37318
37319  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37320
37321
37322  # Publish this variable in the help.
37323
37324
37325  if [ -z "${LIPO+x}" ]; then
37326    # The variable is not set by user, try to locate tool using the code snippet
37327    for ac_prog in lipo
37328do
37329  # Extract the first word of "$ac_prog", so it can be a program name with args.
37330set dummy $ac_prog; ac_word=$2
37331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37332$as_echo_n "checking for $ac_word... " >&6; }
37333if ${ac_cv_path_LIPO+:} false; then :
37334  $as_echo_n "(cached) " >&6
37335else
37336  case $LIPO in
37337  [\\/]* | ?:[\\/]*)
37338  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37339  ;;
37340  *)
37341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37342for as_dir in $PATH
37343do
37344  IFS=$as_save_IFS
37345  test -z "$as_dir" && as_dir=.
37346    for ac_exec_ext in '' $ac_executable_extensions; do
37347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37348    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37350    break 2
37351  fi
37352done
37353  done
37354IFS=$as_save_IFS
37355
37356  ;;
37357esac
37358fi
37359LIPO=$ac_cv_path_LIPO
37360if test -n "$LIPO"; then
37361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37362$as_echo "$LIPO" >&6; }
37363else
37364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37365$as_echo "no" >&6; }
37366fi
37367
37368
37369  test -n "$LIPO" && break
37370done
37371
37372  else
37373    # The variable is set, but is it from the command line or the environment?
37374
37375    # Try to remove the string !LIPO! from our list.
37376    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37377    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37378      # If it failed, the variable was not from the command line. Ignore it,
37379      # but warn the user (except for BASH, which is always set by the calling BASH).
37380      if test "xLIPO" != xBASH; then
37381        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37382$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37383      fi
37384      # Try to locate tool using the code snippet
37385      for ac_prog in lipo
37386do
37387  # Extract the first word of "$ac_prog", so it can be a program name with args.
37388set dummy $ac_prog; ac_word=$2
37389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37390$as_echo_n "checking for $ac_word... " >&6; }
37391if ${ac_cv_path_LIPO+:} false; then :
37392  $as_echo_n "(cached) " >&6
37393else
37394  case $LIPO in
37395  [\\/]* | ?:[\\/]*)
37396  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37397  ;;
37398  *)
37399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37400for as_dir in $PATH
37401do
37402  IFS=$as_save_IFS
37403  test -z "$as_dir" && as_dir=.
37404    for ac_exec_ext in '' $ac_executable_extensions; do
37405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37406    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37408    break 2
37409  fi
37410done
37411  done
37412IFS=$as_save_IFS
37413
37414  ;;
37415esac
37416fi
37417LIPO=$ac_cv_path_LIPO
37418if test -n "$LIPO"; then
37419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37420$as_echo "$LIPO" >&6; }
37421else
37422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37423$as_echo "no" >&6; }
37424fi
37425
37426
37427  test -n "$LIPO" && break
37428done
37429
37430    else
37431      # If it succeeded, then it was overridden by the user. We will use it
37432      # for the tool.
37433
37434      # First remove it from the list of overridden variables, so we can test
37435      # for unknown variables in the end.
37436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37437
37438      # Check if we try to supply an empty value
37439      if test "x$LIPO" = x; then
37440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37441$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37443$as_echo_n "checking for LIPO... " >&6; }
37444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37445$as_echo "disabled" >&6; }
37446      else
37447        # Check if the provided tool contains a complete path.
37448        tool_specified="$LIPO"
37449        tool_basename="${tool_specified##*/}"
37450        if test "x$tool_basename" = "x$tool_specified"; then
37451          # A command without a complete path is provided, search $PATH.
37452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37453$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37454          # Extract the first word of "$tool_basename", so it can be a program name with args.
37455set dummy $tool_basename; ac_word=$2
37456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37457$as_echo_n "checking for $ac_word... " >&6; }
37458if ${ac_cv_path_LIPO+:} false; then :
37459  $as_echo_n "(cached) " >&6
37460else
37461  case $LIPO in
37462  [\\/]* | ?:[\\/]*)
37463  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37464  ;;
37465  *)
37466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37467for as_dir in $PATH
37468do
37469  IFS=$as_save_IFS
37470  test -z "$as_dir" && as_dir=.
37471    for ac_exec_ext in '' $ac_executable_extensions; do
37472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37473    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37475    break 2
37476  fi
37477done
37478  done
37479IFS=$as_save_IFS
37480
37481  ;;
37482esac
37483fi
37484LIPO=$ac_cv_path_LIPO
37485if test -n "$LIPO"; then
37486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37487$as_echo "$LIPO" >&6; }
37488else
37489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37490$as_echo "no" >&6; }
37491fi
37492
37493
37494          if test "x$LIPO" = x; then
37495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37496          fi
37497        else
37498          # Otherwise we believe it is a complete path. Use it as it is.
37499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37500$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37502$as_echo_n "checking for LIPO... " >&6; }
37503          if test ! -x "$tool_specified"; then
37504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37505$as_echo "not found" >&6; }
37506            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37507          fi
37508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37509$as_echo "$tool_specified" >&6; }
37510        fi
37511      fi
37512    fi
37513
37514  fi
37515
37516
37517
37518  # Only process if variable expands to non-empty
37519
37520  if test "x$LIPO" != x; then
37521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37522
37523  # First separate the path from the arguments. This will split at the first
37524  # space.
37525  complete="$LIPO"
37526  path="${complete%% *}"
37527  tmp="$complete EOL"
37528  arguments="${tmp#* }"
37529
37530  # Input might be given as Windows format, start by converting to
37531  # unix format.
37532  new_path=`$CYGPATH -u "$path"`
37533
37534  # Now try to locate executable using which
37535  new_path=`$WHICH "$new_path" 2> /dev/null`
37536  # bat and cmd files are not always considered executable in cygwin causing which
37537  # to not find them
37538  if test "x$new_path" = x \
37539      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37540      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37541    new_path=`$CYGPATH -u "$path"`
37542  fi
37543  if test "x$new_path" = x; then
37544    # Oops. Which didn't find the executable.
37545    # The splitting of arguments from the executable at a space might have been incorrect,
37546    # since paths with space are more likely in Windows. Give it another try with the whole
37547    # argument.
37548    path="$complete"
37549    arguments="EOL"
37550    new_path=`$CYGPATH -u "$path"`
37551    new_path=`$WHICH "$new_path" 2> /dev/null`
37552    # bat and cmd files are not always considered executable in cygwin causing which
37553    # to not find them
37554    if test "x$new_path" = x \
37555        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37556        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37557      new_path=`$CYGPATH -u "$path"`
37558    fi
37559    if test "x$new_path" = x; then
37560      # It's still not found. Now this is an unrecoverable error.
37561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37562$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37563      has_space=`$ECHO "$complete" | $GREP " "`
37564      if test "x$has_space" != x; then
37565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37567      fi
37568      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37569    fi
37570  fi
37571
37572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37575  # "foo.exe" is OK but "foo" is an error.
37576  #
37577  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37578  # It is also a way to make sure we got the proper file name for the real test later on.
37579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37580  if test "x$test_shortpath" = x; then
37581    # Short path failed, file does not exist as specified.
37582    # Try adding .exe or .cmd
37583    if test -f "${new_path}.exe"; then
37584      input_to_shortpath="${new_path}.exe"
37585    elif test -f "${new_path}.cmd"; then
37586      input_to_shortpath="${new_path}.cmd"
37587    else
37588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37589$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37590      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37591$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37592      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37593    fi
37594  else
37595    input_to_shortpath="$new_path"
37596  fi
37597
37598  # Call helper function which possibly converts this using DOS-style short mode.
37599  # If so, the updated path is stored in $new_path.
37600  new_path="$input_to_shortpath"
37601
37602  input_path="$input_to_shortpath"
37603  # Check if we need to convert this using DOS-style short mode. If the path
37604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37605  # take no chances and rewrite it.
37606  # Note: m4 eats our [], so we need to use [ and ] instead.
37607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37608  if test "x$has_forbidden_chars" != x; then
37609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37613      # Going to short mode and back again did indeed matter. Since short mode is
37614      # case insensitive, let's make it lowercase to improve readability.
37615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37616      # Now convert it back to Unix-style (cygpath)
37617      input_path=`$CYGPATH -u "$shortmode_path"`
37618      new_path="$input_path"
37619    fi
37620  fi
37621
37622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37623  if test "x$test_cygdrive_prefix" = x; then
37624    # As a simple fix, exclude /usr/bin since it's not a real path.
37625    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37627      # a path prefixed by /cygdrive for fixpath to work.
37628      new_path="$CYGWIN_ROOT_PATH$input_path"
37629    fi
37630  fi
37631
37632  # remove trailing .exe if any
37633  new_path="${new_path/%.exe/}"
37634
37635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37636
37637  # First separate the path from the arguments. This will split at the first
37638  # space.
37639  complete="$LIPO"
37640  path="${complete%% *}"
37641  tmp="$complete EOL"
37642  arguments="${tmp#* }"
37643
37644  # Input might be given as Windows format, start by converting to
37645  # unix format.
37646  new_path="$path"
37647
37648  windows_path="$new_path"
37649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37650    unix_path=`$CYGPATH -u "$windows_path"`
37651    new_path="$unix_path"
37652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37654    new_path="$unix_path"
37655  fi
37656
37657
37658  # Now try to locate executable using which
37659  new_path=`$WHICH "$new_path" 2> /dev/null`
37660
37661  if test "x$new_path" = x; then
37662    # Oops. Which didn't find the executable.
37663    # The splitting of arguments from the executable at a space might have been incorrect,
37664    # since paths with space are more likely in Windows. Give it another try with the whole
37665    # argument.
37666    path="$complete"
37667    arguments="EOL"
37668    new_path="$path"
37669
37670  windows_path="$new_path"
37671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37672    unix_path=`$CYGPATH -u "$windows_path"`
37673    new_path="$unix_path"
37674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37676    new_path="$unix_path"
37677  fi
37678
37679
37680    new_path=`$WHICH "$new_path" 2> /dev/null`
37681    # bat and cmd files are not always considered executable in MSYS causing which
37682    # to not find them
37683    if test "x$new_path" = x \
37684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37686      new_path="$path"
37687
37688  windows_path="$new_path"
37689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37690    unix_path=`$CYGPATH -u "$windows_path"`
37691    new_path="$unix_path"
37692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37694    new_path="$unix_path"
37695  fi
37696
37697    fi
37698
37699    if test "x$new_path" = x; then
37700      # It's still not found. Now this is an unrecoverable error.
37701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37702$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37703      has_space=`$ECHO "$complete" | $GREP " "`
37704      if test "x$has_space" != x; then
37705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37707      fi
37708      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37709    fi
37710  fi
37711
37712  # Now new_path has a complete unix path to the binary
37713  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37714    # Keep paths in /bin as-is, but remove trailing .exe if any
37715    new_path="${new_path/%.exe/}"
37716    # Do not save /bin paths to all_fixpath_prefixes!
37717  else
37718    # Not in mixed or Windows style, start by that.
37719    new_path=`cmd //c echo $new_path`
37720
37721  input_path="$new_path"
37722  # Check if we need to convert this using DOS-style short mode. If the path
37723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37724  # take no chances and rewrite it.
37725  # Note: m4 eats our [], so we need to use [ and ] instead.
37726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37727  if test "x$has_forbidden_chars" != x; then
37728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37730  fi
37731
37732    # Output is in $new_path
37733
37734  windows_path="$new_path"
37735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37736    unix_path=`$CYGPATH -u "$windows_path"`
37737    new_path="$unix_path"
37738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37740    new_path="$unix_path"
37741  fi
37742
37743    # remove trailing .exe if any
37744    new_path="${new_path/%.exe/}"
37745
37746    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37747    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37748  fi
37749
37750    else
37751      # We're on a unix platform. Hooray! :)
37752      # First separate the path from the arguments. This will split at the first
37753      # space.
37754      complete="$LIPO"
37755      path="${complete%% *}"
37756      tmp="$complete EOL"
37757      arguments="${tmp#* }"
37758
37759      # Cannot rely on the command "which" here since it doesn't always work.
37760      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37761      if test -z "$is_absolute_path"; then
37762        # Path to executable is not absolute. Find it.
37763        IFS_save="$IFS"
37764        IFS=:
37765        for p in $PATH; do
37766          if test -f "$p/$path" && test -x "$p/$path"; then
37767            new_path="$p/$path"
37768            break
37769          fi
37770        done
37771        IFS="$IFS_save"
37772      else
37773        # This is an absolute path, we can use it without further modifications.
37774        new_path="$path"
37775      fi
37776
37777      if test "x$new_path" = x; then
37778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37779$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37780        has_space=`$ECHO "$complete" | $GREP " "`
37781        if test "x$has_space" != x; then
37782          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37783$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37784        fi
37785        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37786      fi
37787    fi
37788
37789    # Now join together the path and the arguments once again
37790    if test "x$arguments" != xEOL; then
37791      new_complete="$new_path ${arguments% *}"
37792    else
37793      new_complete="$new_path"
37794    fi
37795
37796    if test "x$complete" != "x$new_complete"; then
37797      LIPO="$new_complete"
37798      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37799$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37800    fi
37801  fi
37802
37803  fi
37804
37805  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37806    # Extract the first word of "mt", so it can be a program name with args.
37807set dummy mt; ac_word=$2
37808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37809$as_echo_n "checking for $ac_word... " >&6; }
37810if ${ac_cv_prog_MT+:} false; then :
37811  $as_echo_n "(cached) " >&6
37812else
37813  if test -n "$MT"; then
37814  ac_cv_prog_MT="$MT" # Let the user override the test.
37815else
37816  ac_prog_rejected=no
37817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37818for as_dir in $PATH
37819do
37820  IFS=$as_save_IFS
37821  test -z "$as_dir" && as_dir=.
37822    for ac_exec_ext in '' $ac_executable_extensions; do
37823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37824    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37825       ac_prog_rejected=yes
37826       continue
37827     fi
37828    ac_cv_prog_MT="mt"
37829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37830    break 2
37831  fi
37832done
37833  done
37834IFS=$as_save_IFS
37835
37836if test $ac_prog_rejected = yes; then
37837  # We found a bogon in the path, so make sure we never use it.
37838  set dummy $ac_cv_prog_MT
37839  shift
37840  if test $# != 0; then
37841    # We chose a different compiler from the bogus one.
37842    # However, it has the same basename, so the bogon will be chosen
37843    # first if we set MT to just the basename; use the full file name.
37844    shift
37845    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37846  fi
37847fi
37848fi
37849fi
37850MT=$ac_cv_prog_MT
37851if test -n "$MT"; then
37852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37853$as_echo "$MT" >&6; }
37854else
37855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37856$as_echo "no" >&6; }
37857fi
37858
37859
37860
37861  # Only process if variable expands to non-empty
37862
37863  if test "x$MT" != x; then
37864    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37865
37866  # First separate the path from the arguments. This will split at the first
37867  # space.
37868  complete="$MT"
37869  path="${complete%% *}"
37870  tmp="$complete EOL"
37871  arguments="${tmp#* }"
37872
37873  # Input might be given as Windows format, start by converting to
37874  # unix format.
37875  new_path=`$CYGPATH -u "$path"`
37876
37877  # Now try to locate executable using which
37878  new_path=`$WHICH "$new_path" 2> /dev/null`
37879  # bat and cmd files are not always considered executable in cygwin causing which
37880  # to not find them
37881  if test "x$new_path" = x \
37882      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37883      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37884    new_path=`$CYGPATH -u "$path"`
37885  fi
37886  if test "x$new_path" = x; then
37887    # Oops. Which didn't find the executable.
37888    # The splitting of arguments from the executable at a space might have been incorrect,
37889    # since paths with space are more likely in Windows. Give it another try with the whole
37890    # argument.
37891    path="$complete"
37892    arguments="EOL"
37893    new_path=`$CYGPATH -u "$path"`
37894    new_path=`$WHICH "$new_path" 2> /dev/null`
37895    # bat and cmd files are not always considered executable in cygwin causing which
37896    # to not find them
37897    if test "x$new_path" = x \
37898        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37899        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37900      new_path=`$CYGPATH -u "$path"`
37901    fi
37902    if test "x$new_path" = x; then
37903      # It's still not found. Now this is an unrecoverable error.
37904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37905$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37906      has_space=`$ECHO "$complete" | $GREP " "`
37907      if test "x$has_space" != x; then
37908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37910      fi
37911      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37912    fi
37913  fi
37914
37915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37918  # "foo.exe" is OK but "foo" is an error.
37919  #
37920  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37921  # It is also a way to make sure we got the proper file name for the real test later on.
37922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37923  if test "x$test_shortpath" = x; then
37924    # Short path failed, file does not exist as specified.
37925    # Try adding .exe or .cmd
37926    if test -f "${new_path}.exe"; then
37927      input_to_shortpath="${new_path}.exe"
37928    elif test -f "${new_path}.cmd"; then
37929      input_to_shortpath="${new_path}.cmd"
37930    else
37931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37932$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37933      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37934$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37935      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37936    fi
37937  else
37938    input_to_shortpath="$new_path"
37939  fi
37940
37941  # Call helper function which possibly converts this using DOS-style short mode.
37942  # If so, the updated path is stored in $new_path.
37943  new_path="$input_to_shortpath"
37944
37945  input_path="$input_to_shortpath"
37946  # Check if we need to convert this using DOS-style short mode. If the path
37947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37948  # take no chances and rewrite it.
37949  # Note: m4 eats our [], so we need to use [ and ] instead.
37950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37951  if test "x$has_forbidden_chars" != x; then
37952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37956      # Going to short mode and back again did indeed matter. Since short mode is
37957      # case insensitive, let's make it lowercase to improve readability.
37958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37959      # Now convert it back to Unix-style (cygpath)
37960      input_path=`$CYGPATH -u "$shortmode_path"`
37961      new_path="$input_path"
37962    fi
37963  fi
37964
37965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37966  if test "x$test_cygdrive_prefix" = x; then
37967    # As a simple fix, exclude /usr/bin since it's not a real path.
37968    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37970      # a path prefixed by /cygdrive for fixpath to work.
37971      new_path="$CYGWIN_ROOT_PATH$input_path"
37972    fi
37973  fi
37974
37975  # remove trailing .exe if any
37976  new_path="${new_path/%.exe/}"
37977
37978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37979
37980  # First separate the path from the arguments. This will split at the first
37981  # space.
37982  complete="$MT"
37983  path="${complete%% *}"
37984  tmp="$complete EOL"
37985  arguments="${tmp#* }"
37986
37987  # Input might be given as Windows format, start by converting to
37988  # unix format.
37989  new_path="$path"
37990
37991  windows_path="$new_path"
37992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37993    unix_path=`$CYGPATH -u "$windows_path"`
37994    new_path="$unix_path"
37995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37997    new_path="$unix_path"
37998  fi
37999
38000
38001  # Now try to locate executable using which
38002  new_path=`$WHICH "$new_path" 2> /dev/null`
38003
38004  if test "x$new_path" = x; then
38005    # Oops. Which didn't find the executable.
38006    # The splitting of arguments from the executable at a space might have been incorrect,
38007    # since paths with space are more likely in Windows. Give it another try with the whole
38008    # argument.
38009    path="$complete"
38010    arguments="EOL"
38011    new_path="$path"
38012
38013  windows_path="$new_path"
38014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38015    unix_path=`$CYGPATH -u "$windows_path"`
38016    new_path="$unix_path"
38017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38019    new_path="$unix_path"
38020  fi
38021
38022
38023    new_path=`$WHICH "$new_path" 2> /dev/null`
38024    # bat and cmd files are not always considered executable in MSYS causing which
38025    # to not find them
38026    if test "x$new_path" = x \
38027        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38028        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38029      new_path="$path"
38030
38031  windows_path="$new_path"
38032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38033    unix_path=`$CYGPATH -u "$windows_path"`
38034    new_path="$unix_path"
38035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38037    new_path="$unix_path"
38038  fi
38039
38040    fi
38041
38042    if test "x$new_path" = x; then
38043      # It's still not found. Now this is an unrecoverable error.
38044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38045$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38046      has_space=`$ECHO "$complete" | $GREP " "`
38047      if test "x$has_space" != x; then
38048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38050      fi
38051      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38052    fi
38053  fi
38054
38055  # Now new_path has a complete unix path to the binary
38056  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38057    # Keep paths in /bin as-is, but remove trailing .exe if any
38058    new_path="${new_path/%.exe/}"
38059    # Do not save /bin paths to all_fixpath_prefixes!
38060  else
38061    # Not in mixed or Windows style, start by that.
38062    new_path=`cmd //c echo $new_path`
38063
38064  input_path="$new_path"
38065  # Check if we need to convert this using DOS-style short mode. If the path
38066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38067  # take no chances and rewrite it.
38068  # Note: m4 eats our [], so we need to use [ and ] instead.
38069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38070  if test "x$has_forbidden_chars" != x; then
38071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38073  fi
38074
38075    # Output is in $new_path
38076
38077  windows_path="$new_path"
38078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38079    unix_path=`$CYGPATH -u "$windows_path"`
38080    new_path="$unix_path"
38081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38083    new_path="$unix_path"
38084  fi
38085
38086    # remove trailing .exe if any
38087    new_path="${new_path/%.exe/}"
38088
38089    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38090    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38091  fi
38092
38093    else
38094      # We're on a unix platform. Hooray! :)
38095      # First separate the path from the arguments. This will split at the first
38096      # space.
38097      complete="$MT"
38098      path="${complete%% *}"
38099      tmp="$complete EOL"
38100      arguments="${tmp#* }"
38101
38102      # Cannot rely on the command "which" here since it doesn't always work.
38103      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38104      if test -z "$is_absolute_path"; then
38105        # Path to executable is not absolute. Find it.
38106        IFS_save="$IFS"
38107        IFS=:
38108        for p in $PATH; do
38109          if test -f "$p/$path" && test -x "$p/$path"; then
38110            new_path="$p/$path"
38111            break
38112          fi
38113        done
38114        IFS="$IFS_save"
38115      else
38116        # This is an absolute path, we can use it without further modifications.
38117        new_path="$path"
38118      fi
38119
38120      if test "x$new_path" = x; then
38121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38122$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38123        has_space=`$ECHO "$complete" | $GREP " "`
38124        if test "x$has_space" != x; then
38125          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38126$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38127        fi
38128        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38129      fi
38130    fi
38131
38132    # Now join together the path and the arguments once again
38133    if test "x$arguments" != xEOL; then
38134      new_complete="$new_path ${arguments% *}"
38135    else
38136      new_complete="$new_path"
38137    fi
38138
38139    if test "x$complete" != "x$new_complete"; then
38140      MT="$new_complete"
38141      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38142$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38143    fi
38144  fi
38145
38146    # Setup the resource compiler (RC)
38147    # Extract the first word of "rc", so it can be a program name with args.
38148set dummy rc; ac_word=$2
38149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38150$as_echo_n "checking for $ac_word... " >&6; }
38151if ${ac_cv_prog_RC+:} false; then :
38152  $as_echo_n "(cached) " >&6
38153else
38154  if test -n "$RC"; then
38155  ac_cv_prog_RC="$RC" # Let the user override the test.
38156else
38157  ac_prog_rejected=no
38158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38159for as_dir in $PATH
38160do
38161  IFS=$as_save_IFS
38162  test -z "$as_dir" && as_dir=.
38163    for ac_exec_ext in '' $ac_executable_extensions; do
38164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38165    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38166       ac_prog_rejected=yes
38167       continue
38168     fi
38169    ac_cv_prog_RC="rc"
38170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38171    break 2
38172  fi
38173done
38174  done
38175IFS=$as_save_IFS
38176
38177if test $ac_prog_rejected = yes; then
38178  # We found a bogon in the path, so make sure we never use it.
38179  set dummy $ac_cv_prog_RC
38180  shift
38181  if test $# != 0; then
38182    # We chose a different compiler from the bogus one.
38183    # However, it has the same basename, so the bogon will be chosen
38184    # first if we set RC to just the basename; use the full file name.
38185    shift
38186    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38187  fi
38188fi
38189fi
38190fi
38191RC=$ac_cv_prog_RC
38192if test -n "$RC"; then
38193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38194$as_echo "$RC" >&6; }
38195else
38196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38197$as_echo "no" >&6; }
38198fi
38199
38200
38201
38202  # Only process if variable expands to non-empty
38203
38204  if test "x$RC" != x; then
38205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38206
38207  # First separate the path from the arguments. This will split at the first
38208  # space.
38209  complete="$RC"
38210  path="${complete%% *}"
38211  tmp="$complete EOL"
38212  arguments="${tmp#* }"
38213
38214  # Input might be given as Windows format, start by converting to
38215  # unix format.
38216  new_path=`$CYGPATH -u "$path"`
38217
38218  # Now try to locate executable using which
38219  new_path=`$WHICH "$new_path" 2> /dev/null`
38220  # bat and cmd files are not always considered executable in cygwin causing which
38221  # to not find them
38222  if test "x$new_path" = x \
38223      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38224      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38225    new_path=`$CYGPATH -u "$path"`
38226  fi
38227  if test "x$new_path" = x; then
38228    # Oops. Which didn't find the executable.
38229    # The splitting of arguments from the executable at a space might have been incorrect,
38230    # since paths with space are more likely in Windows. Give it another try with the whole
38231    # argument.
38232    path="$complete"
38233    arguments="EOL"
38234    new_path=`$CYGPATH -u "$path"`
38235    new_path=`$WHICH "$new_path" 2> /dev/null`
38236    # bat and cmd files are not always considered executable in cygwin causing which
38237    # to not find them
38238    if test "x$new_path" = x \
38239        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38240        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38241      new_path=`$CYGPATH -u "$path"`
38242    fi
38243    if test "x$new_path" = x; then
38244      # It's still not found. Now this is an unrecoverable error.
38245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38246$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38247      has_space=`$ECHO "$complete" | $GREP " "`
38248      if test "x$has_space" != x; then
38249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38251      fi
38252      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38253    fi
38254  fi
38255
38256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38259  # "foo.exe" is OK but "foo" is an error.
38260  #
38261  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38262  # It is also a way to make sure we got the proper file name for the real test later on.
38263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38264  if test "x$test_shortpath" = x; then
38265    # Short path failed, file does not exist as specified.
38266    # Try adding .exe or .cmd
38267    if test -f "${new_path}.exe"; then
38268      input_to_shortpath="${new_path}.exe"
38269    elif test -f "${new_path}.cmd"; then
38270      input_to_shortpath="${new_path}.cmd"
38271    else
38272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38273$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38274      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38275$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38276      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38277    fi
38278  else
38279    input_to_shortpath="$new_path"
38280  fi
38281
38282  # Call helper function which possibly converts this using DOS-style short mode.
38283  # If so, the updated path is stored in $new_path.
38284  new_path="$input_to_shortpath"
38285
38286  input_path="$input_to_shortpath"
38287  # Check if we need to convert this using DOS-style short mode. If the path
38288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38289  # take no chances and rewrite it.
38290  # Note: m4 eats our [], so we need to use [ and ] instead.
38291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38292  if test "x$has_forbidden_chars" != x; then
38293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38297      # Going to short mode and back again did indeed matter. Since short mode is
38298      # case insensitive, let's make it lowercase to improve readability.
38299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38300      # Now convert it back to Unix-style (cygpath)
38301      input_path=`$CYGPATH -u "$shortmode_path"`
38302      new_path="$input_path"
38303    fi
38304  fi
38305
38306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38307  if test "x$test_cygdrive_prefix" = x; then
38308    # As a simple fix, exclude /usr/bin since it's not a real path.
38309    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38311      # a path prefixed by /cygdrive for fixpath to work.
38312      new_path="$CYGWIN_ROOT_PATH$input_path"
38313    fi
38314  fi
38315
38316  # remove trailing .exe if any
38317  new_path="${new_path/%.exe/}"
38318
38319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38320
38321  # First separate the path from the arguments. This will split at the first
38322  # space.
38323  complete="$RC"
38324  path="${complete%% *}"
38325  tmp="$complete EOL"
38326  arguments="${tmp#* }"
38327
38328  # Input might be given as Windows format, start by converting to
38329  # unix format.
38330  new_path="$path"
38331
38332  windows_path="$new_path"
38333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38334    unix_path=`$CYGPATH -u "$windows_path"`
38335    new_path="$unix_path"
38336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38338    new_path="$unix_path"
38339  fi
38340
38341
38342  # Now try to locate executable using which
38343  new_path=`$WHICH "$new_path" 2> /dev/null`
38344
38345  if test "x$new_path" = x; then
38346    # Oops. Which didn't find the executable.
38347    # The splitting of arguments from the executable at a space might have been incorrect,
38348    # since paths with space are more likely in Windows. Give it another try with the whole
38349    # argument.
38350    path="$complete"
38351    arguments="EOL"
38352    new_path="$path"
38353
38354  windows_path="$new_path"
38355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38356    unix_path=`$CYGPATH -u "$windows_path"`
38357    new_path="$unix_path"
38358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38360    new_path="$unix_path"
38361  fi
38362
38363
38364    new_path=`$WHICH "$new_path" 2> /dev/null`
38365    # bat and cmd files are not always considered executable in MSYS causing which
38366    # to not find them
38367    if test "x$new_path" = x \
38368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38370      new_path="$path"
38371
38372  windows_path="$new_path"
38373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38374    unix_path=`$CYGPATH -u "$windows_path"`
38375    new_path="$unix_path"
38376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38378    new_path="$unix_path"
38379  fi
38380
38381    fi
38382
38383    if test "x$new_path" = x; then
38384      # It's still not found. Now this is an unrecoverable error.
38385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38386$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38387      has_space=`$ECHO "$complete" | $GREP " "`
38388      if test "x$has_space" != x; then
38389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38391      fi
38392      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38393    fi
38394  fi
38395
38396  # Now new_path has a complete unix path to the binary
38397  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38398    # Keep paths in /bin as-is, but remove trailing .exe if any
38399    new_path="${new_path/%.exe/}"
38400    # Do not save /bin paths to all_fixpath_prefixes!
38401  else
38402    # Not in mixed or Windows style, start by that.
38403    new_path=`cmd //c echo $new_path`
38404
38405  input_path="$new_path"
38406  # Check if we need to convert this using DOS-style short mode. If the path
38407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38408  # take no chances and rewrite it.
38409  # Note: m4 eats our [], so we need to use [ and ] instead.
38410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38411  if test "x$has_forbidden_chars" != x; then
38412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38414  fi
38415
38416    # Output is in $new_path
38417
38418  windows_path="$new_path"
38419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38420    unix_path=`$CYGPATH -u "$windows_path"`
38421    new_path="$unix_path"
38422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38424    new_path="$unix_path"
38425  fi
38426
38427    # remove trailing .exe if any
38428    new_path="${new_path/%.exe/}"
38429
38430    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38431    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38432  fi
38433
38434    else
38435      # We're on a unix platform. Hooray! :)
38436      # First separate the path from the arguments. This will split at the first
38437      # space.
38438      complete="$RC"
38439      path="${complete%% *}"
38440      tmp="$complete EOL"
38441      arguments="${tmp#* }"
38442
38443      # Cannot rely on the command "which" here since it doesn't always work.
38444      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38445      if test -z "$is_absolute_path"; then
38446        # Path to executable is not absolute. Find it.
38447        IFS_save="$IFS"
38448        IFS=:
38449        for p in $PATH; do
38450          if test -f "$p/$path" && test -x "$p/$path"; then
38451            new_path="$p/$path"
38452            break
38453          fi
38454        done
38455        IFS="$IFS_save"
38456      else
38457        # This is an absolute path, we can use it without further modifications.
38458        new_path="$path"
38459      fi
38460
38461      if test "x$new_path" = x; then
38462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38463$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38464        has_space=`$ECHO "$complete" | $GREP " "`
38465        if test "x$has_space" != x; then
38466          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38467$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38468        fi
38469        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38470      fi
38471    fi
38472
38473    # Now join together the path and the arguments once again
38474    if test "x$arguments" != xEOL; then
38475      new_complete="$new_path ${arguments% *}"
38476    else
38477      new_complete="$new_path"
38478    fi
38479
38480    if test "x$complete" != "x$new_complete"; then
38481      RC="$new_complete"
38482      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38483$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38484    fi
38485  fi
38486
38487    # Extract the first word of "dumpbin", so it can be a program name with args.
38488set dummy dumpbin; ac_word=$2
38489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38490$as_echo_n "checking for $ac_word... " >&6; }
38491if ${ac_cv_prog_DUMPBIN+:} false; then :
38492  $as_echo_n "(cached) " >&6
38493else
38494  if test -n "$DUMPBIN"; then
38495  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38496else
38497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38498for as_dir in $PATH
38499do
38500  IFS=$as_save_IFS
38501  test -z "$as_dir" && as_dir=.
38502    for ac_exec_ext in '' $ac_executable_extensions; do
38503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38504    ac_cv_prog_DUMPBIN="dumpbin"
38505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38506    break 2
38507  fi
38508done
38509  done
38510IFS=$as_save_IFS
38511
38512fi
38513fi
38514DUMPBIN=$ac_cv_prog_DUMPBIN
38515if test -n "$DUMPBIN"; then
38516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38517$as_echo "$DUMPBIN" >&6; }
38518else
38519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38520$as_echo "no" >&6; }
38521fi
38522
38523
38524
38525  # Only process if variable expands to non-empty
38526
38527  if test "x$DUMPBIN" != x; then
38528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38529
38530  # First separate the path from the arguments. This will split at the first
38531  # space.
38532  complete="$DUMPBIN"
38533  path="${complete%% *}"
38534  tmp="$complete EOL"
38535  arguments="${tmp#* }"
38536
38537  # Input might be given as Windows format, start by converting to
38538  # unix format.
38539  new_path=`$CYGPATH -u "$path"`
38540
38541  # Now try to locate executable using which
38542  new_path=`$WHICH "$new_path" 2> /dev/null`
38543  # bat and cmd files are not always considered executable in cygwin causing which
38544  # to not find them
38545  if test "x$new_path" = x \
38546      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38547      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38548    new_path=`$CYGPATH -u "$path"`
38549  fi
38550  if test "x$new_path" = x; then
38551    # Oops. Which didn't find the executable.
38552    # The splitting of arguments from the executable at a space might have been incorrect,
38553    # since paths with space are more likely in Windows. Give it another try with the whole
38554    # argument.
38555    path="$complete"
38556    arguments="EOL"
38557    new_path=`$CYGPATH -u "$path"`
38558    new_path=`$WHICH "$new_path" 2> /dev/null`
38559    # bat and cmd files are not always considered executable in cygwin causing which
38560    # to not find them
38561    if test "x$new_path" = x \
38562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38564      new_path=`$CYGPATH -u "$path"`
38565    fi
38566    if test "x$new_path" = x; then
38567      # It's still not found. Now this is an unrecoverable error.
38568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38569$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38570      has_space=`$ECHO "$complete" | $GREP " "`
38571      if test "x$has_space" != x; then
38572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38574      fi
38575      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38576    fi
38577  fi
38578
38579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38582  # "foo.exe" is OK but "foo" is an error.
38583  #
38584  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38585  # It is also a way to make sure we got the proper file name for the real test later on.
38586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38587  if test "x$test_shortpath" = x; then
38588    # Short path failed, file does not exist as specified.
38589    # Try adding .exe or .cmd
38590    if test -f "${new_path}.exe"; then
38591      input_to_shortpath="${new_path}.exe"
38592    elif test -f "${new_path}.cmd"; then
38593      input_to_shortpath="${new_path}.cmd"
38594    else
38595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38596$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38597      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38598$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38599      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38600    fi
38601  else
38602    input_to_shortpath="$new_path"
38603  fi
38604
38605  # Call helper function which possibly converts this using DOS-style short mode.
38606  # If so, the updated path is stored in $new_path.
38607  new_path="$input_to_shortpath"
38608
38609  input_path="$input_to_shortpath"
38610  # Check if we need to convert this using DOS-style short mode. If the path
38611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38612  # take no chances and rewrite it.
38613  # Note: m4 eats our [], so we need to use [ and ] instead.
38614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38615  if test "x$has_forbidden_chars" != x; then
38616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38620      # Going to short mode and back again did indeed matter. Since short mode is
38621      # case insensitive, let's make it lowercase to improve readability.
38622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38623      # Now convert it back to Unix-style (cygpath)
38624      input_path=`$CYGPATH -u "$shortmode_path"`
38625      new_path="$input_path"
38626    fi
38627  fi
38628
38629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38630  if test "x$test_cygdrive_prefix" = x; then
38631    # As a simple fix, exclude /usr/bin since it's not a real path.
38632    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38634      # a path prefixed by /cygdrive for fixpath to work.
38635      new_path="$CYGWIN_ROOT_PATH$input_path"
38636    fi
38637  fi
38638
38639  # remove trailing .exe if any
38640  new_path="${new_path/%.exe/}"
38641
38642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38643
38644  # First separate the path from the arguments. This will split at the first
38645  # space.
38646  complete="$DUMPBIN"
38647  path="${complete%% *}"
38648  tmp="$complete EOL"
38649  arguments="${tmp#* }"
38650
38651  # Input might be given as Windows format, start by converting to
38652  # unix format.
38653  new_path="$path"
38654
38655  windows_path="$new_path"
38656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38657    unix_path=`$CYGPATH -u "$windows_path"`
38658    new_path="$unix_path"
38659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38661    new_path="$unix_path"
38662  fi
38663
38664
38665  # Now try to locate executable using which
38666  new_path=`$WHICH "$new_path" 2> /dev/null`
38667
38668  if test "x$new_path" = x; then
38669    # Oops. Which didn't find the executable.
38670    # The splitting of arguments from the executable at a space might have been incorrect,
38671    # since paths with space are more likely in Windows. Give it another try with the whole
38672    # argument.
38673    path="$complete"
38674    arguments="EOL"
38675    new_path="$path"
38676
38677  windows_path="$new_path"
38678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38679    unix_path=`$CYGPATH -u "$windows_path"`
38680    new_path="$unix_path"
38681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38683    new_path="$unix_path"
38684  fi
38685
38686
38687    new_path=`$WHICH "$new_path" 2> /dev/null`
38688    # bat and cmd files are not always considered executable in MSYS causing which
38689    # to not find them
38690    if test "x$new_path" = x \
38691        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38692        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38693      new_path="$path"
38694
38695  windows_path="$new_path"
38696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38697    unix_path=`$CYGPATH -u "$windows_path"`
38698    new_path="$unix_path"
38699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38701    new_path="$unix_path"
38702  fi
38703
38704    fi
38705
38706    if test "x$new_path" = x; then
38707      # It's still not found. Now this is an unrecoverable error.
38708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38709$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38710      has_space=`$ECHO "$complete" | $GREP " "`
38711      if test "x$has_space" != x; then
38712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38714      fi
38715      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38716    fi
38717  fi
38718
38719  # Now new_path has a complete unix path to the binary
38720  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38721    # Keep paths in /bin as-is, but remove trailing .exe if any
38722    new_path="${new_path/%.exe/}"
38723    # Do not save /bin paths to all_fixpath_prefixes!
38724  else
38725    # Not in mixed or Windows style, start by that.
38726    new_path=`cmd //c echo $new_path`
38727
38728  input_path="$new_path"
38729  # Check if we need to convert this using DOS-style short mode. If the path
38730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38731  # take no chances and rewrite it.
38732  # Note: m4 eats our [], so we need to use [ and ] instead.
38733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38734  if test "x$has_forbidden_chars" != x; then
38735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38737  fi
38738
38739    # Output is in $new_path
38740
38741  windows_path="$new_path"
38742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38743    unix_path=`$CYGPATH -u "$windows_path"`
38744    new_path="$unix_path"
38745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38747    new_path="$unix_path"
38748  fi
38749
38750    # remove trailing .exe if any
38751    new_path="${new_path/%.exe/}"
38752
38753    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38754    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38755  fi
38756
38757    else
38758      # We're on a unix platform. Hooray! :)
38759      # First separate the path from the arguments. This will split at the first
38760      # space.
38761      complete="$DUMPBIN"
38762      path="${complete%% *}"
38763      tmp="$complete EOL"
38764      arguments="${tmp#* }"
38765
38766      # Cannot rely on the command "which" here since it doesn't always work.
38767      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38768      if test -z "$is_absolute_path"; then
38769        # Path to executable is not absolute. Find it.
38770        IFS_save="$IFS"
38771        IFS=:
38772        for p in $PATH; do
38773          if test -f "$p/$path" && test -x "$p/$path"; then
38774            new_path="$p/$path"
38775            break
38776          fi
38777        done
38778        IFS="$IFS_save"
38779      else
38780        # This is an absolute path, we can use it without further modifications.
38781        new_path="$path"
38782      fi
38783
38784      if test "x$new_path" = x; then
38785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38786$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38787        has_space=`$ECHO "$complete" | $GREP " "`
38788        if test "x$has_space" != x; then
38789          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38790$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38791        fi
38792        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38793      fi
38794    fi
38795
38796    # Now join together the path and the arguments once again
38797    if test "x$arguments" != xEOL; then
38798      new_complete="$new_path ${arguments% *}"
38799    else
38800      new_complete="$new_path"
38801    fi
38802
38803    if test "x$complete" != "x$new_complete"; then
38804      DUMPBIN="$new_complete"
38805      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38806$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38807    fi
38808  fi
38809
38810    # We need to check for 'msbuild.exe' because at the place where we expect to
38811    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38812    # won't find the 'msbuild.exe' executable in that case (and the
38813    # 'ac_executable_extensions' is unusable due to performance reasons).
38814    # Notice that we intentionally don't fix up the path to MSBUILD because we
38815    # will call it in a DOS shell during freetype detection on Windows (see
38816    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38817    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38818set dummy msbuild.exe; ac_word=$2
38819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38820$as_echo_n "checking for $ac_word... " >&6; }
38821if ${ac_cv_prog_MSBUILD+:} false; then :
38822  $as_echo_n "(cached) " >&6
38823else
38824  if test -n "$MSBUILD"; then
38825  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38826else
38827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38828for as_dir in $PATH
38829do
38830  IFS=$as_save_IFS
38831  test -z "$as_dir" && as_dir=.
38832    for ac_exec_ext in '' $ac_executable_extensions; do
38833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38834    ac_cv_prog_MSBUILD="msbuild.exe"
38835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38836    break 2
38837  fi
38838done
38839  done
38840IFS=$as_save_IFS
38841
38842fi
38843fi
38844MSBUILD=$ac_cv_prog_MSBUILD
38845if test -n "$MSBUILD"; then
38846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38847$as_echo "$MSBUILD" >&6; }
38848else
38849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38850$as_echo "no" >&6; }
38851fi
38852
38853
38854  fi
38855
38856  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38857
38858
38859  # Publish this variable in the help.
38860
38861
38862  if [ -z "${STRIP+x}" ]; then
38863    # The variable is not set by user, try to locate tool using the code snippet
38864    for ac_prog in strip
38865do
38866  # Extract the first word of "$ac_prog", so it can be a program name with args.
38867set dummy $ac_prog; ac_word=$2
38868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38869$as_echo_n "checking for $ac_word... " >&6; }
38870if ${ac_cv_path_STRIP+:} false; then :
38871  $as_echo_n "(cached) " >&6
38872else
38873  case $STRIP in
38874  [\\/]* | ?:[\\/]*)
38875  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38876  ;;
38877  *)
38878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38879for as_dir in $PATH
38880do
38881  IFS=$as_save_IFS
38882  test -z "$as_dir" && as_dir=.
38883    for ac_exec_ext in '' $ac_executable_extensions; do
38884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38885    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38887    break 2
38888  fi
38889done
38890  done
38891IFS=$as_save_IFS
38892
38893  ;;
38894esac
38895fi
38896STRIP=$ac_cv_path_STRIP
38897if test -n "$STRIP"; then
38898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38899$as_echo "$STRIP" >&6; }
38900else
38901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38902$as_echo "no" >&6; }
38903fi
38904
38905
38906  test -n "$STRIP" && break
38907done
38908
38909  else
38910    # The variable is set, but is it from the command line or the environment?
38911
38912    # Try to remove the string !STRIP! from our list.
38913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38915      # If it failed, the variable was not from the command line. Ignore it,
38916      # but warn the user (except for BASH, which is always set by the calling BASH).
38917      if test "xSTRIP" != xBASH; then
38918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38919$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38920      fi
38921      # Try to locate tool using the code snippet
38922      for ac_prog in strip
38923do
38924  # Extract the first word of "$ac_prog", so it can be a program name with args.
38925set dummy $ac_prog; ac_word=$2
38926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38927$as_echo_n "checking for $ac_word... " >&6; }
38928if ${ac_cv_path_STRIP+:} false; then :
38929  $as_echo_n "(cached) " >&6
38930else
38931  case $STRIP in
38932  [\\/]* | ?:[\\/]*)
38933  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38934  ;;
38935  *)
38936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38937for as_dir in $PATH
38938do
38939  IFS=$as_save_IFS
38940  test -z "$as_dir" && as_dir=.
38941    for ac_exec_ext in '' $ac_executable_extensions; do
38942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38943    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38945    break 2
38946  fi
38947done
38948  done
38949IFS=$as_save_IFS
38950
38951  ;;
38952esac
38953fi
38954STRIP=$ac_cv_path_STRIP
38955if test -n "$STRIP"; then
38956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38957$as_echo "$STRIP" >&6; }
38958else
38959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38960$as_echo "no" >&6; }
38961fi
38962
38963
38964  test -n "$STRIP" && break
38965done
38966
38967    else
38968      # If it succeeded, then it was overridden by the user. We will use it
38969      # for the tool.
38970
38971      # First remove it from the list of overridden variables, so we can test
38972      # for unknown variables in the end.
38973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38974
38975      # Check if we try to supply an empty value
38976      if test "x$STRIP" = x; then
38977        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38978$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38979        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38980$as_echo_n "checking for STRIP... " >&6; }
38981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38982$as_echo "disabled" >&6; }
38983      else
38984        # Check if the provided tool contains a complete path.
38985        tool_specified="$STRIP"
38986        tool_basename="${tool_specified##*/}"
38987        if test "x$tool_basename" = "x$tool_specified"; then
38988          # A command without a complete path is provided, search $PATH.
38989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38990$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38991          # Extract the first word of "$tool_basename", so it can be a program name with args.
38992set dummy $tool_basename; ac_word=$2
38993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38994$as_echo_n "checking for $ac_word... " >&6; }
38995if ${ac_cv_path_STRIP+:} false; then :
38996  $as_echo_n "(cached) " >&6
38997else
38998  case $STRIP in
38999  [\\/]* | ?:[\\/]*)
39000  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39001  ;;
39002  *)
39003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39004for as_dir in $PATH
39005do
39006  IFS=$as_save_IFS
39007  test -z "$as_dir" && as_dir=.
39008    for ac_exec_ext in '' $ac_executable_extensions; do
39009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39010    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39012    break 2
39013  fi
39014done
39015  done
39016IFS=$as_save_IFS
39017
39018  ;;
39019esac
39020fi
39021STRIP=$ac_cv_path_STRIP
39022if test -n "$STRIP"; then
39023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39024$as_echo "$STRIP" >&6; }
39025else
39026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39027$as_echo "no" >&6; }
39028fi
39029
39030
39031          if test "x$STRIP" = x; then
39032            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39033          fi
39034        else
39035          # Otherwise we believe it is a complete path. Use it as it is.
39036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39037$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39038          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39039$as_echo_n "checking for STRIP... " >&6; }
39040          if test ! -x "$tool_specified"; then
39041            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39042$as_echo "not found" >&6; }
39043            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39044          fi
39045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39046$as_echo "$tool_specified" >&6; }
39047        fi
39048      fi
39049    fi
39050
39051  fi
39052
39053
39054
39055  # Only process if variable expands to non-empty
39056
39057  if test "x$STRIP" != x; then
39058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39059
39060  # First separate the path from the arguments. This will split at the first
39061  # space.
39062  complete="$STRIP"
39063  path="${complete%% *}"
39064  tmp="$complete EOL"
39065  arguments="${tmp#* }"
39066
39067  # Input might be given as Windows format, start by converting to
39068  # unix format.
39069  new_path=`$CYGPATH -u "$path"`
39070
39071  # Now try to locate executable using which
39072  new_path=`$WHICH "$new_path" 2> /dev/null`
39073  # bat and cmd files are not always considered executable in cygwin causing which
39074  # to not find them
39075  if test "x$new_path" = x \
39076      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39077      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39078    new_path=`$CYGPATH -u "$path"`
39079  fi
39080  if test "x$new_path" = x; then
39081    # Oops. Which didn't find the executable.
39082    # The splitting of arguments from the executable at a space might have been incorrect,
39083    # since paths with space are more likely in Windows. Give it another try with the whole
39084    # argument.
39085    path="$complete"
39086    arguments="EOL"
39087    new_path=`$CYGPATH -u "$path"`
39088    new_path=`$WHICH "$new_path" 2> /dev/null`
39089    # bat and cmd files are not always considered executable in cygwin causing which
39090    # to not find them
39091    if test "x$new_path" = x \
39092        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39093        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39094      new_path=`$CYGPATH -u "$path"`
39095    fi
39096    if test "x$new_path" = x; then
39097      # It's still not found. Now this is an unrecoverable error.
39098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39099$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39100      has_space=`$ECHO "$complete" | $GREP " "`
39101      if test "x$has_space" != x; then
39102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39104      fi
39105      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39106    fi
39107  fi
39108
39109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39112  # "foo.exe" is OK but "foo" is an error.
39113  #
39114  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39115  # It is also a way to make sure we got the proper file name for the real test later on.
39116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39117  if test "x$test_shortpath" = x; then
39118    # Short path failed, file does not exist as specified.
39119    # Try adding .exe or .cmd
39120    if test -f "${new_path}.exe"; then
39121      input_to_shortpath="${new_path}.exe"
39122    elif test -f "${new_path}.cmd"; then
39123      input_to_shortpath="${new_path}.cmd"
39124    else
39125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39126$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39127      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39128$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39129      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39130    fi
39131  else
39132    input_to_shortpath="$new_path"
39133  fi
39134
39135  # Call helper function which possibly converts this using DOS-style short mode.
39136  # If so, the updated path is stored in $new_path.
39137  new_path="$input_to_shortpath"
39138
39139  input_path="$input_to_shortpath"
39140  # Check if we need to convert this using DOS-style short mode. If the path
39141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39142  # take no chances and rewrite it.
39143  # Note: m4 eats our [], so we need to use [ and ] instead.
39144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39145  if test "x$has_forbidden_chars" != x; then
39146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39150      # Going to short mode and back again did indeed matter. Since short mode is
39151      # case insensitive, let's make it lowercase to improve readability.
39152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39153      # Now convert it back to Unix-style (cygpath)
39154      input_path=`$CYGPATH -u "$shortmode_path"`
39155      new_path="$input_path"
39156    fi
39157  fi
39158
39159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39160  if test "x$test_cygdrive_prefix" = x; then
39161    # As a simple fix, exclude /usr/bin since it's not a real path.
39162    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39164      # a path prefixed by /cygdrive for fixpath to work.
39165      new_path="$CYGWIN_ROOT_PATH$input_path"
39166    fi
39167  fi
39168
39169  # remove trailing .exe if any
39170  new_path="${new_path/%.exe/}"
39171
39172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39173
39174  # First separate the path from the arguments. This will split at the first
39175  # space.
39176  complete="$STRIP"
39177  path="${complete%% *}"
39178  tmp="$complete EOL"
39179  arguments="${tmp#* }"
39180
39181  # Input might be given as Windows format, start by converting to
39182  # unix format.
39183  new_path="$path"
39184
39185  windows_path="$new_path"
39186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39187    unix_path=`$CYGPATH -u "$windows_path"`
39188    new_path="$unix_path"
39189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39191    new_path="$unix_path"
39192  fi
39193
39194
39195  # Now try to locate executable using which
39196  new_path=`$WHICH "$new_path" 2> /dev/null`
39197
39198  if test "x$new_path" = x; then
39199    # Oops. Which didn't find the executable.
39200    # The splitting of arguments from the executable at a space might have been incorrect,
39201    # since paths with space are more likely in Windows. Give it another try with the whole
39202    # argument.
39203    path="$complete"
39204    arguments="EOL"
39205    new_path="$path"
39206
39207  windows_path="$new_path"
39208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39209    unix_path=`$CYGPATH -u "$windows_path"`
39210    new_path="$unix_path"
39211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39213    new_path="$unix_path"
39214  fi
39215
39216
39217    new_path=`$WHICH "$new_path" 2> /dev/null`
39218    # bat and cmd files are not always considered executable in MSYS causing which
39219    # to not find them
39220    if test "x$new_path" = x \
39221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39223      new_path="$path"
39224
39225  windows_path="$new_path"
39226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39227    unix_path=`$CYGPATH -u "$windows_path"`
39228    new_path="$unix_path"
39229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39231    new_path="$unix_path"
39232  fi
39233
39234    fi
39235
39236    if test "x$new_path" = x; then
39237      # It's still not found. Now this is an unrecoverable error.
39238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39239$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39240      has_space=`$ECHO "$complete" | $GREP " "`
39241      if test "x$has_space" != x; then
39242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39244      fi
39245      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39246    fi
39247  fi
39248
39249  # Now new_path has a complete unix path to the binary
39250  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39251    # Keep paths in /bin as-is, but remove trailing .exe if any
39252    new_path="${new_path/%.exe/}"
39253    # Do not save /bin paths to all_fixpath_prefixes!
39254  else
39255    # Not in mixed or Windows style, start by that.
39256    new_path=`cmd //c echo $new_path`
39257
39258  input_path="$new_path"
39259  # Check if we need to convert this using DOS-style short mode. If the path
39260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39261  # take no chances and rewrite it.
39262  # Note: m4 eats our [], so we need to use [ and ] instead.
39263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39264  if test "x$has_forbidden_chars" != x; then
39265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39267  fi
39268
39269    # Output is in $new_path
39270
39271  windows_path="$new_path"
39272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39273    unix_path=`$CYGPATH -u "$windows_path"`
39274    new_path="$unix_path"
39275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39277    new_path="$unix_path"
39278  fi
39279
39280    # remove trailing .exe if any
39281    new_path="${new_path/%.exe/}"
39282
39283    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39284    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39285  fi
39286
39287    else
39288      # We're on a unix platform. Hooray! :)
39289      # First separate the path from the arguments. This will split at the first
39290      # space.
39291      complete="$STRIP"
39292      path="${complete%% *}"
39293      tmp="$complete EOL"
39294      arguments="${tmp#* }"
39295
39296      # Cannot rely on the command "which" here since it doesn't always work.
39297      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39298      if test -z "$is_absolute_path"; then
39299        # Path to executable is not absolute. Find it.
39300        IFS_save="$IFS"
39301        IFS=:
39302        for p in $PATH; do
39303          if test -f "$p/$path" && test -x "$p/$path"; then
39304            new_path="$p/$path"
39305            break
39306          fi
39307        done
39308        IFS="$IFS_save"
39309      else
39310        # This is an absolute path, we can use it without further modifications.
39311        new_path="$path"
39312      fi
39313
39314      if test "x$new_path" = x; then
39315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39316$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39317        has_space=`$ECHO "$complete" | $GREP " "`
39318        if test "x$has_space" != x; then
39319          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39320$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39321        fi
39322        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39323      fi
39324    fi
39325
39326    # Now join together the path and the arguments once again
39327    if test "x$arguments" != xEOL; then
39328      new_complete="$new_path ${arguments% *}"
39329    else
39330      new_complete="$new_path"
39331    fi
39332
39333    if test "x$complete" != "x$new_complete"; then
39334      STRIP="$new_complete"
39335      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39336$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39337    fi
39338  fi
39339
39340
39341
39342  # Publish this variable in the help.
39343
39344
39345  if [ -z "${NM+x}" ]; then
39346    # The variable is not set by user, try to locate tool using the code snippet
39347    for ac_prog in nm
39348do
39349  # Extract the first word of "$ac_prog", so it can be a program name with args.
39350set dummy $ac_prog; ac_word=$2
39351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39352$as_echo_n "checking for $ac_word... " >&6; }
39353if ${ac_cv_path_NM+:} false; then :
39354  $as_echo_n "(cached) " >&6
39355else
39356  case $NM in
39357  [\\/]* | ?:[\\/]*)
39358  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39359  ;;
39360  *)
39361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39362for as_dir in $PATH
39363do
39364  IFS=$as_save_IFS
39365  test -z "$as_dir" && as_dir=.
39366    for ac_exec_ext in '' $ac_executable_extensions; do
39367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39368    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39370    break 2
39371  fi
39372done
39373  done
39374IFS=$as_save_IFS
39375
39376  ;;
39377esac
39378fi
39379NM=$ac_cv_path_NM
39380if test -n "$NM"; then
39381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39382$as_echo "$NM" >&6; }
39383else
39384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39385$as_echo "no" >&6; }
39386fi
39387
39388
39389  test -n "$NM" && break
39390done
39391
39392  else
39393    # The variable is set, but is it from the command line or the environment?
39394
39395    # Try to remove the string !NM! from our list.
39396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39398      # If it failed, the variable was not from the command line. Ignore it,
39399      # but warn the user (except for BASH, which is always set by the calling BASH).
39400      if test "xNM" != xBASH; then
39401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39402$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39403      fi
39404      # Try to locate tool using the code snippet
39405      for ac_prog in nm
39406do
39407  # Extract the first word of "$ac_prog", so it can be a program name with args.
39408set dummy $ac_prog; ac_word=$2
39409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39410$as_echo_n "checking for $ac_word... " >&6; }
39411if ${ac_cv_path_NM+:} false; then :
39412  $as_echo_n "(cached) " >&6
39413else
39414  case $NM in
39415  [\\/]* | ?:[\\/]*)
39416  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39417  ;;
39418  *)
39419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39420for as_dir in $PATH
39421do
39422  IFS=$as_save_IFS
39423  test -z "$as_dir" && as_dir=.
39424    for ac_exec_ext in '' $ac_executable_extensions; do
39425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39426    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39428    break 2
39429  fi
39430done
39431  done
39432IFS=$as_save_IFS
39433
39434  ;;
39435esac
39436fi
39437NM=$ac_cv_path_NM
39438if test -n "$NM"; then
39439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39440$as_echo "$NM" >&6; }
39441else
39442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39443$as_echo "no" >&6; }
39444fi
39445
39446
39447  test -n "$NM" && break
39448done
39449
39450    else
39451      # If it succeeded, then it was overridden by the user. We will use it
39452      # for the tool.
39453
39454      # First remove it from the list of overridden variables, so we can test
39455      # for unknown variables in the end.
39456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39457
39458      # Check if we try to supply an empty value
39459      if test "x$NM" = x; then
39460        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39461$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39463$as_echo_n "checking for NM... " >&6; }
39464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39465$as_echo "disabled" >&6; }
39466      else
39467        # Check if the provided tool contains a complete path.
39468        tool_specified="$NM"
39469        tool_basename="${tool_specified##*/}"
39470        if test "x$tool_basename" = "x$tool_specified"; then
39471          # A command without a complete path is provided, search $PATH.
39472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39473$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39474          # Extract the first word of "$tool_basename", so it can be a program name with args.
39475set dummy $tool_basename; ac_word=$2
39476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39477$as_echo_n "checking for $ac_word... " >&6; }
39478if ${ac_cv_path_NM+:} false; then :
39479  $as_echo_n "(cached) " >&6
39480else
39481  case $NM in
39482  [\\/]* | ?:[\\/]*)
39483  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39484  ;;
39485  *)
39486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39487for as_dir in $PATH
39488do
39489  IFS=$as_save_IFS
39490  test -z "$as_dir" && as_dir=.
39491    for ac_exec_ext in '' $ac_executable_extensions; do
39492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39493    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39495    break 2
39496  fi
39497done
39498  done
39499IFS=$as_save_IFS
39500
39501  ;;
39502esac
39503fi
39504NM=$ac_cv_path_NM
39505if test -n "$NM"; then
39506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39507$as_echo "$NM" >&6; }
39508else
39509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39510$as_echo "no" >&6; }
39511fi
39512
39513
39514          if test "x$NM" = x; then
39515            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39516          fi
39517        else
39518          # Otherwise we believe it is a complete path. Use it as it is.
39519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39520$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39522$as_echo_n "checking for NM... " >&6; }
39523          if test ! -x "$tool_specified"; then
39524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39525$as_echo "not found" >&6; }
39526            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39527          fi
39528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39529$as_echo "$tool_specified" >&6; }
39530        fi
39531      fi
39532    fi
39533
39534  fi
39535
39536
39537
39538  # Only process if variable expands to non-empty
39539
39540  if test "x$NM" != x; then
39541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39542
39543  # First separate the path from the arguments. This will split at the first
39544  # space.
39545  complete="$NM"
39546  path="${complete%% *}"
39547  tmp="$complete EOL"
39548  arguments="${tmp#* }"
39549
39550  # Input might be given as Windows format, start by converting to
39551  # unix format.
39552  new_path=`$CYGPATH -u "$path"`
39553
39554  # Now try to locate executable using which
39555  new_path=`$WHICH "$new_path" 2> /dev/null`
39556  # bat and cmd files are not always considered executable in cygwin causing which
39557  # to not find them
39558  if test "x$new_path" = x \
39559      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39560      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39561    new_path=`$CYGPATH -u "$path"`
39562  fi
39563  if test "x$new_path" = x; then
39564    # Oops. Which didn't find the executable.
39565    # The splitting of arguments from the executable at a space might have been incorrect,
39566    # since paths with space are more likely in Windows. Give it another try with the whole
39567    # argument.
39568    path="$complete"
39569    arguments="EOL"
39570    new_path=`$CYGPATH -u "$path"`
39571    new_path=`$WHICH "$new_path" 2> /dev/null`
39572    # bat and cmd files are not always considered executable in cygwin causing which
39573    # to not find them
39574    if test "x$new_path" = x \
39575        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39576        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39577      new_path=`$CYGPATH -u "$path"`
39578    fi
39579    if test "x$new_path" = x; then
39580      # It's still not found. Now this is an unrecoverable error.
39581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39582$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39583      has_space=`$ECHO "$complete" | $GREP " "`
39584      if test "x$has_space" != x; then
39585        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39586$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39587      fi
39588      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39589    fi
39590  fi
39591
39592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39595  # "foo.exe" is OK but "foo" is an error.
39596  #
39597  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39598  # It is also a way to make sure we got the proper file name for the real test later on.
39599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39600  if test "x$test_shortpath" = x; then
39601    # Short path failed, file does not exist as specified.
39602    # Try adding .exe or .cmd
39603    if test -f "${new_path}.exe"; then
39604      input_to_shortpath="${new_path}.exe"
39605    elif test -f "${new_path}.cmd"; then
39606      input_to_shortpath="${new_path}.cmd"
39607    else
39608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39609$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39610      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39611$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39612      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39613    fi
39614  else
39615    input_to_shortpath="$new_path"
39616  fi
39617
39618  # Call helper function which possibly converts this using DOS-style short mode.
39619  # If so, the updated path is stored in $new_path.
39620  new_path="$input_to_shortpath"
39621
39622  input_path="$input_to_shortpath"
39623  # Check if we need to convert this using DOS-style short mode. If the path
39624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39625  # take no chances and rewrite it.
39626  # Note: m4 eats our [], so we need to use [ and ] instead.
39627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39628  if test "x$has_forbidden_chars" != x; then
39629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39633      # Going to short mode and back again did indeed matter. Since short mode is
39634      # case insensitive, let's make it lowercase to improve readability.
39635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39636      # Now convert it back to Unix-style (cygpath)
39637      input_path=`$CYGPATH -u "$shortmode_path"`
39638      new_path="$input_path"
39639    fi
39640  fi
39641
39642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39643  if test "x$test_cygdrive_prefix" = x; then
39644    # As a simple fix, exclude /usr/bin since it's not a real path.
39645    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39647      # a path prefixed by /cygdrive for fixpath to work.
39648      new_path="$CYGWIN_ROOT_PATH$input_path"
39649    fi
39650  fi
39651
39652  # remove trailing .exe if any
39653  new_path="${new_path/%.exe/}"
39654
39655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39656
39657  # First separate the path from the arguments. This will split at the first
39658  # space.
39659  complete="$NM"
39660  path="${complete%% *}"
39661  tmp="$complete EOL"
39662  arguments="${tmp#* }"
39663
39664  # Input might be given as Windows format, start by converting to
39665  # unix format.
39666  new_path="$path"
39667
39668  windows_path="$new_path"
39669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39670    unix_path=`$CYGPATH -u "$windows_path"`
39671    new_path="$unix_path"
39672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39674    new_path="$unix_path"
39675  fi
39676
39677
39678  # Now try to locate executable using which
39679  new_path=`$WHICH "$new_path" 2> /dev/null`
39680
39681  if test "x$new_path" = x; then
39682    # Oops. Which didn't find the executable.
39683    # The splitting of arguments from the executable at a space might have been incorrect,
39684    # since paths with space are more likely in Windows. Give it another try with the whole
39685    # argument.
39686    path="$complete"
39687    arguments="EOL"
39688    new_path="$path"
39689
39690  windows_path="$new_path"
39691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39692    unix_path=`$CYGPATH -u "$windows_path"`
39693    new_path="$unix_path"
39694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39696    new_path="$unix_path"
39697  fi
39698
39699
39700    new_path=`$WHICH "$new_path" 2> /dev/null`
39701    # bat and cmd files are not always considered executable in MSYS causing which
39702    # to not find them
39703    if test "x$new_path" = x \
39704        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39705        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39706      new_path="$path"
39707
39708  windows_path="$new_path"
39709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39710    unix_path=`$CYGPATH -u "$windows_path"`
39711    new_path="$unix_path"
39712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39714    new_path="$unix_path"
39715  fi
39716
39717    fi
39718
39719    if test "x$new_path" = x; then
39720      # It's still not found. Now this is an unrecoverable error.
39721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39722$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39723      has_space=`$ECHO "$complete" | $GREP " "`
39724      if test "x$has_space" != x; then
39725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39727      fi
39728      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39729    fi
39730  fi
39731
39732  # Now new_path has a complete unix path to the binary
39733  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39734    # Keep paths in /bin as-is, but remove trailing .exe if any
39735    new_path="${new_path/%.exe/}"
39736    # Do not save /bin paths to all_fixpath_prefixes!
39737  else
39738    # Not in mixed or Windows style, start by that.
39739    new_path=`cmd //c echo $new_path`
39740
39741  input_path="$new_path"
39742  # Check if we need to convert this using DOS-style short mode. If the path
39743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39744  # take no chances and rewrite it.
39745  # Note: m4 eats our [], so we need to use [ and ] instead.
39746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39747  if test "x$has_forbidden_chars" != x; then
39748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39750  fi
39751
39752    # Output is in $new_path
39753
39754  windows_path="$new_path"
39755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39756    unix_path=`$CYGPATH -u "$windows_path"`
39757    new_path="$unix_path"
39758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39760    new_path="$unix_path"
39761  fi
39762
39763    # remove trailing .exe if any
39764    new_path="${new_path/%.exe/}"
39765
39766    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39767    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39768  fi
39769
39770    else
39771      # We're on a unix platform. Hooray! :)
39772      # First separate the path from the arguments. This will split at the first
39773      # space.
39774      complete="$NM"
39775      path="${complete%% *}"
39776      tmp="$complete EOL"
39777      arguments="${tmp#* }"
39778
39779      # Cannot rely on the command "which" here since it doesn't always work.
39780      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39781      if test -z "$is_absolute_path"; then
39782        # Path to executable is not absolute. Find it.
39783        IFS_save="$IFS"
39784        IFS=:
39785        for p in $PATH; do
39786          if test -f "$p/$path" && test -x "$p/$path"; then
39787            new_path="$p/$path"
39788            break
39789          fi
39790        done
39791        IFS="$IFS_save"
39792      else
39793        # This is an absolute path, we can use it without further modifications.
39794        new_path="$path"
39795      fi
39796
39797      if test "x$new_path" = x; then
39798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39799$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39800        has_space=`$ECHO "$complete" | $GREP " "`
39801        if test "x$has_space" != x; then
39802          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39803$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39804        fi
39805        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39806      fi
39807    fi
39808
39809    # Now join together the path and the arguments once again
39810    if test "x$arguments" != xEOL; then
39811      new_complete="$new_path ${arguments% *}"
39812    else
39813      new_complete="$new_path"
39814    fi
39815
39816    if test "x$complete" != "x$new_complete"; then
39817      NM="$new_complete"
39818      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39819$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39820    fi
39821  fi
39822
39823
39824
39825  # Publish this variable in the help.
39826
39827
39828  if [ -z "${GNM+x}" ]; then
39829    # The variable is not set by user, try to locate tool using the code snippet
39830    for ac_prog in gnm
39831do
39832  # Extract the first word of "$ac_prog", so it can be a program name with args.
39833set dummy $ac_prog; ac_word=$2
39834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39835$as_echo_n "checking for $ac_word... " >&6; }
39836if ${ac_cv_path_GNM+:} false; then :
39837  $as_echo_n "(cached) " >&6
39838else
39839  case $GNM in
39840  [\\/]* | ?:[\\/]*)
39841  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39842  ;;
39843  *)
39844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39845for as_dir in $PATH
39846do
39847  IFS=$as_save_IFS
39848  test -z "$as_dir" && as_dir=.
39849    for ac_exec_ext in '' $ac_executable_extensions; do
39850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39851    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39853    break 2
39854  fi
39855done
39856  done
39857IFS=$as_save_IFS
39858
39859  ;;
39860esac
39861fi
39862GNM=$ac_cv_path_GNM
39863if test -n "$GNM"; then
39864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39865$as_echo "$GNM" >&6; }
39866else
39867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39868$as_echo "no" >&6; }
39869fi
39870
39871
39872  test -n "$GNM" && break
39873done
39874
39875  else
39876    # The variable is set, but is it from the command line or the environment?
39877
39878    # Try to remove the string !GNM! from our list.
39879    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39880    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39881      # If it failed, the variable was not from the command line. Ignore it,
39882      # but warn the user (except for BASH, which is always set by the calling BASH).
39883      if test "xGNM" != xBASH; then
39884        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39885$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39886      fi
39887      # Try to locate tool using the code snippet
39888      for ac_prog in gnm
39889do
39890  # Extract the first word of "$ac_prog", so it can be a program name with args.
39891set dummy $ac_prog; ac_word=$2
39892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39893$as_echo_n "checking for $ac_word... " >&6; }
39894if ${ac_cv_path_GNM+:} false; then :
39895  $as_echo_n "(cached) " >&6
39896else
39897  case $GNM in
39898  [\\/]* | ?:[\\/]*)
39899  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39900  ;;
39901  *)
39902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39903for as_dir in $PATH
39904do
39905  IFS=$as_save_IFS
39906  test -z "$as_dir" && as_dir=.
39907    for ac_exec_ext in '' $ac_executable_extensions; do
39908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39909    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39911    break 2
39912  fi
39913done
39914  done
39915IFS=$as_save_IFS
39916
39917  ;;
39918esac
39919fi
39920GNM=$ac_cv_path_GNM
39921if test -n "$GNM"; then
39922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39923$as_echo "$GNM" >&6; }
39924else
39925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39926$as_echo "no" >&6; }
39927fi
39928
39929
39930  test -n "$GNM" && break
39931done
39932
39933    else
39934      # If it succeeded, then it was overridden by the user. We will use it
39935      # for the tool.
39936
39937      # First remove it from the list of overridden variables, so we can test
39938      # for unknown variables in the end.
39939      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39940
39941      # Check if we try to supply an empty value
39942      if test "x$GNM" = x; then
39943        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39944$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39945        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39946$as_echo_n "checking for GNM... " >&6; }
39947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39948$as_echo "disabled" >&6; }
39949      else
39950        # Check if the provided tool contains a complete path.
39951        tool_specified="$GNM"
39952        tool_basename="${tool_specified##*/}"
39953        if test "x$tool_basename" = "x$tool_specified"; then
39954          # A command without a complete path is provided, search $PATH.
39955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39956$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39957          # Extract the first word of "$tool_basename", so it can be a program name with args.
39958set dummy $tool_basename; ac_word=$2
39959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39960$as_echo_n "checking for $ac_word... " >&6; }
39961if ${ac_cv_path_GNM+:} false; then :
39962  $as_echo_n "(cached) " >&6
39963else
39964  case $GNM in
39965  [\\/]* | ?:[\\/]*)
39966  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39967  ;;
39968  *)
39969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39970for as_dir in $PATH
39971do
39972  IFS=$as_save_IFS
39973  test -z "$as_dir" && as_dir=.
39974    for ac_exec_ext in '' $ac_executable_extensions; do
39975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39976    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39978    break 2
39979  fi
39980done
39981  done
39982IFS=$as_save_IFS
39983
39984  ;;
39985esac
39986fi
39987GNM=$ac_cv_path_GNM
39988if test -n "$GNM"; then
39989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39990$as_echo "$GNM" >&6; }
39991else
39992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39993$as_echo "no" >&6; }
39994fi
39995
39996
39997          if test "x$GNM" = x; then
39998            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39999          fi
40000        else
40001          # Otherwise we believe it is a complete path. Use it as it is.
40002          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40003$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40004          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40005$as_echo_n "checking for GNM... " >&6; }
40006          if test ! -x "$tool_specified"; then
40007            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40008$as_echo "not found" >&6; }
40009            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40010          fi
40011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40012$as_echo "$tool_specified" >&6; }
40013        fi
40014      fi
40015    fi
40016
40017  fi
40018
40019
40020
40021  # Only process if variable expands to non-empty
40022
40023  if test "x$GNM" != x; then
40024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40025
40026  # First separate the path from the arguments. This will split at the first
40027  # space.
40028  complete="$GNM"
40029  path="${complete%% *}"
40030  tmp="$complete EOL"
40031  arguments="${tmp#* }"
40032
40033  # Input might be given as Windows format, start by converting to
40034  # unix format.
40035  new_path=`$CYGPATH -u "$path"`
40036
40037  # Now try to locate executable using which
40038  new_path=`$WHICH "$new_path" 2> /dev/null`
40039  # bat and cmd files are not always considered executable in cygwin causing which
40040  # to not find them
40041  if test "x$new_path" = x \
40042      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40043      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40044    new_path=`$CYGPATH -u "$path"`
40045  fi
40046  if test "x$new_path" = x; then
40047    # Oops. Which didn't find the executable.
40048    # The splitting of arguments from the executable at a space might have been incorrect,
40049    # since paths with space are more likely in Windows. Give it another try with the whole
40050    # argument.
40051    path="$complete"
40052    arguments="EOL"
40053    new_path=`$CYGPATH -u "$path"`
40054    new_path=`$WHICH "$new_path" 2> /dev/null`
40055    # bat and cmd files are not always considered executable in cygwin causing which
40056    # to not find them
40057    if test "x$new_path" = x \
40058        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40059        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40060      new_path=`$CYGPATH -u "$path"`
40061    fi
40062    if test "x$new_path" = x; then
40063      # It's still not found. Now this is an unrecoverable error.
40064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40065$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40066      has_space=`$ECHO "$complete" | $GREP " "`
40067      if test "x$has_space" != x; then
40068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40070      fi
40071      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40072    fi
40073  fi
40074
40075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40078  # "foo.exe" is OK but "foo" is an error.
40079  #
40080  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40081  # It is also a way to make sure we got the proper file name for the real test later on.
40082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40083  if test "x$test_shortpath" = x; then
40084    # Short path failed, file does not exist as specified.
40085    # Try adding .exe or .cmd
40086    if test -f "${new_path}.exe"; then
40087      input_to_shortpath="${new_path}.exe"
40088    elif test -f "${new_path}.cmd"; then
40089      input_to_shortpath="${new_path}.cmd"
40090    else
40091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40092$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40093      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40094$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40095      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40096    fi
40097  else
40098    input_to_shortpath="$new_path"
40099  fi
40100
40101  # Call helper function which possibly converts this using DOS-style short mode.
40102  # If so, the updated path is stored in $new_path.
40103  new_path="$input_to_shortpath"
40104
40105  input_path="$input_to_shortpath"
40106  # Check if we need to convert this using DOS-style short mode. If the path
40107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40108  # take no chances and rewrite it.
40109  # Note: m4 eats our [], so we need to use [ and ] instead.
40110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40111  if test "x$has_forbidden_chars" != x; then
40112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40116      # Going to short mode and back again did indeed matter. Since short mode is
40117      # case insensitive, let's make it lowercase to improve readability.
40118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40119      # Now convert it back to Unix-style (cygpath)
40120      input_path=`$CYGPATH -u "$shortmode_path"`
40121      new_path="$input_path"
40122    fi
40123  fi
40124
40125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40126  if test "x$test_cygdrive_prefix" = x; then
40127    # As a simple fix, exclude /usr/bin since it's not a real path.
40128    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40130      # a path prefixed by /cygdrive for fixpath to work.
40131      new_path="$CYGWIN_ROOT_PATH$input_path"
40132    fi
40133  fi
40134
40135  # remove trailing .exe if any
40136  new_path="${new_path/%.exe/}"
40137
40138    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40139
40140  # First separate the path from the arguments. This will split at the first
40141  # space.
40142  complete="$GNM"
40143  path="${complete%% *}"
40144  tmp="$complete EOL"
40145  arguments="${tmp#* }"
40146
40147  # Input might be given as Windows format, start by converting to
40148  # unix format.
40149  new_path="$path"
40150
40151  windows_path="$new_path"
40152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40153    unix_path=`$CYGPATH -u "$windows_path"`
40154    new_path="$unix_path"
40155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40157    new_path="$unix_path"
40158  fi
40159
40160
40161  # Now try to locate executable using which
40162  new_path=`$WHICH "$new_path" 2> /dev/null`
40163
40164  if test "x$new_path" = x; then
40165    # Oops. Which didn't find the executable.
40166    # The splitting of arguments from the executable at a space might have been incorrect,
40167    # since paths with space are more likely in Windows. Give it another try with the whole
40168    # argument.
40169    path="$complete"
40170    arguments="EOL"
40171    new_path="$path"
40172
40173  windows_path="$new_path"
40174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40175    unix_path=`$CYGPATH -u "$windows_path"`
40176    new_path="$unix_path"
40177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40179    new_path="$unix_path"
40180  fi
40181
40182
40183    new_path=`$WHICH "$new_path" 2> /dev/null`
40184    # bat and cmd files are not always considered executable in MSYS causing which
40185    # to not find them
40186    if test "x$new_path" = x \
40187        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40188        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40189      new_path="$path"
40190
40191  windows_path="$new_path"
40192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40193    unix_path=`$CYGPATH -u "$windows_path"`
40194    new_path="$unix_path"
40195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40197    new_path="$unix_path"
40198  fi
40199
40200    fi
40201
40202    if test "x$new_path" = x; then
40203      # It's still not found. Now this is an unrecoverable error.
40204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40205$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40206      has_space=`$ECHO "$complete" | $GREP " "`
40207      if test "x$has_space" != x; then
40208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40210      fi
40211      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40212    fi
40213  fi
40214
40215  # Now new_path has a complete unix path to the binary
40216  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40217    # Keep paths in /bin as-is, but remove trailing .exe if any
40218    new_path="${new_path/%.exe/}"
40219    # Do not save /bin paths to all_fixpath_prefixes!
40220  else
40221    # Not in mixed or Windows style, start by that.
40222    new_path=`cmd //c echo $new_path`
40223
40224  input_path="$new_path"
40225  # Check if we need to convert this using DOS-style short mode. If the path
40226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40227  # take no chances and rewrite it.
40228  # Note: m4 eats our [], so we need to use [ and ] instead.
40229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40230  if test "x$has_forbidden_chars" != x; then
40231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40233  fi
40234
40235    # Output is in $new_path
40236
40237  windows_path="$new_path"
40238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40239    unix_path=`$CYGPATH -u "$windows_path"`
40240    new_path="$unix_path"
40241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40243    new_path="$unix_path"
40244  fi
40245
40246    # remove trailing .exe if any
40247    new_path="${new_path/%.exe/}"
40248
40249    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40250    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40251  fi
40252
40253    else
40254      # We're on a unix platform. Hooray! :)
40255      # First separate the path from the arguments. This will split at the first
40256      # space.
40257      complete="$GNM"
40258      path="${complete%% *}"
40259      tmp="$complete EOL"
40260      arguments="${tmp#* }"
40261
40262      # Cannot rely on the command "which" here since it doesn't always work.
40263      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40264      if test -z "$is_absolute_path"; then
40265        # Path to executable is not absolute. Find it.
40266        IFS_save="$IFS"
40267        IFS=:
40268        for p in $PATH; do
40269          if test -f "$p/$path" && test -x "$p/$path"; then
40270            new_path="$p/$path"
40271            break
40272          fi
40273        done
40274        IFS="$IFS_save"
40275      else
40276        # This is an absolute path, we can use it without further modifications.
40277        new_path="$path"
40278      fi
40279
40280      if test "x$new_path" = x; then
40281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40282$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40283        has_space=`$ECHO "$complete" | $GREP " "`
40284        if test "x$has_space" != x; then
40285          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40286$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40287        fi
40288        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40289      fi
40290    fi
40291
40292    # Now join together the path and the arguments once again
40293    if test "x$arguments" != xEOL; then
40294      new_complete="$new_path ${arguments% *}"
40295    else
40296      new_complete="$new_path"
40297    fi
40298
40299    if test "x$complete" != "x$new_complete"; then
40300      GNM="$new_complete"
40301      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40302$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40303    fi
40304  fi
40305
40306  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40307    # FIXME: we should unify this with the solaris case above.
40308
40309
40310  # Publish this variable in the help.
40311
40312
40313  if [ -z "${STRIP+x}" ]; then
40314    # The variable is not set by user, try to locate tool using the code snippet
40315    if test -n "$ac_tool_prefix"; then
40316  for ac_prog in strip
40317  do
40318    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40319set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40321$as_echo_n "checking for $ac_word... " >&6; }
40322if ${ac_cv_prog_STRIP+:} false; then :
40323  $as_echo_n "(cached) " >&6
40324else
40325  if test -n "$STRIP"; then
40326  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40327else
40328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40329for as_dir in $PATH
40330do
40331  IFS=$as_save_IFS
40332  test -z "$as_dir" && as_dir=.
40333    for ac_exec_ext in '' $ac_executable_extensions; do
40334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40335    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40337    break 2
40338  fi
40339done
40340  done
40341IFS=$as_save_IFS
40342
40343fi
40344fi
40345STRIP=$ac_cv_prog_STRIP
40346if test -n "$STRIP"; then
40347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40348$as_echo "$STRIP" >&6; }
40349else
40350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40351$as_echo "no" >&6; }
40352fi
40353
40354
40355    test -n "$STRIP" && break
40356  done
40357fi
40358if test -z "$STRIP"; then
40359  ac_ct_STRIP=$STRIP
40360  for ac_prog in strip
40361do
40362  # Extract the first word of "$ac_prog", so it can be a program name with args.
40363set dummy $ac_prog; ac_word=$2
40364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40365$as_echo_n "checking for $ac_word... " >&6; }
40366if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40367  $as_echo_n "(cached) " >&6
40368else
40369  if test -n "$ac_ct_STRIP"; then
40370  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40371else
40372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40373for as_dir in $PATH
40374do
40375  IFS=$as_save_IFS
40376  test -z "$as_dir" && as_dir=.
40377    for ac_exec_ext in '' $ac_executable_extensions; do
40378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40379    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40381    break 2
40382  fi
40383done
40384  done
40385IFS=$as_save_IFS
40386
40387fi
40388fi
40389ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40390if test -n "$ac_ct_STRIP"; then
40391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40392$as_echo "$ac_ct_STRIP" >&6; }
40393else
40394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40395$as_echo "no" >&6; }
40396fi
40397
40398
40399  test -n "$ac_ct_STRIP" && break
40400done
40401
40402  if test "x$ac_ct_STRIP" = x; then
40403    STRIP=""
40404  else
40405    case $cross_compiling:$ac_tool_warned in
40406yes:)
40407{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40408$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40409ac_tool_warned=yes ;;
40410esac
40411    STRIP=$ac_ct_STRIP
40412  fi
40413fi
40414
40415  else
40416    # The variable is set, but is it from the command line or the environment?
40417
40418    # Try to remove the string !STRIP! from our list.
40419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40421      # If it failed, the variable was not from the command line. Ignore it,
40422      # but warn the user (except for BASH, which is always set by the calling BASH).
40423      if test "xSTRIP" != xBASH; then
40424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40425$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40426      fi
40427      # Try to locate tool using the code snippet
40428      if test -n "$ac_tool_prefix"; then
40429  for ac_prog in strip
40430  do
40431    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40432set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40434$as_echo_n "checking for $ac_word... " >&6; }
40435if ${ac_cv_prog_STRIP+:} false; then :
40436  $as_echo_n "(cached) " >&6
40437else
40438  if test -n "$STRIP"; then
40439  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40440else
40441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40442for as_dir in $PATH
40443do
40444  IFS=$as_save_IFS
40445  test -z "$as_dir" && as_dir=.
40446    for ac_exec_ext in '' $ac_executable_extensions; do
40447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40448    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40450    break 2
40451  fi
40452done
40453  done
40454IFS=$as_save_IFS
40455
40456fi
40457fi
40458STRIP=$ac_cv_prog_STRIP
40459if test -n "$STRIP"; then
40460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40461$as_echo "$STRIP" >&6; }
40462else
40463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40464$as_echo "no" >&6; }
40465fi
40466
40467
40468    test -n "$STRIP" && break
40469  done
40470fi
40471if test -z "$STRIP"; then
40472  ac_ct_STRIP=$STRIP
40473  for ac_prog in strip
40474do
40475  # Extract the first word of "$ac_prog", so it can be a program name with args.
40476set dummy $ac_prog; ac_word=$2
40477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40478$as_echo_n "checking for $ac_word... " >&6; }
40479if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40480  $as_echo_n "(cached) " >&6
40481else
40482  if test -n "$ac_ct_STRIP"; then
40483  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40484else
40485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40486for as_dir in $PATH
40487do
40488  IFS=$as_save_IFS
40489  test -z "$as_dir" && as_dir=.
40490    for ac_exec_ext in '' $ac_executable_extensions; do
40491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40492    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40494    break 2
40495  fi
40496done
40497  done
40498IFS=$as_save_IFS
40499
40500fi
40501fi
40502ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40503if test -n "$ac_ct_STRIP"; then
40504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40505$as_echo "$ac_ct_STRIP" >&6; }
40506else
40507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40508$as_echo "no" >&6; }
40509fi
40510
40511
40512  test -n "$ac_ct_STRIP" && break
40513done
40514
40515  if test "x$ac_ct_STRIP" = x; then
40516    STRIP=""
40517  else
40518    case $cross_compiling:$ac_tool_warned in
40519yes:)
40520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40522ac_tool_warned=yes ;;
40523esac
40524    STRIP=$ac_ct_STRIP
40525  fi
40526fi
40527
40528    else
40529      # If it succeeded, then it was overridden by the user. We will use it
40530      # for the tool.
40531
40532      # First remove it from the list of overridden variables, so we can test
40533      # for unknown variables in the end.
40534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40535
40536      # Check if we try to supply an empty value
40537      if test "x$STRIP" = x; then
40538        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40539$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40541$as_echo_n "checking for STRIP... " >&6; }
40542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40543$as_echo "disabled" >&6; }
40544      else
40545        # Check if the provided tool contains a complete path.
40546        tool_specified="$STRIP"
40547        tool_basename="${tool_specified##*/}"
40548        if test "x$tool_basename" = "x$tool_specified"; then
40549          # A command without a complete path is provided, search $PATH.
40550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40551$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40552          # Extract the first word of "$tool_basename", so it can be a program name with args.
40553set dummy $tool_basename; ac_word=$2
40554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40555$as_echo_n "checking for $ac_word... " >&6; }
40556if ${ac_cv_path_STRIP+:} false; then :
40557  $as_echo_n "(cached) " >&6
40558else
40559  case $STRIP in
40560  [\\/]* | ?:[\\/]*)
40561  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40562  ;;
40563  *)
40564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40565for as_dir in $PATH
40566do
40567  IFS=$as_save_IFS
40568  test -z "$as_dir" && as_dir=.
40569    for ac_exec_ext in '' $ac_executable_extensions; do
40570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40571    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40573    break 2
40574  fi
40575done
40576  done
40577IFS=$as_save_IFS
40578
40579  ;;
40580esac
40581fi
40582STRIP=$ac_cv_path_STRIP
40583if test -n "$STRIP"; then
40584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40585$as_echo "$STRIP" >&6; }
40586else
40587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40588$as_echo "no" >&6; }
40589fi
40590
40591
40592          if test "x$STRIP" = x; then
40593            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40594          fi
40595        else
40596          # Otherwise we believe it is a complete path. Use it as it is.
40597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40598$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40599          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40600$as_echo_n "checking for STRIP... " >&6; }
40601          if test ! -x "$tool_specified"; then
40602            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40603$as_echo "not found" >&6; }
40604            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40605          fi
40606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40607$as_echo "$tool_specified" >&6; }
40608        fi
40609      fi
40610    fi
40611
40612  fi
40613
40614
40615
40616  # Only process if variable expands to non-empty
40617
40618  if test "x$STRIP" != x; then
40619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40620
40621  # First separate the path from the arguments. This will split at the first
40622  # space.
40623  complete="$STRIP"
40624  path="${complete%% *}"
40625  tmp="$complete EOL"
40626  arguments="${tmp#* }"
40627
40628  # Input might be given as Windows format, start by converting to
40629  # unix format.
40630  new_path=`$CYGPATH -u "$path"`
40631
40632  # Now try to locate executable using which
40633  new_path=`$WHICH "$new_path" 2> /dev/null`
40634  # bat and cmd files are not always considered executable in cygwin causing which
40635  # to not find them
40636  if test "x$new_path" = x \
40637      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40638      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40639    new_path=`$CYGPATH -u "$path"`
40640  fi
40641  if test "x$new_path" = x; then
40642    # Oops. Which didn't find the executable.
40643    # The splitting of arguments from the executable at a space might have been incorrect,
40644    # since paths with space are more likely in Windows. Give it another try with the whole
40645    # argument.
40646    path="$complete"
40647    arguments="EOL"
40648    new_path=`$CYGPATH -u "$path"`
40649    new_path=`$WHICH "$new_path" 2> /dev/null`
40650    # bat and cmd files are not always considered executable in cygwin causing which
40651    # to not find them
40652    if test "x$new_path" = x \
40653        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40654        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40655      new_path=`$CYGPATH -u "$path"`
40656    fi
40657    if test "x$new_path" = x; then
40658      # It's still not found. Now this is an unrecoverable error.
40659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40660$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40661      has_space=`$ECHO "$complete" | $GREP " "`
40662      if test "x$has_space" != x; then
40663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40665      fi
40666      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40667    fi
40668  fi
40669
40670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40673  # "foo.exe" is OK but "foo" is an error.
40674  #
40675  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40676  # It is also a way to make sure we got the proper file name for the real test later on.
40677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40678  if test "x$test_shortpath" = x; then
40679    # Short path failed, file does not exist as specified.
40680    # Try adding .exe or .cmd
40681    if test -f "${new_path}.exe"; then
40682      input_to_shortpath="${new_path}.exe"
40683    elif test -f "${new_path}.cmd"; then
40684      input_to_shortpath="${new_path}.cmd"
40685    else
40686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40687$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40688      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40689$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40690      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40691    fi
40692  else
40693    input_to_shortpath="$new_path"
40694  fi
40695
40696  # Call helper function which possibly converts this using DOS-style short mode.
40697  # If so, the updated path is stored in $new_path.
40698  new_path="$input_to_shortpath"
40699
40700  input_path="$input_to_shortpath"
40701  # Check if we need to convert this using DOS-style short mode. If the path
40702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40703  # take no chances and rewrite it.
40704  # Note: m4 eats our [], so we need to use [ and ] instead.
40705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40706  if test "x$has_forbidden_chars" != x; then
40707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40711      # Going to short mode and back again did indeed matter. Since short mode is
40712      # case insensitive, let's make it lowercase to improve readability.
40713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40714      # Now convert it back to Unix-style (cygpath)
40715      input_path=`$CYGPATH -u "$shortmode_path"`
40716      new_path="$input_path"
40717    fi
40718  fi
40719
40720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40721  if test "x$test_cygdrive_prefix" = x; then
40722    # As a simple fix, exclude /usr/bin since it's not a real path.
40723    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40725      # a path prefixed by /cygdrive for fixpath to work.
40726      new_path="$CYGWIN_ROOT_PATH$input_path"
40727    fi
40728  fi
40729
40730  # remove trailing .exe if any
40731  new_path="${new_path/%.exe/}"
40732
40733    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40734
40735  # First separate the path from the arguments. This will split at the first
40736  # space.
40737  complete="$STRIP"
40738  path="${complete%% *}"
40739  tmp="$complete EOL"
40740  arguments="${tmp#* }"
40741
40742  # Input might be given as Windows format, start by converting to
40743  # unix format.
40744  new_path="$path"
40745
40746  windows_path="$new_path"
40747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40748    unix_path=`$CYGPATH -u "$windows_path"`
40749    new_path="$unix_path"
40750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40752    new_path="$unix_path"
40753  fi
40754
40755
40756  # Now try to locate executable using which
40757  new_path=`$WHICH "$new_path" 2> /dev/null`
40758
40759  if test "x$new_path" = x; then
40760    # Oops. Which didn't find the executable.
40761    # The splitting of arguments from the executable at a space might have been incorrect,
40762    # since paths with space are more likely in Windows. Give it another try with the whole
40763    # argument.
40764    path="$complete"
40765    arguments="EOL"
40766    new_path="$path"
40767
40768  windows_path="$new_path"
40769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40770    unix_path=`$CYGPATH -u "$windows_path"`
40771    new_path="$unix_path"
40772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40774    new_path="$unix_path"
40775  fi
40776
40777
40778    new_path=`$WHICH "$new_path" 2> /dev/null`
40779    # bat and cmd files are not always considered executable in MSYS causing which
40780    # to not find them
40781    if test "x$new_path" = x \
40782        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40783        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40784      new_path="$path"
40785
40786  windows_path="$new_path"
40787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40788    unix_path=`$CYGPATH -u "$windows_path"`
40789    new_path="$unix_path"
40790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40792    new_path="$unix_path"
40793  fi
40794
40795    fi
40796
40797    if test "x$new_path" = x; then
40798      # It's still not found. Now this is an unrecoverable error.
40799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40800$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40801      has_space=`$ECHO "$complete" | $GREP " "`
40802      if test "x$has_space" != x; then
40803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40805      fi
40806      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40807    fi
40808  fi
40809
40810  # Now new_path has a complete unix path to the binary
40811  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40812    # Keep paths in /bin as-is, but remove trailing .exe if any
40813    new_path="${new_path/%.exe/}"
40814    # Do not save /bin paths to all_fixpath_prefixes!
40815  else
40816    # Not in mixed or Windows style, start by that.
40817    new_path=`cmd //c echo $new_path`
40818
40819  input_path="$new_path"
40820  # Check if we need to convert this using DOS-style short mode. If the path
40821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40822  # take no chances and rewrite it.
40823  # Note: m4 eats our [], so we need to use [ and ] instead.
40824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40825  if test "x$has_forbidden_chars" != x; then
40826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40828  fi
40829
40830    # Output is in $new_path
40831
40832  windows_path="$new_path"
40833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40834    unix_path=`$CYGPATH -u "$windows_path"`
40835    new_path="$unix_path"
40836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40838    new_path="$unix_path"
40839  fi
40840
40841    # remove trailing .exe if any
40842    new_path="${new_path/%.exe/}"
40843
40844    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40845    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40846  fi
40847
40848    else
40849      # We're on a unix platform. Hooray! :)
40850      # First separate the path from the arguments. This will split at the first
40851      # space.
40852      complete="$STRIP"
40853      path="${complete%% *}"
40854      tmp="$complete EOL"
40855      arguments="${tmp#* }"
40856
40857      # Cannot rely on the command "which" here since it doesn't always work.
40858      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40859      if test -z "$is_absolute_path"; then
40860        # Path to executable is not absolute. Find it.
40861        IFS_save="$IFS"
40862        IFS=:
40863        for p in $PATH; do
40864          if test -f "$p/$path" && test -x "$p/$path"; then
40865            new_path="$p/$path"
40866            break
40867          fi
40868        done
40869        IFS="$IFS_save"
40870      else
40871        # This is an absolute path, we can use it without further modifications.
40872        new_path="$path"
40873      fi
40874
40875      if test "x$new_path" = x; then
40876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40877$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40878        has_space=`$ECHO "$complete" | $GREP " "`
40879        if test "x$has_space" != x; then
40880          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40881$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40882        fi
40883        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40884      fi
40885    fi
40886
40887    # Now join together the path and the arguments once again
40888    if test "x$arguments" != xEOL; then
40889      new_complete="$new_path ${arguments% *}"
40890    else
40891      new_complete="$new_path"
40892    fi
40893
40894    if test "x$complete" != "x$new_complete"; then
40895      STRIP="$new_complete"
40896      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40897$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40898    fi
40899  fi
40900
40901    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40902
40903
40904  # Publish this variable in the help.
40905
40906
40907  if [ -z "${NM+x}" ]; then
40908    # The variable is not set by user, try to locate tool using the code snippet
40909    if test -n "$ac_tool_prefix"; then
40910  for ac_prog in nm gcc-nm
40911  do
40912    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40913set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40915$as_echo_n "checking for $ac_word... " >&6; }
40916if ${ac_cv_prog_NM+:} false; then :
40917  $as_echo_n "(cached) " >&6
40918else
40919  if test -n "$NM"; then
40920  ac_cv_prog_NM="$NM" # Let the user override the test.
40921else
40922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40923for as_dir in $PATH
40924do
40925  IFS=$as_save_IFS
40926  test -z "$as_dir" && as_dir=.
40927    for ac_exec_ext in '' $ac_executable_extensions; do
40928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40929    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40931    break 2
40932  fi
40933done
40934  done
40935IFS=$as_save_IFS
40936
40937fi
40938fi
40939NM=$ac_cv_prog_NM
40940if test -n "$NM"; then
40941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40942$as_echo "$NM" >&6; }
40943else
40944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40945$as_echo "no" >&6; }
40946fi
40947
40948
40949    test -n "$NM" && break
40950  done
40951fi
40952if test -z "$NM"; then
40953  ac_ct_NM=$NM
40954  for ac_prog in nm gcc-nm
40955do
40956  # Extract the first word of "$ac_prog", so it can be a program name with args.
40957set dummy $ac_prog; ac_word=$2
40958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40959$as_echo_n "checking for $ac_word... " >&6; }
40960if ${ac_cv_prog_ac_ct_NM+:} false; then :
40961  $as_echo_n "(cached) " >&6
40962else
40963  if test -n "$ac_ct_NM"; then
40964  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40965else
40966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40967for as_dir in $PATH
40968do
40969  IFS=$as_save_IFS
40970  test -z "$as_dir" && as_dir=.
40971    for ac_exec_ext in '' $ac_executable_extensions; do
40972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40973    ac_cv_prog_ac_ct_NM="$ac_prog"
40974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40975    break 2
40976  fi
40977done
40978  done
40979IFS=$as_save_IFS
40980
40981fi
40982fi
40983ac_ct_NM=$ac_cv_prog_ac_ct_NM
40984if test -n "$ac_ct_NM"; then
40985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40986$as_echo "$ac_ct_NM" >&6; }
40987else
40988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40989$as_echo "no" >&6; }
40990fi
40991
40992
40993  test -n "$ac_ct_NM" && break
40994done
40995
40996  if test "x$ac_ct_NM" = x; then
40997    NM=""
40998  else
40999    case $cross_compiling:$ac_tool_warned in
41000yes:)
41001{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41002$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41003ac_tool_warned=yes ;;
41004esac
41005    NM=$ac_ct_NM
41006  fi
41007fi
41008
41009  else
41010    # The variable is set, but is it from the command line or the environment?
41011
41012    # Try to remove the string !NM! from our list.
41013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41015      # If it failed, the variable was not from the command line. Ignore it,
41016      # but warn the user (except for BASH, which is always set by the calling BASH).
41017      if test "xNM" != xBASH; then
41018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41019$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41020      fi
41021      # Try to locate tool using the code snippet
41022      if test -n "$ac_tool_prefix"; then
41023  for ac_prog in nm gcc-nm
41024  do
41025    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41026set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41028$as_echo_n "checking for $ac_word... " >&6; }
41029if ${ac_cv_prog_NM+:} false; then :
41030  $as_echo_n "(cached) " >&6
41031else
41032  if test -n "$NM"; then
41033  ac_cv_prog_NM="$NM" # Let the user override the test.
41034else
41035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41036for as_dir in $PATH
41037do
41038  IFS=$as_save_IFS
41039  test -z "$as_dir" && as_dir=.
41040    for ac_exec_ext in '' $ac_executable_extensions; do
41041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41042    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41044    break 2
41045  fi
41046done
41047  done
41048IFS=$as_save_IFS
41049
41050fi
41051fi
41052NM=$ac_cv_prog_NM
41053if test -n "$NM"; then
41054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41055$as_echo "$NM" >&6; }
41056else
41057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41058$as_echo "no" >&6; }
41059fi
41060
41061
41062    test -n "$NM" && break
41063  done
41064fi
41065if test -z "$NM"; then
41066  ac_ct_NM=$NM
41067  for ac_prog in nm gcc-nm
41068do
41069  # Extract the first word of "$ac_prog", so it can be a program name with args.
41070set dummy $ac_prog; ac_word=$2
41071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41072$as_echo_n "checking for $ac_word... " >&6; }
41073if ${ac_cv_prog_ac_ct_NM+:} false; then :
41074  $as_echo_n "(cached) " >&6
41075else
41076  if test -n "$ac_ct_NM"; then
41077  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41078else
41079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41080for as_dir in $PATH
41081do
41082  IFS=$as_save_IFS
41083  test -z "$as_dir" && as_dir=.
41084    for ac_exec_ext in '' $ac_executable_extensions; do
41085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41086    ac_cv_prog_ac_ct_NM="$ac_prog"
41087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41088    break 2
41089  fi
41090done
41091  done
41092IFS=$as_save_IFS
41093
41094fi
41095fi
41096ac_ct_NM=$ac_cv_prog_ac_ct_NM
41097if test -n "$ac_ct_NM"; then
41098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41099$as_echo "$ac_ct_NM" >&6; }
41100else
41101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41102$as_echo "no" >&6; }
41103fi
41104
41105
41106  test -n "$ac_ct_NM" && break
41107done
41108
41109  if test "x$ac_ct_NM" = x; then
41110    NM=""
41111  else
41112    case $cross_compiling:$ac_tool_warned in
41113yes:)
41114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41116ac_tool_warned=yes ;;
41117esac
41118    NM=$ac_ct_NM
41119  fi
41120fi
41121
41122    else
41123      # If it succeeded, then it was overridden by the user. We will use it
41124      # for the tool.
41125
41126      # First remove it from the list of overridden variables, so we can test
41127      # for unknown variables in the end.
41128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41129
41130      # Check if we try to supply an empty value
41131      if test "x$NM" = x; then
41132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41133$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41135$as_echo_n "checking for NM... " >&6; }
41136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41137$as_echo "disabled" >&6; }
41138      else
41139        # Check if the provided tool contains a complete path.
41140        tool_specified="$NM"
41141        tool_basename="${tool_specified##*/}"
41142        if test "x$tool_basename" = "x$tool_specified"; then
41143          # A command without a complete path is provided, search $PATH.
41144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41145$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41146          # Extract the first word of "$tool_basename", so it can be a program name with args.
41147set dummy $tool_basename; ac_word=$2
41148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41149$as_echo_n "checking for $ac_word... " >&6; }
41150if ${ac_cv_path_NM+:} false; then :
41151  $as_echo_n "(cached) " >&6
41152else
41153  case $NM in
41154  [\\/]* | ?:[\\/]*)
41155  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41156  ;;
41157  *)
41158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41159for as_dir in $PATH
41160do
41161  IFS=$as_save_IFS
41162  test -z "$as_dir" && as_dir=.
41163    for ac_exec_ext in '' $ac_executable_extensions; do
41164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41165    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41167    break 2
41168  fi
41169done
41170  done
41171IFS=$as_save_IFS
41172
41173  ;;
41174esac
41175fi
41176NM=$ac_cv_path_NM
41177if test -n "$NM"; then
41178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41179$as_echo "$NM" >&6; }
41180else
41181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41182$as_echo "no" >&6; }
41183fi
41184
41185
41186          if test "x$NM" = x; then
41187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41188          fi
41189        else
41190          # Otherwise we believe it is a complete path. Use it as it is.
41191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41192$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41194$as_echo_n "checking for NM... " >&6; }
41195          if test ! -x "$tool_specified"; then
41196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41197$as_echo "not found" >&6; }
41198            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41199          fi
41200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41201$as_echo "$tool_specified" >&6; }
41202        fi
41203      fi
41204    fi
41205
41206  fi
41207
41208
41209    else
41210
41211
41212  # Publish this variable in the help.
41213
41214
41215  if [ -z "${NM+x}" ]; then
41216    # The variable is not set by user, try to locate tool using the code snippet
41217    if test -n "$ac_tool_prefix"; then
41218  for ac_prog in nm
41219  do
41220    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41221set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41223$as_echo_n "checking for $ac_word... " >&6; }
41224if ${ac_cv_prog_NM+:} false; then :
41225  $as_echo_n "(cached) " >&6
41226else
41227  if test -n "$NM"; then
41228  ac_cv_prog_NM="$NM" # Let the user override the test.
41229else
41230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41231for as_dir in $PATH
41232do
41233  IFS=$as_save_IFS
41234  test -z "$as_dir" && as_dir=.
41235    for ac_exec_ext in '' $ac_executable_extensions; do
41236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41237    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41239    break 2
41240  fi
41241done
41242  done
41243IFS=$as_save_IFS
41244
41245fi
41246fi
41247NM=$ac_cv_prog_NM
41248if test -n "$NM"; then
41249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41250$as_echo "$NM" >&6; }
41251else
41252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41253$as_echo "no" >&6; }
41254fi
41255
41256
41257    test -n "$NM" && break
41258  done
41259fi
41260if test -z "$NM"; then
41261  ac_ct_NM=$NM
41262  for ac_prog in nm
41263do
41264  # Extract the first word of "$ac_prog", so it can be a program name with args.
41265set dummy $ac_prog; 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_prog_ac_ct_NM+:} false; then :
41269  $as_echo_n "(cached) " >&6
41270else
41271  if test -n "$ac_ct_NM"; then
41272  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41273else
41274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41275for as_dir in $PATH
41276do
41277  IFS=$as_save_IFS
41278  test -z "$as_dir" && as_dir=.
41279    for ac_exec_ext in '' $ac_executable_extensions; do
41280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41281    ac_cv_prog_ac_ct_NM="$ac_prog"
41282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41283    break 2
41284  fi
41285done
41286  done
41287IFS=$as_save_IFS
41288
41289fi
41290fi
41291ac_ct_NM=$ac_cv_prog_ac_ct_NM
41292if test -n "$ac_ct_NM"; then
41293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41294$as_echo "$ac_ct_NM" >&6; }
41295else
41296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41297$as_echo "no" >&6; }
41298fi
41299
41300
41301  test -n "$ac_ct_NM" && break
41302done
41303
41304  if test "x$ac_ct_NM" = x; then
41305    NM=""
41306  else
41307    case $cross_compiling:$ac_tool_warned in
41308yes:)
41309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41311ac_tool_warned=yes ;;
41312esac
41313    NM=$ac_ct_NM
41314  fi
41315fi
41316
41317  else
41318    # The variable is set, but is it from the command line or the environment?
41319
41320    # Try to remove the string !NM! from our list.
41321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41323      # If it failed, the variable was not from the command line. Ignore it,
41324      # but warn the user (except for BASH, which is always set by the calling BASH).
41325      if test "xNM" != xBASH; then
41326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41327$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41328      fi
41329      # Try to locate tool using the code snippet
41330      if test -n "$ac_tool_prefix"; then
41331  for ac_prog in nm
41332  do
41333    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41334set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41336$as_echo_n "checking for $ac_word... " >&6; }
41337if ${ac_cv_prog_NM+:} false; then :
41338  $as_echo_n "(cached) " >&6
41339else
41340  if test -n "$NM"; then
41341  ac_cv_prog_NM="$NM" # Let the user override the test.
41342else
41343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41344for as_dir in $PATH
41345do
41346  IFS=$as_save_IFS
41347  test -z "$as_dir" && as_dir=.
41348    for ac_exec_ext in '' $ac_executable_extensions; do
41349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41350    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41352    break 2
41353  fi
41354done
41355  done
41356IFS=$as_save_IFS
41357
41358fi
41359fi
41360NM=$ac_cv_prog_NM
41361if test -n "$NM"; then
41362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41363$as_echo "$NM" >&6; }
41364else
41365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41366$as_echo "no" >&6; }
41367fi
41368
41369
41370    test -n "$NM" && break
41371  done
41372fi
41373if test -z "$NM"; then
41374  ac_ct_NM=$NM
41375  for ac_prog in nm
41376do
41377  # Extract the first word of "$ac_prog", so it can be a program name with args.
41378set dummy $ac_prog; ac_word=$2
41379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41380$as_echo_n "checking for $ac_word... " >&6; }
41381if ${ac_cv_prog_ac_ct_NM+:} false; then :
41382  $as_echo_n "(cached) " >&6
41383else
41384  if test -n "$ac_ct_NM"; then
41385  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41386else
41387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41388for as_dir in $PATH
41389do
41390  IFS=$as_save_IFS
41391  test -z "$as_dir" && as_dir=.
41392    for ac_exec_ext in '' $ac_executable_extensions; do
41393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41394    ac_cv_prog_ac_ct_NM="$ac_prog"
41395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41396    break 2
41397  fi
41398done
41399  done
41400IFS=$as_save_IFS
41401
41402fi
41403fi
41404ac_ct_NM=$ac_cv_prog_ac_ct_NM
41405if test -n "$ac_ct_NM"; then
41406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41407$as_echo "$ac_ct_NM" >&6; }
41408else
41409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41410$as_echo "no" >&6; }
41411fi
41412
41413
41414  test -n "$ac_ct_NM" && break
41415done
41416
41417  if test "x$ac_ct_NM" = x; then
41418    NM=""
41419  else
41420    case $cross_compiling:$ac_tool_warned in
41421yes:)
41422{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41423$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41424ac_tool_warned=yes ;;
41425esac
41426    NM=$ac_ct_NM
41427  fi
41428fi
41429
41430    else
41431      # If it succeeded, then it was overridden by the user. We will use it
41432      # for the tool.
41433
41434      # First remove it from the list of overridden variables, so we can test
41435      # for unknown variables in the end.
41436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41437
41438      # Check if we try to supply an empty value
41439      if test "x$NM" = x; then
41440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41441$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41443$as_echo_n "checking for NM... " >&6; }
41444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41445$as_echo "disabled" >&6; }
41446      else
41447        # Check if the provided tool contains a complete path.
41448        tool_specified="$NM"
41449        tool_basename="${tool_specified##*/}"
41450        if test "x$tool_basename" = "x$tool_specified"; then
41451          # A command without a complete path is provided, search $PATH.
41452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41453$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41454          # Extract the first word of "$tool_basename", so it can be a program name with args.
41455set dummy $tool_basename; ac_word=$2
41456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41457$as_echo_n "checking for $ac_word... " >&6; }
41458if ${ac_cv_path_NM+:} false; then :
41459  $as_echo_n "(cached) " >&6
41460else
41461  case $NM in
41462  [\\/]* | ?:[\\/]*)
41463  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41464  ;;
41465  *)
41466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41467for as_dir in $PATH
41468do
41469  IFS=$as_save_IFS
41470  test -z "$as_dir" && as_dir=.
41471    for ac_exec_ext in '' $ac_executable_extensions; do
41472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41473    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41475    break 2
41476  fi
41477done
41478  done
41479IFS=$as_save_IFS
41480
41481  ;;
41482esac
41483fi
41484NM=$ac_cv_path_NM
41485if test -n "$NM"; then
41486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41487$as_echo "$NM" >&6; }
41488else
41489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41490$as_echo "no" >&6; }
41491fi
41492
41493
41494          if test "x$NM" = x; then
41495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41496          fi
41497        else
41498          # Otherwise we believe it is a complete path. Use it as it is.
41499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41500$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41502$as_echo_n "checking for NM... " >&6; }
41503          if test ! -x "$tool_specified"; then
41504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41505$as_echo "not found" >&6; }
41506            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41507          fi
41508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41509$as_echo "$tool_specified" >&6; }
41510        fi
41511      fi
41512    fi
41513
41514  fi
41515
41516
41517    fi
41518
41519  # Only process if variable expands to non-empty
41520
41521  if test "x$NM" != x; then
41522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41523
41524  # First separate the path from the arguments. This will split at the first
41525  # space.
41526  complete="$NM"
41527  path="${complete%% *}"
41528  tmp="$complete EOL"
41529  arguments="${tmp#* }"
41530
41531  # Input might be given as Windows format, start by converting to
41532  # unix format.
41533  new_path=`$CYGPATH -u "$path"`
41534
41535  # Now try to locate executable using which
41536  new_path=`$WHICH "$new_path" 2> /dev/null`
41537  # bat and cmd files are not always considered executable in cygwin causing which
41538  # to not find them
41539  if test "x$new_path" = x \
41540      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41541      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41542    new_path=`$CYGPATH -u "$path"`
41543  fi
41544  if test "x$new_path" = x; then
41545    # Oops. Which didn't find the executable.
41546    # The splitting of arguments from the executable at a space might have been incorrect,
41547    # since paths with space are more likely in Windows. Give it another try with the whole
41548    # argument.
41549    path="$complete"
41550    arguments="EOL"
41551    new_path=`$CYGPATH -u "$path"`
41552    new_path=`$WHICH "$new_path" 2> /dev/null`
41553    # bat and cmd files are not always considered executable in cygwin causing which
41554    # to not find them
41555    if test "x$new_path" = x \
41556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41558      new_path=`$CYGPATH -u "$path"`
41559    fi
41560    if test "x$new_path" = x; then
41561      # It's still not found. Now this is an unrecoverable error.
41562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41563$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41564      has_space=`$ECHO "$complete" | $GREP " "`
41565      if test "x$has_space" != x; then
41566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41568      fi
41569      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41570    fi
41571  fi
41572
41573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41576  # "foo.exe" is OK but "foo" is an error.
41577  #
41578  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41579  # It is also a way to make sure we got the proper file name for the real test later on.
41580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41581  if test "x$test_shortpath" = x; then
41582    # Short path failed, file does not exist as specified.
41583    # Try adding .exe or .cmd
41584    if test -f "${new_path}.exe"; then
41585      input_to_shortpath="${new_path}.exe"
41586    elif test -f "${new_path}.cmd"; then
41587      input_to_shortpath="${new_path}.cmd"
41588    else
41589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41590$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41593      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41594    fi
41595  else
41596    input_to_shortpath="$new_path"
41597  fi
41598
41599  # Call helper function which possibly converts this using DOS-style short mode.
41600  # If so, the updated path is stored in $new_path.
41601  new_path="$input_to_shortpath"
41602
41603  input_path="$input_to_shortpath"
41604  # Check if we need to convert this using DOS-style short mode. If the path
41605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41606  # take no chances and rewrite it.
41607  # Note: m4 eats our [], so we need to use [ and ] instead.
41608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41609  if test "x$has_forbidden_chars" != x; then
41610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41614      # Going to short mode and back again did indeed matter. Since short mode is
41615      # case insensitive, let's make it lowercase to improve readability.
41616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41617      # Now convert it back to Unix-style (cygpath)
41618      input_path=`$CYGPATH -u "$shortmode_path"`
41619      new_path="$input_path"
41620    fi
41621  fi
41622
41623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41624  if test "x$test_cygdrive_prefix" = x; then
41625    # As a simple fix, exclude /usr/bin since it's not a real path.
41626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41628      # a path prefixed by /cygdrive for fixpath to work.
41629      new_path="$CYGWIN_ROOT_PATH$input_path"
41630    fi
41631  fi
41632
41633  # remove trailing .exe if any
41634  new_path="${new_path/%.exe/}"
41635
41636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41637
41638  # First separate the path from the arguments. This will split at the first
41639  # space.
41640  complete="$NM"
41641  path="${complete%% *}"
41642  tmp="$complete EOL"
41643  arguments="${tmp#* }"
41644
41645  # Input might be given as Windows format, start by converting to
41646  # unix format.
41647  new_path="$path"
41648
41649  windows_path="$new_path"
41650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41651    unix_path=`$CYGPATH -u "$windows_path"`
41652    new_path="$unix_path"
41653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41655    new_path="$unix_path"
41656  fi
41657
41658
41659  # Now try to locate executable using which
41660  new_path=`$WHICH "$new_path" 2> /dev/null`
41661
41662  if test "x$new_path" = x; then
41663    # Oops. Which didn't find the executable.
41664    # The splitting of arguments from the executable at a space might have been incorrect,
41665    # since paths with space are more likely in Windows. Give it another try with the whole
41666    # argument.
41667    path="$complete"
41668    arguments="EOL"
41669    new_path="$path"
41670
41671  windows_path="$new_path"
41672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41673    unix_path=`$CYGPATH -u "$windows_path"`
41674    new_path="$unix_path"
41675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41677    new_path="$unix_path"
41678  fi
41679
41680
41681    new_path=`$WHICH "$new_path" 2> /dev/null`
41682    # bat and cmd files are not always considered executable in MSYS causing which
41683    # to not find them
41684    if test "x$new_path" = x \
41685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41687      new_path="$path"
41688
41689  windows_path="$new_path"
41690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41691    unix_path=`$CYGPATH -u "$windows_path"`
41692    new_path="$unix_path"
41693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41695    new_path="$unix_path"
41696  fi
41697
41698    fi
41699
41700    if test "x$new_path" = x; then
41701      # It's still not found. Now this is an unrecoverable error.
41702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41703$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41704      has_space=`$ECHO "$complete" | $GREP " "`
41705      if test "x$has_space" != x; then
41706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41708      fi
41709      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41710    fi
41711  fi
41712
41713  # Now new_path has a complete unix path to the binary
41714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41715    # Keep paths in /bin as-is, but remove trailing .exe if any
41716    new_path="${new_path/%.exe/}"
41717    # Do not save /bin paths to all_fixpath_prefixes!
41718  else
41719    # Not in mixed or Windows style, start by that.
41720    new_path=`cmd //c echo $new_path`
41721
41722  input_path="$new_path"
41723  # Check if we need to convert this using DOS-style short mode. If the path
41724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41725  # take no chances and rewrite it.
41726  # Note: m4 eats our [], so we need to use [ and ] instead.
41727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41728  if test "x$has_forbidden_chars" != x; then
41729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41731  fi
41732
41733    # Output is in $new_path
41734
41735  windows_path="$new_path"
41736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41737    unix_path=`$CYGPATH -u "$windows_path"`
41738    new_path="$unix_path"
41739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41741    new_path="$unix_path"
41742  fi
41743
41744    # remove trailing .exe if any
41745    new_path="${new_path/%.exe/}"
41746
41747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41749  fi
41750
41751    else
41752      # We're on a unix platform. Hooray! :)
41753      # First separate the path from the arguments. This will split at the first
41754      # space.
41755      complete="$NM"
41756      path="${complete%% *}"
41757      tmp="$complete EOL"
41758      arguments="${tmp#* }"
41759
41760      # Cannot rely on the command "which" here since it doesn't always work.
41761      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41762      if test -z "$is_absolute_path"; then
41763        # Path to executable is not absolute. Find it.
41764        IFS_save="$IFS"
41765        IFS=:
41766        for p in $PATH; do
41767          if test -f "$p/$path" && test -x "$p/$path"; then
41768            new_path="$p/$path"
41769            break
41770          fi
41771        done
41772        IFS="$IFS_save"
41773      else
41774        # This is an absolute path, we can use it without further modifications.
41775        new_path="$path"
41776      fi
41777
41778      if test "x$new_path" = x; then
41779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41780$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41781        has_space=`$ECHO "$complete" | $GREP " "`
41782        if test "x$has_space" != x; then
41783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41785        fi
41786        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41787      fi
41788    fi
41789
41790    # Now join together the path and the arguments once again
41791    if test "x$arguments" != xEOL; then
41792      new_complete="$new_path ${arguments% *}"
41793    else
41794      new_complete="$new_path"
41795    fi
41796
41797    if test "x$complete" != "x$new_complete"; then
41798      NM="$new_complete"
41799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41800$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41801    fi
41802  fi
41803
41804    GNM="$NM"
41805
41806  fi
41807
41808  # objcopy is used for moving debug symbols to separate files when
41809  # full debug symbols are enabled.
41810  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41811
41812
41813  # Publish this variable in the help.
41814
41815
41816  if [ -z "${OBJCOPY+x}" ]; then
41817    # The variable is not set by user, try to locate tool using the code snippet
41818    if test -n "$ac_tool_prefix"; then
41819  for ac_prog in gobjcopy objcopy
41820  do
41821    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41822set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41824$as_echo_n "checking for $ac_word... " >&6; }
41825if ${ac_cv_prog_OBJCOPY+:} false; then :
41826  $as_echo_n "(cached) " >&6
41827else
41828  if test -n "$OBJCOPY"; then
41829  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41830else
41831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41832for as_dir in $PATH
41833do
41834  IFS=$as_save_IFS
41835  test -z "$as_dir" && as_dir=.
41836    for ac_exec_ext in '' $ac_executable_extensions; do
41837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41838    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41840    break 2
41841  fi
41842done
41843  done
41844IFS=$as_save_IFS
41845
41846fi
41847fi
41848OBJCOPY=$ac_cv_prog_OBJCOPY
41849if test -n "$OBJCOPY"; then
41850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41851$as_echo "$OBJCOPY" >&6; }
41852else
41853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41854$as_echo "no" >&6; }
41855fi
41856
41857
41858    test -n "$OBJCOPY" && break
41859  done
41860fi
41861if test -z "$OBJCOPY"; then
41862  ac_ct_OBJCOPY=$OBJCOPY
41863  for ac_prog in gobjcopy objcopy
41864do
41865  # Extract the first word of "$ac_prog", so it can be a program name with args.
41866set dummy $ac_prog; ac_word=$2
41867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41868$as_echo_n "checking for $ac_word... " >&6; }
41869if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41870  $as_echo_n "(cached) " >&6
41871else
41872  if test -n "$ac_ct_OBJCOPY"; then
41873  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41874else
41875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41876for as_dir in $PATH
41877do
41878  IFS=$as_save_IFS
41879  test -z "$as_dir" && as_dir=.
41880    for ac_exec_ext in '' $ac_executable_extensions; do
41881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41882    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41884    break 2
41885  fi
41886done
41887  done
41888IFS=$as_save_IFS
41889
41890fi
41891fi
41892ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41893if test -n "$ac_ct_OBJCOPY"; then
41894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41895$as_echo "$ac_ct_OBJCOPY" >&6; }
41896else
41897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41898$as_echo "no" >&6; }
41899fi
41900
41901
41902  test -n "$ac_ct_OBJCOPY" && break
41903done
41904
41905  if test "x$ac_ct_OBJCOPY" = x; then
41906    OBJCOPY=""
41907  else
41908    case $cross_compiling:$ac_tool_warned in
41909yes:)
41910{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41911$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41912ac_tool_warned=yes ;;
41913esac
41914    OBJCOPY=$ac_ct_OBJCOPY
41915  fi
41916fi
41917
41918  else
41919    # The variable is set, but is it from the command line or the environment?
41920
41921    # Try to remove the string !OBJCOPY! from our list.
41922    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41923    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41924      # If it failed, the variable was not from the command line. Ignore it,
41925      # but warn the user (except for BASH, which is always set by the calling BASH).
41926      if test "xOBJCOPY" != xBASH; then
41927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41928$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41929      fi
41930      # Try to locate tool using the code snippet
41931      if test -n "$ac_tool_prefix"; then
41932  for ac_prog in gobjcopy objcopy
41933  do
41934    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41935set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41937$as_echo_n "checking for $ac_word... " >&6; }
41938if ${ac_cv_prog_OBJCOPY+:} false; then :
41939  $as_echo_n "(cached) " >&6
41940else
41941  if test -n "$OBJCOPY"; then
41942  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41943else
41944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41945for as_dir in $PATH
41946do
41947  IFS=$as_save_IFS
41948  test -z "$as_dir" && as_dir=.
41949    for ac_exec_ext in '' $ac_executable_extensions; do
41950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41951    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41953    break 2
41954  fi
41955done
41956  done
41957IFS=$as_save_IFS
41958
41959fi
41960fi
41961OBJCOPY=$ac_cv_prog_OBJCOPY
41962if test -n "$OBJCOPY"; then
41963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41964$as_echo "$OBJCOPY" >&6; }
41965else
41966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41967$as_echo "no" >&6; }
41968fi
41969
41970
41971    test -n "$OBJCOPY" && break
41972  done
41973fi
41974if test -z "$OBJCOPY"; then
41975  ac_ct_OBJCOPY=$OBJCOPY
41976  for ac_prog in gobjcopy objcopy
41977do
41978  # Extract the first word of "$ac_prog", so it can be a program name with args.
41979set dummy $ac_prog; ac_word=$2
41980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41981$as_echo_n "checking for $ac_word... " >&6; }
41982if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41983  $as_echo_n "(cached) " >&6
41984else
41985  if test -n "$ac_ct_OBJCOPY"; then
41986  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41987else
41988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41989for as_dir in $PATH
41990do
41991  IFS=$as_save_IFS
41992  test -z "$as_dir" && as_dir=.
41993    for ac_exec_ext in '' $ac_executable_extensions; do
41994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41995    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41997    break 2
41998  fi
41999done
42000  done
42001IFS=$as_save_IFS
42002
42003fi
42004fi
42005ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42006if test -n "$ac_ct_OBJCOPY"; then
42007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42008$as_echo "$ac_ct_OBJCOPY" >&6; }
42009else
42010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42011$as_echo "no" >&6; }
42012fi
42013
42014
42015  test -n "$ac_ct_OBJCOPY" && break
42016done
42017
42018  if test "x$ac_ct_OBJCOPY" = x; then
42019    OBJCOPY=""
42020  else
42021    case $cross_compiling:$ac_tool_warned in
42022yes:)
42023{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42024$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42025ac_tool_warned=yes ;;
42026esac
42027    OBJCOPY=$ac_ct_OBJCOPY
42028  fi
42029fi
42030
42031    else
42032      # If it succeeded, then it was overridden by the user. We will use it
42033      # for the tool.
42034
42035      # First remove it from the list of overridden variables, so we can test
42036      # for unknown variables in the end.
42037      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42038
42039      # Check if we try to supply an empty value
42040      if test "x$OBJCOPY" = x; then
42041        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42042$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42044$as_echo_n "checking for OBJCOPY... " >&6; }
42045        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42046$as_echo "disabled" >&6; }
42047      else
42048        # Check if the provided tool contains a complete path.
42049        tool_specified="$OBJCOPY"
42050        tool_basename="${tool_specified##*/}"
42051        if test "x$tool_basename" = "x$tool_specified"; then
42052          # A command without a complete path is provided, search $PATH.
42053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42054$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42055          # Extract the first word of "$tool_basename", so it can be a program name with args.
42056set dummy $tool_basename; ac_word=$2
42057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42058$as_echo_n "checking for $ac_word... " >&6; }
42059if ${ac_cv_path_OBJCOPY+:} false; then :
42060  $as_echo_n "(cached) " >&6
42061else
42062  case $OBJCOPY in
42063  [\\/]* | ?:[\\/]*)
42064  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42065  ;;
42066  *)
42067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42068for as_dir in $PATH
42069do
42070  IFS=$as_save_IFS
42071  test -z "$as_dir" && as_dir=.
42072    for ac_exec_ext in '' $ac_executable_extensions; do
42073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42074    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42076    break 2
42077  fi
42078done
42079  done
42080IFS=$as_save_IFS
42081
42082  ;;
42083esac
42084fi
42085OBJCOPY=$ac_cv_path_OBJCOPY
42086if test -n "$OBJCOPY"; then
42087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42088$as_echo "$OBJCOPY" >&6; }
42089else
42090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42091$as_echo "no" >&6; }
42092fi
42093
42094
42095          if test "x$OBJCOPY" = x; then
42096            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42097          fi
42098        else
42099          # Otherwise we believe it is a complete path. Use it as it is.
42100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42101$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42102          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42103$as_echo_n "checking for OBJCOPY... " >&6; }
42104          if test ! -x "$tool_specified"; then
42105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42106$as_echo "not found" >&6; }
42107            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42108          fi
42109          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42110$as_echo "$tool_specified" >&6; }
42111        fi
42112      fi
42113    fi
42114
42115  fi
42116
42117
42118    # Only call fixup if objcopy was found.
42119    if test -n "$OBJCOPY"; then
42120
42121  # Only process if variable expands to non-empty
42122
42123  if test "x$OBJCOPY" != x; then
42124    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42125
42126  # First separate the path from the arguments. This will split at the first
42127  # space.
42128  complete="$OBJCOPY"
42129  path="${complete%% *}"
42130  tmp="$complete EOL"
42131  arguments="${tmp#* }"
42132
42133  # Input might be given as Windows format, start by converting to
42134  # unix format.
42135  new_path=`$CYGPATH -u "$path"`
42136
42137  # Now try to locate executable using which
42138  new_path=`$WHICH "$new_path" 2> /dev/null`
42139  # bat and cmd files are not always considered executable in cygwin causing which
42140  # to not find them
42141  if test "x$new_path" = x \
42142      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42143      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42144    new_path=`$CYGPATH -u "$path"`
42145  fi
42146  if test "x$new_path" = x; then
42147    # Oops. Which didn't find the executable.
42148    # The splitting of arguments from the executable at a space might have been incorrect,
42149    # since paths with space are more likely in Windows. Give it another try with the whole
42150    # argument.
42151    path="$complete"
42152    arguments="EOL"
42153    new_path=`$CYGPATH -u "$path"`
42154    new_path=`$WHICH "$new_path" 2> /dev/null`
42155    # bat and cmd files are not always considered executable in cygwin causing which
42156    # to not find them
42157    if test "x$new_path" = x \
42158        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42159        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42160      new_path=`$CYGPATH -u "$path"`
42161    fi
42162    if test "x$new_path" = x; then
42163      # It's still not found. Now this is an unrecoverable error.
42164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42165$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42166      has_space=`$ECHO "$complete" | $GREP " "`
42167      if test "x$has_space" != x; then
42168        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42169$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42170      fi
42171      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42172    fi
42173  fi
42174
42175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42178  # "foo.exe" is OK but "foo" is an error.
42179  #
42180  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42181  # It is also a way to make sure we got the proper file name for the real test later on.
42182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42183  if test "x$test_shortpath" = x; then
42184    # Short path failed, file does not exist as specified.
42185    # Try adding .exe or .cmd
42186    if test -f "${new_path}.exe"; then
42187      input_to_shortpath="${new_path}.exe"
42188    elif test -f "${new_path}.cmd"; then
42189      input_to_shortpath="${new_path}.cmd"
42190    else
42191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42192$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42193      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42194$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42195      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42196    fi
42197  else
42198    input_to_shortpath="$new_path"
42199  fi
42200
42201  # Call helper function which possibly converts this using DOS-style short mode.
42202  # If so, the updated path is stored in $new_path.
42203  new_path="$input_to_shortpath"
42204
42205  input_path="$input_to_shortpath"
42206  # Check if we need to convert this using DOS-style short mode. If the path
42207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42208  # take no chances and rewrite it.
42209  # Note: m4 eats our [], so we need to use [ and ] instead.
42210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42211  if test "x$has_forbidden_chars" != x; then
42212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42216      # Going to short mode and back again did indeed matter. Since short mode is
42217      # case insensitive, let's make it lowercase to improve readability.
42218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42219      # Now convert it back to Unix-style (cygpath)
42220      input_path=`$CYGPATH -u "$shortmode_path"`
42221      new_path="$input_path"
42222    fi
42223  fi
42224
42225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42226  if test "x$test_cygdrive_prefix" = x; then
42227    # As a simple fix, exclude /usr/bin since it's not a real path.
42228    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42230      # a path prefixed by /cygdrive for fixpath to work.
42231      new_path="$CYGWIN_ROOT_PATH$input_path"
42232    fi
42233  fi
42234
42235  # remove trailing .exe if any
42236  new_path="${new_path/%.exe/}"
42237
42238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42239
42240  # First separate the path from the arguments. This will split at the first
42241  # space.
42242  complete="$OBJCOPY"
42243  path="${complete%% *}"
42244  tmp="$complete EOL"
42245  arguments="${tmp#* }"
42246
42247  # Input might be given as Windows format, start by converting to
42248  # unix format.
42249  new_path="$path"
42250
42251  windows_path="$new_path"
42252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42253    unix_path=`$CYGPATH -u "$windows_path"`
42254    new_path="$unix_path"
42255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42257    new_path="$unix_path"
42258  fi
42259
42260
42261  # Now try to locate executable using which
42262  new_path=`$WHICH "$new_path" 2> /dev/null`
42263
42264  if test "x$new_path" = x; then
42265    # Oops. Which didn't find the executable.
42266    # The splitting of arguments from the executable at a space might have been incorrect,
42267    # since paths with space are more likely in Windows. Give it another try with the whole
42268    # argument.
42269    path="$complete"
42270    arguments="EOL"
42271    new_path="$path"
42272
42273  windows_path="$new_path"
42274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42275    unix_path=`$CYGPATH -u "$windows_path"`
42276    new_path="$unix_path"
42277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42279    new_path="$unix_path"
42280  fi
42281
42282
42283    new_path=`$WHICH "$new_path" 2> /dev/null`
42284    # bat and cmd files are not always considered executable in MSYS causing which
42285    # to not find them
42286    if test "x$new_path" = x \
42287        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42288        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42289      new_path="$path"
42290
42291  windows_path="$new_path"
42292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42293    unix_path=`$CYGPATH -u "$windows_path"`
42294    new_path="$unix_path"
42295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42297    new_path="$unix_path"
42298  fi
42299
42300    fi
42301
42302    if test "x$new_path" = x; then
42303      # It's still not found. Now this is an unrecoverable error.
42304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42305$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42306      has_space=`$ECHO "$complete" | $GREP " "`
42307      if test "x$has_space" != x; then
42308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42310      fi
42311      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42312    fi
42313  fi
42314
42315  # Now new_path has a complete unix path to the binary
42316  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42317    # Keep paths in /bin as-is, but remove trailing .exe if any
42318    new_path="${new_path/%.exe/}"
42319    # Do not save /bin paths to all_fixpath_prefixes!
42320  else
42321    # Not in mixed or Windows style, start by that.
42322    new_path=`cmd //c echo $new_path`
42323
42324  input_path="$new_path"
42325  # Check if we need to convert this using DOS-style short mode. If the path
42326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42327  # take no chances and rewrite it.
42328  # Note: m4 eats our [], so we need to use [ and ] instead.
42329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42330  if test "x$has_forbidden_chars" != x; then
42331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42333  fi
42334
42335    # Output is in $new_path
42336
42337  windows_path="$new_path"
42338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42339    unix_path=`$CYGPATH -u "$windows_path"`
42340    new_path="$unix_path"
42341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42343    new_path="$unix_path"
42344  fi
42345
42346    # remove trailing .exe if any
42347    new_path="${new_path/%.exe/}"
42348
42349    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42350    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42351  fi
42352
42353    else
42354      # We're on a unix platform. Hooray! :)
42355      # First separate the path from the arguments. This will split at the first
42356      # space.
42357      complete="$OBJCOPY"
42358      path="${complete%% *}"
42359      tmp="$complete EOL"
42360      arguments="${tmp#* }"
42361
42362      # Cannot rely on the command "which" here since it doesn't always work.
42363      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42364      if test -z "$is_absolute_path"; then
42365        # Path to executable is not absolute. Find it.
42366        IFS_save="$IFS"
42367        IFS=:
42368        for p in $PATH; do
42369          if test -f "$p/$path" && test -x "$p/$path"; then
42370            new_path="$p/$path"
42371            break
42372          fi
42373        done
42374        IFS="$IFS_save"
42375      else
42376        # This is an absolute path, we can use it without further modifications.
42377        new_path="$path"
42378      fi
42379
42380      if test "x$new_path" = x; then
42381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42382$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42383        has_space=`$ECHO "$complete" | $GREP " "`
42384        if test "x$has_space" != x; then
42385          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42386$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42387        fi
42388        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42389      fi
42390    fi
42391
42392    # Now join together the path and the arguments once again
42393    if test "x$arguments" != xEOL; then
42394      new_complete="$new_path ${arguments% *}"
42395    else
42396      new_complete="$new_path"
42397    fi
42398
42399    if test "x$complete" != "x$new_complete"; then
42400      OBJCOPY="$new_complete"
42401      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42402$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42403    fi
42404  fi
42405
42406      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42407        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42408        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42409        # - version number is last blank separate word on first line
42410        # - version number formats that have been seen:
42411        #   - <major>.<minor>
42412        #   - <major>.<minor>.<micro>
42413        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42414        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42415         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42416              -e 's/.* //' \
42417              -e '/^[01]\./b bad' \
42418              -e '/^2\./{' \
42419              -e '  s/^2\.//' \
42420              -e '  /^[0-9]$/b bad' \
42421              -e '  /^[0-9]\./b bad' \
42422              -e '  /^1[0-9]$/b bad' \
42423              -e '  /^1[0-9]\./b bad' \
42424              -e '  /^20\./b bad' \
42425              -e '  /^21\.0$/b bad' \
42426              -e '  /^21\.0\./b bad' \
42427              -e '}' \
42428              -e ':good' \
42429              -e 's/.*/VALID_VERSION/p' \
42430              -e 'q' \
42431              -e ':bad' \
42432              -e 's/.*/BAD_VERSION/p' \
42433              -e 'q'`
42434        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42435          OBJCOPY=
42436          { $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
42437$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42438          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42439$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42440          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42441$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42442          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42443$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42444          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42445$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42446        fi
42447      fi
42448    fi
42449  fi
42450
42451
42452
42453  # Publish this variable in the help.
42454
42455
42456  if [ -z "${OBJDUMP+x}" ]; then
42457    # The variable is not set by user, try to locate tool using the code snippet
42458    if test -n "$ac_tool_prefix"; then
42459  for ac_prog in gobjdump objdump
42460  do
42461    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42462set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42464$as_echo_n "checking for $ac_word... " >&6; }
42465if ${ac_cv_prog_OBJDUMP+:} false; then :
42466  $as_echo_n "(cached) " >&6
42467else
42468  if test -n "$OBJDUMP"; then
42469  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42470else
42471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42472for as_dir in $PATH
42473do
42474  IFS=$as_save_IFS
42475  test -z "$as_dir" && as_dir=.
42476    for ac_exec_ext in '' $ac_executable_extensions; do
42477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42478    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42480    break 2
42481  fi
42482done
42483  done
42484IFS=$as_save_IFS
42485
42486fi
42487fi
42488OBJDUMP=$ac_cv_prog_OBJDUMP
42489if test -n "$OBJDUMP"; then
42490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42491$as_echo "$OBJDUMP" >&6; }
42492else
42493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42494$as_echo "no" >&6; }
42495fi
42496
42497
42498    test -n "$OBJDUMP" && break
42499  done
42500fi
42501if test -z "$OBJDUMP"; then
42502  ac_ct_OBJDUMP=$OBJDUMP
42503  for ac_prog in gobjdump objdump
42504do
42505  # Extract the first word of "$ac_prog", so it can be a program name with args.
42506set dummy $ac_prog; ac_word=$2
42507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42508$as_echo_n "checking for $ac_word... " >&6; }
42509if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42510  $as_echo_n "(cached) " >&6
42511else
42512  if test -n "$ac_ct_OBJDUMP"; then
42513  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42514else
42515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42516for as_dir in $PATH
42517do
42518  IFS=$as_save_IFS
42519  test -z "$as_dir" && as_dir=.
42520    for ac_exec_ext in '' $ac_executable_extensions; do
42521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42522    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42524    break 2
42525  fi
42526done
42527  done
42528IFS=$as_save_IFS
42529
42530fi
42531fi
42532ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42533if test -n "$ac_ct_OBJDUMP"; then
42534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42535$as_echo "$ac_ct_OBJDUMP" >&6; }
42536else
42537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42538$as_echo "no" >&6; }
42539fi
42540
42541
42542  test -n "$ac_ct_OBJDUMP" && break
42543done
42544
42545  if test "x$ac_ct_OBJDUMP" = x; then
42546    OBJDUMP=""
42547  else
42548    case $cross_compiling:$ac_tool_warned in
42549yes:)
42550{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42551$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42552ac_tool_warned=yes ;;
42553esac
42554    OBJDUMP=$ac_ct_OBJDUMP
42555  fi
42556fi
42557
42558  else
42559    # The variable is set, but is it from the command line or the environment?
42560
42561    # Try to remove the string !OBJDUMP! from our list.
42562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42564      # If it failed, the variable was not from the command line. Ignore it,
42565      # but warn the user (except for BASH, which is always set by the calling BASH).
42566      if test "xOBJDUMP" != xBASH; then
42567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42568$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42569      fi
42570      # Try to locate tool using the code snippet
42571      if test -n "$ac_tool_prefix"; then
42572  for ac_prog in gobjdump objdump
42573  do
42574    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42575set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42577$as_echo_n "checking for $ac_word... " >&6; }
42578if ${ac_cv_prog_OBJDUMP+:} false; then :
42579  $as_echo_n "(cached) " >&6
42580else
42581  if test -n "$OBJDUMP"; then
42582  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42583else
42584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42585for as_dir in $PATH
42586do
42587  IFS=$as_save_IFS
42588  test -z "$as_dir" && as_dir=.
42589    for ac_exec_ext in '' $ac_executable_extensions; do
42590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42591    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42593    break 2
42594  fi
42595done
42596  done
42597IFS=$as_save_IFS
42598
42599fi
42600fi
42601OBJDUMP=$ac_cv_prog_OBJDUMP
42602if test -n "$OBJDUMP"; then
42603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42604$as_echo "$OBJDUMP" >&6; }
42605else
42606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42607$as_echo "no" >&6; }
42608fi
42609
42610
42611    test -n "$OBJDUMP" && break
42612  done
42613fi
42614if test -z "$OBJDUMP"; then
42615  ac_ct_OBJDUMP=$OBJDUMP
42616  for ac_prog in gobjdump objdump
42617do
42618  # Extract the first word of "$ac_prog", so it can be a program name with args.
42619set dummy $ac_prog; ac_word=$2
42620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42621$as_echo_n "checking for $ac_word... " >&6; }
42622if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42623  $as_echo_n "(cached) " >&6
42624else
42625  if test -n "$ac_ct_OBJDUMP"; then
42626  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42627else
42628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42629for as_dir in $PATH
42630do
42631  IFS=$as_save_IFS
42632  test -z "$as_dir" && as_dir=.
42633    for ac_exec_ext in '' $ac_executable_extensions; do
42634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42635    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42637    break 2
42638  fi
42639done
42640  done
42641IFS=$as_save_IFS
42642
42643fi
42644fi
42645ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42646if test -n "$ac_ct_OBJDUMP"; then
42647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42648$as_echo "$ac_ct_OBJDUMP" >&6; }
42649else
42650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42651$as_echo "no" >&6; }
42652fi
42653
42654
42655  test -n "$ac_ct_OBJDUMP" && break
42656done
42657
42658  if test "x$ac_ct_OBJDUMP" = x; then
42659    OBJDUMP=""
42660  else
42661    case $cross_compiling:$ac_tool_warned in
42662yes:)
42663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42665ac_tool_warned=yes ;;
42666esac
42667    OBJDUMP=$ac_ct_OBJDUMP
42668  fi
42669fi
42670
42671    else
42672      # If it succeeded, then it was overridden by the user. We will use it
42673      # for the tool.
42674
42675      # First remove it from the list of overridden variables, so we can test
42676      # for unknown variables in the end.
42677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42678
42679      # Check if we try to supply an empty value
42680      if test "x$OBJDUMP" = x; then
42681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42682$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42684$as_echo_n "checking for OBJDUMP... " >&6; }
42685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42686$as_echo "disabled" >&6; }
42687      else
42688        # Check if the provided tool contains a complete path.
42689        tool_specified="$OBJDUMP"
42690        tool_basename="${tool_specified##*/}"
42691        if test "x$tool_basename" = "x$tool_specified"; then
42692          # A command without a complete path is provided, search $PATH.
42693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42694$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42695          # Extract the first word of "$tool_basename", so it can be a program name with args.
42696set dummy $tool_basename; ac_word=$2
42697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42698$as_echo_n "checking for $ac_word... " >&6; }
42699if ${ac_cv_path_OBJDUMP+:} false; then :
42700  $as_echo_n "(cached) " >&6
42701else
42702  case $OBJDUMP in
42703  [\\/]* | ?:[\\/]*)
42704  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42705  ;;
42706  *)
42707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42708for as_dir in $PATH
42709do
42710  IFS=$as_save_IFS
42711  test -z "$as_dir" && as_dir=.
42712    for ac_exec_ext in '' $ac_executable_extensions; do
42713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42714    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42716    break 2
42717  fi
42718done
42719  done
42720IFS=$as_save_IFS
42721
42722  ;;
42723esac
42724fi
42725OBJDUMP=$ac_cv_path_OBJDUMP
42726if test -n "$OBJDUMP"; then
42727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42728$as_echo "$OBJDUMP" >&6; }
42729else
42730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42731$as_echo "no" >&6; }
42732fi
42733
42734
42735          if test "x$OBJDUMP" = x; then
42736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42737          fi
42738        else
42739          # Otherwise we believe it is a complete path. Use it as it is.
42740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42741$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42743$as_echo_n "checking for OBJDUMP... " >&6; }
42744          if test ! -x "$tool_specified"; then
42745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42746$as_echo "not found" >&6; }
42747            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42748          fi
42749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42750$as_echo "$tool_specified" >&6; }
42751        fi
42752      fi
42753    fi
42754
42755  fi
42756
42757
42758  if test "x$OBJDUMP" != x; then
42759    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42760    # bails if argument is missing.
42761
42762  # Only process if variable expands to non-empty
42763
42764  if test "x$OBJDUMP" != x; then
42765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42766
42767  # First separate the path from the arguments. This will split at the first
42768  # space.
42769  complete="$OBJDUMP"
42770  path="${complete%% *}"
42771  tmp="$complete EOL"
42772  arguments="${tmp#* }"
42773
42774  # Input might be given as Windows format, start by converting to
42775  # unix format.
42776  new_path=`$CYGPATH -u "$path"`
42777
42778  # Now try to locate executable using which
42779  new_path=`$WHICH "$new_path" 2> /dev/null`
42780  # bat and cmd files are not always considered executable in cygwin causing which
42781  # to not find them
42782  if test "x$new_path" = x \
42783      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42784      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42785    new_path=`$CYGPATH -u "$path"`
42786  fi
42787  if test "x$new_path" = x; then
42788    # Oops. Which didn't find the executable.
42789    # The splitting of arguments from the executable at a space might have been incorrect,
42790    # since paths with space are more likely in Windows. Give it another try with the whole
42791    # argument.
42792    path="$complete"
42793    arguments="EOL"
42794    new_path=`$CYGPATH -u "$path"`
42795    new_path=`$WHICH "$new_path" 2> /dev/null`
42796    # bat and cmd files are not always considered executable in cygwin causing which
42797    # to not find them
42798    if test "x$new_path" = x \
42799        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42800        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42801      new_path=`$CYGPATH -u "$path"`
42802    fi
42803    if test "x$new_path" = x; then
42804      # It's still not found. Now this is an unrecoverable error.
42805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42806$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42807      has_space=`$ECHO "$complete" | $GREP " "`
42808      if test "x$has_space" != x; then
42809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42811      fi
42812      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42813    fi
42814  fi
42815
42816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42819  # "foo.exe" is OK but "foo" is an error.
42820  #
42821  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42822  # It is also a way to make sure we got the proper file name for the real test later on.
42823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42824  if test "x$test_shortpath" = x; then
42825    # Short path failed, file does not exist as specified.
42826    # Try adding .exe or .cmd
42827    if test -f "${new_path}.exe"; then
42828      input_to_shortpath="${new_path}.exe"
42829    elif test -f "${new_path}.cmd"; then
42830      input_to_shortpath="${new_path}.cmd"
42831    else
42832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42833$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42834      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42835$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42836      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42837    fi
42838  else
42839    input_to_shortpath="$new_path"
42840  fi
42841
42842  # Call helper function which possibly converts this using DOS-style short mode.
42843  # If so, the updated path is stored in $new_path.
42844  new_path="$input_to_shortpath"
42845
42846  input_path="$input_to_shortpath"
42847  # Check if we need to convert this using DOS-style short mode. If the path
42848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42849  # take no chances and rewrite it.
42850  # Note: m4 eats our [], so we need to use [ and ] instead.
42851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42852  if test "x$has_forbidden_chars" != x; then
42853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42857      # Going to short mode and back again did indeed matter. Since short mode is
42858      # case insensitive, let's make it lowercase to improve readability.
42859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42860      # Now convert it back to Unix-style (cygpath)
42861      input_path=`$CYGPATH -u "$shortmode_path"`
42862      new_path="$input_path"
42863    fi
42864  fi
42865
42866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42867  if test "x$test_cygdrive_prefix" = x; then
42868    # As a simple fix, exclude /usr/bin since it's not a real path.
42869    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42871      # a path prefixed by /cygdrive for fixpath to work.
42872      new_path="$CYGWIN_ROOT_PATH$input_path"
42873    fi
42874  fi
42875
42876  # remove trailing .exe if any
42877  new_path="${new_path/%.exe/}"
42878
42879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42880
42881  # First separate the path from the arguments. This will split at the first
42882  # space.
42883  complete="$OBJDUMP"
42884  path="${complete%% *}"
42885  tmp="$complete EOL"
42886  arguments="${tmp#* }"
42887
42888  # Input might be given as Windows format, start by converting to
42889  # unix format.
42890  new_path="$path"
42891
42892  windows_path="$new_path"
42893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42894    unix_path=`$CYGPATH -u "$windows_path"`
42895    new_path="$unix_path"
42896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42898    new_path="$unix_path"
42899  fi
42900
42901
42902  # Now try to locate executable using which
42903  new_path=`$WHICH "$new_path" 2> /dev/null`
42904
42905  if test "x$new_path" = x; then
42906    # Oops. Which didn't find the executable.
42907    # The splitting of arguments from the executable at a space might have been incorrect,
42908    # since paths with space are more likely in Windows. Give it another try with the whole
42909    # argument.
42910    path="$complete"
42911    arguments="EOL"
42912    new_path="$path"
42913
42914  windows_path="$new_path"
42915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42916    unix_path=`$CYGPATH -u "$windows_path"`
42917    new_path="$unix_path"
42918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42920    new_path="$unix_path"
42921  fi
42922
42923
42924    new_path=`$WHICH "$new_path" 2> /dev/null`
42925    # bat and cmd files are not always considered executable in MSYS causing which
42926    # to not find them
42927    if test "x$new_path" = x \
42928        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42929        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42930      new_path="$path"
42931
42932  windows_path="$new_path"
42933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42934    unix_path=`$CYGPATH -u "$windows_path"`
42935    new_path="$unix_path"
42936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42938    new_path="$unix_path"
42939  fi
42940
42941    fi
42942
42943    if test "x$new_path" = x; then
42944      # It's still not found. Now this is an unrecoverable error.
42945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42946$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42947      has_space=`$ECHO "$complete" | $GREP " "`
42948      if test "x$has_space" != x; then
42949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42951      fi
42952      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42953    fi
42954  fi
42955
42956  # Now new_path has a complete unix path to the binary
42957  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42958    # Keep paths in /bin as-is, but remove trailing .exe if any
42959    new_path="${new_path/%.exe/}"
42960    # Do not save /bin paths to all_fixpath_prefixes!
42961  else
42962    # Not in mixed or Windows style, start by that.
42963    new_path=`cmd //c echo $new_path`
42964
42965  input_path="$new_path"
42966  # Check if we need to convert this using DOS-style short mode. If the path
42967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42968  # take no chances and rewrite it.
42969  # Note: m4 eats our [], so we need to use [ and ] instead.
42970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42971  if test "x$has_forbidden_chars" != x; then
42972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42974  fi
42975
42976    # Output is in $new_path
42977
42978  windows_path="$new_path"
42979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42980    unix_path=`$CYGPATH -u "$windows_path"`
42981    new_path="$unix_path"
42982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42984    new_path="$unix_path"
42985  fi
42986
42987    # remove trailing .exe if any
42988    new_path="${new_path/%.exe/}"
42989
42990    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42991    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42992  fi
42993
42994    else
42995      # We're on a unix platform. Hooray! :)
42996      # First separate the path from the arguments. This will split at the first
42997      # space.
42998      complete="$OBJDUMP"
42999      path="${complete%% *}"
43000      tmp="$complete EOL"
43001      arguments="${tmp#* }"
43002
43003      # Cannot rely on the command "which" here since it doesn't always work.
43004      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43005      if test -z "$is_absolute_path"; then
43006        # Path to executable is not absolute. Find it.
43007        IFS_save="$IFS"
43008        IFS=:
43009        for p in $PATH; do
43010          if test -f "$p/$path" && test -x "$p/$path"; then
43011            new_path="$p/$path"
43012            break
43013          fi
43014        done
43015        IFS="$IFS_save"
43016      else
43017        # This is an absolute path, we can use it without further modifications.
43018        new_path="$path"
43019      fi
43020
43021      if test "x$new_path" = x; then
43022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43023$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43024        has_space=`$ECHO "$complete" | $GREP " "`
43025        if test "x$has_space" != x; then
43026          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43027$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43028        fi
43029        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43030      fi
43031    fi
43032
43033    # Now join together the path and the arguments once again
43034    if test "x$arguments" != xEOL; then
43035      new_complete="$new_path ${arguments% *}"
43036    else
43037      new_complete="$new_path"
43038    fi
43039
43040    if test "x$complete" != "x$new_complete"; then
43041      OBJDUMP="$new_complete"
43042      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43043$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43044    fi
43045  fi
43046
43047  fi
43048
43049
43050  # Restore old path.
43051  PATH="$OLD_PATH"
43052
43053  # Restore the flags to the user specified values.
43054  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43055  CFLAGS="$ORG_CFLAGS"
43056  CXXFLAGS="$ORG_CXXFLAGS"
43057
43058
43059# Finally do some processing after the detection phase
43060
43061  if test "x$COMPILE_TYPE" = "xcross"; then
43062    # Now we need to find a C/C++ compiler that can build executables for the
43063    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43064    # used once. Also, we need to do this without adding a tools dir to the
43065    # path, otherwise we might pick up cross-compilers which don't use standard
43066    # naming.
43067
43068    OLDPATH="$PATH"
43069
43070
43071# Check whether --with-build-devkit was given.
43072if test "${with_build_devkit+set}" = set; then :
43073  withval=$with_build_devkit;
43074fi
43075
43076    if test "x$with_build_devkit" = "xyes"; then
43077      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43078    elif test -n "$with_build_devkit"; then
43079      if test ! -d "$with_build_devkit"; then
43080        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43081      else
43082
43083  # Only process if variable expands to non-empty
43084
43085  if test "x$with_build_devkit" != x; then
43086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43087
43088  # Input might be given as Windows format, start by converting to
43089  # unix format.
43090  path="$with_build_devkit"
43091  new_path=`$CYGPATH -u "$path"`
43092
43093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43096  # "foo.exe" is OK but "foo" is an error.
43097  #
43098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43099  # It is also a way to make sure we got the proper file name for the real test later on.
43100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43101  if test "x$test_shortpath" = x; then
43102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43103$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43104    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43105  fi
43106
43107  # Call helper function which possibly converts this using DOS-style short mode.
43108  # If so, the updated path is stored in $new_path.
43109
43110  input_path="$new_path"
43111  # Check if we need to convert this using DOS-style short mode. If the path
43112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43113  # take no chances and rewrite it.
43114  # Note: m4 eats our [], so we need to use [ and ] instead.
43115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43116  if test "x$has_forbidden_chars" != x; then
43117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43121      # Going to short mode and back again did indeed matter. Since short mode is
43122      # case insensitive, let's make it lowercase to improve readability.
43123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43124      # Now convert it back to Unix-style (cygpath)
43125      input_path=`$CYGPATH -u "$shortmode_path"`
43126      new_path="$input_path"
43127    fi
43128  fi
43129
43130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43131  if test "x$test_cygdrive_prefix" = x; then
43132    # As a simple fix, exclude /usr/bin since it's not a real path.
43133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43135      # a path prefixed by /cygdrive for fixpath to work.
43136      new_path="$CYGWIN_ROOT_PATH$input_path"
43137    fi
43138  fi
43139
43140
43141  if test "x$path" != "x$new_path"; then
43142    with_build_devkit="$new_path"
43143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43144$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43145  fi
43146
43147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43148
43149  path="$with_build_devkit"
43150  has_colon=`$ECHO $path | $GREP ^.:`
43151  new_path="$path"
43152  if test "x$has_colon" = x; then
43153    # Not in mixed or Windows style, start by that.
43154    new_path=`cmd //c echo $path`
43155  fi
43156
43157
43158  input_path="$new_path"
43159  # Check if we need to convert this using DOS-style short mode. If the path
43160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43161  # take no chances and rewrite it.
43162  # Note: m4 eats our [], so we need to use [ and ] instead.
43163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43164  if test "x$has_forbidden_chars" != x; then
43165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43167  fi
43168
43169
43170  windows_path="$new_path"
43171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43172    unix_path=`$CYGPATH -u "$windows_path"`
43173    new_path="$unix_path"
43174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43176    new_path="$unix_path"
43177  fi
43178
43179  if test "x$path" != "x$new_path"; then
43180    with_build_devkit="$new_path"
43181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43182$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43183  fi
43184
43185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43187
43188    else
43189      # We're on a unix platform. Hooray! :)
43190      path="$with_build_devkit"
43191      has_space=`$ECHO "$path" | $GREP " "`
43192      if test "x$has_space" != x; then
43193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43194$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43195        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43196      fi
43197
43198      # Use eval to expand a potential ~
43199      eval path="$path"
43200      if test ! -f "$path" && test ! -d "$path"; then
43201        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43202      fi
43203
43204      if test -d "$path"; then
43205        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43206      else
43207        dir="`$DIRNAME "$path"`"
43208        base="`$BASENAME "$path"`"
43209        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43210      fi
43211    fi
43212  fi
43213
43214        BUILD_DEVKIT_ROOT="$with_build_devkit"
43215        # Check for a meta data info file in the root of the devkit
43216        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43217          # Process devkit.info so that existing devkit variables are not
43218          # modified by this
43219          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43220              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43221              -e "s/\$host/\$build/g" \
43222              $BUILD_DEVKIT_ROOT/devkit.info \
43223              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43224          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43225          # This potentially sets the following:
43226          # A descriptive name of the devkit
43227
43228  if test "x$BUILD_DEVKIT_NAME" = x; then
43229    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43230  fi
43231
43232          # Corresponds to --with-extra-path
43233
43234  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43235    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43236  fi
43237
43238          # Corresponds to --with-toolchain-path
43239
43240  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43241    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43242  fi
43243
43244          # Corresponds to --with-sysroot
43245
43246  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43247    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43248  fi
43249
43250          # Skip the Window specific parts
43251        fi
43252
43253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43254$as_echo_n "checking for build platform devkit... " >&6; }
43255        if test "x$BUILD_DEVKIT_NAME" != x; then
43256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43257$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43258        else
43259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43260$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43261        fi
43262
43263        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43264
43265  if test "x$BUILD_SYSROOT" != "x"; then
43266    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43267      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43268        # Solaris Studio does not have a concept of sysroot. Instead we must
43269        # make sure the default include and lib dirs are appended to each
43270        # compile and link command line.
43271        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
43272        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43273            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43274            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43275      fi
43276    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43277      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43278      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43279    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43280      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43281      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43282    fi
43283    # Propagate the sysroot args to hotspot
43284    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43285    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43286    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43287    # The global CFLAGS and LDFLAGS variables need these for configure to function
43288    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43289    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43290    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43291    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43292  fi
43293
43294  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43295    # We also need -iframework<path>/System/Library/Frameworks
43296    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43297    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43298    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43299    # set this here so it doesn't have to be peppered throughout the forest
43300    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43301    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43302  fi
43303
43304
43305
43306
43307
43308         # Fallback default of just /bin if DEVKIT_PATH is not defined
43309        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43310          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43311        fi
43312        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43313      fi
43314    fi
43315
43316    # FIXME: we should list the discovered compilers as an exclude pattern!
43317    # If we do that, we can do this detection before POST_DETECTION, and still
43318    # find the build compilers in the tools dir, if needed.
43319
43320
43321
43322  # Publish this variable in the help.
43323
43324
43325  if [ -z "${BUILD_CC+x}" ]; then
43326    # The variable is not set by user, try to locate tool using the code snippet
43327    for ac_prog in cl cc gcc
43328do
43329  # Extract the first word of "$ac_prog", so it can be a program name with args.
43330set dummy $ac_prog; ac_word=$2
43331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43332$as_echo_n "checking for $ac_word... " >&6; }
43333if ${ac_cv_path_BUILD_CC+:} false; then :
43334  $as_echo_n "(cached) " >&6
43335else
43336  case $BUILD_CC in
43337  [\\/]* | ?:[\\/]*)
43338  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43339  ;;
43340  *)
43341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43342for as_dir in $PATH
43343do
43344  IFS=$as_save_IFS
43345  test -z "$as_dir" && as_dir=.
43346    for ac_exec_ext in '' $ac_executable_extensions; do
43347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43348    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43350    break 2
43351  fi
43352done
43353  done
43354IFS=$as_save_IFS
43355
43356  ;;
43357esac
43358fi
43359BUILD_CC=$ac_cv_path_BUILD_CC
43360if test -n "$BUILD_CC"; then
43361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43362$as_echo "$BUILD_CC" >&6; }
43363else
43364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43365$as_echo "no" >&6; }
43366fi
43367
43368
43369  test -n "$BUILD_CC" && break
43370done
43371
43372  else
43373    # The variable is set, but is it from the command line or the environment?
43374
43375    # Try to remove the string !BUILD_CC! from our list.
43376    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43377    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43378      # If it failed, the variable was not from the command line. Ignore it,
43379      # but warn the user (except for BASH, which is always set by the calling BASH).
43380      if test "xBUILD_CC" != xBASH; then
43381        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43382$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43383      fi
43384      # Try to locate tool using the code snippet
43385      for ac_prog in cl cc gcc
43386do
43387  # Extract the first word of "$ac_prog", so it can be a program name with args.
43388set dummy $ac_prog; ac_word=$2
43389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43390$as_echo_n "checking for $ac_word... " >&6; }
43391if ${ac_cv_path_BUILD_CC+:} false; then :
43392  $as_echo_n "(cached) " >&6
43393else
43394  case $BUILD_CC in
43395  [\\/]* | ?:[\\/]*)
43396  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43397  ;;
43398  *)
43399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43400for as_dir in $PATH
43401do
43402  IFS=$as_save_IFS
43403  test -z "$as_dir" && as_dir=.
43404    for ac_exec_ext in '' $ac_executable_extensions; do
43405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43406    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43408    break 2
43409  fi
43410done
43411  done
43412IFS=$as_save_IFS
43413
43414  ;;
43415esac
43416fi
43417BUILD_CC=$ac_cv_path_BUILD_CC
43418if test -n "$BUILD_CC"; then
43419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43420$as_echo "$BUILD_CC" >&6; }
43421else
43422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43423$as_echo "no" >&6; }
43424fi
43425
43426
43427  test -n "$BUILD_CC" && break
43428done
43429
43430    else
43431      # If it succeeded, then it was overridden by the user. We will use it
43432      # for the tool.
43433
43434      # First remove it from the list of overridden variables, so we can test
43435      # for unknown variables in the end.
43436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43437
43438      # Check if we try to supply an empty value
43439      if test "x$BUILD_CC" = x; then
43440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43441$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43443$as_echo_n "checking for BUILD_CC... " >&6; }
43444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43445$as_echo "disabled" >&6; }
43446      else
43447        # Check if the provided tool contains a complete path.
43448        tool_specified="$BUILD_CC"
43449        tool_basename="${tool_specified##*/}"
43450        if test "x$tool_basename" = "x$tool_specified"; then
43451          # A command without a complete path is provided, search $PATH.
43452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43453$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43454          # Extract the first word of "$tool_basename", so it can be a program name with args.
43455set dummy $tool_basename; ac_word=$2
43456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43457$as_echo_n "checking for $ac_word... " >&6; }
43458if ${ac_cv_path_BUILD_CC+:} false; then :
43459  $as_echo_n "(cached) " >&6
43460else
43461  case $BUILD_CC in
43462  [\\/]* | ?:[\\/]*)
43463  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43464  ;;
43465  *)
43466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43467for as_dir in $PATH
43468do
43469  IFS=$as_save_IFS
43470  test -z "$as_dir" && as_dir=.
43471    for ac_exec_ext in '' $ac_executable_extensions; do
43472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43473    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43475    break 2
43476  fi
43477done
43478  done
43479IFS=$as_save_IFS
43480
43481  ;;
43482esac
43483fi
43484BUILD_CC=$ac_cv_path_BUILD_CC
43485if test -n "$BUILD_CC"; then
43486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43487$as_echo "$BUILD_CC" >&6; }
43488else
43489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43490$as_echo "no" >&6; }
43491fi
43492
43493
43494          if test "x$BUILD_CC" = x; then
43495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43496          fi
43497        else
43498          # Otherwise we believe it is a complete path. Use it as it is.
43499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43500$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43502$as_echo_n "checking for BUILD_CC... " >&6; }
43503          if test ! -x "$tool_specified"; then
43504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43505$as_echo "not found" >&6; }
43506            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43507          fi
43508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43509$as_echo "$tool_specified" >&6; }
43510        fi
43511      fi
43512    fi
43513
43514  fi
43515
43516
43517
43518  if test "x$BUILD_CC" = x; then
43519    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43520  fi
43521
43522
43523
43524  # Only process if variable expands to non-empty
43525
43526  if test "x$BUILD_CC" != x; then
43527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43528
43529  # First separate the path from the arguments. This will split at the first
43530  # space.
43531  complete="$BUILD_CC"
43532  path="${complete%% *}"
43533  tmp="$complete EOL"
43534  arguments="${tmp#* }"
43535
43536  # Input might be given as Windows format, start by converting to
43537  # unix format.
43538  new_path=`$CYGPATH -u "$path"`
43539
43540  # Now try to locate executable using which
43541  new_path=`$WHICH "$new_path" 2> /dev/null`
43542  # bat and cmd files are not always considered executable in cygwin causing which
43543  # to not find them
43544  if test "x$new_path" = x \
43545      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43546      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43547    new_path=`$CYGPATH -u "$path"`
43548  fi
43549  if test "x$new_path" = x; then
43550    # Oops. Which didn't find the executable.
43551    # The splitting of arguments from the executable at a space might have been incorrect,
43552    # since paths with space are more likely in Windows. Give it another try with the whole
43553    # argument.
43554    path="$complete"
43555    arguments="EOL"
43556    new_path=`$CYGPATH -u "$path"`
43557    new_path=`$WHICH "$new_path" 2> /dev/null`
43558    # bat and cmd files are not always considered executable in cygwin causing which
43559    # to not find them
43560    if test "x$new_path" = x \
43561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43563      new_path=`$CYGPATH -u "$path"`
43564    fi
43565    if test "x$new_path" = x; then
43566      # It's still not found. Now this is an unrecoverable error.
43567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43568$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43569      has_space=`$ECHO "$complete" | $GREP " "`
43570      if test "x$has_space" != x; then
43571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43573      fi
43574      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43575    fi
43576  fi
43577
43578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43581  # "foo.exe" is OK but "foo" is an error.
43582  #
43583  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43584  # It is also a way to make sure we got the proper file name for the real test later on.
43585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43586  if test "x$test_shortpath" = x; then
43587    # Short path failed, file does not exist as specified.
43588    # Try adding .exe or .cmd
43589    if test -f "${new_path}.exe"; then
43590      input_to_shortpath="${new_path}.exe"
43591    elif test -f "${new_path}.cmd"; then
43592      input_to_shortpath="${new_path}.cmd"
43593    else
43594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43595$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43598      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43599    fi
43600  else
43601    input_to_shortpath="$new_path"
43602  fi
43603
43604  # Call helper function which possibly converts this using DOS-style short mode.
43605  # If so, the updated path is stored in $new_path.
43606  new_path="$input_to_shortpath"
43607
43608  input_path="$input_to_shortpath"
43609  # Check if we need to convert this using DOS-style short mode. If the path
43610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43611  # take no chances and rewrite it.
43612  # Note: m4 eats our [], so we need to use [ and ] instead.
43613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43614  if test "x$has_forbidden_chars" != x; then
43615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43619      # Going to short mode and back again did indeed matter. Since short mode is
43620      # case insensitive, let's make it lowercase to improve readability.
43621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43622      # Now convert it back to Unix-style (cygpath)
43623      input_path=`$CYGPATH -u "$shortmode_path"`
43624      new_path="$input_path"
43625    fi
43626  fi
43627
43628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43629  if test "x$test_cygdrive_prefix" = x; then
43630    # As a simple fix, exclude /usr/bin since it's not a real path.
43631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43633      # a path prefixed by /cygdrive for fixpath to work.
43634      new_path="$CYGWIN_ROOT_PATH$input_path"
43635    fi
43636  fi
43637
43638  # remove trailing .exe if any
43639  new_path="${new_path/%.exe/}"
43640
43641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43642
43643  # First separate the path from the arguments. This will split at the first
43644  # space.
43645  complete="$BUILD_CC"
43646  path="${complete%% *}"
43647  tmp="$complete EOL"
43648  arguments="${tmp#* }"
43649
43650  # Input might be given as Windows format, start by converting to
43651  # unix format.
43652  new_path="$path"
43653
43654  windows_path="$new_path"
43655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43656    unix_path=`$CYGPATH -u "$windows_path"`
43657    new_path="$unix_path"
43658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43660    new_path="$unix_path"
43661  fi
43662
43663
43664  # Now try to locate executable using which
43665  new_path=`$WHICH "$new_path" 2> /dev/null`
43666
43667  if test "x$new_path" = x; then
43668    # Oops. Which didn't find the executable.
43669    # The splitting of arguments from the executable at a space might have been incorrect,
43670    # since paths with space are more likely in Windows. Give it another try with the whole
43671    # argument.
43672    path="$complete"
43673    arguments="EOL"
43674    new_path="$path"
43675
43676  windows_path="$new_path"
43677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43678    unix_path=`$CYGPATH -u "$windows_path"`
43679    new_path="$unix_path"
43680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43682    new_path="$unix_path"
43683  fi
43684
43685
43686    new_path=`$WHICH "$new_path" 2> /dev/null`
43687    # bat and cmd files are not always considered executable in MSYS causing which
43688    # to not find them
43689    if test "x$new_path" = x \
43690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43692      new_path="$path"
43693
43694  windows_path="$new_path"
43695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43696    unix_path=`$CYGPATH -u "$windows_path"`
43697    new_path="$unix_path"
43698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43700    new_path="$unix_path"
43701  fi
43702
43703    fi
43704
43705    if test "x$new_path" = x; then
43706      # It's still not found. Now this is an unrecoverable error.
43707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43708$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43709      has_space=`$ECHO "$complete" | $GREP " "`
43710      if test "x$has_space" != x; then
43711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43713      fi
43714      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43715    fi
43716  fi
43717
43718  # Now new_path has a complete unix path to the binary
43719  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43720    # Keep paths in /bin as-is, but remove trailing .exe if any
43721    new_path="${new_path/%.exe/}"
43722    # Do not save /bin paths to all_fixpath_prefixes!
43723  else
43724    # Not in mixed or Windows style, start by that.
43725    new_path=`cmd //c echo $new_path`
43726
43727  input_path="$new_path"
43728  # Check if we need to convert this using DOS-style short mode. If the path
43729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43730  # take no chances and rewrite it.
43731  # Note: m4 eats our [], so we need to use [ and ] instead.
43732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43733  if test "x$has_forbidden_chars" != x; then
43734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43736  fi
43737
43738    # Output is in $new_path
43739
43740  windows_path="$new_path"
43741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43742    unix_path=`$CYGPATH -u "$windows_path"`
43743    new_path="$unix_path"
43744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43746    new_path="$unix_path"
43747  fi
43748
43749    # remove trailing .exe if any
43750    new_path="${new_path/%.exe/}"
43751
43752    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43753    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43754  fi
43755
43756    else
43757      # We're on a unix platform. Hooray! :)
43758      # First separate the path from the arguments. This will split at the first
43759      # space.
43760      complete="$BUILD_CC"
43761      path="${complete%% *}"
43762      tmp="$complete EOL"
43763      arguments="${tmp#* }"
43764
43765      # Cannot rely on the command "which" here since it doesn't always work.
43766      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43767      if test -z "$is_absolute_path"; then
43768        # Path to executable is not absolute. Find it.
43769        IFS_save="$IFS"
43770        IFS=:
43771        for p in $PATH; do
43772          if test -f "$p/$path" && test -x "$p/$path"; then
43773            new_path="$p/$path"
43774            break
43775          fi
43776        done
43777        IFS="$IFS_save"
43778      else
43779        # This is an absolute path, we can use it without further modifications.
43780        new_path="$path"
43781      fi
43782
43783      if test "x$new_path" = x; then
43784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43785$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43786        has_space=`$ECHO "$complete" | $GREP " "`
43787        if test "x$has_space" != x; then
43788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43790        fi
43791        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43792      fi
43793    fi
43794
43795    # Now join together the path and the arguments once again
43796    if test "x$arguments" != xEOL; then
43797      new_complete="$new_path ${arguments% *}"
43798    else
43799      new_complete="$new_path"
43800    fi
43801
43802    if test "x$complete" != "x$new_complete"; then
43803      BUILD_CC="$new_complete"
43804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43805$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43806    fi
43807  fi
43808
43809
43810
43811
43812  # Publish this variable in the help.
43813
43814
43815  if [ -z "${BUILD_CXX+x}" ]; then
43816    # The variable is not set by user, try to locate tool using the code snippet
43817    for ac_prog in cl CC g++
43818do
43819  # Extract the first word of "$ac_prog", so it can be a program name with args.
43820set dummy $ac_prog; ac_word=$2
43821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43822$as_echo_n "checking for $ac_word... " >&6; }
43823if ${ac_cv_path_BUILD_CXX+:} false; then :
43824  $as_echo_n "(cached) " >&6
43825else
43826  case $BUILD_CXX in
43827  [\\/]* | ?:[\\/]*)
43828  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43829  ;;
43830  *)
43831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43832for as_dir in $PATH
43833do
43834  IFS=$as_save_IFS
43835  test -z "$as_dir" && as_dir=.
43836    for ac_exec_ext in '' $ac_executable_extensions; do
43837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43838    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43840    break 2
43841  fi
43842done
43843  done
43844IFS=$as_save_IFS
43845
43846  ;;
43847esac
43848fi
43849BUILD_CXX=$ac_cv_path_BUILD_CXX
43850if test -n "$BUILD_CXX"; then
43851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43852$as_echo "$BUILD_CXX" >&6; }
43853else
43854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43855$as_echo "no" >&6; }
43856fi
43857
43858
43859  test -n "$BUILD_CXX" && break
43860done
43861
43862  else
43863    # The variable is set, but is it from the command line or the environment?
43864
43865    # Try to remove the string !BUILD_CXX! from our list.
43866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43868      # If it failed, the variable was not from the command line. Ignore it,
43869      # but warn the user (except for BASH, which is always set by the calling BASH).
43870      if test "xBUILD_CXX" != xBASH; then
43871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43872$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43873      fi
43874      # Try to locate tool using the code snippet
43875      for ac_prog in cl CC g++
43876do
43877  # Extract the first word of "$ac_prog", so it can be a program name with args.
43878set dummy $ac_prog; ac_word=$2
43879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43880$as_echo_n "checking for $ac_word... " >&6; }
43881if ${ac_cv_path_BUILD_CXX+:} false; then :
43882  $as_echo_n "(cached) " >&6
43883else
43884  case $BUILD_CXX in
43885  [\\/]* | ?:[\\/]*)
43886  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43887  ;;
43888  *)
43889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43890for as_dir in $PATH
43891do
43892  IFS=$as_save_IFS
43893  test -z "$as_dir" && as_dir=.
43894    for ac_exec_ext in '' $ac_executable_extensions; do
43895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43896    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43898    break 2
43899  fi
43900done
43901  done
43902IFS=$as_save_IFS
43903
43904  ;;
43905esac
43906fi
43907BUILD_CXX=$ac_cv_path_BUILD_CXX
43908if test -n "$BUILD_CXX"; then
43909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43910$as_echo "$BUILD_CXX" >&6; }
43911else
43912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43913$as_echo "no" >&6; }
43914fi
43915
43916
43917  test -n "$BUILD_CXX" && break
43918done
43919
43920    else
43921      # If it succeeded, then it was overridden by the user. We will use it
43922      # for the tool.
43923
43924      # First remove it from the list of overridden variables, so we can test
43925      # for unknown variables in the end.
43926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43927
43928      # Check if we try to supply an empty value
43929      if test "x$BUILD_CXX" = x; then
43930        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43931$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43933$as_echo_n "checking for BUILD_CXX... " >&6; }
43934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43935$as_echo "disabled" >&6; }
43936      else
43937        # Check if the provided tool contains a complete path.
43938        tool_specified="$BUILD_CXX"
43939        tool_basename="${tool_specified##*/}"
43940        if test "x$tool_basename" = "x$tool_specified"; then
43941          # A command without a complete path is provided, search $PATH.
43942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43943$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43944          # Extract the first word of "$tool_basename", so it can be a program name with args.
43945set dummy $tool_basename; ac_word=$2
43946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43947$as_echo_n "checking for $ac_word... " >&6; }
43948if ${ac_cv_path_BUILD_CXX+:} false; then :
43949  $as_echo_n "(cached) " >&6
43950else
43951  case $BUILD_CXX in
43952  [\\/]* | ?:[\\/]*)
43953  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43954  ;;
43955  *)
43956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43957for as_dir in $PATH
43958do
43959  IFS=$as_save_IFS
43960  test -z "$as_dir" && as_dir=.
43961    for ac_exec_ext in '' $ac_executable_extensions; do
43962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43963    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43965    break 2
43966  fi
43967done
43968  done
43969IFS=$as_save_IFS
43970
43971  ;;
43972esac
43973fi
43974BUILD_CXX=$ac_cv_path_BUILD_CXX
43975if test -n "$BUILD_CXX"; then
43976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43977$as_echo "$BUILD_CXX" >&6; }
43978else
43979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43980$as_echo "no" >&6; }
43981fi
43982
43983
43984          if test "x$BUILD_CXX" = x; then
43985            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43986          fi
43987        else
43988          # Otherwise we believe it is a complete path. Use it as it is.
43989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43990$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43991          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43992$as_echo_n "checking for BUILD_CXX... " >&6; }
43993          if test ! -x "$tool_specified"; then
43994            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43995$as_echo "not found" >&6; }
43996            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43997          fi
43998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43999$as_echo "$tool_specified" >&6; }
44000        fi
44001      fi
44002    fi
44003
44004  fi
44005
44006
44007
44008  if test "x$BUILD_CXX" = x; then
44009    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44010  fi
44011
44012
44013
44014  # Only process if variable expands to non-empty
44015
44016  if test "x$BUILD_CXX" != x; then
44017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44018
44019  # First separate the path from the arguments. This will split at the first
44020  # space.
44021  complete="$BUILD_CXX"
44022  path="${complete%% *}"
44023  tmp="$complete EOL"
44024  arguments="${tmp#* }"
44025
44026  # Input might be given as Windows format, start by converting to
44027  # unix format.
44028  new_path=`$CYGPATH -u "$path"`
44029
44030  # Now try to locate executable using which
44031  new_path=`$WHICH "$new_path" 2> /dev/null`
44032  # bat and cmd files are not always considered executable in cygwin causing which
44033  # to not find them
44034  if test "x$new_path" = x \
44035      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44036      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44037    new_path=`$CYGPATH -u "$path"`
44038  fi
44039  if test "x$new_path" = x; then
44040    # Oops. Which didn't find the executable.
44041    # The splitting of arguments from the executable at a space might have been incorrect,
44042    # since paths with space are more likely in Windows. Give it another try with the whole
44043    # argument.
44044    path="$complete"
44045    arguments="EOL"
44046    new_path=`$CYGPATH -u "$path"`
44047    new_path=`$WHICH "$new_path" 2> /dev/null`
44048    # bat and cmd files are not always considered executable in cygwin causing which
44049    # to not find them
44050    if test "x$new_path" = x \
44051        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44052        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44053      new_path=`$CYGPATH -u "$path"`
44054    fi
44055    if test "x$new_path" = x; then
44056      # It's still not found. Now this is an unrecoverable error.
44057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44058$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44059      has_space=`$ECHO "$complete" | $GREP " "`
44060      if test "x$has_space" != x; then
44061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44063      fi
44064      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44065    fi
44066  fi
44067
44068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44071  # "foo.exe" is OK but "foo" is an error.
44072  #
44073  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44074  # It is also a way to make sure we got the proper file name for the real test later on.
44075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44076  if test "x$test_shortpath" = x; then
44077    # Short path failed, file does not exist as specified.
44078    # Try adding .exe or .cmd
44079    if test -f "${new_path}.exe"; then
44080      input_to_shortpath="${new_path}.exe"
44081    elif test -f "${new_path}.cmd"; then
44082      input_to_shortpath="${new_path}.cmd"
44083    else
44084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44085$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44088      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44089    fi
44090  else
44091    input_to_shortpath="$new_path"
44092  fi
44093
44094  # Call helper function which possibly converts this using DOS-style short mode.
44095  # If so, the updated path is stored in $new_path.
44096  new_path="$input_to_shortpath"
44097
44098  input_path="$input_to_shortpath"
44099  # Check if we need to convert this using DOS-style short mode. If the path
44100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44101  # take no chances and rewrite it.
44102  # Note: m4 eats our [], so we need to use [ and ] instead.
44103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44104  if test "x$has_forbidden_chars" != x; then
44105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44109      # Going to short mode and back again did indeed matter. Since short mode is
44110      # case insensitive, let's make it lowercase to improve readability.
44111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44112      # Now convert it back to Unix-style (cygpath)
44113      input_path=`$CYGPATH -u "$shortmode_path"`
44114      new_path="$input_path"
44115    fi
44116  fi
44117
44118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44119  if test "x$test_cygdrive_prefix" = x; then
44120    # As a simple fix, exclude /usr/bin since it's not a real path.
44121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44123      # a path prefixed by /cygdrive for fixpath to work.
44124      new_path="$CYGWIN_ROOT_PATH$input_path"
44125    fi
44126  fi
44127
44128  # remove trailing .exe if any
44129  new_path="${new_path/%.exe/}"
44130
44131    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44132
44133  # First separate the path from the arguments. This will split at the first
44134  # space.
44135  complete="$BUILD_CXX"
44136  path="${complete%% *}"
44137  tmp="$complete EOL"
44138  arguments="${tmp#* }"
44139
44140  # Input might be given as Windows format, start by converting to
44141  # unix format.
44142  new_path="$path"
44143
44144  windows_path="$new_path"
44145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44146    unix_path=`$CYGPATH -u "$windows_path"`
44147    new_path="$unix_path"
44148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44150    new_path="$unix_path"
44151  fi
44152
44153
44154  # Now try to locate executable using which
44155  new_path=`$WHICH "$new_path" 2> /dev/null`
44156
44157  if test "x$new_path" = x; then
44158    # Oops. Which didn't find the executable.
44159    # The splitting of arguments from the executable at a space might have been incorrect,
44160    # since paths with space are more likely in Windows. Give it another try with the whole
44161    # argument.
44162    path="$complete"
44163    arguments="EOL"
44164    new_path="$path"
44165
44166  windows_path="$new_path"
44167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44168    unix_path=`$CYGPATH -u "$windows_path"`
44169    new_path="$unix_path"
44170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44172    new_path="$unix_path"
44173  fi
44174
44175
44176    new_path=`$WHICH "$new_path" 2> /dev/null`
44177    # bat and cmd files are not always considered executable in MSYS causing which
44178    # to not find them
44179    if test "x$new_path" = x \
44180        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44181        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44182      new_path="$path"
44183
44184  windows_path="$new_path"
44185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44186    unix_path=`$CYGPATH -u "$windows_path"`
44187    new_path="$unix_path"
44188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44190    new_path="$unix_path"
44191  fi
44192
44193    fi
44194
44195    if test "x$new_path" = x; then
44196      # It's still not found. Now this is an unrecoverable error.
44197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44198$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44199      has_space=`$ECHO "$complete" | $GREP " "`
44200      if test "x$has_space" != x; then
44201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44203      fi
44204      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44205    fi
44206  fi
44207
44208  # Now new_path has a complete unix path to the binary
44209  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44210    # Keep paths in /bin as-is, but remove trailing .exe if any
44211    new_path="${new_path/%.exe/}"
44212    # Do not save /bin paths to all_fixpath_prefixes!
44213  else
44214    # Not in mixed or Windows style, start by that.
44215    new_path=`cmd //c echo $new_path`
44216
44217  input_path="$new_path"
44218  # Check if we need to convert this using DOS-style short mode. If the path
44219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44220  # take no chances and rewrite it.
44221  # Note: m4 eats our [], so we need to use [ and ] instead.
44222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44223  if test "x$has_forbidden_chars" != x; then
44224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44226  fi
44227
44228    # Output is in $new_path
44229
44230  windows_path="$new_path"
44231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44232    unix_path=`$CYGPATH -u "$windows_path"`
44233    new_path="$unix_path"
44234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44236    new_path="$unix_path"
44237  fi
44238
44239    # remove trailing .exe if any
44240    new_path="${new_path/%.exe/}"
44241
44242    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44243    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44244  fi
44245
44246    else
44247      # We're on a unix platform. Hooray! :)
44248      # First separate the path from the arguments. This will split at the first
44249      # space.
44250      complete="$BUILD_CXX"
44251      path="${complete%% *}"
44252      tmp="$complete EOL"
44253      arguments="${tmp#* }"
44254
44255      # Cannot rely on the command "which" here since it doesn't always work.
44256      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44257      if test -z "$is_absolute_path"; then
44258        # Path to executable is not absolute. Find it.
44259        IFS_save="$IFS"
44260        IFS=:
44261        for p in $PATH; do
44262          if test -f "$p/$path" && test -x "$p/$path"; then
44263            new_path="$p/$path"
44264            break
44265          fi
44266        done
44267        IFS="$IFS_save"
44268      else
44269        # This is an absolute path, we can use it without further modifications.
44270        new_path="$path"
44271      fi
44272
44273      if test "x$new_path" = x; then
44274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44275$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44276        has_space=`$ECHO "$complete" | $GREP " "`
44277        if test "x$has_space" != x; then
44278          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44279$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44280        fi
44281        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44282      fi
44283    fi
44284
44285    # Now join together the path and the arguments once again
44286    if test "x$arguments" != xEOL; then
44287      new_complete="$new_path ${arguments% *}"
44288    else
44289      new_complete="$new_path"
44290    fi
44291
44292    if test "x$complete" != "x$new_complete"; then
44293      BUILD_CXX="$new_complete"
44294      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44295$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44296    fi
44297  fi
44298
44299
44300
44301  # Publish this variable in the help.
44302
44303
44304  if [ -z "${BUILD_NM+x}" ]; then
44305    # The variable is not set by user, try to locate tool using the code snippet
44306    for ac_prog in nm gcc-nm
44307do
44308  # Extract the first word of "$ac_prog", so it can be a program name with args.
44309set dummy $ac_prog; ac_word=$2
44310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44311$as_echo_n "checking for $ac_word... " >&6; }
44312if ${ac_cv_path_BUILD_NM+:} false; then :
44313  $as_echo_n "(cached) " >&6
44314else
44315  case $BUILD_NM in
44316  [\\/]* | ?:[\\/]*)
44317  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44318  ;;
44319  *)
44320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44321for as_dir in $PATH
44322do
44323  IFS=$as_save_IFS
44324  test -z "$as_dir" && as_dir=.
44325    for ac_exec_ext in '' $ac_executable_extensions; do
44326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44327    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44329    break 2
44330  fi
44331done
44332  done
44333IFS=$as_save_IFS
44334
44335  ;;
44336esac
44337fi
44338BUILD_NM=$ac_cv_path_BUILD_NM
44339if test -n "$BUILD_NM"; then
44340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44341$as_echo "$BUILD_NM" >&6; }
44342else
44343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44344$as_echo "no" >&6; }
44345fi
44346
44347
44348  test -n "$BUILD_NM" && break
44349done
44350
44351  else
44352    # The variable is set, but is it from the command line or the environment?
44353
44354    # Try to remove the string !BUILD_NM! from our list.
44355    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44356    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44357      # If it failed, the variable was not from the command line. Ignore it,
44358      # but warn the user (except for BASH, which is always set by the calling BASH).
44359      if test "xBUILD_NM" != xBASH; then
44360        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44361$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44362      fi
44363      # Try to locate tool using the code snippet
44364      for ac_prog in nm gcc-nm
44365do
44366  # Extract the first word of "$ac_prog", so it can be a program name with args.
44367set dummy $ac_prog; ac_word=$2
44368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44369$as_echo_n "checking for $ac_word... " >&6; }
44370if ${ac_cv_path_BUILD_NM+:} false; then :
44371  $as_echo_n "(cached) " >&6
44372else
44373  case $BUILD_NM in
44374  [\\/]* | ?:[\\/]*)
44375  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44376  ;;
44377  *)
44378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44379for as_dir in $PATH
44380do
44381  IFS=$as_save_IFS
44382  test -z "$as_dir" && as_dir=.
44383    for ac_exec_ext in '' $ac_executable_extensions; do
44384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44385    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44387    break 2
44388  fi
44389done
44390  done
44391IFS=$as_save_IFS
44392
44393  ;;
44394esac
44395fi
44396BUILD_NM=$ac_cv_path_BUILD_NM
44397if test -n "$BUILD_NM"; then
44398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44399$as_echo "$BUILD_NM" >&6; }
44400else
44401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44402$as_echo "no" >&6; }
44403fi
44404
44405
44406  test -n "$BUILD_NM" && break
44407done
44408
44409    else
44410      # If it succeeded, then it was overridden by the user. We will use it
44411      # for the tool.
44412
44413      # First remove it from the list of overridden variables, so we can test
44414      # for unknown variables in the end.
44415      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44416
44417      # Check if we try to supply an empty value
44418      if test "x$BUILD_NM" = x; then
44419        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44420$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44421        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44422$as_echo_n "checking for BUILD_NM... " >&6; }
44423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44424$as_echo "disabled" >&6; }
44425      else
44426        # Check if the provided tool contains a complete path.
44427        tool_specified="$BUILD_NM"
44428        tool_basename="${tool_specified##*/}"
44429        if test "x$tool_basename" = "x$tool_specified"; then
44430          # A command without a complete path is provided, search $PATH.
44431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44432$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44433          # Extract the first word of "$tool_basename", so it can be a program name with args.
44434set dummy $tool_basename; ac_word=$2
44435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44436$as_echo_n "checking for $ac_word... " >&6; }
44437if ${ac_cv_path_BUILD_NM+:} false; then :
44438  $as_echo_n "(cached) " >&6
44439else
44440  case $BUILD_NM in
44441  [\\/]* | ?:[\\/]*)
44442  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44443  ;;
44444  *)
44445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44446for as_dir in $PATH
44447do
44448  IFS=$as_save_IFS
44449  test -z "$as_dir" && as_dir=.
44450    for ac_exec_ext in '' $ac_executable_extensions; do
44451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44452    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44454    break 2
44455  fi
44456done
44457  done
44458IFS=$as_save_IFS
44459
44460  ;;
44461esac
44462fi
44463BUILD_NM=$ac_cv_path_BUILD_NM
44464if test -n "$BUILD_NM"; then
44465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44466$as_echo "$BUILD_NM" >&6; }
44467else
44468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44469$as_echo "no" >&6; }
44470fi
44471
44472
44473          if test "x$BUILD_NM" = x; then
44474            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44475          fi
44476        else
44477          # Otherwise we believe it is a complete path. Use it as it is.
44478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44479$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44480          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44481$as_echo_n "checking for BUILD_NM... " >&6; }
44482          if test ! -x "$tool_specified"; then
44483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44484$as_echo "not found" >&6; }
44485            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44486          fi
44487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44488$as_echo "$tool_specified" >&6; }
44489        fi
44490      fi
44491    fi
44492
44493  fi
44494
44495
44496
44497  # Only process if variable expands to non-empty
44498
44499  if test "x$BUILD_NM" != x; then
44500    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44501
44502  # First separate the path from the arguments. This will split at the first
44503  # space.
44504  complete="$BUILD_NM"
44505  path="${complete%% *}"
44506  tmp="$complete EOL"
44507  arguments="${tmp#* }"
44508
44509  # Input might be given as Windows format, start by converting to
44510  # unix format.
44511  new_path=`$CYGPATH -u "$path"`
44512
44513  # Now try to locate executable using which
44514  new_path=`$WHICH "$new_path" 2> /dev/null`
44515  # bat and cmd files are not always considered executable in cygwin causing which
44516  # to not find them
44517  if test "x$new_path" = x \
44518      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44519      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44520    new_path=`$CYGPATH -u "$path"`
44521  fi
44522  if test "x$new_path" = x; then
44523    # Oops. Which didn't find the executable.
44524    # The splitting of arguments from the executable at a space might have been incorrect,
44525    # since paths with space are more likely in Windows. Give it another try with the whole
44526    # argument.
44527    path="$complete"
44528    arguments="EOL"
44529    new_path=`$CYGPATH -u "$path"`
44530    new_path=`$WHICH "$new_path" 2> /dev/null`
44531    # bat and cmd files are not always considered executable in cygwin causing which
44532    # to not find them
44533    if test "x$new_path" = x \
44534        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44535        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44536      new_path=`$CYGPATH -u "$path"`
44537    fi
44538    if test "x$new_path" = x; then
44539      # It's still not found. Now this is an unrecoverable error.
44540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44541$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44542      has_space=`$ECHO "$complete" | $GREP " "`
44543      if test "x$has_space" != x; then
44544        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44545$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44546      fi
44547      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44548    fi
44549  fi
44550
44551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44554  # "foo.exe" is OK but "foo" is an error.
44555  #
44556  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44557  # It is also a way to make sure we got the proper file name for the real test later on.
44558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44559  if test "x$test_shortpath" = x; then
44560    # Short path failed, file does not exist as specified.
44561    # Try adding .exe or .cmd
44562    if test -f "${new_path}.exe"; then
44563      input_to_shortpath="${new_path}.exe"
44564    elif test -f "${new_path}.cmd"; then
44565      input_to_shortpath="${new_path}.cmd"
44566    else
44567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44568$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44569      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44570$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44571      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44572    fi
44573  else
44574    input_to_shortpath="$new_path"
44575  fi
44576
44577  # Call helper function which possibly converts this using DOS-style short mode.
44578  # If so, the updated path is stored in $new_path.
44579  new_path="$input_to_shortpath"
44580
44581  input_path="$input_to_shortpath"
44582  # Check if we need to convert this using DOS-style short mode. If the path
44583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44584  # take no chances and rewrite it.
44585  # Note: m4 eats our [], so we need to use [ and ] instead.
44586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44587  if test "x$has_forbidden_chars" != x; then
44588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44592      # Going to short mode and back again did indeed matter. Since short mode is
44593      # case insensitive, let's make it lowercase to improve readability.
44594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44595      # Now convert it back to Unix-style (cygpath)
44596      input_path=`$CYGPATH -u "$shortmode_path"`
44597      new_path="$input_path"
44598    fi
44599  fi
44600
44601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44602  if test "x$test_cygdrive_prefix" = x; then
44603    # As a simple fix, exclude /usr/bin since it's not a real path.
44604    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44606      # a path prefixed by /cygdrive for fixpath to work.
44607      new_path="$CYGWIN_ROOT_PATH$input_path"
44608    fi
44609  fi
44610
44611  # remove trailing .exe if any
44612  new_path="${new_path/%.exe/}"
44613
44614    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44615
44616  # First separate the path from the arguments. This will split at the first
44617  # space.
44618  complete="$BUILD_NM"
44619  path="${complete%% *}"
44620  tmp="$complete EOL"
44621  arguments="${tmp#* }"
44622
44623  # Input might be given as Windows format, start by converting to
44624  # unix format.
44625  new_path="$path"
44626
44627  windows_path="$new_path"
44628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44629    unix_path=`$CYGPATH -u "$windows_path"`
44630    new_path="$unix_path"
44631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44633    new_path="$unix_path"
44634  fi
44635
44636
44637  # Now try to locate executable using which
44638  new_path=`$WHICH "$new_path" 2> /dev/null`
44639
44640  if test "x$new_path" = x; then
44641    # Oops. Which didn't find the executable.
44642    # The splitting of arguments from the executable at a space might have been incorrect,
44643    # since paths with space are more likely in Windows. Give it another try with the whole
44644    # argument.
44645    path="$complete"
44646    arguments="EOL"
44647    new_path="$path"
44648
44649  windows_path="$new_path"
44650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44651    unix_path=`$CYGPATH -u "$windows_path"`
44652    new_path="$unix_path"
44653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44655    new_path="$unix_path"
44656  fi
44657
44658
44659    new_path=`$WHICH "$new_path" 2> /dev/null`
44660    # bat and cmd files are not always considered executable in MSYS causing which
44661    # to not find them
44662    if test "x$new_path" = x \
44663        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44664        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44665      new_path="$path"
44666
44667  windows_path="$new_path"
44668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44669    unix_path=`$CYGPATH -u "$windows_path"`
44670    new_path="$unix_path"
44671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44673    new_path="$unix_path"
44674  fi
44675
44676    fi
44677
44678    if test "x$new_path" = x; then
44679      # It's still not found. Now this is an unrecoverable error.
44680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44681$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44682      has_space=`$ECHO "$complete" | $GREP " "`
44683      if test "x$has_space" != x; then
44684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44686      fi
44687      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44688    fi
44689  fi
44690
44691  # Now new_path has a complete unix path to the binary
44692  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44693    # Keep paths in /bin as-is, but remove trailing .exe if any
44694    new_path="${new_path/%.exe/}"
44695    # Do not save /bin paths to all_fixpath_prefixes!
44696  else
44697    # Not in mixed or Windows style, start by that.
44698    new_path=`cmd //c echo $new_path`
44699
44700  input_path="$new_path"
44701  # Check if we need to convert this using DOS-style short mode. If the path
44702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44703  # take no chances and rewrite it.
44704  # Note: m4 eats our [], so we need to use [ and ] instead.
44705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44706  if test "x$has_forbidden_chars" != x; then
44707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44709  fi
44710
44711    # Output is in $new_path
44712
44713  windows_path="$new_path"
44714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44715    unix_path=`$CYGPATH -u "$windows_path"`
44716    new_path="$unix_path"
44717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44719    new_path="$unix_path"
44720  fi
44721
44722    # remove trailing .exe if any
44723    new_path="${new_path/%.exe/}"
44724
44725    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44726    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44727  fi
44728
44729    else
44730      # We're on a unix platform. Hooray! :)
44731      # First separate the path from the arguments. This will split at the first
44732      # space.
44733      complete="$BUILD_NM"
44734      path="${complete%% *}"
44735      tmp="$complete EOL"
44736      arguments="${tmp#* }"
44737
44738      # Cannot rely on the command "which" here since it doesn't always work.
44739      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44740      if test -z "$is_absolute_path"; then
44741        # Path to executable is not absolute. Find it.
44742        IFS_save="$IFS"
44743        IFS=:
44744        for p in $PATH; do
44745          if test -f "$p/$path" && test -x "$p/$path"; then
44746            new_path="$p/$path"
44747            break
44748          fi
44749        done
44750        IFS="$IFS_save"
44751      else
44752        # This is an absolute path, we can use it without further modifications.
44753        new_path="$path"
44754      fi
44755
44756      if test "x$new_path" = x; then
44757        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44758$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44759        has_space=`$ECHO "$complete" | $GREP " "`
44760        if test "x$has_space" != x; then
44761          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44762$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44763        fi
44764        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44765      fi
44766    fi
44767
44768    # Now join together the path and the arguments once again
44769    if test "x$arguments" != xEOL; then
44770      new_complete="$new_path ${arguments% *}"
44771    else
44772      new_complete="$new_path"
44773    fi
44774
44775    if test "x$complete" != "x$new_complete"; then
44776      BUILD_NM="$new_complete"
44777      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44778$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44779    fi
44780  fi
44781
44782
44783
44784  # Publish this variable in the help.
44785
44786
44787  if [ -z "${BUILD_AR+x}" ]; then
44788    # The variable is not set by user, try to locate tool using the code snippet
44789    for ac_prog in ar gcc-ar
44790do
44791  # Extract the first word of "$ac_prog", so it can be a program name with args.
44792set dummy $ac_prog; ac_word=$2
44793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44794$as_echo_n "checking for $ac_word... " >&6; }
44795if ${ac_cv_path_BUILD_AR+:} false; then :
44796  $as_echo_n "(cached) " >&6
44797else
44798  case $BUILD_AR in
44799  [\\/]* | ?:[\\/]*)
44800  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44801  ;;
44802  *)
44803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44804for as_dir in $PATH
44805do
44806  IFS=$as_save_IFS
44807  test -z "$as_dir" && as_dir=.
44808    for ac_exec_ext in '' $ac_executable_extensions; do
44809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44810    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44812    break 2
44813  fi
44814done
44815  done
44816IFS=$as_save_IFS
44817
44818  ;;
44819esac
44820fi
44821BUILD_AR=$ac_cv_path_BUILD_AR
44822if test -n "$BUILD_AR"; then
44823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44824$as_echo "$BUILD_AR" >&6; }
44825else
44826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44827$as_echo "no" >&6; }
44828fi
44829
44830
44831  test -n "$BUILD_AR" && break
44832done
44833
44834  else
44835    # The variable is set, but is it from the command line or the environment?
44836
44837    # Try to remove the string !BUILD_AR! from our list.
44838    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44839    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44840      # If it failed, the variable was not from the command line. Ignore it,
44841      # but warn the user (except for BASH, which is always set by the calling BASH).
44842      if test "xBUILD_AR" != xBASH; then
44843        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44844$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44845      fi
44846      # Try to locate tool using the code snippet
44847      for ac_prog in ar gcc-ar
44848do
44849  # Extract the first word of "$ac_prog", so it can be a program name with args.
44850set dummy $ac_prog; ac_word=$2
44851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44852$as_echo_n "checking for $ac_word... " >&6; }
44853if ${ac_cv_path_BUILD_AR+:} false; then :
44854  $as_echo_n "(cached) " >&6
44855else
44856  case $BUILD_AR in
44857  [\\/]* | ?:[\\/]*)
44858  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44859  ;;
44860  *)
44861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44862for as_dir in $PATH
44863do
44864  IFS=$as_save_IFS
44865  test -z "$as_dir" && as_dir=.
44866    for ac_exec_ext in '' $ac_executable_extensions; do
44867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44868    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44870    break 2
44871  fi
44872done
44873  done
44874IFS=$as_save_IFS
44875
44876  ;;
44877esac
44878fi
44879BUILD_AR=$ac_cv_path_BUILD_AR
44880if test -n "$BUILD_AR"; then
44881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44882$as_echo "$BUILD_AR" >&6; }
44883else
44884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44885$as_echo "no" >&6; }
44886fi
44887
44888
44889  test -n "$BUILD_AR" && break
44890done
44891
44892    else
44893      # If it succeeded, then it was overridden by the user. We will use it
44894      # for the tool.
44895
44896      # First remove it from the list of overridden variables, so we can test
44897      # for unknown variables in the end.
44898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44899
44900      # Check if we try to supply an empty value
44901      if test "x$BUILD_AR" = x; then
44902        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44903$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44905$as_echo_n "checking for BUILD_AR... " >&6; }
44906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44907$as_echo "disabled" >&6; }
44908      else
44909        # Check if the provided tool contains a complete path.
44910        tool_specified="$BUILD_AR"
44911        tool_basename="${tool_specified##*/}"
44912        if test "x$tool_basename" = "x$tool_specified"; then
44913          # A command without a complete path is provided, search $PATH.
44914          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44915$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44916          # Extract the first word of "$tool_basename", so it can be a program name with args.
44917set dummy $tool_basename; ac_word=$2
44918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44919$as_echo_n "checking for $ac_word... " >&6; }
44920if ${ac_cv_path_BUILD_AR+:} false; then :
44921  $as_echo_n "(cached) " >&6
44922else
44923  case $BUILD_AR in
44924  [\\/]* | ?:[\\/]*)
44925  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44926  ;;
44927  *)
44928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44929for as_dir in $PATH
44930do
44931  IFS=$as_save_IFS
44932  test -z "$as_dir" && as_dir=.
44933    for ac_exec_ext in '' $ac_executable_extensions; do
44934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44935    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44937    break 2
44938  fi
44939done
44940  done
44941IFS=$as_save_IFS
44942
44943  ;;
44944esac
44945fi
44946BUILD_AR=$ac_cv_path_BUILD_AR
44947if test -n "$BUILD_AR"; then
44948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44949$as_echo "$BUILD_AR" >&6; }
44950else
44951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44952$as_echo "no" >&6; }
44953fi
44954
44955
44956          if test "x$BUILD_AR" = x; then
44957            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44958          fi
44959        else
44960          # Otherwise we believe it is a complete path. Use it as it is.
44961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44962$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44963          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44964$as_echo_n "checking for BUILD_AR... " >&6; }
44965          if test ! -x "$tool_specified"; then
44966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44967$as_echo "not found" >&6; }
44968            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44969          fi
44970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44971$as_echo "$tool_specified" >&6; }
44972        fi
44973      fi
44974    fi
44975
44976  fi
44977
44978
44979
44980  # Only process if variable expands to non-empty
44981
44982  if test "x$BUILD_AR" != x; then
44983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44984
44985  # First separate the path from the arguments. This will split at the first
44986  # space.
44987  complete="$BUILD_AR"
44988  path="${complete%% *}"
44989  tmp="$complete EOL"
44990  arguments="${tmp#* }"
44991
44992  # Input might be given as Windows format, start by converting to
44993  # unix format.
44994  new_path=`$CYGPATH -u "$path"`
44995
44996  # Now try to locate executable using which
44997  new_path=`$WHICH "$new_path" 2> /dev/null`
44998  # bat and cmd files are not always considered executable in cygwin causing which
44999  # to not find them
45000  if test "x$new_path" = x \
45001      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45002      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45003    new_path=`$CYGPATH -u "$path"`
45004  fi
45005  if test "x$new_path" = x; then
45006    # Oops. Which didn't find the executable.
45007    # The splitting of arguments from the executable at a space might have been incorrect,
45008    # since paths with space are more likely in Windows. Give it another try with the whole
45009    # argument.
45010    path="$complete"
45011    arguments="EOL"
45012    new_path=`$CYGPATH -u "$path"`
45013    new_path=`$WHICH "$new_path" 2> /dev/null`
45014    # bat and cmd files are not always considered executable in cygwin causing which
45015    # to not find them
45016    if test "x$new_path" = x \
45017        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45018        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45019      new_path=`$CYGPATH -u "$path"`
45020    fi
45021    if test "x$new_path" = x; then
45022      # It's still not found. Now this is an unrecoverable error.
45023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45024$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45025      has_space=`$ECHO "$complete" | $GREP " "`
45026      if test "x$has_space" != x; then
45027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45029      fi
45030      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45031    fi
45032  fi
45033
45034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45037  # "foo.exe" is OK but "foo" is an error.
45038  #
45039  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45040  # It is also a way to make sure we got the proper file name for the real test later on.
45041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45042  if test "x$test_shortpath" = x; then
45043    # Short path failed, file does not exist as specified.
45044    # Try adding .exe or .cmd
45045    if test -f "${new_path}.exe"; then
45046      input_to_shortpath="${new_path}.exe"
45047    elif test -f "${new_path}.cmd"; then
45048      input_to_shortpath="${new_path}.cmd"
45049    else
45050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45051$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45052      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45053$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45054      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45055    fi
45056  else
45057    input_to_shortpath="$new_path"
45058  fi
45059
45060  # Call helper function which possibly converts this using DOS-style short mode.
45061  # If so, the updated path is stored in $new_path.
45062  new_path="$input_to_shortpath"
45063
45064  input_path="$input_to_shortpath"
45065  # Check if we need to convert this using DOS-style short mode. If the path
45066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45067  # take no chances and rewrite it.
45068  # Note: m4 eats our [], so we need to use [ and ] instead.
45069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45070  if test "x$has_forbidden_chars" != x; then
45071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45075      # Going to short mode and back again did indeed matter. Since short mode is
45076      # case insensitive, let's make it lowercase to improve readability.
45077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45078      # Now convert it back to Unix-style (cygpath)
45079      input_path=`$CYGPATH -u "$shortmode_path"`
45080      new_path="$input_path"
45081    fi
45082  fi
45083
45084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45085  if test "x$test_cygdrive_prefix" = x; then
45086    # As a simple fix, exclude /usr/bin since it's not a real path.
45087    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45089      # a path prefixed by /cygdrive for fixpath to work.
45090      new_path="$CYGWIN_ROOT_PATH$input_path"
45091    fi
45092  fi
45093
45094  # remove trailing .exe if any
45095  new_path="${new_path/%.exe/}"
45096
45097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45098
45099  # First separate the path from the arguments. This will split at the first
45100  # space.
45101  complete="$BUILD_AR"
45102  path="${complete%% *}"
45103  tmp="$complete EOL"
45104  arguments="${tmp#* }"
45105
45106  # Input might be given as Windows format, start by converting to
45107  # unix format.
45108  new_path="$path"
45109
45110  windows_path="$new_path"
45111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45112    unix_path=`$CYGPATH -u "$windows_path"`
45113    new_path="$unix_path"
45114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45116    new_path="$unix_path"
45117  fi
45118
45119
45120  # Now try to locate executable using which
45121  new_path=`$WHICH "$new_path" 2> /dev/null`
45122
45123  if test "x$new_path" = x; then
45124    # Oops. Which didn't find the executable.
45125    # The splitting of arguments from the executable at a space might have been incorrect,
45126    # since paths with space are more likely in Windows. Give it another try with the whole
45127    # argument.
45128    path="$complete"
45129    arguments="EOL"
45130    new_path="$path"
45131
45132  windows_path="$new_path"
45133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45134    unix_path=`$CYGPATH -u "$windows_path"`
45135    new_path="$unix_path"
45136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45138    new_path="$unix_path"
45139  fi
45140
45141
45142    new_path=`$WHICH "$new_path" 2> /dev/null`
45143    # bat and cmd files are not always considered executable in MSYS causing which
45144    # to not find them
45145    if test "x$new_path" = x \
45146        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45147        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45148      new_path="$path"
45149
45150  windows_path="$new_path"
45151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45152    unix_path=`$CYGPATH -u "$windows_path"`
45153    new_path="$unix_path"
45154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45156    new_path="$unix_path"
45157  fi
45158
45159    fi
45160
45161    if test "x$new_path" = x; then
45162      # It's still not found. Now this is an unrecoverable error.
45163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45164$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45165      has_space=`$ECHO "$complete" | $GREP " "`
45166      if test "x$has_space" != x; then
45167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45169      fi
45170      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45171    fi
45172  fi
45173
45174  # Now new_path has a complete unix path to the binary
45175  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45176    # Keep paths in /bin as-is, but remove trailing .exe if any
45177    new_path="${new_path/%.exe/}"
45178    # Do not save /bin paths to all_fixpath_prefixes!
45179  else
45180    # Not in mixed or Windows style, start by that.
45181    new_path=`cmd //c echo $new_path`
45182
45183  input_path="$new_path"
45184  # Check if we need to convert this using DOS-style short mode. If the path
45185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45186  # take no chances and rewrite it.
45187  # Note: m4 eats our [], so we need to use [ and ] instead.
45188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45189  if test "x$has_forbidden_chars" != x; then
45190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45192  fi
45193
45194    # Output is in $new_path
45195
45196  windows_path="$new_path"
45197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45198    unix_path=`$CYGPATH -u "$windows_path"`
45199    new_path="$unix_path"
45200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45202    new_path="$unix_path"
45203  fi
45204
45205    # remove trailing .exe if any
45206    new_path="${new_path/%.exe/}"
45207
45208    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45209    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45210  fi
45211
45212    else
45213      # We're on a unix platform. Hooray! :)
45214      # First separate the path from the arguments. This will split at the first
45215      # space.
45216      complete="$BUILD_AR"
45217      path="${complete%% *}"
45218      tmp="$complete EOL"
45219      arguments="${tmp#* }"
45220
45221      # Cannot rely on the command "which" here since it doesn't always work.
45222      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45223      if test -z "$is_absolute_path"; then
45224        # Path to executable is not absolute. Find it.
45225        IFS_save="$IFS"
45226        IFS=:
45227        for p in $PATH; do
45228          if test -f "$p/$path" && test -x "$p/$path"; then
45229            new_path="$p/$path"
45230            break
45231          fi
45232        done
45233        IFS="$IFS_save"
45234      else
45235        # This is an absolute path, we can use it without further modifications.
45236        new_path="$path"
45237      fi
45238
45239      if test "x$new_path" = x; then
45240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45241$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45242        has_space=`$ECHO "$complete" | $GREP " "`
45243        if test "x$has_space" != x; then
45244          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45245$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45246        fi
45247        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45248      fi
45249    fi
45250
45251    # Now join together the path and the arguments once again
45252    if test "x$arguments" != xEOL; then
45253      new_complete="$new_path ${arguments% *}"
45254    else
45255      new_complete="$new_path"
45256    fi
45257
45258    if test "x$complete" != "x$new_complete"; then
45259      BUILD_AR="$new_complete"
45260      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45261$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45262    fi
45263  fi
45264
45265    # Assume the C compiler is the assembler
45266    BUILD_AS="$BUILD_CC -c"
45267    # Just like for the target compiler, use the compiler as linker
45268    BUILD_LD="$BUILD_CC"
45269    BUILD_LDCXX="$BUILD_CXX"
45270
45271    PATH="$OLDPATH"
45272  else
45273    # If we are not cross compiling, use the normal target compilers for
45274    # building the build platform executables.
45275    BUILD_CC="$CC"
45276    BUILD_CXX="$CXX"
45277    BUILD_LD="$LD"
45278    BUILD_LDCXX="$LDCXX"
45279    BUILD_NM="$NM"
45280    BUILD_AS="$AS"
45281    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
45282    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
45283    BUILD_AR="$AR"
45284  fi
45285
45286
45287
45288
45289
45290
45291
45292
45293
45294
45295
45296
45297  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45298    # For hotspot, we need these in Windows mixed path,
45299    # so rewrite them all. Need added .exe suffix.
45300    HOTSPOT_CXX="$CXX.exe"
45301    HOTSPOT_LD="$LD.exe"
45302    HOTSPOT_MT="$MT.exe"
45303    HOTSPOT_RC="$RC.exe"
45304
45305  unix_path="$HOTSPOT_CXX"
45306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45307    windows_path=`$CYGPATH -m "$unix_path"`
45308    HOTSPOT_CXX="$windows_path"
45309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45310    windows_path=`cmd //c echo $unix_path`
45311    HOTSPOT_CXX="$windows_path"
45312  fi
45313
45314
45315  unix_path="$HOTSPOT_LD"
45316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45317    windows_path=`$CYGPATH -m "$unix_path"`
45318    HOTSPOT_LD="$windows_path"
45319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45320    windows_path=`cmd //c echo $unix_path`
45321    HOTSPOT_LD="$windows_path"
45322  fi
45323
45324
45325  unix_path="$HOTSPOT_MT"
45326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45327    windows_path=`$CYGPATH -m "$unix_path"`
45328    HOTSPOT_MT="$windows_path"
45329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45330    windows_path=`cmd //c echo $unix_path`
45331    HOTSPOT_MT="$windows_path"
45332  fi
45333
45334
45335  unix_path="$HOTSPOT_RC"
45336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45337    windows_path=`$CYGPATH -m "$unix_path"`
45338    HOTSPOT_RC="$windows_path"
45339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45340    windows_path=`cmd //c echo $unix_path`
45341    HOTSPOT_RC="$windows_path"
45342  fi
45343
45344
45345
45346  else
45347    HOTSPOT_CXX="$CXX"
45348    HOTSPOT_LD="$LD"
45349  fi
45350
45351
45352
45353  if test  "x$TOOLCHAIN_TYPE" = xclang; then
45354    USE_CLANG=true
45355  fi
45356
45357
45358
45359
45360
45361  # The package path is used only on macosx?
45362  # FIXME: clean this up, and/or move it elsewhere.
45363  PACKAGE_PATH=/opt/local
45364
45365
45366  # Check for extra potential brokenness.
45367  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45368    # On Windows, double-check that we got the right compiler.
45369    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
45370    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
45371    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
45372      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
45373        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
45374      fi
45375    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
45376      if test "x$COMPILER_CPU_TEST" != "xx64"; then
45377        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
45378      fi
45379    fi
45380  fi
45381
45382  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45383    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45384    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
45385    # This is later checked when setting flags.
45386
45387    # "-Og" suppported for GCC 4.8 and later
45388    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
45389
45390
45391
45392
45393
45394
45395
45396
45397
45398
45399
45400
45401
45402
45403
45404
45405
45406
45407
45408
45409
45410
45411
45412
45413
45414
45415
45416
45417
45418
45419
45420
45421
45422
45423
45424
45425
45426
45427
45428
45429
45430
45431
45432
45433
45434
45435
45436    # Execute function body
45437
45438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
45439$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
45440  supports=yes
45441
45442  saved_cflags="$CFLAGS"
45443  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
45444  ac_ext=c
45445ac_cpp='$CPP $CPPFLAGS'
45446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45448ac_compiler_gnu=$ac_cv_c_compiler_gnu
45449
45450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45451/* end confdefs.h.  */
45452int i;
45453_ACEOF
45454if ac_fn_c_try_compile "$LINENO"; then :
45455
45456else
45457  supports=no
45458fi
45459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45460  ac_ext=cpp
45461ac_cpp='$CXXCPP $CPPFLAGS'
45462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45465
45466  CFLAGS="$saved_cflags"
45467
45468  saved_cxxflags="$CXXFLAGS"
45469  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
45470  ac_ext=cpp
45471ac_cpp='$CXXCPP $CPPFLAGS'
45472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45475
45476  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45477/* end confdefs.h.  */
45478int i;
45479_ACEOF
45480if ac_fn_cxx_try_compile "$LINENO"; then :
45481
45482else
45483  supports=no
45484fi
45485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45486  ac_ext=cpp
45487ac_cpp='$CXXCPP $CPPFLAGS'
45488ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45489ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45490ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45491
45492  CXXFLAGS="$saved_cxxflags"
45493
45494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45495$as_echo "$supports" >&6; }
45496  if test "x$supports" = "xyes" ; then
45497    :
45498    HAS_CFLAG_OPTIMIZE_DEBUG=true
45499  else
45500    :
45501    HAS_CFLAG_OPTIMIZE_DEBUG=false
45502  fi
45503
45504
45505
45506
45507
45508
45509
45510
45511
45512
45513
45514
45515
45516    # "-z relro" supported in GNU binutils 2.17 and later
45517    LINKER_RELRO_FLAG="-Wl,-z,relro"
45518
45519
45520
45521
45522
45523
45524
45525
45526
45527
45528
45529
45530
45531
45532
45533
45534
45535
45536
45537
45538
45539
45540
45541
45542
45543
45544
45545
45546
45547
45548
45549
45550
45551
45552
45553
45554
45555
45556
45557
45558
45559
45560
45561
45562
45563
45564
45565    # Execute function body
45566
45567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
45568$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
45569  supports=yes
45570
45571  saved_ldflags="$LDFLAGS"
45572  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
45573  ac_ext=c
45574ac_cpp='$CPP $CPPFLAGS'
45575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45577ac_compiler_gnu=$ac_cv_c_compiler_gnu
45578
45579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45580/* end confdefs.h.  */
45581
45582int
45583main ()
45584{
45585
45586  ;
45587  return 0;
45588}
45589_ACEOF
45590if ac_fn_c_try_link "$LINENO"; then :
45591
45592else
45593  supports=no
45594fi
45595rm -f core conftest.err conftest.$ac_objext \
45596    conftest$ac_exeext conftest.$ac_ext
45597  ac_ext=cpp
45598ac_cpp='$CXXCPP $CPPFLAGS'
45599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45602
45603  LDFLAGS="$saved_ldflags"
45604
45605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45606$as_echo "$supports" >&6; }
45607  if test "x$supports" = "xyes" ; then
45608    :
45609    HAS_LINKER_RELRO=true
45610  else
45611    :
45612    HAS_LINKER_RELRO=false
45613  fi
45614
45615
45616
45617
45618
45619
45620
45621
45622
45623
45624
45625
45626
45627    # "-z now" supported in GNU binutils 2.11 and later
45628    LINKER_NOW_FLAG="-Wl,-z,now"
45629
45630
45631
45632
45633
45634
45635
45636
45637
45638
45639
45640
45641
45642
45643
45644
45645
45646
45647
45648
45649
45650
45651
45652
45653
45654
45655
45656
45657
45658
45659
45660
45661
45662
45663
45664
45665
45666
45667
45668
45669
45670
45671
45672
45673
45674
45675
45676    # Execute function body
45677
45678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
45679$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
45680  supports=yes
45681
45682  saved_ldflags="$LDFLAGS"
45683  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
45684  ac_ext=c
45685ac_cpp='$CPP $CPPFLAGS'
45686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45688ac_compiler_gnu=$ac_cv_c_compiler_gnu
45689
45690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45691/* end confdefs.h.  */
45692
45693int
45694main ()
45695{
45696
45697  ;
45698  return 0;
45699}
45700_ACEOF
45701if ac_fn_c_try_link "$LINENO"; then :
45702
45703else
45704  supports=no
45705fi
45706rm -f core conftest.err conftest.$ac_objext \
45707    conftest$ac_exeext conftest.$ac_ext
45708  ac_ext=cpp
45709ac_cpp='$CXXCPP $CPPFLAGS'
45710ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45711ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45712ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45713
45714  LDFLAGS="$saved_ldflags"
45715
45716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45717$as_echo "$supports" >&6; }
45718  if test "x$supports" = "xyes" ; then
45719    :
45720    HAS_LINKER_NOW=true
45721  else
45722    :
45723    HAS_LINKER_NOW=false
45724  fi
45725
45726
45727
45728
45729
45730
45731
45732
45733
45734
45735
45736
45737  fi
45738
45739  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
45740  # in executable.'
45741  USING_BROKEN_SUSE_LD=no
45742  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
45743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
45744$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
45745    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
45746    $ECHO "int main() { }" > main.c
45747    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
45748      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45749$as_echo "no" >&6; }
45750      USING_BROKEN_SUSE_LD=no
45751    else
45752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45753$as_echo "yes" >&6; }
45754      USING_BROKEN_SUSE_LD=yes
45755    fi
45756    rm -rf version-script.map main.c a.out
45757  fi
45758
45759
45760
45761# Setup the JTReg Regression Test Harness.
45762
45763
45764# Check whether --with-jtreg was given.
45765if test "${with_jtreg+set}" = set; then :
45766  withval=$with_jtreg;
45767else
45768  with_jtreg=no
45769fi
45770
45771
45772  if test "x$with_jtreg" = xno; then
45773    # jtreg disabled
45774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45775$as_echo_n "checking for jtreg... " >&6; }
45776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45777$as_echo "no" >&6; }
45778  else
45779    if test "x$with_jtreg" != xyes; then
45780      # with path specified.
45781      JT_HOME="$with_jtreg"
45782    fi
45783
45784    if test "x$JT_HOME" != x; then
45785      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45786$as_echo_n "checking for jtreg... " >&6; }
45787
45788      # use JT_HOME enviroment var.
45789
45790  # Only process if variable expands to non-empty
45791
45792  if test "x$JT_HOME" != x; then
45793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45794
45795  # Input might be given as Windows format, start by converting to
45796  # unix format.
45797  path="$JT_HOME"
45798  new_path=`$CYGPATH -u "$path"`
45799
45800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45803  # "foo.exe" is OK but "foo" is an error.
45804  #
45805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45806  # It is also a way to make sure we got the proper file name for the real test later on.
45807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45808  if test "x$test_shortpath" = x; then
45809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45810$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45811    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45812  fi
45813
45814  # Call helper function which possibly converts this using DOS-style short mode.
45815  # If so, the updated path is stored in $new_path.
45816
45817  input_path="$new_path"
45818  # Check if we need to convert this using DOS-style short mode. If the path
45819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45820  # take no chances and rewrite it.
45821  # Note: m4 eats our [], so we need to use [ and ] instead.
45822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45823  if test "x$has_forbidden_chars" != x; then
45824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45828      # Going to short mode and back again did indeed matter. Since short mode is
45829      # case insensitive, let's make it lowercase to improve readability.
45830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45831      # Now convert it back to Unix-style (cygpath)
45832      input_path=`$CYGPATH -u "$shortmode_path"`
45833      new_path="$input_path"
45834    fi
45835  fi
45836
45837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45838  if test "x$test_cygdrive_prefix" = x; then
45839    # As a simple fix, exclude /usr/bin since it's not a real path.
45840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45842      # a path prefixed by /cygdrive for fixpath to work.
45843      new_path="$CYGWIN_ROOT_PATH$input_path"
45844    fi
45845  fi
45846
45847
45848  if test "x$path" != "x$new_path"; then
45849    JT_HOME="$new_path"
45850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45851$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45852  fi
45853
45854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45855
45856  path="$JT_HOME"
45857  has_colon=`$ECHO $path | $GREP ^.:`
45858  new_path="$path"
45859  if test "x$has_colon" = x; then
45860    # Not in mixed or Windows style, start by that.
45861    new_path=`cmd //c echo $path`
45862  fi
45863
45864
45865  input_path="$new_path"
45866  # Check if we need to convert this using DOS-style short mode. If the path
45867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45868  # take no chances and rewrite it.
45869  # Note: m4 eats our [], so we need to use [ and ] instead.
45870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45871  if test "x$has_forbidden_chars" != x; then
45872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45874  fi
45875
45876
45877  windows_path="$new_path"
45878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45879    unix_path=`$CYGPATH -u "$windows_path"`
45880    new_path="$unix_path"
45881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45883    new_path="$unix_path"
45884  fi
45885
45886  if test "x$path" != "x$new_path"; then
45887    JT_HOME="$new_path"
45888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45889$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45890  fi
45891
45892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45894
45895    else
45896      # We're on a unix platform. Hooray! :)
45897      path="$JT_HOME"
45898      has_space=`$ECHO "$path" | $GREP " "`
45899      if test "x$has_space" != x; then
45900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45901$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45902        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45903      fi
45904
45905      # Use eval to expand a potential ~
45906      eval path="$path"
45907      if test ! -f "$path" && test ! -d "$path"; then
45908        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45909      fi
45910
45911      if test -d "$path"; then
45912        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45913      else
45914        dir="`$DIRNAME "$path"`"
45915        base="`$BASENAME "$path"`"
45916        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45917      fi
45918    fi
45919  fi
45920
45921
45922      # jtreg win32 script works for everybody
45923      JTREGEXE="$JT_HOME/bin/jtreg"
45924
45925      if test ! -f "$JTREGEXE"; then
45926        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45927      fi
45928
45929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45930$as_echo "$JTREGEXE" >&6; }
45931    else
45932      # try to find jtreg on path
45933
45934
45935
45936  # Publish this variable in the help.
45937
45938
45939  if [ -z "${JTREGEXE+x}" ]; then
45940    # The variable is not set by user, try to locate tool using the code snippet
45941    for ac_prog in jtreg
45942do
45943  # Extract the first word of "$ac_prog", so it can be a program name with args.
45944set dummy $ac_prog; ac_word=$2
45945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45946$as_echo_n "checking for $ac_word... " >&6; }
45947if ${ac_cv_path_JTREGEXE+:} false; then :
45948  $as_echo_n "(cached) " >&6
45949else
45950  case $JTREGEXE in
45951  [\\/]* | ?:[\\/]*)
45952  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45953  ;;
45954  *)
45955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45956for as_dir in $PATH
45957do
45958  IFS=$as_save_IFS
45959  test -z "$as_dir" && as_dir=.
45960    for ac_exec_ext in '' $ac_executable_extensions; do
45961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45962    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45964    break 2
45965  fi
45966done
45967  done
45968IFS=$as_save_IFS
45969
45970  ;;
45971esac
45972fi
45973JTREGEXE=$ac_cv_path_JTREGEXE
45974if test -n "$JTREGEXE"; then
45975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45976$as_echo "$JTREGEXE" >&6; }
45977else
45978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45979$as_echo "no" >&6; }
45980fi
45981
45982
45983  test -n "$JTREGEXE" && break
45984done
45985
45986  else
45987    # The variable is set, but is it from the command line or the environment?
45988
45989    # Try to remove the string !JTREGEXE! from our list.
45990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45992      # If it failed, the variable was not from the command line. Ignore it,
45993      # but warn the user (except for BASH, which is always set by the calling BASH).
45994      if test "xJTREGEXE" != xBASH; then
45995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45996$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45997      fi
45998      # Try to locate tool using the code snippet
45999      for ac_prog in jtreg
46000do
46001  # Extract the first word of "$ac_prog", so it can be a program name with args.
46002set dummy $ac_prog; ac_word=$2
46003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46004$as_echo_n "checking for $ac_word... " >&6; }
46005if ${ac_cv_path_JTREGEXE+:} false; then :
46006  $as_echo_n "(cached) " >&6
46007else
46008  case $JTREGEXE in
46009  [\\/]* | ?:[\\/]*)
46010  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46011  ;;
46012  *)
46013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46014for as_dir in $PATH
46015do
46016  IFS=$as_save_IFS
46017  test -z "$as_dir" && as_dir=.
46018    for ac_exec_ext in '' $ac_executable_extensions; do
46019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46020    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
46021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46022    break 2
46023  fi
46024done
46025  done
46026IFS=$as_save_IFS
46027
46028  ;;
46029esac
46030fi
46031JTREGEXE=$ac_cv_path_JTREGEXE
46032if test -n "$JTREGEXE"; then
46033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46034$as_echo "$JTREGEXE" >&6; }
46035else
46036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46037$as_echo "no" >&6; }
46038fi
46039
46040
46041  test -n "$JTREGEXE" && break
46042done
46043
46044    else
46045      # If it succeeded, then it was overridden by the user. We will use it
46046      # for the tool.
46047
46048      # First remove it from the list of overridden variables, so we can test
46049      # for unknown variables in the end.
46050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46051
46052      # Check if we try to supply an empty value
46053      if test "x$JTREGEXE" = x; then
46054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
46055$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
46056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
46057$as_echo_n "checking for JTREGEXE... " >&6; }
46058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46059$as_echo "disabled" >&6; }
46060      else
46061        # Check if the provided tool contains a complete path.
46062        tool_specified="$JTREGEXE"
46063        tool_basename="${tool_specified##*/}"
46064        if test "x$tool_basename" = "x$tool_specified"; then
46065          # A command without a complete path is provided, search $PATH.
46066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
46067$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
46068          # Extract the first word of "$tool_basename", so it can be a program name with args.
46069set dummy $tool_basename; ac_word=$2
46070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46071$as_echo_n "checking for $ac_word... " >&6; }
46072if ${ac_cv_path_JTREGEXE+:} false; then :
46073  $as_echo_n "(cached) " >&6
46074else
46075  case $JTREGEXE in
46076  [\\/]* | ?:[\\/]*)
46077  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46078  ;;
46079  *)
46080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46081for as_dir in $PATH
46082do
46083  IFS=$as_save_IFS
46084  test -z "$as_dir" && as_dir=.
46085    for ac_exec_ext in '' $ac_executable_extensions; do
46086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46087    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
46088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46089    break 2
46090  fi
46091done
46092  done
46093IFS=$as_save_IFS
46094
46095  ;;
46096esac
46097fi
46098JTREGEXE=$ac_cv_path_JTREGEXE
46099if test -n "$JTREGEXE"; then
46100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46101$as_echo "$JTREGEXE" >&6; }
46102else
46103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46104$as_echo "no" >&6; }
46105fi
46106
46107
46108          if test "x$JTREGEXE" = x; then
46109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46110          fi
46111        else
46112          # Otherwise we believe it is a complete path. Use it as it is.
46113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
46114$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
46115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
46116$as_echo_n "checking for JTREGEXE... " >&6; }
46117          if test ! -x "$tool_specified"; then
46118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46119$as_echo "not found" >&6; }
46120            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
46121          fi
46122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46123$as_echo "$tool_specified" >&6; }
46124        fi
46125      fi
46126    fi
46127
46128  fi
46129
46130
46131
46132  if test "x$JTREGEXE" = x; then
46133    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
46134  fi
46135
46136
46137      JT_HOME="`$DIRNAME $JTREGEXE`"
46138    fi
46139  fi
46140
46141
46142
46143
46144
46145
46146  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
46147  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
46148  if test "x$TOOLCHAIN_TYPE" = xxlc; then
46149    COMPILER_TARGET_BITS_FLAG="-q"
46150    COMPILER_COMMAND_FILE_FLAG="-f"
46151  else
46152    COMPILER_TARGET_BITS_FLAG="-m"
46153    COMPILER_COMMAND_FILE_FLAG="@"
46154
46155    # The solstudio linker does not support @-files.
46156    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46157      COMPILER_COMMAND_FILE_FLAG=
46158    fi
46159
46160    # Check if @file is supported by gcc
46161    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
46163$as_echo_n "checking if @file is supported by gcc... " >&6; }
46164      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
46165      $ECHO "" "--version" > command.file
46166      if $CXX @command.file 2>&5 >&5; then
46167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46168$as_echo "yes" >&6; }
46169        COMPILER_COMMAND_FILE_FLAG="@"
46170      else
46171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46172$as_echo "no" >&6; }
46173        COMPILER_COMMAND_FILE_FLAG=
46174      fi
46175      rm -rf command.file
46176    fi
46177  fi
46178
46179
46180
46181  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
46182  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46183    ARFLAGS="-r"
46184  elif test "x$OPENJDK_TARGET_OS" = xaix; then
46185    ARFLAGS="-X64"
46186  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
46187    # lib.exe is used as AR to create static libraries.
46188    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
46189  else
46190    ARFLAGS=""
46191  fi
46192
46193
46194  ## Setup strip.
46195  # FIXME: should this really be per platform, or should it be per toolchain type?
46196  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
46197  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
46198  if test "x$OPENJDK_TARGET_OS" = xlinux; then
46199    STRIPFLAGS="-g"
46200  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
46201    STRIPFLAGS="-x"
46202  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
46203    STRIPFLAGS="-S"
46204  elif test "x$OPENJDK_TARGET_OS" = xaix; then
46205    STRIPFLAGS="-X32_64"
46206  fi
46207
46208
46209
46210  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46211    CC_OUT_OPTION=-Fo
46212    EXE_OUT_OPTION=-out:
46213    LD_OUT_OPTION=-out:
46214    AR_OUT_OPTION=-out:
46215  else
46216    # The option used to specify the target .o,.a or .so file.
46217    # When compiling, how to specify the to be created object file.
46218    CC_OUT_OPTION='-o$(SPACE)'
46219    # When linking, how to specify the to be created executable.
46220    EXE_OUT_OPTION='-o$(SPACE)'
46221    # When linking, how to specify the to be created dynamically linkable library.
46222    LD_OUT_OPTION='-o$(SPACE)'
46223    # When archiving, how to specify the to be create static archive for object files.
46224    AR_OUT_OPTION='rcs$(SPACE)'
46225  fi
46226
46227
46228
46229
46230
46231  # On Windows, we need to set RC flags.
46232  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46233    RC_FLAGS="-nologo -l0x409"
46234    if test "x$VARIANT" = xOPT; then
46235      RC_FLAGS="$RC_FLAGS -DNDEBUG"
46236    fi
46237
46238    # The version variables used to create RC_FLAGS may be overridden
46239    # in a custom configure script, or possibly the command line.
46240    # Let those variables be expanded at make time in spec.gmk.
46241    # The \$ are escaped to the shell, and the $(...) variables
46242    # are evaluated by make.
46243    RC_FLAGS="$RC_FLAGS \
46244        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
46245        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
46246        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
46247        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
46248        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
46249        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
46250        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
46251  fi
46252
46253
46254  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46255    # silence copyright notice and other headers.
46256    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
46257  fi
46258
46259
46260# FIXME: Currently we must test this after toolchain but before flags. Fix!
46261
46262# Now we can test some aspects on the target using configure macros.
46263
46264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
46265$as_echo_n "checking for ANSI C header files... " >&6; }
46266if ${ac_cv_header_stdc+:} false; then :
46267  $as_echo_n "(cached) " >&6
46268else
46269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46270/* end confdefs.h.  */
46271#include <stdlib.h>
46272#include <stdarg.h>
46273#include <string.h>
46274#include <float.h>
46275
46276int
46277main ()
46278{
46279
46280  ;
46281  return 0;
46282}
46283_ACEOF
46284if ac_fn_cxx_try_compile "$LINENO"; then :
46285  ac_cv_header_stdc=yes
46286else
46287  ac_cv_header_stdc=no
46288fi
46289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46290
46291if test $ac_cv_header_stdc = yes; then
46292  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
46293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46294/* end confdefs.h.  */
46295#include <string.h>
46296
46297_ACEOF
46298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46299  $EGREP "memchr" >/dev/null 2>&1; then :
46300
46301else
46302  ac_cv_header_stdc=no
46303fi
46304rm -f conftest*
46305
46306fi
46307
46308if test $ac_cv_header_stdc = yes; then
46309  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
46310  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46311/* end confdefs.h.  */
46312#include <stdlib.h>
46313
46314_ACEOF
46315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46316  $EGREP "free" >/dev/null 2>&1; then :
46317
46318else
46319  ac_cv_header_stdc=no
46320fi
46321rm -f conftest*
46322
46323fi
46324
46325if test $ac_cv_header_stdc = yes; then
46326  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
46327  if test "$cross_compiling" = yes; then :
46328  :
46329else
46330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46331/* end confdefs.h.  */
46332#include <ctype.h>
46333#include <stdlib.h>
46334#if ((' ' & 0x0FF) == 0x020)
46335# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
46336# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
46337#else
46338# define ISLOWER(c) \
46339		   (('a' <= (c) && (c) <= 'i') \
46340		     || ('j' <= (c) && (c) <= 'r') \
46341		     || ('s' <= (c) && (c) <= 'z'))
46342# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
46343#endif
46344
46345#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
46346int
46347main ()
46348{
46349  int i;
46350  for (i = 0; i < 256; i++)
46351    if (XOR (islower (i), ISLOWER (i))
46352	|| toupper (i) != TOUPPER (i))
46353      return 2;
46354  return 0;
46355}
46356_ACEOF
46357if ac_fn_cxx_try_run "$LINENO"; then :
46358
46359else
46360  ac_cv_header_stdc=no
46361fi
46362rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46363  conftest.$ac_objext conftest.beam conftest.$ac_ext
46364fi
46365
46366fi
46367fi
46368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
46369$as_echo "$ac_cv_header_stdc" >&6; }
46370if test $ac_cv_header_stdc = yes; then
46371
46372$as_echo "#define STDC_HEADERS 1" >>confdefs.h
46373
46374fi
46375
46376# On IRIX 5.3, sys/types and inttypes.h are conflicting.
46377for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
46378		  inttypes.h stdint.h unistd.h
46379do :
46380  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
46381ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
46382"
46383if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
46384  cat >>confdefs.h <<_ACEOF
46385#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
46386_ACEOF
46387
46388fi
46389
46390done
46391
46392
46393
46394  ###############################################################################
46395  #
46396  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
46397  # (The JVM can use 32 or 64 bit Java pointers but that decision
46398  # is made at runtime.)
46399  #
46400
46401  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
46402    # Always specify -m flag on Solaris
46403    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
46404
46405  # When we add flags to the "official" CFLAGS etc, we need to
46406  # keep track of these additions in ADDED_CFLAGS etc. These
46407  # will later be checked to make sure only controlled additions
46408  # have been made to CFLAGS etc.
46409  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46410  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46411  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46412
46413  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46414  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46415  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46416
46417  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46418  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46419  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46420
46421  elif test "x$COMPILE_TYPE" = xreduced; then
46422    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
46423      # Specify -m if running reduced on unix platforms
46424
46425  # When we add flags to the "official" CFLAGS etc, we need to
46426  # keep track of these additions in ADDED_CFLAGS etc. These
46427  # will later be checked to make sure only controlled additions
46428  # have been made to CFLAGS etc.
46429  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46430  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46431  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46432
46433  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46434  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46435  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46436
46437  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46438  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46439  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46440
46441    fi
46442  fi
46443
46444  # Make compilation sanity check
46445  for ac_header in stdio.h
46446do :
46447  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
46448if test "x$ac_cv_header_stdio_h" = xyes; then :
46449  cat >>confdefs.h <<_ACEOF
46450#define HAVE_STDIO_H 1
46451_ACEOF
46452
46453else
46454
46455    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
46456$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
46457    if test "x$COMPILE_TYPE" = xreduced; then
46458
46459  # Print a helpful message on how to acquire the necessary build dependency.
46460  # reduced is the help tag: freetype, cups, alsa etc
46461  MISSING_DEPENDENCY=reduced
46462
46463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46464    cygwin_help $MISSING_DEPENDENCY
46465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46466    msys_help $MISSING_DEPENDENCY
46467  else
46468    PKGHANDLER_COMMAND=
46469
46470    case $PKGHANDLER in
46471      apt-get)
46472        apt_help     $MISSING_DEPENDENCY ;;
46473      yum)
46474        yum_help     $MISSING_DEPENDENCY ;;
46475      port)
46476        port_help    $MISSING_DEPENDENCY ;;
46477      pkgutil)
46478        pkgutil_help $MISSING_DEPENDENCY ;;
46479      pkgadd)
46480        pkgadd_help  $MISSING_DEPENDENCY ;;
46481    esac
46482
46483    if test "x$PKGHANDLER_COMMAND" != x; then
46484      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46485    fi
46486  fi
46487
46488      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46489$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46490    elif test "x$COMPILE_TYPE" = xcross; then
46491      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46492$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46493    fi
46494    as_fn_error $? "Cannot continue." "$LINENO" 5
46495
46496fi
46497
46498done
46499
46500
46501  # The cast to long int works around a bug in the HP C Compiler
46502# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46503# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46504# This bug is HP SR number 8606223364.
46505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46506$as_echo_n "checking size of int *... " >&6; }
46507if ${ac_cv_sizeof_int_p+:} false; then :
46508  $as_echo_n "(cached) " >&6
46509else
46510  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46511
46512else
46513  if test "$ac_cv_type_int_p" = yes; then
46514     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46515$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46516as_fn_error 77 "cannot compute sizeof (int *)
46517See \`config.log' for more details" "$LINENO" 5; }
46518   else
46519     ac_cv_sizeof_int_p=0
46520   fi
46521fi
46522
46523fi
46524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46525$as_echo "$ac_cv_sizeof_int_p" >&6; }
46526
46527
46528
46529cat >>confdefs.h <<_ACEOF
46530#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46531_ACEOF
46532
46533
46534
46535  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
46536  if test "x$ac_cv_sizeof_int_p" = x; then
46537    # The test failed, lets stick to the assumed value.
46538    { $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
46539$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
46540  else
46541    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46542
46543    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46544      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
46545      # Let's try to implicitely set the compilers target architecture and retry the test
46546      { $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
46547$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;}
46548      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
46549$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
46550
46551  # When we add flags to the "official" CFLAGS etc, we need to
46552  # keep track of these additions in ADDED_CFLAGS etc. These
46553  # will later be checked to make sure only controlled additions
46554  # have been made to CFLAGS etc.
46555  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46556  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46557  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46558
46559  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46560  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46561  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46562
46563  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46564  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46565  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46566
46567
46568      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
46569      unset ac_cv_sizeof_int_p
46570      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
46571      cat >>confdefs.h <<_ACEOF
46572#undef SIZEOF_INT_P
46573_ACEOF
46574
46575      # The cast to long int works around a bug in the HP C Compiler
46576# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46577# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46578# This bug is HP SR number 8606223364.
46579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46580$as_echo_n "checking size of int *... " >&6; }
46581if ${ac_cv_sizeof_int_p+:} false; then :
46582  $as_echo_n "(cached) " >&6
46583else
46584  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46585
46586else
46587  if test "$ac_cv_type_int_p" = yes; then
46588     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46590as_fn_error 77 "cannot compute sizeof (int *)
46591See \`config.log' for more details" "$LINENO" 5; }
46592   else
46593     ac_cv_sizeof_int_p=0
46594   fi
46595fi
46596
46597fi
46598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46599$as_echo "$ac_cv_sizeof_int_p" >&6; }
46600
46601
46602
46603cat >>confdefs.h <<_ACEOF
46604#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46605_ACEOF
46606
46607
46608
46609      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46610
46611      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46612        { $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
46613$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;}
46614        if test "x$COMPILE_TYPE" = xreduced; then
46615
46616  # Print a helpful message on how to acquire the necessary build dependency.
46617  # reduced is the help tag: freetype, cups, alsa etc
46618  MISSING_DEPENDENCY=reduced
46619
46620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46621    cygwin_help $MISSING_DEPENDENCY
46622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46623    msys_help $MISSING_DEPENDENCY
46624  else
46625    PKGHANDLER_COMMAND=
46626
46627    case $PKGHANDLER in
46628      apt-get)
46629        apt_help     $MISSING_DEPENDENCY ;;
46630      yum)
46631        yum_help     $MISSING_DEPENDENCY ;;
46632      port)
46633        port_help    $MISSING_DEPENDENCY ;;
46634      pkgutil)
46635        pkgutil_help $MISSING_DEPENDENCY ;;
46636      pkgadd)
46637        pkgadd_help  $MISSING_DEPENDENCY ;;
46638    esac
46639
46640    if test "x$PKGHANDLER_COMMAND" != x; then
46641      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46642    fi
46643  fi
46644
46645          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46646$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46647        elif test "x$COMPILE_TYPE" = xcross; then
46648          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46649$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46650        fi
46651        as_fn_error $? "Cannot continue." "$LINENO" 5
46652      fi
46653    fi
46654  fi
46655
46656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
46657$as_echo_n "checking for target address size... " >&6; }
46658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
46659$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
46660
46661
46662  ###############################################################################
46663  #
46664  # Is the target little of big endian?
46665  #
46666   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
46667$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
46668if ${ac_cv_c_bigendian+:} false; then :
46669  $as_echo_n "(cached) " >&6
46670else
46671  ac_cv_c_bigendian=unknown
46672    # See if we're dealing with a universal compiler.
46673    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46674/* end confdefs.h.  */
46675#ifndef __APPLE_CC__
46676	       not a universal capable compiler
46677	     #endif
46678	     typedef int dummy;
46679
46680_ACEOF
46681if ac_fn_cxx_try_compile "$LINENO"; then :
46682
46683	# Check for potential -arch flags.  It is not universal unless
46684	# there are at least two -arch flags with different values.
46685	ac_arch=
46686	ac_prev=
46687	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
46688	 if test -n "$ac_prev"; then
46689	   case $ac_word in
46690	     i?86 | x86_64 | ppc | ppc64)
46691	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
46692		 ac_arch=$ac_word
46693	       else
46694		 ac_cv_c_bigendian=universal
46695		 break
46696	       fi
46697	       ;;
46698	   esac
46699	   ac_prev=
46700	 elif test "x$ac_word" = "x-arch"; then
46701	   ac_prev=arch
46702	 fi
46703       done
46704fi
46705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46706    if test $ac_cv_c_bigendian = unknown; then
46707      # See if sys/param.h defines the BYTE_ORDER macro.
46708      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46709/* end confdefs.h.  */
46710#include <sys/types.h>
46711	     #include <sys/param.h>
46712
46713int
46714main ()
46715{
46716#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
46717		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
46718		     && LITTLE_ENDIAN)
46719	      bogus endian macros
46720	     #endif
46721
46722  ;
46723  return 0;
46724}
46725_ACEOF
46726if ac_fn_cxx_try_compile "$LINENO"; then :
46727  # It does; now see whether it defined to BIG_ENDIAN or not.
46728	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46729/* end confdefs.h.  */
46730#include <sys/types.h>
46731		#include <sys/param.h>
46732
46733int
46734main ()
46735{
46736#if BYTE_ORDER != BIG_ENDIAN
46737		 not big endian
46738		#endif
46739
46740  ;
46741  return 0;
46742}
46743_ACEOF
46744if ac_fn_cxx_try_compile "$LINENO"; then :
46745  ac_cv_c_bigendian=yes
46746else
46747  ac_cv_c_bigendian=no
46748fi
46749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46750fi
46751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46752    fi
46753    if test $ac_cv_c_bigendian = unknown; then
46754      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
46755      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46756/* end confdefs.h.  */
46757#include <limits.h>
46758
46759int
46760main ()
46761{
46762#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46763	      bogus endian macros
46764	     #endif
46765
46766  ;
46767  return 0;
46768}
46769_ACEOF
46770if ac_fn_cxx_try_compile "$LINENO"; then :
46771  # It does; now see whether it defined to _BIG_ENDIAN or not.
46772	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46773/* end confdefs.h.  */
46774#include <limits.h>
46775
46776int
46777main ()
46778{
46779#ifndef _BIG_ENDIAN
46780		 not big endian
46781		#endif
46782
46783  ;
46784  return 0;
46785}
46786_ACEOF
46787if ac_fn_cxx_try_compile "$LINENO"; then :
46788  ac_cv_c_bigendian=yes
46789else
46790  ac_cv_c_bigendian=no
46791fi
46792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46793fi
46794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46795    fi
46796    if test $ac_cv_c_bigendian = unknown; then
46797      # Compile a test program.
46798      if test "$cross_compiling" = yes; then :
46799  # Try to guess by grepping values from an object file.
46800	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46801/* end confdefs.h.  */
46802short int ascii_mm[] =
46803		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46804		short int ascii_ii[] =
46805		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46806		int use_ascii (int i) {
46807		  return ascii_mm[i] + ascii_ii[i];
46808		}
46809		short int ebcdic_ii[] =
46810		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46811		short int ebcdic_mm[] =
46812		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46813		int use_ebcdic (int i) {
46814		  return ebcdic_mm[i] + ebcdic_ii[i];
46815		}
46816		extern int foo;
46817
46818int
46819main ()
46820{
46821return use_ascii (foo) == use_ebcdic (foo);
46822  ;
46823  return 0;
46824}
46825_ACEOF
46826if ac_fn_cxx_try_compile "$LINENO"; then :
46827  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46828	      ac_cv_c_bigendian=yes
46829	    fi
46830	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46831	      if test "$ac_cv_c_bigendian" = unknown; then
46832		ac_cv_c_bigendian=no
46833	      else
46834		# finding both strings is unlikely to happen, but who knows?
46835		ac_cv_c_bigendian=unknown
46836	      fi
46837	    fi
46838fi
46839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46840else
46841  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46842/* end confdefs.h.  */
46843$ac_includes_default
46844int
46845main ()
46846{
46847
46848	     /* Are we little or big endian?  From Harbison&Steele.  */
46849	     union
46850	     {
46851	       long int l;
46852	       char c[sizeof (long int)];
46853	     } u;
46854	     u.l = 1;
46855	     return u.c[sizeof (long int) - 1] == 1;
46856
46857  ;
46858  return 0;
46859}
46860_ACEOF
46861if ac_fn_cxx_try_run "$LINENO"; then :
46862  ac_cv_c_bigendian=no
46863else
46864  ac_cv_c_bigendian=yes
46865fi
46866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46867  conftest.$ac_objext conftest.beam conftest.$ac_ext
46868fi
46869
46870    fi
46871fi
46872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46873$as_echo "$ac_cv_c_bigendian" >&6; }
46874 case $ac_cv_c_bigendian in #(
46875   yes)
46876     ENDIAN="big";; #(
46877   no)
46878     ENDIAN="little" ;; #(
46879   universal)
46880     ENDIAN="universal_endianness"
46881     ;; #(
46882   *)
46883     ENDIAN="unknown" ;;
46884 esac
46885
46886
46887  if test "x$ENDIAN" = xuniversal_endianness; then
46888    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46889  fi
46890  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46891    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
46892  fi
46893
46894
46895# Configure flags for the tools
46896
46897  ###############################################################################
46898  #
46899  # How to compile shared libraries.
46900  #
46901
46902  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46903    PICFLAG="-fPIC"
46904    C_FLAG_REORDER=''
46905    CXX_FLAG_REORDER=''
46906
46907    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46908      # Linking is different on MacOSX
46909      if test "x$STATIC_BUILD" = xtrue; then
46910        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46911      else
46912        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46913      fi
46914      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46915      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46916      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46917      SET_SHARED_LIBRARY_MAPFILE=''
46918    else
46919      # Default works for linux, might work on other platforms as well.
46920      SHARED_LIBRARY_FLAGS='-shared'
46921      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46922      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46923      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46924      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46925    fi
46926  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46927    C_FLAG_REORDER=''
46928    CXX_FLAG_REORDER=''
46929
46930    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46931      # Linking is different on MacOSX
46932      PICFLAG=''
46933      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46934      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46935      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46936      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46937      SET_SHARED_LIBRARY_MAPFILE=''
46938    else
46939      # Default works for linux, might work on other platforms as well.
46940      PICFLAG='-fPIC'
46941      SHARED_LIBRARY_FLAGS='-shared'
46942      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46943      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46944      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46945      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46946    fi
46947  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46948    PICFLAG="-KPIC"
46949    C_FLAG_REORDER='-xF'
46950    CXX_FLAG_REORDER='-xF'
46951    SHARED_LIBRARY_FLAGS="-G"
46952    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46953    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46954    SET_SHARED_LIBRARY_NAME='-h $1'
46955    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46956  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46957    PICFLAG="-qpic=large"
46958    C_FLAG_REORDER=''
46959    CXX_FLAG_REORDER=''
46960    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46961    SET_EXECUTABLE_ORIGIN=""
46962    SET_SHARED_LIBRARY_ORIGIN=''
46963    SET_SHARED_LIBRARY_NAME=''
46964    SET_SHARED_LIBRARY_MAPFILE=''
46965  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46966    PICFLAG=""
46967    C_FLAG_REORDER=''
46968    CXX_FLAG_REORDER=''
46969    SHARED_LIBRARY_FLAGS="-dll"
46970    SET_EXECUTABLE_ORIGIN=''
46971    SET_SHARED_LIBRARY_ORIGIN=''
46972    SET_SHARED_LIBRARY_NAME=''
46973    SET_SHARED_LIBRARY_MAPFILE=''
46974  fi
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46985    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46986    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46987    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46988  fi
46989  # The (cross) compiler is now configured, we can now test capabilities
46990  # of the target platform.
46991
46992
46993
46994  ###############################################################################
46995  #
46996  # Setup the opt flags for different compilers
46997  # and different operating systems.
46998  #
46999
47000  # FIXME: this was indirectly the old default, but just inherited.
47001  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47002  #   C_FLAG_DEPS="-MMD -MF"
47003  # fi
47004
47005  # Generate make dependency files
47006  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47007    C_FLAG_DEPS="-MMD -MF"
47008  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47009    C_FLAG_DEPS="-MMD -MF"
47010  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47011    C_FLAG_DEPS="-xMMD -xMF"
47012  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47013    C_FLAG_DEPS="-qmakedep=gcc -MF"
47014  fi
47015  CXX_FLAG_DEPS="$C_FLAG_DEPS"
47016
47017
47018
47019  # Debug symbols
47020  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47021    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
47022      # reduce from default "-g2" option to save space
47023      CFLAGS_DEBUG_SYMBOLS="-g1"
47024      CXXFLAGS_DEBUG_SYMBOLS="-g1"
47025    else
47026      CFLAGS_DEBUG_SYMBOLS="-g"
47027      CXXFLAGS_DEBUG_SYMBOLS="-g"
47028    fi
47029  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47030    CFLAGS_DEBUG_SYMBOLS="-g"
47031    CXXFLAGS_DEBUG_SYMBOLS="-g"
47032  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47033    CFLAGS_DEBUG_SYMBOLS="-g -xs"
47034    # FIXME: likely a bug, this disables debug symbols rather than enables them
47035    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
47036  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47037    CFLAGS_DEBUG_SYMBOLS="-g"
47038    CXXFLAGS_DEBUG_SYMBOLS="-g"
47039  fi
47040
47041
47042
47043  # bounds, memory and behavior checking options
47044  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47045    case $DEBUG_LEVEL in
47046    release )
47047      # no adjustment
47048      ;;
47049    fastdebug )
47050      # no adjustment
47051      ;;
47052    slowdebug )
47053      # Add runtime stack smashing and undefined behavior checks.
47054      # Not all versions of gcc support -fstack-protector
47055      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079
47080
47081
47082
47083
47084
47085
47086
47087
47088
47089
47090
47091
47092
47093
47094
47095
47096
47097
47098    # Execute function body
47099
47100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
47101$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
47102  supports=yes
47103
47104  saved_cflags="$CFLAGS"
47105  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
47106  ac_ext=c
47107ac_cpp='$CPP $CPPFLAGS'
47108ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47109ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47110ac_compiler_gnu=$ac_cv_c_compiler_gnu
47111
47112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47113/* end confdefs.h.  */
47114int i;
47115_ACEOF
47116if ac_fn_c_try_compile "$LINENO"; then :
47117
47118else
47119  supports=no
47120fi
47121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47122  ac_ext=cpp
47123ac_cpp='$CXXCPP $CPPFLAGS'
47124ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47125ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47126ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47127
47128  CFLAGS="$saved_cflags"
47129
47130  saved_cxxflags="$CXXFLAGS"
47131  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
47132  ac_ext=cpp
47133ac_cpp='$CXXCPP $CPPFLAGS'
47134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47137
47138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47139/* end confdefs.h.  */
47140int i;
47141_ACEOF
47142if ac_fn_cxx_try_compile "$LINENO"; then :
47143
47144else
47145  supports=no
47146fi
47147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47148  ac_ext=cpp
47149ac_cpp='$CXXCPP $CPPFLAGS'
47150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47153
47154  CXXFLAGS="$saved_cxxflags"
47155
47156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47157$as_echo "$supports" >&6; }
47158  if test "x$supports" = "xyes" ; then
47159    :
47160
47161  else
47162    :
47163    STACK_PROTECTOR_CFLAG=""
47164  fi
47165
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
47179      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
47180      ;;
47181    esac
47182  fi
47183
47184  # Optimization levels
47185  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47186    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
47187
47188    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
47189      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
47190      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
47191      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
47192      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
47193      C_O_FLAG_DEBUG="-xregs=no%frameptr"
47194      C_O_FLAG_NONE="-xregs=no%frameptr"
47195      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
47196      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
47197      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
47198      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
47199      CXX_O_FLAG_NONE="-xregs=no%frameptr"
47200      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
47201        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
47202        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
47203      fi
47204    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
47205      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
47206      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
47207      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
47208      C_O_FLAG_DEBUG=""
47209      C_O_FLAG_NONE=""
47210      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
47211      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
47212      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
47213      C_O_FLAG_DEBUG=""
47214      CXX_O_FLAG_NONE=""
47215    fi
47216  else
47217    # The remaining toolchains share opt flags between CC and CXX;
47218    # setup for C and duplicate afterwards.
47219    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47220      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47221        # On MacOSX we optimize for size, something
47222        # we should do for all platforms?
47223        C_O_FLAG_HIGHEST="-Os"
47224        C_O_FLAG_HI="-Os"
47225        C_O_FLAG_NORM="-Os"
47226      else
47227        C_O_FLAG_HIGHEST="-O3"
47228        C_O_FLAG_HI="-O3"
47229        C_O_FLAG_NORM="-O2"
47230      fi
47231      C_O_FLAG_DEBUG="-O0"
47232      C_O_FLAG_NONE="-O0"
47233    elif test "x$TOOLCHAIN_TYPE" = xclang; then
47234      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47235        # On MacOSX we optimize for size, something
47236        # we should do for all platforms?
47237        C_O_FLAG_HIGHEST="-Os"
47238        C_O_FLAG_HI="-Os"
47239        C_O_FLAG_NORM="-Os"
47240      else
47241        C_O_FLAG_HIGHEST="-O3"
47242        C_O_FLAG_HI="-O3"
47243        C_O_FLAG_NORM="-O2"
47244      fi
47245      C_O_FLAG_DEBUG="-O0"
47246      C_O_FLAG_NONE="-O0"
47247    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47248      C_O_FLAG_HIGHEST="-O3"
47249      C_O_FLAG_HI="-O3 -qstrict"
47250      C_O_FLAG_NORM="-O2"
47251      C_O_FLAG_DEBUG="-qnoopt"
47252      C_O_FLAG_NONE="-qnoopt"
47253    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47254      C_O_FLAG_HIGHEST="-O2"
47255      C_O_FLAG_HI="-O1"
47256      C_O_FLAG_NORM="-O1"
47257      C_O_FLAG_DEBUG="-Od"
47258      C_O_FLAG_NONE="-Od"
47259    fi
47260    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
47261    CXX_O_FLAG_HI="$C_O_FLAG_HI"
47262    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
47263    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
47264    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
47265  fi
47266
47267  # Adjust optimization flags according to debug level.
47268  case $DEBUG_LEVEL in
47269    release )
47270      # no adjustment
47271      ;;
47272    fastdebug )
47273      # Not quite so much optimization
47274      C_O_FLAG_HI="$C_O_FLAG_NORM"
47275      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
47276      ;;
47277    slowdebug )
47278      # Disable optimization
47279      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
47280      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
47281      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
47282      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
47283      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
47284      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
47285      ;;
47286  esac
47287
47288
47289
47290
47291
47292
47293
47294
47295
47296
47297
47298
47299
47300  # Special extras...
47301  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47302    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
47303      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
47304      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
47305    fi
47306    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
47307    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
47308  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47309    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
47310    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
47311  fi
47312
47313  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
47314  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
47315  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
47316
47317  ###############################################################################
47318  #
47319  # Now setup the CFLAGS and LDFLAGS for the JDK build.
47320  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
47321  #
47322
47323  # Setup compiler/platform specific flags into
47324  #    CFLAGS_JDK    - C Compiler flags
47325  #    CXXFLAGS_JDK  - C++ Compiler flags
47326  #    COMMON_CCXXFLAGS_JDK - common to C and C++
47327  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47328    if test "x$OPENJDK_TARGET_CPU" = xx86; then
47329      # Force compatibility with i586 on 32 bit intel platforms.
47330      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47331    fi
47332    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47333        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47334    case $OPENJDK_TARGET_CPU_ARCH in
47335      arm )
47336        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47337        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47338        ;;
47339      ppc )
47340        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47341        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47342        ;;
47343      * )
47344        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47345        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47346        ;;
47347    esac
47348  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47349    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47350	    if test "x$OPENJDK_TARGET_CPU" = xx86; then
47351	      # Force compatibility with i586 on 32 bit intel platforms.
47352	      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47353	    fi
47354	    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47355	        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47356	    case $OPENJDK_TARGET_CPU_ARCH in
47357	      ppc )
47358	        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47359	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47360	        ;;
47361	      * )
47362	        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47363	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47364	        ;;
47365	    esac
47366    fi
47367  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47368    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
47369    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
47370      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
47371    fi
47372
47373    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
47374    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
47375  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47376    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47377    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47378  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47379    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
47380        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
47381        -DWIN32_LEAN_AND_MEAN \
47382        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
47383        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
47384        -DWIN32 -DIAL"
47385    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
47386      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
47387    else
47388      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
47389    fi
47390    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
47391    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
47392    # studio.
47393    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
47394      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47395          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
47396    fi
47397  fi
47398
47399  ###############################################################################
47400
47401  # Adjust flags according to debug level.
47402  case $DEBUG_LEVEL in
47403    fastdebug | slowdebug )
47404      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
47405      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
47406      JAVAC_FLAGS="$JAVAC_FLAGS -g"
47407      ;;
47408    release )
47409      ;;
47410    * )
47411      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47412      ;;
47413  esac
47414
47415  # Setup LP64
47416  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
47417
47418  # Set some common defines. These works for all compilers, but assume
47419  # -D is universally accepted.
47420
47421  # Setup endianness
47422  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
47423    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
47424    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
47425    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
47426    #   Note: -Dmacro         is the same as    #define macro 1
47427    #         -Dmacro=        is the same as    #define macro
47428    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47429      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
47430    else
47431      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
47432    fi
47433  else
47434    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
47435    # are defined in the system?
47436    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47437      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
47438    else
47439      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
47440    fi
47441  fi
47442
47443  # Setup target OS define. Use OS target name but in upper case.
47444  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
47445  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
47446
47447  # Setup target CPU
47448  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
47449
47450  # Setup debug/release defines
47451  if test "x$DEBUG_LEVEL" = xrelease; then
47452    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
47453    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47454      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
47455    fi
47456  else
47457    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
47458  fi
47459
47460  # Set some additional per-OS defines.
47461  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47462    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
47463  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47464    # FIXME: PPC64 should not be here.
47465    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
47466  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
47467    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
47468  fi
47469
47470  # Additional macosx handling
47471  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47472    # Setting these parameters makes it an error to link to macosx APIs that are
47473    # newer than the given OS version and makes the linked binaries compatible
47474    # even if built on a newer version of the OS.
47475    # The expected format is X.Y.Z
47476    MACOSX_VERSION_MIN=10.7.0
47477
47478
47479    # The macro takes the version with no dots, ex: 1070
47480    # Let the flags variables get resolved in make for easier override on make
47481    # command line.
47482    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47483    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47484  fi
47485
47486  # Setup some hard coded includes
47487  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47488      -I${JDK_TOPDIR}/src/java.base/share/native/include \
47489      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
47490      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
47491      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
47492      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
47493
47494  # The shared libraries are compiled using the picflag.
47495  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47496  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47497
47498  # Executable flags
47499  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47500  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47501
47502
47503
47504
47505
47506
47507  # Flags for compiling test libraries
47508  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47509  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47510
47511  # Flags for compiling test executables
47512  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47513  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47514
47515
47516
47517
47518
47519
47520  # Setup LDFLAGS et al.
47521  #
47522
47523  # Now this is odd. The JDK native libraries have to link against libjvm.so
47524  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
47525  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
47526  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
47527  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
47528  # libraries will link to whatever is in memory. Yuck.
47529  #
47530  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
47531  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47532    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
47533    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
47534      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
47535    fi
47536    # TODO: make -debug optional "--disable-full-debug-symbols"
47537    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
47538  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
47539    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47540    # We have previously set HAS_GNU_HASH if this is the case
47541    if test -n "$HAS_GNU_HASH"; then
47542      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,--hash-style=both"
47543    fi
47544    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47545      # And since we now know that the linker is gnu, then add -z defs, to forbid
47546      # undefined symbols in object files.
47547      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,defs"
47548      case $DEBUG_LEVEL in
47549        release )
47550          # tell linker to optimize libraries.
47551          # Should this be supplied to the OSS linker as well?
47552          LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-O1"
47553          ;;
47554        slowdebug )
47555          if test "x$HAS_LINKER_NOW" = "xtrue"; then
47556            # do relocations at load
47557            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
47558            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
47559          fi
47560          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47561            # mark relocations read only
47562            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47563            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47564          fi
47565          ;;
47566        fastdebug )
47567          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47568            # mark relocations read only
47569            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47570            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47571          fi
47572          ;;
47573        * )
47574          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47575          ;;
47576        esac
47577    fi
47578  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47579    LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,defs -xildoff -ztext"
47580    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
47581  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47582    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
47583  fi
47584
47585  # Customize LDFLAGS for executables
47586
47587  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
47588
47589  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47590    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
47591      LDFLAGS_STACK_SIZE=1048576
47592    else
47593      LDFLAGS_STACK_SIZE=327680
47594    fi
47595    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
47596  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
47597    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
47598  fi
47599
47600  # Customize LDFLAGS for libs
47601  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
47602
47603  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
47604  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47605    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47606        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
47607    JDKLIB_LIBS=""
47608  else
47609    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47610        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
47611
47612    # On some platforms (mac) the linker warns about non existing -L dirs.
47613    # Add server first if available. Linking aginst client does not always produce the same results.
47614    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
47615    # Default to server for other variants.
47616    if test "x$JVM_VARIANT_SERVER" = xtrue; then
47617      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47618    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
47619      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
47620    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
47621      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
47622    else
47623      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47624    fi
47625
47626    JDKLIB_LIBS="-ljava -ljvm"
47627    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47628      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
47629    fi
47630  fi
47631
47632
47633
47634
47635
47636
47637
47638  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
47639  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
47640
47641
47642
47643
47644
47645  # Some Zero and Shark settings.
47646  # ZERO_ARCHFLAG tells the compiler which mode to build for
47647  case "${OPENJDK_TARGET_CPU}" in
47648    s390)
47649      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
47650      ;;
47651    *)
47652      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47653  esac
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696    # Execute function body
47697
47698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
47699$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
47700  supports=yes
47701
47702  saved_cflags="$CFLAGS"
47703  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
47704  ac_ext=c
47705ac_cpp='$CPP $CPPFLAGS'
47706ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47707ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47708ac_compiler_gnu=$ac_cv_c_compiler_gnu
47709
47710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47711/* end confdefs.h.  */
47712int i;
47713_ACEOF
47714if ac_fn_c_try_compile "$LINENO"; then :
47715
47716else
47717  supports=no
47718fi
47719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47720  ac_ext=cpp
47721ac_cpp='$CXXCPP $CPPFLAGS'
47722ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47723ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47724ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47725
47726  CFLAGS="$saved_cflags"
47727
47728  saved_cxxflags="$CXXFLAGS"
47729  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
47730  ac_ext=cpp
47731ac_cpp='$CXXCPP $CPPFLAGS'
47732ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47733ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47734ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47735
47736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47737/* end confdefs.h.  */
47738int i;
47739_ACEOF
47740if ac_fn_cxx_try_compile "$LINENO"; then :
47741
47742else
47743  supports=no
47744fi
47745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47746  ac_ext=cpp
47747ac_cpp='$CXXCPP $CPPFLAGS'
47748ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47749ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47750ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47751
47752  CXXFLAGS="$saved_cxxflags"
47753
47754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47755$as_echo "$supports" >&6; }
47756  if test "x$supports" = "xyes" ; then
47757    :
47758
47759  else
47760    :
47761    ZERO_ARCHFLAG=""
47762  fi
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777  # Check that the compiler supports -mX (or -qX on AIX) flags
47778  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802
47803
47804
47805
47806
47807
47808
47809
47810
47811
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
47824
47825
47826    # Execute function body
47827
47828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
47829$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
47830  supports=yes
47831
47832  saved_cflags="$CFLAGS"
47833  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47834  ac_ext=c
47835ac_cpp='$CPP $CPPFLAGS'
47836ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47837ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47838ac_compiler_gnu=$ac_cv_c_compiler_gnu
47839
47840  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47841/* end confdefs.h.  */
47842int i;
47843_ACEOF
47844if ac_fn_c_try_compile "$LINENO"; then :
47845
47846else
47847  supports=no
47848fi
47849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47850  ac_ext=cpp
47851ac_cpp='$CXXCPP $CPPFLAGS'
47852ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47853ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47854ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47855
47856  CFLAGS="$saved_cflags"
47857
47858  saved_cxxflags="$CXXFLAGS"
47859  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47860  ac_ext=cpp
47861ac_cpp='$CXXCPP $CPPFLAGS'
47862ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47863ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47864ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47865
47866  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47867/* end confdefs.h.  */
47868int i;
47869_ACEOF
47870if ac_fn_cxx_try_compile "$LINENO"; then :
47871
47872else
47873  supports=no
47874fi
47875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47876  ac_ext=cpp
47877ac_cpp='$CXXCPP $CPPFLAGS'
47878ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47879ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47880ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47881
47882  CXXFLAGS="$saved_cxxflags"
47883
47884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47885$as_echo "$supports" >&6; }
47886  if test "x$supports" = "xyes" ; then
47887    :
47888    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
47889  else
47890    :
47891    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
47892  fi
47893
47894
47895
47896
47897
47898
47899
47900
47901
47902
47903
47904
47905
47906
47907  # Check whether --enable-warnings-as-errors was given.
47908if test "${enable_warnings_as_errors+set}" = set; then :
47909  enableval=$enable_warnings_as_errors;
47910fi
47911
47912
47913  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47914$as_echo_n "checking if native warnings are errors... " >&6; }
47915  if test "x$enable_warnings_as_errors" = "xyes"; then
47916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47917$as_echo "yes (explicitely set)" >&6; }
47918    WARNINGS_AS_ERRORS=true
47919  elif test "x$enable_warnings_as_errors" = "xno"; then
47920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47921$as_echo "no" >&6; }
47922    WARNINGS_AS_ERRORS=false
47923  elif test "x$enable_warnings_as_errors" = "x"; then
47924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47925$as_echo "yes (default)" >&6; }
47926    WARNINGS_AS_ERRORS=true
47927  else
47928    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47929  fi
47930
47931  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47932    # Set legacy hotspot variable
47933    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47934  else
47935    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47936  fi
47937
47938
47939
47940
47941  case "${TOOLCHAIN_TYPE}" in
47942    microsoft)
47943      DISABLE_WARNING_PREFIX="-wd"
47944      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47945      ;;
47946    solstudio)
47947      DISABLE_WARNING_PREFIX="-erroff="
47948      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47949      ;;
47950    gcc)
47951      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47952
47953
47954
47955
47956
47957
47958
47959
47960
47961
47962
47963
47964
47965
47966
47967
47968
47969
47970
47971
47972
47973
47974
47975
47976
47977
47978
47979
47980
47981
47982
47983
47984
47985
47986
47987
47988
47989
47990
47991
47992
47993
47994
47995
47996
47997
47998
47999    # Execute function body
48000
48001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48002$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48003  supports=yes
48004
48005  saved_cflags="$CFLAGS"
48006  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
48007  ac_ext=c
48008ac_cpp='$CPP $CPPFLAGS'
48009ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48010ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48011ac_compiler_gnu=$ac_cv_c_compiler_gnu
48012
48013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48014/* end confdefs.h.  */
48015int i;
48016_ACEOF
48017if ac_fn_c_try_compile "$LINENO"; then :
48018
48019else
48020  supports=no
48021fi
48022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48023  ac_ext=cpp
48024ac_cpp='$CXXCPP $CPPFLAGS'
48025ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48026ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48027ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48028
48029  CFLAGS="$saved_cflags"
48030
48031  saved_cxxflags="$CXXFLAGS"
48032  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
48033  ac_ext=cpp
48034ac_cpp='$CXXCPP $CPPFLAGS'
48035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48038
48039  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48040/* end confdefs.h.  */
48041int i;
48042_ACEOF
48043if ac_fn_cxx_try_compile "$LINENO"; then :
48044
48045else
48046  supports=no
48047fi
48048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48049  ac_ext=cpp
48050ac_cpp='$CXXCPP $CPPFLAGS'
48051ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48052ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48053ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48054
48055  CXXFLAGS="$saved_cxxflags"
48056
48057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48058$as_echo "$supports" >&6; }
48059  if test "x$supports" = "xyes" ; then
48060    :
48061    GCC_CAN_DISABLE_WARNINGS=true
48062  else
48063    :
48064    GCC_CAN_DISABLE_WARNINGS=false
48065
48066  fi
48067
48068
48069
48070
48071
48072
48073
48074
48075
48076
48077
48078
48079      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
48080        DISABLE_WARNING_PREFIX="-Wno-"
48081      else
48082        DISABLE_WARNING_PREFIX=
48083      fi
48084      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
48085      # Repeate the check for the BUILD_CC
48086      CC_OLD="$CC"
48087      CC="$BUILD_CC"
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134
48135    # Execute function body
48136
48137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48138$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48139  supports=yes
48140
48141  saved_cflags="$CFLAGS"
48142  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
48143  ac_ext=c
48144ac_cpp='$CPP $CPPFLAGS'
48145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48147ac_compiler_gnu=$ac_cv_c_compiler_gnu
48148
48149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48150/* end confdefs.h.  */
48151int i;
48152_ACEOF
48153if ac_fn_c_try_compile "$LINENO"; then :
48154
48155else
48156  supports=no
48157fi
48158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48159  ac_ext=cpp
48160ac_cpp='$CXXCPP $CPPFLAGS'
48161ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48162ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48163ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48164
48165  CFLAGS="$saved_cflags"
48166
48167  saved_cxxflags="$CXXFLAGS"
48168  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
48169  ac_ext=cpp
48170ac_cpp='$CXXCPP $CPPFLAGS'
48171ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48172ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48173ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48174
48175  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48176/* end confdefs.h.  */
48177int i;
48178_ACEOF
48179if ac_fn_cxx_try_compile "$LINENO"; then :
48180
48181else
48182  supports=no
48183fi
48184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48185  ac_ext=cpp
48186ac_cpp='$CXXCPP $CPPFLAGS'
48187ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48188ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48189ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48190
48191  CXXFLAGS="$saved_cxxflags"
48192
48193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48194$as_echo "$supports" >&6; }
48195  if test "x$supports" = "xyes" ; then
48196    :
48197    BUILD_CC_CAN_DISABLE_WARNINGS=true
48198  else
48199    :
48200    BUILD_CC_CAN_DISABLE_WARNINGS=false
48201
48202  fi
48203
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
48216        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
48217      else
48218        BUILD_CC_DISABLE_WARNING_PREFIX=
48219      fi
48220      CC="$CC_OLD"
48221      ;;
48222    clang)
48223      DISABLE_WARNING_PREFIX="-Wno-"
48224      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
48225      ;;
48226  esac
48227
48228
48229
48230
48231# Setup debug symbols (need objcopy from the toolchain for that)
48232
48233  #
48234  # NATIVE_DEBUG_SYMBOLS
48235  # This must be done after the toolchain is setup, since we're looking at objcopy.
48236  #
48237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
48238$as_echo_n "checking what type of native debug symbols to use... " >&6; }
48239
48240# Check whether --with-native-debug-symbols was given.
48241if test "${with_native_debug_symbols+set}" = set; then :
48242  withval=$with_native_debug_symbols;
48243        if test "x$OPENJDK_TARGET_OS" = xaix; then
48244          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
48245            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
48246          fi
48247        fi
48248
48249else
48250
48251        if test "x$OPENJDK_TARGET_OS" = xaix; then
48252          # AIX doesn't support 'zipped' so use 'internal' as default
48253          with_native_debug_symbols="internal"
48254        else
48255          with_native_debug_symbols="zipped"
48256        fi
48257
48258fi
48259
48260  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
48261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
48262$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
48263
48264  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
48265
48266    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
48267      if test "x$OBJCOPY" = x; then
48268        # enabling of enable-debug-symbols and can't find objcopy
48269        # this is an error
48270        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
48271      fi
48272    fi
48273
48274    ENABLE_DEBUG_SYMBOLS=true
48275    ZIP_DEBUGINFO_FILES=true
48276    # -g is already added by ENABLE_DEBUG_SYMBOLS and the hotspot makefiles
48277    # will basically do slowdebug builds when DEBUG_BINARIES is set for
48278    # fastdebug builds
48279    DEBUG_BINARIES=false
48280    STRIP_POLICY=min_strip
48281  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
48282    ENABLE_DEBUG_SYMBOLS=false
48283    ZIP_DEBUGINFO_FILES=false
48284    DEBUG_BINARIES=false
48285    STRIP_POLICY=no_strip
48286  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
48287    ENABLE_DEBUG_SYMBOLS=false  # -g option only
48288    ZIP_DEBUGINFO_FILES=false
48289    # Fastdebug builds with this setting will essentially be slowdebug
48290    # in hotspot.
48291    DEBUG_BINARIES=true
48292    STRIP_POLICY=no_strip
48293    STRIP=""
48294  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
48295
48296    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
48297      if test "x$OBJCOPY" = x; then
48298        # enabling of enable-debug-symbols and can't find objcopy
48299        # this is an error
48300        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
48301      fi
48302    fi
48303
48304    ENABLE_DEBUG_SYMBOLS=true
48305    ZIP_DEBUGINFO_FILES=false
48306    # -g is already added by ENABLE_DEBUG_SYMBOLS and the hotspot makefiles
48307    # will basically do slowdebug builds when DEBUG_BINARIES is set for
48308    # fastdebug builds
48309    DEBUG_BINARIES=false
48310    STRIP_POLICY=min_strip
48311  else
48312    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
48313  fi
48314
48315  # --enable-debug-symbols is deprecated.
48316  # Please use --with-native-debug-symbols=[internal,external,zipped] .
48317
48318  # Check whether --enable-debug-symbols was given.
48319if test "${enable_debug_symbols+set}" = set; then :
48320  enableval=$enable_debug_symbols;
48321fi
48322
48323  if test "x$enable_debug_symbols" != x; then
48324    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
48325$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
48326
48327    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
48328      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
48329$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
48330    fi
48331
48332  fi
48333
48334
48335  # --enable-zip-debug-info is deprecated.
48336  # Please use --with-native-debug-symbols=zipped .
48337
48338  # Check whether --enable-zip-debug-info was given.
48339if test "${enable_zip_debug_info+set}" = set; then :
48340  enableval=$enable_zip_debug_info;
48341fi
48342
48343  if test "x$enable_zip_debug_info" != x; then
48344    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
48345$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
48346
48347    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
48348      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
48349$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
48350    fi
48351
48352  fi
48353
48354
48355
48356
48357
48358
48359
48360
48361
48362  # Check whether --enable-native-coverage was given.
48363if test "${enable_native_coverage+set}" = set; then :
48364  enableval=$enable_native_coverage;
48365fi
48366
48367  GCOV_ENABLED="false"
48368  if test "x$enable_native_coverage" = "xyes"; then
48369    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
48370      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
48371$as_echo_n "checking if native coverage is enabled... " >&6; }
48372      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48373$as_echo "yes" >&6; }
48374      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
48375      GCOV_LDFLAGS="-fprofile-arcs"
48376      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
48377      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
48378      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
48379      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
48380      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
48381      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
48382      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
48383      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
48384      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
48385      GCOV_ENABLED="true"
48386    else
48387      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
48388    fi
48389  elif test "x$enable_native_coverage" = "xno"; then
48390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
48391$as_echo_n "checking if native coverage is enabled... " >&6; }
48392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48393$as_echo "no" >&6; }
48394  elif test "x$enable_native_coverage" != "x"; then
48395    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
48396  fi
48397
48398
48399
48400
48401###############################################################################
48402#
48403# Check dependencies for external and internal libraries.
48404#
48405###############################################################################
48406
48407# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
48408
48409  # When using cygwin or msys, we need a wrapper binary that renames
48410  # /cygdrive/c/ arguments into c:/ arguments and peeks into
48411  # @files and rewrites these too! This wrapper binary is
48412  # called fixpath.
48413  FIXPATH=
48414  if test "x$OPENJDK_BUILD_OS" = xwindows; then
48415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
48416$as_echo_n "checking if fixpath can be created... " >&6; }
48417    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
48418    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
48419    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
48420    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
48421      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
48422      FIXPATH="$FIXPATH_BIN -c"
48423    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
48424      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
48425      # @ was chosen as separator to minimize risk of other tools messing around with it
48426      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
48427          | tr ' ' '\n' | grep '^/./' | sort | uniq`
48428      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
48429      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
48430    fi
48431    FIXPATH_SRC_W="$FIXPATH_SRC"
48432    FIXPATH_BIN_W="$FIXPATH_BIN"
48433
48434  unix_path="$FIXPATH_SRC_W"
48435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48436    windows_path=`$CYGPATH -m "$unix_path"`
48437    FIXPATH_SRC_W="$windows_path"
48438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48439    windows_path=`cmd //c echo $unix_path`
48440    FIXPATH_SRC_W="$windows_path"
48441  fi
48442
48443
48444  unix_path="$FIXPATH_BIN_W"
48445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48446    windows_path=`$CYGPATH -m "$unix_path"`
48447    FIXPATH_BIN_W="$windows_path"
48448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48449    windows_path=`cmd //c echo $unix_path`
48450    FIXPATH_BIN_W="$windows_path"
48451  fi
48452
48453    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
48454    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
48455    cd $FIXPATH_DIR
48456    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
48457    cd $CURDIR
48458
48459    if test ! -x $FIXPATH_BIN; then
48460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48461$as_echo "no" >&6; }
48462      cat $FIXPATH_DIR/fixpath1.log
48463      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
48464    fi
48465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48466$as_echo "yes" >&6; }
48467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
48468$as_echo_n "checking if fixpath.exe works... " >&6; }
48469    cd $FIXPATH_DIR
48470    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
48471        > $FIXPATH_DIR/fixpath2.log 2>&1
48472    cd $CURDIR
48473    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
48474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48475$as_echo "no" >&6; }
48476      cat $FIXPATH_DIR/fixpath2.log
48477      as_fn_error $? "fixpath did not work!" "$LINENO" 5
48478    fi
48479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48480$as_echo "yes" >&6; }
48481
48482    FIXPATH_DETACH_FLAG="--detach"
48483  fi
48484
48485
48486
48487
48488
48489
48490  # Check if X11 is needed
48491  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
48492    # No X11 support on windows or macosx
48493    NEEDS_LIB_X11=false
48494  else
48495    if test "x$SUPPORT_HEADFUL" = xno; then
48496      # No X11 support if building headless-only
48497      NEEDS_LIB_X11=false
48498    else
48499      # All other instances need X11
48500      NEEDS_LIB_X11=true
48501    fi
48502  fi
48503
48504  # Check if cups is needed
48505  if test "x$OPENJDK_TARGET_OS" = xwindows; then
48506    # Windows have a separate print system
48507    NEEDS_LIB_CUPS=false
48508  else
48509    NEEDS_LIB_CUPS=true
48510  fi
48511
48512  # Check if freetype is needed
48513  if test "x$OPENJDK" = "xtrue"; then
48514    NEEDS_LIB_FREETYPE=true
48515  else
48516    NEEDS_LIB_FREETYPE=false
48517  fi
48518
48519  # Check if alsa is needed
48520  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48521    NEEDS_LIB_ALSA=true
48522  else
48523    NEEDS_LIB_ALSA=false
48524  fi
48525
48526  # Check if ffi is needed
48527  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48528    NEEDS_LIB_FFI=true
48529  else
48530    NEEDS_LIB_FFI=false
48531  fi
48532
48533
48534  # statically link libstdc++ before C++ ABI is stablized on Linux unless
48535  # dynamic build is configured on command line.
48536
48537# Check whether --with-stdc++lib was given.
48538if test "${with_stdc__lib+set}" = set; then :
48539  withval=$with_stdc__lib;
48540        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48541                && test "x$with_stdc__lib" != xdefault; then
48542          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48543        fi
48544
48545else
48546  with_stdc__lib=default
48547
48548fi
48549
48550
48551  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48552    # Test if -lstdc++ works.
48553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48554$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48555    ac_ext=cpp
48556ac_cpp='$CXXCPP $CPPFLAGS'
48557ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48558ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48559ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48560
48561    OLD_CXXFLAGS="$CXXFLAGS"
48562    CXXFLAGS="$CXXFLAGS -lstdc++"
48563    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48564/* end confdefs.h.  */
48565
48566int
48567main ()
48568{
48569return 0;
48570  ;
48571  return 0;
48572}
48573_ACEOF
48574if ac_fn_cxx_try_link "$LINENO"; then :
48575  has_dynamic_libstdcxx=yes
48576else
48577  has_dynamic_libstdcxx=no
48578fi
48579rm -f core conftest.err conftest.$ac_objext \
48580    conftest$ac_exeext conftest.$ac_ext
48581    CXXFLAGS="$OLD_CXXFLAGS"
48582    ac_ext=cpp
48583ac_cpp='$CXXCPP $CPPFLAGS'
48584ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48585ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48586ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48587
48588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48589$as_echo "$has_dynamic_libstdcxx" >&6; }
48590
48591    # Test if stdc++ can be linked statically.
48592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48593$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48594    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48595    ac_ext=cpp
48596ac_cpp='$CXXCPP $CPPFLAGS'
48597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48600
48601    OLD_LIBS="$LIBS"
48602    OLD_CXX="$CXX"
48603    LIBS="$STATIC_STDCXX_FLAGS"
48604    CXX="$CC"
48605    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48606/* end confdefs.h.  */
48607
48608int
48609main ()
48610{
48611return 0;
48612  ;
48613  return 0;
48614}
48615_ACEOF
48616if ac_fn_cxx_try_link "$LINENO"; then :
48617  has_static_libstdcxx=yes
48618else
48619  has_static_libstdcxx=no
48620fi
48621rm -f core conftest.err conftest.$ac_objext \
48622    conftest$ac_exeext conftest.$ac_ext
48623    LIBS="$OLD_LIBS"
48624    CXX="$OLD_CXX"
48625    ac_ext=cpp
48626ac_cpp='$CXXCPP $CPPFLAGS'
48627ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48628ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48629ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48630
48631    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48632$as_echo "$has_static_libstdcxx" >&6; }
48633
48634    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48635      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48636    fi
48637
48638    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48639      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48640    fi
48641
48642    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48643      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48644    fi
48645
48646    # If dynamic was requested, it's available since it would fail above otherwise.
48647    # If dynamic wasn't requested, go with static unless it isn't available.
48648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48649$as_echo_n "checking how to link with libstdc++... " >&6; }
48650    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48651      LIBCXX="$LIBCXX -lstdc++"
48652      LDCXX="$CXX"
48653      STATIC_CXX_SETTING="STATIC_CXX=false"
48654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48655$as_echo "dynamic" >&6; }
48656    else
48657      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48658      LDCXX="$CC"
48659      STATIC_CXX_SETTING="STATIC_CXX=true"
48660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48661$as_echo "static" >&6; }
48662    fi
48663  fi
48664
48665
48666  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48667  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48668    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48669  fi
48670
48671  # TODO better (platform agnostic) test
48672  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48673    LIBCXX="-lstdc++"
48674  fi
48675
48676
48677  # Setup Windows runtime dlls
48678  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48679
48680
48681# Check whether --with-msvcr-dll was given.
48682if test "${with_msvcr_dll+set}" = set; then :
48683  withval=$with_msvcr_dll;
48684fi
48685
48686
48687  if test "x$with_msvcr_dll" != x; then
48688    # If given explicitely by user, do not probe. If not present, fail directly.
48689
48690  DLL_NAME="$MSVCR_NAME"
48691  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
48692  METHOD="--with-msvcr-dll"
48693  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48694    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48695$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48696
48697    # Need to check if the found msvcr is correct architecture
48698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48699$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48700    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48702      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48703      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48704      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48705        CORRECT_MSVCR_ARCH="PE32 executable"
48706      else
48707        CORRECT_MSVCR_ARCH="PE32+ executable"
48708      fi
48709    else
48710      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48711        CORRECT_MSVCR_ARCH=386
48712      else
48713        CORRECT_MSVCR_ARCH=x86-64
48714      fi
48715    fi
48716    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48717      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48718$as_echo "ok" >&6; }
48719      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48720
48721  # Only process if variable expands to non-empty
48722
48723  if test "x$MSVC_DLL" != x; then
48724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48725
48726  # Input might be given as Windows format, start by converting to
48727  # unix format.
48728  path="$MSVC_DLL"
48729  new_path=`$CYGPATH -u "$path"`
48730
48731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48734  # "foo.exe" is OK but "foo" is an error.
48735  #
48736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48737  # It is also a way to make sure we got the proper file name for the real test later on.
48738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48739  if test "x$test_shortpath" = x; then
48740    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48741$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48742    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48743  fi
48744
48745  # Call helper function which possibly converts this using DOS-style short mode.
48746  # If so, the updated path is stored in $new_path.
48747
48748  input_path="$new_path"
48749  # Check if we need to convert this using DOS-style short mode. If the path
48750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48751  # take no chances and rewrite it.
48752  # Note: m4 eats our [], so we need to use [ and ] instead.
48753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48754  if test "x$has_forbidden_chars" != x; then
48755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48759      # Going to short mode and back again did indeed matter. Since short mode is
48760      # case insensitive, let's make it lowercase to improve readability.
48761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48762      # Now convert it back to Unix-style (cygpath)
48763      input_path=`$CYGPATH -u "$shortmode_path"`
48764      new_path="$input_path"
48765    fi
48766  fi
48767
48768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48769  if test "x$test_cygdrive_prefix" = x; then
48770    # As a simple fix, exclude /usr/bin since it's not a real path.
48771    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48773      # a path prefixed by /cygdrive for fixpath to work.
48774      new_path="$CYGWIN_ROOT_PATH$input_path"
48775    fi
48776  fi
48777
48778
48779  if test "x$path" != "x$new_path"; then
48780    MSVC_DLL="$new_path"
48781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48782$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48783  fi
48784
48785    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48786
48787  path="$MSVC_DLL"
48788  has_colon=`$ECHO $path | $GREP ^.:`
48789  new_path="$path"
48790  if test "x$has_colon" = x; then
48791    # Not in mixed or Windows style, start by that.
48792    new_path=`cmd //c echo $path`
48793  fi
48794
48795
48796  input_path="$new_path"
48797  # Check if we need to convert this using DOS-style short mode. If the path
48798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48799  # take no chances and rewrite it.
48800  # Note: m4 eats our [], so we need to use [ and ] instead.
48801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48802  if test "x$has_forbidden_chars" != x; then
48803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48805  fi
48806
48807
48808  windows_path="$new_path"
48809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48810    unix_path=`$CYGPATH -u "$windows_path"`
48811    new_path="$unix_path"
48812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48814    new_path="$unix_path"
48815  fi
48816
48817  if test "x$path" != "x$new_path"; then
48818    MSVC_DLL="$new_path"
48819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48820$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48821  fi
48822
48823  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48824  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48825
48826    else
48827      # We're on a unix platform. Hooray! :)
48828      path="$MSVC_DLL"
48829      has_space=`$ECHO "$path" | $GREP " "`
48830      if test "x$has_space" != x; then
48831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48832$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48833        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48834      fi
48835
48836      # Use eval to expand a potential ~
48837      eval path="$path"
48838      if test ! -f "$path" && test ! -d "$path"; then
48839        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48840      fi
48841
48842      if test -d "$path"; then
48843        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48844      else
48845        dir="`$DIRNAME "$path"`"
48846        base="`$BASENAME "$path"`"
48847        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48848      fi
48849    fi
48850  fi
48851
48852      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48853$as_echo_n "checking for $DLL_NAME... " >&6; }
48854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48855$as_echo "$MSVC_DLL" >&6; }
48856    else
48857      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48858$as_echo "incorrect, ignoring" >&6; }
48859      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48860$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48861    fi
48862  fi
48863
48864    if test "x$MSVC_DLL" = x; then
48865      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48866    fi
48867    MSVCR_DLL="$MSVC_DLL"
48868  elif test "x$DEVKIT_MSVCR_DLL" != x; then
48869
48870  DLL_NAME="$MSVCR_NAME"
48871  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48872  METHOD="devkit"
48873  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48874    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48875$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48876
48877    # Need to check if the found msvcr is correct architecture
48878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48879$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48880    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48881    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48882      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48883      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48884      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48885        CORRECT_MSVCR_ARCH="PE32 executable"
48886      else
48887        CORRECT_MSVCR_ARCH="PE32+ executable"
48888      fi
48889    else
48890      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48891        CORRECT_MSVCR_ARCH=386
48892      else
48893        CORRECT_MSVCR_ARCH=x86-64
48894      fi
48895    fi
48896    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48897      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48898$as_echo "ok" >&6; }
48899      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48900
48901  # Only process if variable expands to non-empty
48902
48903  if test "x$MSVC_DLL" != x; then
48904    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48905
48906  # Input might be given as Windows format, start by converting to
48907  # unix format.
48908  path="$MSVC_DLL"
48909  new_path=`$CYGPATH -u "$path"`
48910
48911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48914  # "foo.exe" is OK but "foo" is an error.
48915  #
48916  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48917  # It is also a way to make sure we got the proper file name for the real test later on.
48918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48919  if test "x$test_shortpath" = x; then
48920    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48921$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48922    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48923  fi
48924
48925  # Call helper function which possibly converts this using DOS-style short mode.
48926  # If so, the updated path is stored in $new_path.
48927
48928  input_path="$new_path"
48929  # Check if we need to convert this using DOS-style short mode. If the path
48930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48931  # take no chances and rewrite it.
48932  # Note: m4 eats our [], so we need to use [ and ] instead.
48933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48934  if test "x$has_forbidden_chars" != x; then
48935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48939      # Going to short mode and back again did indeed matter. Since short mode is
48940      # case insensitive, let's make it lowercase to improve readability.
48941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48942      # Now convert it back to Unix-style (cygpath)
48943      input_path=`$CYGPATH -u "$shortmode_path"`
48944      new_path="$input_path"
48945    fi
48946  fi
48947
48948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48949  if test "x$test_cygdrive_prefix" = x; then
48950    # As a simple fix, exclude /usr/bin since it's not a real path.
48951    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48953      # a path prefixed by /cygdrive for fixpath to work.
48954      new_path="$CYGWIN_ROOT_PATH$input_path"
48955    fi
48956  fi
48957
48958
48959  if test "x$path" != "x$new_path"; then
48960    MSVC_DLL="$new_path"
48961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48962$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48963  fi
48964
48965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48966
48967  path="$MSVC_DLL"
48968  has_colon=`$ECHO $path | $GREP ^.:`
48969  new_path="$path"
48970  if test "x$has_colon" = x; then
48971    # Not in mixed or Windows style, start by that.
48972    new_path=`cmd //c echo $path`
48973  fi
48974
48975
48976  input_path="$new_path"
48977  # Check if we need to convert this using DOS-style short mode. If the path
48978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48979  # take no chances and rewrite it.
48980  # Note: m4 eats our [], so we need to use [ and ] instead.
48981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48982  if test "x$has_forbidden_chars" != x; then
48983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48985  fi
48986
48987
48988  windows_path="$new_path"
48989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48990    unix_path=`$CYGPATH -u "$windows_path"`
48991    new_path="$unix_path"
48992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48994    new_path="$unix_path"
48995  fi
48996
48997  if test "x$path" != "x$new_path"; then
48998    MSVC_DLL="$new_path"
48999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49000$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49001  fi
49002
49003  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49004  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49005
49006    else
49007      # We're on a unix platform. Hooray! :)
49008      path="$MSVC_DLL"
49009      has_space=`$ECHO "$path" | $GREP " "`
49010      if test "x$has_space" != x; then
49011        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49012$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49013        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49014      fi
49015
49016      # Use eval to expand a potential ~
49017      eval path="$path"
49018      if test ! -f "$path" && test ! -d "$path"; then
49019        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49020      fi
49021
49022      if test -d "$path"; then
49023        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49024      else
49025        dir="`$DIRNAME "$path"`"
49026        base="`$BASENAME "$path"`"
49027        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49028      fi
49029    fi
49030  fi
49031
49032      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49033$as_echo_n "checking for $DLL_NAME... " >&6; }
49034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49035$as_echo "$MSVC_DLL" >&6; }
49036    else
49037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49038$as_echo "incorrect, ignoring" >&6; }
49039      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49040$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49041    fi
49042  fi
49043
49044    if test "x$MSVC_DLL" = x; then
49045      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49046    fi
49047    MSVCR_DLL="$MSVC_DLL"
49048  else
49049
49050  DLL_NAME="${MSVCR_NAME}"
49051  MSVC_DLL=
49052
49053  if test "x$MSVC_DLL" = x; then
49054    # Probe: Using well-known location from Visual Studio 10.0
49055    if test "x$VCINSTALLDIR" != x; then
49056      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49057
49058  windows_path="$CYGWIN_VC_INSTALL_DIR"
49059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49060    unix_path=`$CYGPATH -u "$windows_path"`
49061    CYGWIN_VC_INSTALL_DIR="$unix_path"
49062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49064    CYGWIN_VC_INSTALL_DIR="$unix_path"
49065  fi
49066
49067      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49068        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49069      else
49070        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49071      fi
49072      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49073
49074  DLL_NAME="$DLL_NAME"
49075  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49076  METHOD="well-known location in VCINSTALLDIR"
49077  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49078    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49079$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49080
49081    # Need to check if the found msvcr is correct architecture
49082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49083$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49084    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49085    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49086      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49087      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49088      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49089        CORRECT_MSVCR_ARCH="PE32 executable"
49090      else
49091        CORRECT_MSVCR_ARCH="PE32+ executable"
49092      fi
49093    else
49094      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49095        CORRECT_MSVCR_ARCH=386
49096      else
49097        CORRECT_MSVCR_ARCH=x86-64
49098      fi
49099    fi
49100    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49102$as_echo "ok" >&6; }
49103      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49104
49105  # Only process if variable expands to non-empty
49106
49107  if test "x$MSVC_DLL" != x; then
49108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49109
49110  # Input might be given as Windows format, start by converting to
49111  # unix format.
49112  path="$MSVC_DLL"
49113  new_path=`$CYGPATH -u "$path"`
49114
49115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49118  # "foo.exe" is OK but "foo" is an error.
49119  #
49120  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49121  # It is also a way to make sure we got the proper file name for the real test later on.
49122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49123  if test "x$test_shortpath" = x; then
49124    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49125$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49126    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49127  fi
49128
49129  # Call helper function which possibly converts this using DOS-style short mode.
49130  # If so, the updated path is stored in $new_path.
49131
49132  input_path="$new_path"
49133  # Check if we need to convert this using DOS-style short mode. If the path
49134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49135  # take no chances and rewrite it.
49136  # Note: m4 eats our [], so we need to use [ and ] instead.
49137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49138  if test "x$has_forbidden_chars" != x; then
49139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49143      # Going to short mode and back again did indeed matter. Since short mode is
49144      # case insensitive, let's make it lowercase to improve readability.
49145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49146      # Now convert it back to Unix-style (cygpath)
49147      input_path=`$CYGPATH -u "$shortmode_path"`
49148      new_path="$input_path"
49149    fi
49150  fi
49151
49152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49153  if test "x$test_cygdrive_prefix" = x; then
49154    # As a simple fix, exclude /usr/bin since it's not a real path.
49155    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49157      # a path prefixed by /cygdrive for fixpath to work.
49158      new_path="$CYGWIN_ROOT_PATH$input_path"
49159    fi
49160  fi
49161
49162
49163  if test "x$path" != "x$new_path"; then
49164    MSVC_DLL="$new_path"
49165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49166$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49167  fi
49168
49169    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49170
49171  path="$MSVC_DLL"
49172  has_colon=`$ECHO $path | $GREP ^.:`
49173  new_path="$path"
49174  if test "x$has_colon" = x; then
49175    # Not in mixed or Windows style, start by that.
49176    new_path=`cmd //c echo $path`
49177  fi
49178
49179
49180  input_path="$new_path"
49181  # Check if we need to convert this using DOS-style short mode. If the path
49182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49183  # take no chances and rewrite it.
49184  # Note: m4 eats our [], so we need to use [ and ] instead.
49185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49186  if test "x$has_forbidden_chars" != x; then
49187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49189  fi
49190
49191
49192  windows_path="$new_path"
49193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49194    unix_path=`$CYGPATH -u "$windows_path"`
49195    new_path="$unix_path"
49196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49198    new_path="$unix_path"
49199  fi
49200
49201  if test "x$path" != "x$new_path"; then
49202    MSVC_DLL="$new_path"
49203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49204$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49205  fi
49206
49207  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49208  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49209
49210    else
49211      # We're on a unix platform. Hooray! :)
49212      path="$MSVC_DLL"
49213      has_space=`$ECHO "$path" | $GREP " "`
49214      if test "x$has_space" != x; then
49215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49216$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49217        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49218      fi
49219
49220      # Use eval to expand a potential ~
49221      eval path="$path"
49222      if test ! -f "$path" && test ! -d "$path"; then
49223        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49224      fi
49225
49226      if test -d "$path"; then
49227        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49228      else
49229        dir="`$DIRNAME "$path"`"
49230        base="`$BASENAME "$path"`"
49231        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49232      fi
49233    fi
49234  fi
49235
49236      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49237$as_echo_n "checking for $DLL_NAME... " >&6; }
49238      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49239$as_echo "$MSVC_DLL" >&6; }
49240    else
49241      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49242$as_echo "incorrect, ignoring" >&6; }
49243      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49244$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49245    fi
49246  fi
49247
49248    fi
49249  fi
49250
49251  if test "x$MSVC_DLL" = x; then
49252    # Probe: Check in the Boot JDK directory.
49253    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49254
49255  DLL_NAME="$DLL_NAME"
49256  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49257  METHOD="well-known location in Boot JDK"
49258  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49259    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49260$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49261
49262    # Need to check if the found msvcr is correct architecture
49263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49264$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49265    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49266    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49267      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49268      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49269      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49270        CORRECT_MSVCR_ARCH="PE32 executable"
49271      else
49272        CORRECT_MSVCR_ARCH="PE32+ executable"
49273      fi
49274    else
49275      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49276        CORRECT_MSVCR_ARCH=386
49277      else
49278        CORRECT_MSVCR_ARCH=x86-64
49279      fi
49280    fi
49281    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49282      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49283$as_echo "ok" >&6; }
49284      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49285
49286  # Only process if variable expands to non-empty
49287
49288  if test "x$MSVC_DLL" != x; then
49289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49290
49291  # Input might be given as Windows format, start by converting to
49292  # unix format.
49293  path="$MSVC_DLL"
49294  new_path=`$CYGPATH -u "$path"`
49295
49296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49299  # "foo.exe" is OK but "foo" is an error.
49300  #
49301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49302  # It is also a way to make sure we got the proper file name for the real test later on.
49303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49304  if test "x$test_shortpath" = x; then
49305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49306$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49307    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49308  fi
49309
49310  # Call helper function which possibly converts this using DOS-style short mode.
49311  # If so, the updated path is stored in $new_path.
49312
49313  input_path="$new_path"
49314  # Check if we need to convert this using DOS-style short mode. If the path
49315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49316  # take no chances and rewrite it.
49317  # Note: m4 eats our [], so we need to use [ and ] instead.
49318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49319  if test "x$has_forbidden_chars" != x; then
49320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49324      # Going to short mode and back again did indeed matter. Since short mode is
49325      # case insensitive, let's make it lowercase to improve readability.
49326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49327      # Now convert it back to Unix-style (cygpath)
49328      input_path=`$CYGPATH -u "$shortmode_path"`
49329      new_path="$input_path"
49330    fi
49331  fi
49332
49333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49334  if test "x$test_cygdrive_prefix" = x; then
49335    # As a simple fix, exclude /usr/bin since it's not a real path.
49336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49338      # a path prefixed by /cygdrive for fixpath to work.
49339      new_path="$CYGWIN_ROOT_PATH$input_path"
49340    fi
49341  fi
49342
49343
49344  if test "x$path" != "x$new_path"; then
49345    MSVC_DLL="$new_path"
49346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49347$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49348  fi
49349
49350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49351
49352  path="$MSVC_DLL"
49353  has_colon=`$ECHO $path | $GREP ^.:`
49354  new_path="$path"
49355  if test "x$has_colon" = x; then
49356    # Not in mixed or Windows style, start by that.
49357    new_path=`cmd //c echo $path`
49358  fi
49359
49360
49361  input_path="$new_path"
49362  # Check if we need to convert this using DOS-style short mode. If the path
49363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49364  # take no chances and rewrite it.
49365  # Note: m4 eats our [], so we need to use [ and ] instead.
49366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49367  if test "x$has_forbidden_chars" != x; then
49368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49370  fi
49371
49372
49373  windows_path="$new_path"
49374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49375    unix_path=`$CYGPATH -u "$windows_path"`
49376    new_path="$unix_path"
49377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49379    new_path="$unix_path"
49380  fi
49381
49382  if test "x$path" != "x$new_path"; then
49383    MSVC_DLL="$new_path"
49384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49385$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49386  fi
49387
49388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49390
49391    else
49392      # We're on a unix platform. Hooray! :)
49393      path="$MSVC_DLL"
49394      has_space=`$ECHO "$path" | $GREP " "`
49395      if test "x$has_space" != x; then
49396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49397$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49398        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49399      fi
49400
49401      # Use eval to expand a potential ~
49402      eval path="$path"
49403      if test ! -f "$path" && test ! -d "$path"; then
49404        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49405      fi
49406
49407      if test -d "$path"; then
49408        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49409      else
49410        dir="`$DIRNAME "$path"`"
49411        base="`$BASENAME "$path"`"
49412        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49413      fi
49414    fi
49415  fi
49416
49417      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49418$as_echo_n "checking for $DLL_NAME... " >&6; }
49419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49420$as_echo "$MSVC_DLL" >&6; }
49421    else
49422      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49423$as_echo "incorrect, ignoring" >&6; }
49424      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49425$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49426    fi
49427  fi
49428
49429  fi
49430
49431  if test "x$MSVC_DLL" = x; then
49432    # Probe: Look in the Windows system32 directory
49433    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49434
49435  windows_path="$CYGWIN_SYSTEMROOT"
49436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49437    unix_path=`$CYGPATH -u "$windows_path"`
49438    CYGWIN_SYSTEMROOT="$unix_path"
49439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49441    CYGWIN_SYSTEMROOT="$unix_path"
49442  fi
49443
49444    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49445
49446  DLL_NAME="$DLL_NAME"
49447  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49448  METHOD="well-known location in SYSTEMROOT"
49449  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49450    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49451$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49452
49453    # Need to check if the found msvcr is correct architecture
49454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49455$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49456    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49458      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49459      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49460      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49461        CORRECT_MSVCR_ARCH="PE32 executable"
49462      else
49463        CORRECT_MSVCR_ARCH="PE32+ executable"
49464      fi
49465    else
49466      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49467        CORRECT_MSVCR_ARCH=386
49468      else
49469        CORRECT_MSVCR_ARCH=x86-64
49470      fi
49471    fi
49472    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49474$as_echo "ok" >&6; }
49475      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49476
49477  # Only process if variable expands to non-empty
49478
49479  if test "x$MSVC_DLL" != x; then
49480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49481
49482  # Input might be given as Windows format, start by converting to
49483  # unix format.
49484  path="$MSVC_DLL"
49485  new_path=`$CYGPATH -u "$path"`
49486
49487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49490  # "foo.exe" is OK but "foo" is an error.
49491  #
49492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49493  # It is also a way to make sure we got the proper file name for the real test later on.
49494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49495  if test "x$test_shortpath" = x; then
49496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49497$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49498    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49499  fi
49500
49501  # Call helper function which possibly converts this using DOS-style short mode.
49502  # If so, the updated path is stored in $new_path.
49503
49504  input_path="$new_path"
49505  # Check if we need to convert this using DOS-style short mode. If the path
49506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49507  # take no chances and rewrite it.
49508  # Note: m4 eats our [], so we need to use [ and ] instead.
49509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49510  if test "x$has_forbidden_chars" != x; then
49511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49515      # Going to short mode and back again did indeed matter. Since short mode is
49516      # case insensitive, let's make it lowercase to improve readability.
49517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49518      # Now convert it back to Unix-style (cygpath)
49519      input_path=`$CYGPATH -u "$shortmode_path"`
49520      new_path="$input_path"
49521    fi
49522  fi
49523
49524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49525  if test "x$test_cygdrive_prefix" = x; then
49526    # As a simple fix, exclude /usr/bin since it's not a real path.
49527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49529      # a path prefixed by /cygdrive for fixpath to work.
49530      new_path="$CYGWIN_ROOT_PATH$input_path"
49531    fi
49532  fi
49533
49534
49535  if test "x$path" != "x$new_path"; then
49536    MSVC_DLL="$new_path"
49537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49538$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49539  fi
49540
49541    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49542
49543  path="$MSVC_DLL"
49544  has_colon=`$ECHO $path | $GREP ^.:`
49545  new_path="$path"
49546  if test "x$has_colon" = x; then
49547    # Not in mixed or Windows style, start by that.
49548    new_path=`cmd //c echo $path`
49549  fi
49550
49551
49552  input_path="$new_path"
49553  # Check if we need to convert this using DOS-style short mode. If the path
49554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49555  # take no chances and rewrite it.
49556  # Note: m4 eats our [], so we need to use [ and ] instead.
49557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49558  if test "x$has_forbidden_chars" != x; then
49559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49561  fi
49562
49563
49564  windows_path="$new_path"
49565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49566    unix_path=`$CYGPATH -u "$windows_path"`
49567    new_path="$unix_path"
49568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49570    new_path="$unix_path"
49571  fi
49572
49573  if test "x$path" != "x$new_path"; then
49574    MSVC_DLL="$new_path"
49575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49576$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49577  fi
49578
49579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49581
49582    else
49583      # We're on a unix platform. Hooray! :)
49584      path="$MSVC_DLL"
49585      has_space=`$ECHO "$path" | $GREP " "`
49586      if test "x$has_space" != x; then
49587        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49588$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49589        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49590      fi
49591
49592      # Use eval to expand a potential ~
49593      eval path="$path"
49594      if test ! -f "$path" && test ! -d "$path"; then
49595        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49596      fi
49597
49598      if test -d "$path"; then
49599        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49600      else
49601        dir="`$DIRNAME "$path"`"
49602        base="`$BASENAME "$path"`"
49603        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49604      fi
49605    fi
49606  fi
49607
49608      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49609$as_echo_n "checking for $DLL_NAME... " >&6; }
49610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49611$as_echo "$MSVC_DLL" >&6; }
49612    else
49613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49614$as_echo "incorrect, ignoring" >&6; }
49615      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49616$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49617    fi
49618  fi
49619
49620  fi
49621
49622  if test "x$MSVC_DLL" = x; then
49623    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49624    if test "x$VS100COMNTOOLS" != x; then
49625      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49626
49627  windows_path="$CYGWIN_VS_TOOLS_DIR"
49628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49629    unix_path=`$CYGPATH -u "$windows_path"`
49630    CYGWIN_VS_TOOLS_DIR="$unix_path"
49631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49633    CYGWIN_VS_TOOLS_DIR="$unix_path"
49634  fi
49635
49636      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49637        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49638	    | $GREP -i /x64/ | $HEAD --lines 1`
49639      else
49640        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49641	    | $GREP -i /x86/ | $HEAD --lines 1`
49642      fi
49643
49644  DLL_NAME="$DLL_NAME"
49645  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49646  METHOD="search of VS100COMNTOOLS"
49647  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49648    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49649$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49650
49651    # Need to check if the found msvcr is correct architecture
49652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49653$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49654    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49656      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49657      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49658      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49659        CORRECT_MSVCR_ARCH="PE32 executable"
49660      else
49661        CORRECT_MSVCR_ARCH="PE32+ executable"
49662      fi
49663    else
49664      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49665        CORRECT_MSVCR_ARCH=386
49666      else
49667        CORRECT_MSVCR_ARCH=x86-64
49668      fi
49669    fi
49670    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49671      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49672$as_echo "ok" >&6; }
49673      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49674
49675  # Only process if variable expands to non-empty
49676
49677  if test "x$MSVC_DLL" != x; then
49678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49679
49680  # Input might be given as Windows format, start by converting to
49681  # unix format.
49682  path="$MSVC_DLL"
49683  new_path=`$CYGPATH -u "$path"`
49684
49685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49688  # "foo.exe" is OK but "foo" is an error.
49689  #
49690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49691  # It is also a way to make sure we got the proper file name for the real test later on.
49692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49693  if test "x$test_shortpath" = x; then
49694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49695$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49696    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49697  fi
49698
49699  # Call helper function which possibly converts this using DOS-style short mode.
49700  # If so, the updated path is stored in $new_path.
49701
49702  input_path="$new_path"
49703  # Check if we need to convert this using DOS-style short mode. If the path
49704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49705  # take no chances and rewrite it.
49706  # Note: m4 eats our [], so we need to use [ and ] instead.
49707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49708  if test "x$has_forbidden_chars" != x; then
49709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49713      # Going to short mode and back again did indeed matter. Since short mode is
49714      # case insensitive, let's make it lowercase to improve readability.
49715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49716      # Now convert it back to Unix-style (cygpath)
49717      input_path=`$CYGPATH -u "$shortmode_path"`
49718      new_path="$input_path"
49719    fi
49720  fi
49721
49722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49723  if test "x$test_cygdrive_prefix" = x; then
49724    # As a simple fix, exclude /usr/bin since it's not a real path.
49725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49727      # a path prefixed by /cygdrive for fixpath to work.
49728      new_path="$CYGWIN_ROOT_PATH$input_path"
49729    fi
49730  fi
49731
49732
49733  if test "x$path" != "x$new_path"; then
49734    MSVC_DLL="$new_path"
49735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49736$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49737  fi
49738
49739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49740
49741  path="$MSVC_DLL"
49742  has_colon=`$ECHO $path | $GREP ^.:`
49743  new_path="$path"
49744  if test "x$has_colon" = x; then
49745    # Not in mixed or Windows style, start by that.
49746    new_path=`cmd //c echo $path`
49747  fi
49748
49749
49750  input_path="$new_path"
49751  # Check if we need to convert this using DOS-style short mode. If the path
49752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49753  # take no chances and rewrite it.
49754  # Note: m4 eats our [], so we need to use [ and ] instead.
49755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49756  if test "x$has_forbidden_chars" != x; then
49757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49759  fi
49760
49761
49762  windows_path="$new_path"
49763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49764    unix_path=`$CYGPATH -u "$windows_path"`
49765    new_path="$unix_path"
49766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49768    new_path="$unix_path"
49769  fi
49770
49771  if test "x$path" != "x$new_path"; then
49772    MSVC_DLL="$new_path"
49773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49774$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49775  fi
49776
49777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49779
49780    else
49781      # We're on a unix platform. Hooray! :)
49782      path="$MSVC_DLL"
49783      has_space=`$ECHO "$path" | $GREP " "`
49784      if test "x$has_space" != x; then
49785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49786$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49787        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49788      fi
49789
49790      # Use eval to expand a potential ~
49791      eval path="$path"
49792      if test ! -f "$path" && test ! -d "$path"; then
49793        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49794      fi
49795
49796      if test -d "$path"; then
49797        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49798      else
49799        dir="`$DIRNAME "$path"`"
49800        base="`$BASENAME "$path"`"
49801        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49802      fi
49803    fi
49804  fi
49805
49806      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49807$as_echo_n "checking for $DLL_NAME... " >&6; }
49808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49809$as_echo "$MSVC_DLL" >&6; }
49810    else
49811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49812$as_echo "incorrect, ignoring" >&6; }
49813      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49814$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49815    fi
49816  fi
49817
49818    fi
49819  fi
49820
49821  if test "x$MSVC_DLL" = x; then
49822    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49823    # (This was the original behaviour; kept since it might turn something up)
49824    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49825      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49826        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49827	    | $GREP x64 | $HEAD --lines 1`
49828      else
49829        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49830	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49831        if test "x$POSSIBLE_MSVC_DLL" = x; then
49832          # We're grasping at straws now...
49833          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49834	      | $HEAD --lines 1`
49835        fi
49836      fi
49837
49838
49839  DLL_NAME="$DLL_NAME"
49840  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49841  METHOD="search of VCINSTALLDIR"
49842  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49843    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49844$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49845
49846    # Need to check if the found msvcr is correct architecture
49847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49848$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49849    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49851      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49852      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49853      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49854        CORRECT_MSVCR_ARCH="PE32 executable"
49855      else
49856        CORRECT_MSVCR_ARCH="PE32+ executable"
49857      fi
49858    else
49859      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49860        CORRECT_MSVCR_ARCH=386
49861      else
49862        CORRECT_MSVCR_ARCH=x86-64
49863      fi
49864    fi
49865    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49867$as_echo "ok" >&6; }
49868      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49869
49870  # Only process if variable expands to non-empty
49871
49872  if test "x$MSVC_DLL" != x; then
49873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49874
49875  # Input might be given as Windows format, start by converting to
49876  # unix format.
49877  path="$MSVC_DLL"
49878  new_path=`$CYGPATH -u "$path"`
49879
49880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49883  # "foo.exe" is OK but "foo" is an error.
49884  #
49885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49886  # It is also a way to make sure we got the proper file name for the real test later on.
49887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49888  if test "x$test_shortpath" = x; then
49889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49890$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49891    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49892  fi
49893
49894  # Call helper function which possibly converts this using DOS-style short mode.
49895  # If so, the updated path is stored in $new_path.
49896
49897  input_path="$new_path"
49898  # Check if we need to convert this using DOS-style short mode. If the path
49899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49900  # take no chances and rewrite it.
49901  # Note: m4 eats our [], so we need to use [ and ] instead.
49902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49903  if test "x$has_forbidden_chars" != x; then
49904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49908      # Going to short mode and back again did indeed matter. Since short mode is
49909      # case insensitive, let's make it lowercase to improve readability.
49910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49911      # Now convert it back to Unix-style (cygpath)
49912      input_path=`$CYGPATH -u "$shortmode_path"`
49913      new_path="$input_path"
49914    fi
49915  fi
49916
49917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49918  if test "x$test_cygdrive_prefix" = x; then
49919    # As a simple fix, exclude /usr/bin since it's not a real path.
49920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49922      # a path prefixed by /cygdrive for fixpath to work.
49923      new_path="$CYGWIN_ROOT_PATH$input_path"
49924    fi
49925  fi
49926
49927
49928  if test "x$path" != "x$new_path"; then
49929    MSVC_DLL="$new_path"
49930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49931$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49932  fi
49933
49934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49935
49936  path="$MSVC_DLL"
49937  has_colon=`$ECHO $path | $GREP ^.:`
49938  new_path="$path"
49939  if test "x$has_colon" = x; then
49940    # Not in mixed or Windows style, start by that.
49941    new_path=`cmd //c echo $path`
49942  fi
49943
49944
49945  input_path="$new_path"
49946  # Check if we need to convert this using DOS-style short mode. If the path
49947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49948  # take no chances and rewrite it.
49949  # Note: m4 eats our [], so we need to use [ and ] instead.
49950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49951  if test "x$has_forbidden_chars" != x; then
49952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49954  fi
49955
49956
49957  windows_path="$new_path"
49958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49959    unix_path=`$CYGPATH -u "$windows_path"`
49960    new_path="$unix_path"
49961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49963    new_path="$unix_path"
49964  fi
49965
49966  if test "x$path" != "x$new_path"; then
49967    MSVC_DLL="$new_path"
49968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49969$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49970  fi
49971
49972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49974
49975    else
49976      # We're on a unix platform. Hooray! :)
49977      path="$MSVC_DLL"
49978      has_space=`$ECHO "$path" | $GREP " "`
49979      if test "x$has_space" != x; then
49980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49981$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49982        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49983      fi
49984
49985      # Use eval to expand a potential ~
49986      eval path="$path"
49987      if test ! -f "$path" && test ! -d "$path"; then
49988        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49989      fi
49990
49991      if test -d "$path"; then
49992        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49993      else
49994        dir="`$DIRNAME "$path"`"
49995        base="`$BASENAME "$path"`"
49996        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49997      fi
49998    fi
49999  fi
50000
50001      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50002$as_echo_n "checking for $DLL_NAME... " >&6; }
50003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50004$as_echo "$MSVC_DLL" >&6; }
50005    else
50006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50007$as_echo "incorrect, ignoring" >&6; }
50008      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50009$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50010    fi
50011  fi
50012
50013    fi
50014  fi
50015
50016  if test "x$MSVC_DLL" = x; then
50017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50018$as_echo_n "checking for $DLL_NAME... " >&6; }
50019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50020$as_echo "no" >&6; }
50021    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50022  fi
50023
50024    MSVCR_DLL="$MSVC_DLL"
50025  fi
50026
50027
50028
50029# Check whether --with-msvcp-dll was given.
50030if test "${with_msvcp_dll+set}" = set; then :
50031  withval=$with_msvcp_dll;
50032fi
50033
50034
50035  if test "x$MSVCP_NAME" != "x"; then
50036    if test "x$with_msvcp_dll" != x; then
50037      # If given explicitely by user, do not probe. If not present, fail directly.
50038
50039  DLL_NAME="$MSVCP_NAME"
50040  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50041  METHOD="--with-msvcp-dll"
50042  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50043    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50044$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50045
50046    # Need to check if the found msvcr is correct architecture
50047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50048$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50049    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50051      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50052      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50053      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50054        CORRECT_MSVCR_ARCH="PE32 executable"
50055      else
50056        CORRECT_MSVCR_ARCH="PE32+ executable"
50057      fi
50058    else
50059      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50060        CORRECT_MSVCR_ARCH=386
50061      else
50062        CORRECT_MSVCR_ARCH=x86-64
50063      fi
50064    fi
50065    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50067$as_echo "ok" >&6; }
50068      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50069
50070  # Only process if variable expands to non-empty
50071
50072  if test "x$MSVC_DLL" != x; then
50073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50074
50075  # Input might be given as Windows format, start by converting to
50076  # unix format.
50077  path="$MSVC_DLL"
50078  new_path=`$CYGPATH -u "$path"`
50079
50080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50083  # "foo.exe" is OK but "foo" is an error.
50084  #
50085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50086  # It is also a way to make sure we got the proper file name for the real test later on.
50087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50088  if test "x$test_shortpath" = x; then
50089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50090$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50091    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50092  fi
50093
50094  # Call helper function which possibly converts this using DOS-style short mode.
50095  # If so, the updated path is stored in $new_path.
50096
50097  input_path="$new_path"
50098  # Check if we need to convert this using DOS-style short mode. If the path
50099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50100  # take no chances and rewrite it.
50101  # Note: m4 eats our [], so we need to use [ and ] instead.
50102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50103  if test "x$has_forbidden_chars" != x; then
50104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50108      # Going to short mode and back again did indeed matter. Since short mode is
50109      # case insensitive, let's make it lowercase to improve readability.
50110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50111      # Now convert it back to Unix-style (cygpath)
50112      input_path=`$CYGPATH -u "$shortmode_path"`
50113      new_path="$input_path"
50114    fi
50115  fi
50116
50117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50118  if test "x$test_cygdrive_prefix" = x; then
50119    # As a simple fix, exclude /usr/bin since it's not a real path.
50120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50122      # a path prefixed by /cygdrive for fixpath to work.
50123      new_path="$CYGWIN_ROOT_PATH$input_path"
50124    fi
50125  fi
50126
50127
50128  if test "x$path" != "x$new_path"; then
50129    MSVC_DLL="$new_path"
50130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50131$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50132  fi
50133
50134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50135
50136  path="$MSVC_DLL"
50137  has_colon=`$ECHO $path | $GREP ^.:`
50138  new_path="$path"
50139  if test "x$has_colon" = x; then
50140    # Not in mixed or Windows style, start by that.
50141    new_path=`cmd //c echo $path`
50142  fi
50143
50144
50145  input_path="$new_path"
50146  # Check if we need to convert this using DOS-style short mode. If the path
50147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50148  # take no chances and rewrite it.
50149  # Note: m4 eats our [], so we need to use [ and ] instead.
50150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50151  if test "x$has_forbidden_chars" != x; then
50152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50154  fi
50155
50156
50157  windows_path="$new_path"
50158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50159    unix_path=`$CYGPATH -u "$windows_path"`
50160    new_path="$unix_path"
50161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50163    new_path="$unix_path"
50164  fi
50165
50166  if test "x$path" != "x$new_path"; then
50167    MSVC_DLL="$new_path"
50168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50169$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50170  fi
50171
50172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50174
50175    else
50176      # We're on a unix platform. Hooray! :)
50177      path="$MSVC_DLL"
50178      has_space=`$ECHO "$path" | $GREP " "`
50179      if test "x$has_space" != x; then
50180        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50181$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50182        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50183      fi
50184
50185      # Use eval to expand a potential ~
50186      eval path="$path"
50187      if test ! -f "$path" && test ! -d "$path"; then
50188        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50189      fi
50190
50191      if test -d "$path"; then
50192        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50193      else
50194        dir="`$DIRNAME "$path"`"
50195        base="`$BASENAME "$path"`"
50196        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50197      fi
50198    fi
50199  fi
50200
50201      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50202$as_echo_n "checking for $DLL_NAME... " >&6; }
50203      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50204$as_echo "$MSVC_DLL" >&6; }
50205    else
50206      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50207$as_echo "incorrect, ignoring" >&6; }
50208      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50209$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50210    fi
50211  fi
50212
50213      if test "x$MSVC_DLL" = x; then
50214        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50215      fi
50216      MSVCP_DLL="$MSVC_DLL"
50217    elif test "x$DEVKIT_MSVCP_DLL" != x; then
50218
50219  DLL_NAME="$MSVCP_NAME"
50220  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
50221  METHOD="devkit"
50222  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50223    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50224$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50225
50226    # Need to check if the found msvcr is correct architecture
50227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50228$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50229    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50231      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50232      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50233      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50234        CORRECT_MSVCR_ARCH="PE32 executable"
50235      else
50236        CORRECT_MSVCR_ARCH="PE32+ executable"
50237      fi
50238    else
50239      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50240        CORRECT_MSVCR_ARCH=386
50241      else
50242        CORRECT_MSVCR_ARCH=x86-64
50243      fi
50244    fi
50245    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50247$as_echo "ok" >&6; }
50248      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50249
50250  # Only process if variable expands to non-empty
50251
50252  if test "x$MSVC_DLL" != x; then
50253    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50254
50255  # Input might be given as Windows format, start by converting to
50256  # unix format.
50257  path="$MSVC_DLL"
50258  new_path=`$CYGPATH -u "$path"`
50259
50260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50263  # "foo.exe" is OK but "foo" is an error.
50264  #
50265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50266  # It is also a way to make sure we got the proper file name for the real test later on.
50267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50268  if test "x$test_shortpath" = x; then
50269    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50270$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50271    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50272  fi
50273
50274  # Call helper function which possibly converts this using DOS-style short mode.
50275  # If so, the updated path is stored in $new_path.
50276
50277  input_path="$new_path"
50278  # Check if we need to convert this using DOS-style short mode. If the path
50279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50280  # take no chances and rewrite it.
50281  # Note: m4 eats our [], so we need to use [ and ] instead.
50282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50283  if test "x$has_forbidden_chars" != x; then
50284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50288      # Going to short mode and back again did indeed matter. Since short mode is
50289      # case insensitive, let's make it lowercase to improve readability.
50290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50291      # Now convert it back to Unix-style (cygpath)
50292      input_path=`$CYGPATH -u "$shortmode_path"`
50293      new_path="$input_path"
50294    fi
50295  fi
50296
50297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50298  if test "x$test_cygdrive_prefix" = x; then
50299    # As a simple fix, exclude /usr/bin since it's not a real path.
50300    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50302      # a path prefixed by /cygdrive for fixpath to work.
50303      new_path="$CYGWIN_ROOT_PATH$input_path"
50304    fi
50305  fi
50306
50307
50308  if test "x$path" != "x$new_path"; then
50309    MSVC_DLL="$new_path"
50310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50311$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50312  fi
50313
50314    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50315
50316  path="$MSVC_DLL"
50317  has_colon=`$ECHO $path | $GREP ^.:`
50318  new_path="$path"
50319  if test "x$has_colon" = x; then
50320    # Not in mixed or Windows style, start by that.
50321    new_path=`cmd //c echo $path`
50322  fi
50323
50324
50325  input_path="$new_path"
50326  # Check if we need to convert this using DOS-style short mode. If the path
50327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50328  # take no chances and rewrite it.
50329  # Note: m4 eats our [], so we need to use [ and ] instead.
50330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50331  if test "x$has_forbidden_chars" != x; then
50332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50334  fi
50335
50336
50337  windows_path="$new_path"
50338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50339    unix_path=`$CYGPATH -u "$windows_path"`
50340    new_path="$unix_path"
50341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50343    new_path="$unix_path"
50344  fi
50345
50346  if test "x$path" != "x$new_path"; then
50347    MSVC_DLL="$new_path"
50348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50349$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50350  fi
50351
50352  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50353  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50354
50355    else
50356      # We're on a unix platform. Hooray! :)
50357      path="$MSVC_DLL"
50358      has_space=`$ECHO "$path" | $GREP " "`
50359      if test "x$has_space" != x; then
50360        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50361$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50362        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50363      fi
50364
50365      # Use eval to expand a potential ~
50366      eval path="$path"
50367      if test ! -f "$path" && test ! -d "$path"; then
50368        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50369      fi
50370
50371      if test -d "$path"; then
50372        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50373      else
50374        dir="`$DIRNAME "$path"`"
50375        base="`$BASENAME "$path"`"
50376        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50377      fi
50378    fi
50379  fi
50380
50381      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50382$as_echo_n "checking for $DLL_NAME... " >&6; }
50383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50384$as_echo "$MSVC_DLL" >&6; }
50385    else
50386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50387$as_echo "incorrect, ignoring" >&6; }
50388      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50389$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50390    fi
50391  fi
50392
50393      if test "x$MSVC_DLL" = x; then
50394        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
50395      fi
50396      MSVCP_DLL="$MSVC_DLL"
50397    else
50398
50399  DLL_NAME="${MSVCP_NAME}"
50400  MSVC_DLL=
50401
50402  if test "x$MSVC_DLL" = x; then
50403    # Probe: Using well-known location from Visual Studio 10.0
50404    if test "x$VCINSTALLDIR" != x; then
50405      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50406
50407  windows_path="$CYGWIN_VC_INSTALL_DIR"
50408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50409    unix_path=`$CYGPATH -u "$windows_path"`
50410    CYGWIN_VC_INSTALL_DIR="$unix_path"
50411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50413    CYGWIN_VC_INSTALL_DIR="$unix_path"
50414  fi
50415
50416      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50417        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50418      else
50419        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50420      fi
50421      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50422
50423  DLL_NAME="$DLL_NAME"
50424  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50425  METHOD="well-known location in VCINSTALLDIR"
50426  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50427    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50428$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50429
50430    # Need to check if the found msvcr is correct architecture
50431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50432$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50433    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50435      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50436      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50437      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50438        CORRECT_MSVCR_ARCH="PE32 executable"
50439      else
50440        CORRECT_MSVCR_ARCH="PE32+ executable"
50441      fi
50442    else
50443      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50444        CORRECT_MSVCR_ARCH=386
50445      else
50446        CORRECT_MSVCR_ARCH=x86-64
50447      fi
50448    fi
50449    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50451$as_echo "ok" >&6; }
50452      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50453
50454  # Only process if variable expands to non-empty
50455
50456  if test "x$MSVC_DLL" != x; then
50457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50458
50459  # Input might be given as Windows format, start by converting to
50460  # unix format.
50461  path="$MSVC_DLL"
50462  new_path=`$CYGPATH -u "$path"`
50463
50464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50467  # "foo.exe" is OK but "foo" is an error.
50468  #
50469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50470  # It is also a way to make sure we got the proper file name for the real test later on.
50471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50472  if test "x$test_shortpath" = x; then
50473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50474$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50475    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50476  fi
50477
50478  # Call helper function which possibly converts this using DOS-style short mode.
50479  # If so, the updated path is stored in $new_path.
50480
50481  input_path="$new_path"
50482  # Check if we need to convert this using DOS-style short mode. If the path
50483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50484  # take no chances and rewrite it.
50485  # Note: m4 eats our [], so we need to use [ and ] instead.
50486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50487  if test "x$has_forbidden_chars" != x; then
50488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50492      # Going to short mode and back again did indeed matter. Since short mode is
50493      # case insensitive, let's make it lowercase to improve readability.
50494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50495      # Now convert it back to Unix-style (cygpath)
50496      input_path=`$CYGPATH -u "$shortmode_path"`
50497      new_path="$input_path"
50498    fi
50499  fi
50500
50501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50502  if test "x$test_cygdrive_prefix" = x; then
50503    # As a simple fix, exclude /usr/bin since it's not a real path.
50504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50506      # a path prefixed by /cygdrive for fixpath to work.
50507      new_path="$CYGWIN_ROOT_PATH$input_path"
50508    fi
50509  fi
50510
50511
50512  if test "x$path" != "x$new_path"; then
50513    MSVC_DLL="$new_path"
50514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50515$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50516  fi
50517
50518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50519
50520  path="$MSVC_DLL"
50521  has_colon=`$ECHO $path | $GREP ^.:`
50522  new_path="$path"
50523  if test "x$has_colon" = x; then
50524    # Not in mixed or Windows style, start by that.
50525    new_path=`cmd //c echo $path`
50526  fi
50527
50528
50529  input_path="$new_path"
50530  # Check if we need to convert this using DOS-style short mode. If the path
50531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50532  # take no chances and rewrite it.
50533  # Note: m4 eats our [], so we need to use [ and ] instead.
50534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50535  if test "x$has_forbidden_chars" != x; then
50536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50538  fi
50539
50540
50541  windows_path="$new_path"
50542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50543    unix_path=`$CYGPATH -u "$windows_path"`
50544    new_path="$unix_path"
50545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50547    new_path="$unix_path"
50548  fi
50549
50550  if test "x$path" != "x$new_path"; then
50551    MSVC_DLL="$new_path"
50552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50553$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50554  fi
50555
50556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50558
50559    else
50560      # We're on a unix platform. Hooray! :)
50561      path="$MSVC_DLL"
50562      has_space=`$ECHO "$path" | $GREP " "`
50563      if test "x$has_space" != x; then
50564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50565$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50566        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50567      fi
50568
50569      # Use eval to expand a potential ~
50570      eval path="$path"
50571      if test ! -f "$path" && test ! -d "$path"; then
50572        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50573      fi
50574
50575      if test -d "$path"; then
50576        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50577      else
50578        dir="`$DIRNAME "$path"`"
50579        base="`$BASENAME "$path"`"
50580        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50581      fi
50582    fi
50583  fi
50584
50585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50586$as_echo_n "checking for $DLL_NAME... " >&6; }
50587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50588$as_echo "$MSVC_DLL" >&6; }
50589    else
50590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50591$as_echo "incorrect, ignoring" >&6; }
50592      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50593$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50594    fi
50595  fi
50596
50597    fi
50598  fi
50599
50600  if test "x$MSVC_DLL" = x; then
50601    # Probe: Check in the Boot JDK directory.
50602    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50603
50604  DLL_NAME="$DLL_NAME"
50605  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50606  METHOD="well-known location in Boot JDK"
50607  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50608    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50609$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50610
50611    # Need to check if the found msvcr is correct architecture
50612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50613$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50614    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50616      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50617      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50618      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50619        CORRECT_MSVCR_ARCH="PE32 executable"
50620      else
50621        CORRECT_MSVCR_ARCH="PE32+ executable"
50622      fi
50623    else
50624      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50625        CORRECT_MSVCR_ARCH=386
50626      else
50627        CORRECT_MSVCR_ARCH=x86-64
50628      fi
50629    fi
50630    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50631      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50632$as_echo "ok" >&6; }
50633      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50634
50635  # Only process if variable expands to non-empty
50636
50637  if test "x$MSVC_DLL" != x; then
50638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50639
50640  # Input might be given as Windows format, start by converting to
50641  # unix format.
50642  path="$MSVC_DLL"
50643  new_path=`$CYGPATH -u "$path"`
50644
50645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50648  # "foo.exe" is OK but "foo" is an error.
50649  #
50650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50651  # It is also a way to make sure we got the proper file name for the real test later on.
50652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50653  if test "x$test_shortpath" = x; then
50654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50655$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50656    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50657  fi
50658
50659  # Call helper function which possibly converts this using DOS-style short mode.
50660  # If so, the updated path is stored in $new_path.
50661
50662  input_path="$new_path"
50663  # Check if we need to convert this using DOS-style short mode. If the path
50664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50665  # take no chances and rewrite it.
50666  # Note: m4 eats our [], so we need to use [ and ] instead.
50667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50668  if test "x$has_forbidden_chars" != x; then
50669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50673      # Going to short mode and back again did indeed matter. Since short mode is
50674      # case insensitive, let's make it lowercase to improve readability.
50675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50676      # Now convert it back to Unix-style (cygpath)
50677      input_path=`$CYGPATH -u "$shortmode_path"`
50678      new_path="$input_path"
50679    fi
50680  fi
50681
50682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50683  if test "x$test_cygdrive_prefix" = x; then
50684    # As a simple fix, exclude /usr/bin since it's not a real path.
50685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50687      # a path prefixed by /cygdrive for fixpath to work.
50688      new_path="$CYGWIN_ROOT_PATH$input_path"
50689    fi
50690  fi
50691
50692
50693  if test "x$path" != "x$new_path"; then
50694    MSVC_DLL="$new_path"
50695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50696$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50697  fi
50698
50699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50700
50701  path="$MSVC_DLL"
50702  has_colon=`$ECHO $path | $GREP ^.:`
50703  new_path="$path"
50704  if test "x$has_colon" = x; then
50705    # Not in mixed or Windows style, start by that.
50706    new_path=`cmd //c echo $path`
50707  fi
50708
50709
50710  input_path="$new_path"
50711  # Check if we need to convert this using DOS-style short mode. If the path
50712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50713  # take no chances and rewrite it.
50714  # Note: m4 eats our [], so we need to use [ and ] instead.
50715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50716  if test "x$has_forbidden_chars" != x; then
50717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50719  fi
50720
50721
50722  windows_path="$new_path"
50723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50724    unix_path=`$CYGPATH -u "$windows_path"`
50725    new_path="$unix_path"
50726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50728    new_path="$unix_path"
50729  fi
50730
50731  if test "x$path" != "x$new_path"; then
50732    MSVC_DLL="$new_path"
50733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50734$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50735  fi
50736
50737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50739
50740    else
50741      # We're on a unix platform. Hooray! :)
50742      path="$MSVC_DLL"
50743      has_space=`$ECHO "$path" | $GREP " "`
50744      if test "x$has_space" != x; then
50745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50746$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50747        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50748      fi
50749
50750      # Use eval to expand a potential ~
50751      eval path="$path"
50752      if test ! -f "$path" && test ! -d "$path"; then
50753        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50754      fi
50755
50756      if test -d "$path"; then
50757        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50758      else
50759        dir="`$DIRNAME "$path"`"
50760        base="`$BASENAME "$path"`"
50761        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50762      fi
50763    fi
50764  fi
50765
50766      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50767$as_echo_n "checking for $DLL_NAME... " >&6; }
50768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50769$as_echo "$MSVC_DLL" >&6; }
50770    else
50771      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50772$as_echo "incorrect, ignoring" >&6; }
50773      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50774$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50775    fi
50776  fi
50777
50778  fi
50779
50780  if test "x$MSVC_DLL" = x; then
50781    # Probe: Look in the Windows system32 directory
50782    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50783
50784  windows_path="$CYGWIN_SYSTEMROOT"
50785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50786    unix_path=`$CYGPATH -u "$windows_path"`
50787    CYGWIN_SYSTEMROOT="$unix_path"
50788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50790    CYGWIN_SYSTEMROOT="$unix_path"
50791  fi
50792
50793    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50794
50795  DLL_NAME="$DLL_NAME"
50796  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50797  METHOD="well-known location in SYSTEMROOT"
50798  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50799    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50800$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50801
50802    # Need to check if the found msvcr is correct architecture
50803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50804$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50805    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50807      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50808      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50809      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50810        CORRECT_MSVCR_ARCH="PE32 executable"
50811      else
50812        CORRECT_MSVCR_ARCH="PE32+ executable"
50813      fi
50814    else
50815      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50816        CORRECT_MSVCR_ARCH=386
50817      else
50818        CORRECT_MSVCR_ARCH=x86-64
50819      fi
50820    fi
50821    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50823$as_echo "ok" >&6; }
50824      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50825
50826  # Only process if variable expands to non-empty
50827
50828  if test "x$MSVC_DLL" != x; then
50829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50830
50831  # Input might be given as Windows format, start by converting to
50832  # unix format.
50833  path="$MSVC_DLL"
50834  new_path=`$CYGPATH -u "$path"`
50835
50836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50839  # "foo.exe" is OK but "foo" is an error.
50840  #
50841  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50842  # It is also a way to make sure we got the proper file name for the real test later on.
50843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50844  if test "x$test_shortpath" = x; then
50845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50846$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50847    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50848  fi
50849
50850  # Call helper function which possibly converts this using DOS-style short mode.
50851  # If so, the updated path is stored in $new_path.
50852
50853  input_path="$new_path"
50854  # Check if we need to convert this using DOS-style short mode. If the path
50855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50856  # take no chances and rewrite it.
50857  # Note: m4 eats our [], so we need to use [ and ] instead.
50858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50859  if test "x$has_forbidden_chars" != x; then
50860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50864      # Going to short mode and back again did indeed matter. Since short mode is
50865      # case insensitive, let's make it lowercase to improve readability.
50866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50867      # Now convert it back to Unix-style (cygpath)
50868      input_path=`$CYGPATH -u "$shortmode_path"`
50869      new_path="$input_path"
50870    fi
50871  fi
50872
50873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50874  if test "x$test_cygdrive_prefix" = x; then
50875    # As a simple fix, exclude /usr/bin since it's not a real path.
50876    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50878      # a path prefixed by /cygdrive for fixpath to work.
50879      new_path="$CYGWIN_ROOT_PATH$input_path"
50880    fi
50881  fi
50882
50883
50884  if test "x$path" != "x$new_path"; then
50885    MSVC_DLL="$new_path"
50886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50887$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50888  fi
50889
50890    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50891
50892  path="$MSVC_DLL"
50893  has_colon=`$ECHO $path | $GREP ^.:`
50894  new_path="$path"
50895  if test "x$has_colon" = x; then
50896    # Not in mixed or Windows style, start by that.
50897    new_path=`cmd //c echo $path`
50898  fi
50899
50900
50901  input_path="$new_path"
50902  # Check if we need to convert this using DOS-style short mode. If the path
50903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50904  # take no chances and rewrite it.
50905  # Note: m4 eats our [], so we need to use [ and ] instead.
50906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50907  if test "x$has_forbidden_chars" != x; then
50908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50910  fi
50911
50912
50913  windows_path="$new_path"
50914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50915    unix_path=`$CYGPATH -u "$windows_path"`
50916    new_path="$unix_path"
50917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50919    new_path="$unix_path"
50920  fi
50921
50922  if test "x$path" != "x$new_path"; then
50923    MSVC_DLL="$new_path"
50924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50925$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50926  fi
50927
50928  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50929  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50930
50931    else
50932      # We're on a unix platform. Hooray! :)
50933      path="$MSVC_DLL"
50934      has_space=`$ECHO "$path" | $GREP " "`
50935      if test "x$has_space" != x; then
50936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50937$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50938        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50939      fi
50940
50941      # Use eval to expand a potential ~
50942      eval path="$path"
50943      if test ! -f "$path" && test ! -d "$path"; then
50944        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50945      fi
50946
50947      if test -d "$path"; then
50948        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50949      else
50950        dir="`$DIRNAME "$path"`"
50951        base="`$BASENAME "$path"`"
50952        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50953      fi
50954    fi
50955  fi
50956
50957      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50958$as_echo_n "checking for $DLL_NAME... " >&6; }
50959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50960$as_echo "$MSVC_DLL" >&6; }
50961    else
50962      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50963$as_echo "incorrect, ignoring" >&6; }
50964      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50965$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50966    fi
50967  fi
50968
50969  fi
50970
50971  if test "x$MSVC_DLL" = x; then
50972    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50973    if test "x$VS100COMNTOOLS" != x; then
50974      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50975
50976  windows_path="$CYGWIN_VS_TOOLS_DIR"
50977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50978    unix_path=`$CYGPATH -u "$windows_path"`
50979    CYGWIN_VS_TOOLS_DIR="$unix_path"
50980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50982    CYGWIN_VS_TOOLS_DIR="$unix_path"
50983  fi
50984
50985      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50986        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50987	    | $GREP -i /x64/ | $HEAD --lines 1`
50988      else
50989        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50990	    | $GREP -i /x86/ | $HEAD --lines 1`
50991      fi
50992
50993  DLL_NAME="$DLL_NAME"
50994  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50995  METHOD="search of VS100COMNTOOLS"
50996  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50997    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50998$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50999
51000    # Need to check if the found msvcr is correct architecture
51001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51002$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51003    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51005      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51006      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51007      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51008        CORRECT_MSVCR_ARCH="PE32 executable"
51009      else
51010        CORRECT_MSVCR_ARCH="PE32+ executable"
51011      fi
51012    else
51013      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51014        CORRECT_MSVCR_ARCH=386
51015      else
51016        CORRECT_MSVCR_ARCH=x86-64
51017      fi
51018    fi
51019    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51021$as_echo "ok" >&6; }
51022      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51023
51024  # Only process if variable expands to non-empty
51025
51026  if test "x$MSVC_DLL" != x; then
51027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51028
51029  # Input might be given as Windows format, start by converting to
51030  # unix format.
51031  path="$MSVC_DLL"
51032  new_path=`$CYGPATH -u "$path"`
51033
51034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51037  # "foo.exe" is OK but "foo" is an error.
51038  #
51039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51040  # It is also a way to make sure we got the proper file name for the real test later on.
51041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51042  if test "x$test_shortpath" = x; then
51043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51044$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51045    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51046  fi
51047
51048  # Call helper function which possibly converts this using DOS-style short mode.
51049  # If so, the updated path is stored in $new_path.
51050
51051  input_path="$new_path"
51052  # Check if we need to convert this using DOS-style short mode. If the path
51053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51054  # take no chances and rewrite it.
51055  # Note: m4 eats our [], so we need to use [ and ] instead.
51056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51057  if test "x$has_forbidden_chars" != x; then
51058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51062      # Going to short mode and back again did indeed matter. Since short mode is
51063      # case insensitive, let's make it lowercase to improve readability.
51064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51065      # Now convert it back to Unix-style (cygpath)
51066      input_path=`$CYGPATH -u "$shortmode_path"`
51067      new_path="$input_path"
51068    fi
51069  fi
51070
51071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51072  if test "x$test_cygdrive_prefix" = x; then
51073    # As a simple fix, exclude /usr/bin since it's not a real path.
51074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51076      # a path prefixed by /cygdrive for fixpath to work.
51077      new_path="$CYGWIN_ROOT_PATH$input_path"
51078    fi
51079  fi
51080
51081
51082  if test "x$path" != "x$new_path"; then
51083    MSVC_DLL="$new_path"
51084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51085$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51086  fi
51087
51088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51089
51090  path="$MSVC_DLL"
51091  has_colon=`$ECHO $path | $GREP ^.:`
51092  new_path="$path"
51093  if test "x$has_colon" = x; then
51094    # Not in mixed or Windows style, start by that.
51095    new_path=`cmd //c echo $path`
51096  fi
51097
51098
51099  input_path="$new_path"
51100  # Check if we need to convert this using DOS-style short mode. If the path
51101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51102  # take no chances and rewrite it.
51103  # Note: m4 eats our [], so we need to use [ and ] instead.
51104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51105  if test "x$has_forbidden_chars" != x; then
51106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51108  fi
51109
51110
51111  windows_path="$new_path"
51112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51113    unix_path=`$CYGPATH -u "$windows_path"`
51114    new_path="$unix_path"
51115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51117    new_path="$unix_path"
51118  fi
51119
51120  if test "x$path" != "x$new_path"; then
51121    MSVC_DLL="$new_path"
51122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51123$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51124  fi
51125
51126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51128
51129    else
51130      # We're on a unix platform. Hooray! :)
51131      path="$MSVC_DLL"
51132      has_space=`$ECHO "$path" | $GREP " "`
51133      if test "x$has_space" != x; then
51134        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51135$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51136        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51137      fi
51138
51139      # Use eval to expand a potential ~
51140      eval path="$path"
51141      if test ! -f "$path" && test ! -d "$path"; then
51142        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51143      fi
51144
51145      if test -d "$path"; then
51146        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51147      else
51148        dir="`$DIRNAME "$path"`"
51149        base="`$BASENAME "$path"`"
51150        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51151      fi
51152    fi
51153  fi
51154
51155      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51156$as_echo_n "checking for $DLL_NAME... " >&6; }
51157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51158$as_echo "$MSVC_DLL" >&6; }
51159    else
51160      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51161$as_echo "incorrect, ignoring" >&6; }
51162      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51163$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51164    fi
51165  fi
51166
51167    fi
51168  fi
51169
51170  if test "x$MSVC_DLL" = x; then
51171    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51172    # (This was the original behaviour; kept since it might turn something up)
51173    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51174      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51175        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51176	    | $GREP x64 | $HEAD --lines 1`
51177      else
51178        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51179	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51180        if test "x$POSSIBLE_MSVC_DLL" = x; then
51181          # We're grasping at straws now...
51182          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51183	      | $HEAD --lines 1`
51184        fi
51185      fi
51186
51187
51188  DLL_NAME="$DLL_NAME"
51189  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51190  METHOD="search of VCINSTALLDIR"
51191  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51192    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51193$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51194
51195    # Need to check if the found msvcr is correct architecture
51196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51197$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51198    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51200      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51201      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51202      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51203        CORRECT_MSVCR_ARCH="PE32 executable"
51204      else
51205        CORRECT_MSVCR_ARCH="PE32+ executable"
51206      fi
51207    else
51208      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51209        CORRECT_MSVCR_ARCH=386
51210      else
51211        CORRECT_MSVCR_ARCH=x86-64
51212      fi
51213    fi
51214    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51216$as_echo "ok" >&6; }
51217      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51218
51219  # Only process if variable expands to non-empty
51220
51221  if test "x$MSVC_DLL" != x; then
51222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51223
51224  # Input might be given as Windows format, start by converting to
51225  # unix format.
51226  path="$MSVC_DLL"
51227  new_path=`$CYGPATH -u "$path"`
51228
51229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51232  # "foo.exe" is OK but "foo" is an error.
51233  #
51234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51235  # It is also a way to make sure we got the proper file name for the real test later on.
51236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51237  if test "x$test_shortpath" = x; then
51238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51239$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51240    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51241  fi
51242
51243  # Call helper function which possibly converts this using DOS-style short mode.
51244  # If so, the updated path is stored in $new_path.
51245
51246  input_path="$new_path"
51247  # Check if we need to convert this using DOS-style short mode. If the path
51248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51249  # take no chances and rewrite it.
51250  # Note: m4 eats our [], so we need to use [ and ] instead.
51251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51252  if test "x$has_forbidden_chars" != x; then
51253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51257      # Going to short mode and back again did indeed matter. Since short mode is
51258      # case insensitive, let's make it lowercase to improve readability.
51259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51260      # Now convert it back to Unix-style (cygpath)
51261      input_path=`$CYGPATH -u "$shortmode_path"`
51262      new_path="$input_path"
51263    fi
51264  fi
51265
51266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51267  if test "x$test_cygdrive_prefix" = x; then
51268    # As a simple fix, exclude /usr/bin since it's not a real path.
51269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51271      # a path prefixed by /cygdrive for fixpath to work.
51272      new_path="$CYGWIN_ROOT_PATH$input_path"
51273    fi
51274  fi
51275
51276
51277  if test "x$path" != "x$new_path"; then
51278    MSVC_DLL="$new_path"
51279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51280$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51281  fi
51282
51283    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51284
51285  path="$MSVC_DLL"
51286  has_colon=`$ECHO $path | $GREP ^.:`
51287  new_path="$path"
51288  if test "x$has_colon" = x; then
51289    # Not in mixed or Windows style, start by that.
51290    new_path=`cmd //c echo $path`
51291  fi
51292
51293
51294  input_path="$new_path"
51295  # Check if we need to convert this using DOS-style short mode. If the path
51296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51297  # take no chances and rewrite it.
51298  # Note: m4 eats our [], so we need to use [ and ] instead.
51299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51300  if test "x$has_forbidden_chars" != x; then
51301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51303  fi
51304
51305
51306  windows_path="$new_path"
51307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51308    unix_path=`$CYGPATH -u "$windows_path"`
51309    new_path="$unix_path"
51310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51312    new_path="$unix_path"
51313  fi
51314
51315  if test "x$path" != "x$new_path"; then
51316    MSVC_DLL="$new_path"
51317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51318$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51319  fi
51320
51321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51323
51324    else
51325      # We're on a unix platform. Hooray! :)
51326      path="$MSVC_DLL"
51327      has_space=`$ECHO "$path" | $GREP " "`
51328      if test "x$has_space" != x; then
51329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51330$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51331        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51332      fi
51333
51334      # Use eval to expand a potential ~
51335      eval path="$path"
51336      if test ! -f "$path" && test ! -d "$path"; then
51337        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51338      fi
51339
51340      if test -d "$path"; then
51341        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51342      else
51343        dir="`$DIRNAME "$path"`"
51344        base="`$BASENAME "$path"`"
51345        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51346      fi
51347    fi
51348  fi
51349
51350      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51351$as_echo_n "checking for $DLL_NAME... " >&6; }
51352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51353$as_echo "$MSVC_DLL" >&6; }
51354    else
51355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51356$as_echo "incorrect, ignoring" >&6; }
51357      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51358$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51359    fi
51360  fi
51361
51362    fi
51363  fi
51364
51365  if test "x$MSVC_DLL" = x; then
51366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51367$as_echo_n "checking for $DLL_NAME... " >&6; }
51368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51369$as_echo "no" >&6; }
51370    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51371  fi
51372
51373      MSVCP_DLL="$MSVC_DLL"
51374    fi
51375
51376  fi
51377
51378  fi
51379
51380
51381  if test "x$NEEDS_LIB_X11" = xfalse; then
51382    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
51383      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
51384$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
51385    fi
51386    X_CFLAGS=
51387    X_LIBS=
51388  else
51389
51390    if test "x${with_x}" = xno; then
51391      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
51392    fi
51393
51394    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
51395      # The user has specified a X11 base directory. Use it for includes and
51396      # libraries, unless explicitely overridden.
51397      if test "x$x_includes" = xNONE; then
51398        x_includes="${with_x}/include"
51399      fi
51400      if test "x$x_libraries" = xNONE; then
51401        x_libraries="${with_x}/lib"
51402      fi
51403    else
51404      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
51405      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
51406      # --x-libraries for the sysroot, if that seems to be correct.
51407      if test "x$SYSROOT" != "x"; then
51408        if test "x$x_includes" = xNONE; then
51409          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
51410            x_includes="$SYSROOT/usr/X11R6/include"
51411          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
51412            x_includes="$SYSROOT/usr/include"
51413          fi
51414        fi
51415        if test "x$x_libraries" = xNONE; then
51416          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
51417            x_libraries="$SYSROOT/usr/X11R6/lib"
51418          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51419            x_libraries="$SYSROOT/usr/lib64"
51420          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
51421            x_libraries="$SYSROOT/usr/lib"
51422          fi
51423        fi
51424      fi
51425    fi
51426
51427    # Now let autoconf do it's magic
51428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
51429$as_echo_n "checking for X... " >&6; }
51430
51431
51432# Check whether --with-x was given.
51433if test "${with_x+set}" = set; then :
51434  withval=$with_x;
51435fi
51436
51437# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
51438if test "x$with_x" = xno; then
51439  # The user explicitly disabled X.
51440  have_x=disabled
51441else
51442  case $x_includes,$x_libraries in #(
51443    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
51444    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
51445  $as_echo_n "(cached) " >&6
51446else
51447  # One or both of the vars are not set, and there is no cached value.
51448ac_x_includes=no ac_x_libraries=no
51449rm -f -r conftest.dir
51450if mkdir conftest.dir; then
51451  cd conftest.dir
51452  cat >Imakefile <<'_ACEOF'
51453incroot:
51454	@echo incroot='${INCROOT}'
51455usrlibdir:
51456	@echo usrlibdir='${USRLIBDIR}'
51457libdir:
51458	@echo libdir='${LIBDIR}'
51459_ACEOF
51460  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
51461    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
51462    for ac_var in incroot usrlibdir libdir; do
51463      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
51464    done
51465    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
51466    for ac_extension in a so sl dylib la dll; do
51467      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
51468	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
51469	ac_im_usrlibdir=$ac_im_libdir; break
51470      fi
51471    done
51472    # Screen out bogus values from the imake configuration.  They are
51473    # bogus both because they are the default anyway, and because
51474    # using them would break gcc on systems where it needs fixed includes.
51475    case $ac_im_incroot in
51476	/usr/include) ac_x_includes= ;;
51477	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
51478    esac
51479    case $ac_im_usrlibdir in
51480	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
51481	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
51482    esac
51483  fi
51484  cd ..
51485  rm -f -r conftest.dir
51486fi
51487
51488# Standard set of common directories for X headers.
51489# Check X11 before X11Rn because it is often a symlink to the current release.
51490ac_x_header_dirs='
51491/usr/X11/include
51492/usr/X11R7/include
51493/usr/X11R6/include
51494/usr/X11R5/include
51495/usr/X11R4/include
51496
51497/usr/include/X11
51498/usr/include/X11R7
51499/usr/include/X11R6
51500/usr/include/X11R5
51501/usr/include/X11R4
51502
51503/usr/local/X11/include
51504/usr/local/X11R7/include
51505/usr/local/X11R6/include
51506/usr/local/X11R5/include
51507/usr/local/X11R4/include
51508
51509/usr/local/include/X11
51510/usr/local/include/X11R7
51511/usr/local/include/X11R6
51512/usr/local/include/X11R5
51513/usr/local/include/X11R4
51514
51515/usr/X386/include
51516/usr/x386/include
51517/usr/XFree86/include/X11
51518
51519/usr/include
51520/usr/local/include
51521/usr/unsupported/include
51522/usr/athena/include
51523/usr/local/x11r5/include
51524/usr/lpp/Xamples/include
51525
51526/usr/openwin/include
51527/usr/openwin/share/include'
51528
51529if test "$ac_x_includes" = no; then
51530  # Guess where to find include files, by looking for Xlib.h.
51531  # First, try using that file with no special directory specified.
51532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51533/* end confdefs.h.  */
51534#include <X11/Xlib.h>
51535_ACEOF
51536if ac_fn_cxx_try_cpp "$LINENO"; then :
51537  # We can compile using X headers with no special include directory.
51538ac_x_includes=
51539else
51540  for ac_dir in $ac_x_header_dirs; do
51541  if test -r "$ac_dir/X11/Xlib.h"; then
51542    ac_x_includes=$ac_dir
51543    break
51544  fi
51545done
51546fi
51547rm -f conftest.err conftest.i conftest.$ac_ext
51548fi # $ac_x_includes = no
51549
51550if test "$ac_x_libraries" = no; then
51551  # Check for the libraries.
51552  # See if we find them without any special options.
51553  # Don't add to $LIBS permanently.
51554  ac_save_LIBS=$LIBS
51555  LIBS="-lX11 $LIBS"
51556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51557/* end confdefs.h.  */
51558#include <X11/Xlib.h>
51559int
51560main ()
51561{
51562XrmInitialize ()
51563  ;
51564  return 0;
51565}
51566_ACEOF
51567if ac_fn_cxx_try_link "$LINENO"; then :
51568  LIBS=$ac_save_LIBS
51569# We can link X programs with no special library path.
51570ac_x_libraries=
51571else
51572  LIBS=$ac_save_LIBS
51573for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
51574do
51575  # Don't even attempt the hair of trying to link an X program!
51576  for ac_extension in a so sl dylib la dll; do
51577    if test -r "$ac_dir/libX11.$ac_extension"; then
51578      ac_x_libraries=$ac_dir
51579      break 2
51580    fi
51581  done
51582done
51583fi
51584rm -f core conftest.err conftest.$ac_objext \
51585    conftest$ac_exeext conftest.$ac_ext
51586fi # $ac_x_libraries = no
51587
51588case $ac_x_includes,$ac_x_libraries in #(
51589  no,* | *,no | *\'*)
51590    # Didn't find X, or a directory has "'" in its name.
51591    ac_cv_have_x="have_x=no";; #(
51592  *)
51593    # Record where we found X for the cache.
51594    ac_cv_have_x="have_x=yes\
51595	ac_x_includes='$ac_x_includes'\
51596	ac_x_libraries='$ac_x_libraries'"
51597esac
51598fi
51599;; #(
51600    *) have_x=yes;;
51601  esac
51602  eval "$ac_cv_have_x"
51603fi # $with_x != no
51604
51605if test "$have_x" != yes; then
51606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
51607$as_echo "$have_x" >&6; }
51608  no_x=yes
51609else
51610  # If each of the values was on the command line, it overrides each guess.
51611  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
51612  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
51613  # Update the cache value to reflect the command line values.
51614  ac_cv_have_x="have_x=yes\
51615	ac_x_includes='$x_includes'\
51616	ac_x_libraries='$x_libraries'"
51617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
51618$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
51619fi
51620
51621    if test "$no_x" = yes; then
51622  # Not all programs may use this symbol, but it does not hurt to define it.
51623
51624$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
51625
51626  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
51627else
51628  if test -n "$x_includes"; then
51629    X_CFLAGS="$X_CFLAGS -I$x_includes"
51630  fi
51631
51632  # It would also be nice to do this for all -L options, not just this one.
51633  if test -n "$x_libraries"; then
51634    X_LIBS="$X_LIBS -L$x_libraries"
51635    # For Solaris; some versions of Sun CC require a space after -R and
51636    # others require no space.  Words are not sufficient . . . .
51637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
51638$as_echo_n "checking whether -R must be followed by a space... " >&6; }
51639    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
51640    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
51641    ac_cxx_werror_flag=yes
51642    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51643/* end confdefs.h.  */
51644
51645int
51646main ()
51647{
51648
51649  ;
51650  return 0;
51651}
51652_ACEOF
51653if ac_fn_cxx_try_link "$LINENO"; then :
51654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51655$as_echo "no" >&6; }
51656       X_LIBS="$X_LIBS -R$x_libraries"
51657else
51658  LIBS="$ac_xsave_LIBS -R $x_libraries"
51659       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51660/* end confdefs.h.  */
51661
51662int
51663main ()
51664{
51665
51666  ;
51667  return 0;
51668}
51669_ACEOF
51670if ac_fn_cxx_try_link "$LINENO"; then :
51671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51672$as_echo "yes" >&6; }
51673	  X_LIBS="$X_LIBS -R $x_libraries"
51674else
51675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
51676$as_echo "neither works" >&6; }
51677fi
51678rm -f core conftest.err conftest.$ac_objext \
51679    conftest$ac_exeext conftest.$ac_ext
51680fi
51681rm -f core conftest.err conftest.$ac_objext \
51682    conftest$ac_exeext conftest.$ac_ext
51683    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
51684    LIBS=$ac_xsave_LIBS
51685  fi
51686
51687  # Check for system-dependent libraries X programs must link with.
51688  # Do this before checking for the system-independent R6 libraries
51689  # (-lICE), since we may need -lsocket or whatever for X linking.
51690
51691  if test "$ISC" = yes; then
51692    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
51693  else
51694    # Martyn Johnson says this is needed for Ultrix, if the X
51695    # libraries were built with DECnet support.  And Karl Berry says
51696    # the Alpha needs dnet_stub (dnet does not exist).
51697    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
51698    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51699/* end confdefs.h.  */
51700
51701/* Override any GCC internal prototype to avoid an error.
51702   Use char because int might match the return type of a GCC
51703   builtin and then its argument prototype would still apply.  */
51704#ifdef __cplusplus
51705extern "C"
51706#endif
51707char XOpenDisplay ();
51708int
51709main ()
51710{
51711return XOpenDisplay ();
51712  ;
51713  return 0;
51714}
51715_ACEOF
51716if ac_fn_cxx_try_link "$LINENO"; then :
51717
51718else
51719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
51720$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
51721if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
51722  $as_echo_n "(cached) " >&6
51723else
51724  ac_check_lib_save_LIBS=$LIBS
51725LIBS="-ldnet  $LIBS"
51726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51727/* end confdefs.h.  */
51728
51729/* Override any GCC internal prototype to avoid an error.
51730   Use char because int might match the return type of a GCC
51731   builtin and then its argument prototype would still apply.  */
51732#ifdef __cplusplus
51733extern "C"
51734#endif
51735char dnet_ntoa ();
51736int
51737main ()
51738{
51739return dnet_ntoa ();
51740  ;
51741  return 0;
51742}
51743_ACEOF
51744if ac_fn_cxx_try_link "$LINENO"; then :
51745  ac_cv_lib_dnet_dnet_ntoa=yes
51746else
51747  ac_cv_lib_dnet_dnet_ntoa=no
51748fi
51749rm -f core conftest.err conftest.$ac_objext \
51750    conftest$ac_exeext conftest.$ac_ext
51751LIBS=$ac_check_lib_save_LIBS
51752fi
51753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
51754$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
51755if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
51756  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
51757fi
51758
51759    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
51760      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
51761$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
51762if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
51763  $as_echo_n "(cached) " >&6
51764else
51765  ac_check_lib_save_LIBS=$LIBS
51766LIBS="-ldnet_stub  $LIBS"
51767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51768/* end confdefs.h.  */
51769
51770/* Override any GCC internal prototype to avoid an error.
51771   Use char because int might match the return type of a GCC
51772   builtin and then its argument prototype would still apply.  */
51773#ifdef __cplusplus
51774extern "C"
51775#endif
51776char dnet_ntoa ();
51777int
51778main ()
51779{
51780return dnet_ntoa ();
51781  ;
51782  return 0;
51783}
51784_ACEOF
51785if ac_fn_cxx_try_link "$LINENO"; then :
51786  ac_cv_lib_dnet_stub_dnet_ntoa=yes
51787else
51788  ac_cv_lib_dnet_stub_dnet_ntoa=no
51789fi
51790rm -f core conftest.err conftest.$ac_objext \
51791    conftest$ac_exeext conftest.$ac_ext
51792LIBS=$ac_check_lib_save_LIBS
51793fi
51794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
51795$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
51796if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
51797  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
51798fi
51799
51800    fi
51801fi
51802rm -f core conftest.err conftest.$ac_objext \
51803    conftest$ac_exeext conftest.$ac_ext
51804    LIBS="$ac_xsave_LIBS"
51805
51806    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
51807    # to get the SysV transport functions.
51808    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
51809    # needs -lnsl.
51810    # The nsl library prevents programs from opening the X display
51811    # on Irix 5.2, according to T.E. Dickey.
51812    # The functions gethostbyname, getservbyname, and inet_addr are
51813    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
51814    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
51815if test "x$ac_cv_func_gethostbyname" = xyes; then :
51816
51817fi
51818
51819    if test $ac_cv_func_gethostbyname = no; then
51820      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
51821$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
51822if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
51823  $as_echo_n "(cached) " >&6
51824else
51825  ac_check_lib_save_LIBS=$LIBS
51826LIBS="-lnsl  $LIBS"
51827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51828/* end confdefs.h.  */
51829
51830/* Override any GCC internal prototype to avoid an error.
51831   Use char because int might match the return type of a GCC
51832   builtin and then its argument prototype would still apply.  */
51833#ifdef __cplusplus
51834extern "C"
51835#endif
51836char gethostbyname ();
51837int
51838main ()
51839{
51840return gethostbyname ();
51841  ;
51842  return 0;
51843}
51844_ACEOF
51845if ac_fn_cxx_try_link "$LINENO"; then :
51846  ac_cv_lib_nsl_gethostbyname=yes
51847else
51848  ac_cv_lib_nsl_gethostbyname=no
51849fi
51850rm -f core conftest.err conftest.$ac_objext \
51851    conftest$ac_exeext conftest.$ac_ext
51852LIBS=$ac_check_lib_save_LIBS
51853fi
51854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
51855$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
51856if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
51857  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
51858fi
51859
51860      if test $ac_cv_lib_nsl_gethostbyname = no; then
51861	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
51862$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
51863if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
51864  $as_echo_n "(cached) " >&6
51865else
51866  ac_check_lib_save_LIBS=$LIBS
51867LIBS="-lbsd  $LIBS"
51868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51869/* end confdefs.h.  */
51870
51871/* Override any GCC internal prototype to avoid an error.
51872   Use char because int might match the return type of a GCC
51873   builtin and then its argument prototype would still apply.  */
51874#ifdef __cplusplus
51875extern "C"
51876#endif
51877char gethostbyname ();
51878int
51879main ()
51880{
51881return gethostbyname ();
51882  ;
51883  return 0;
51884}
51885_ACEOF
51886if ac_fn_cxx_try_link "$LINENO"; then :
51887  ac_cv_lib_bsd_gethostbyname=yes
51888else
51889  ac_cv_lib_bsd_gethostbyname=no
51890fi
51891rm -f core conftest.err conftest.$ac_objext \
51892    conftest$ac_exeext conftest.$ac_ext
51893LIBS=$ac_check_lib_save_LIBS
51894fi
51895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
51896$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
51897if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
51898  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51899fi
51900
51901      fi
51902    fi
51903
51904    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51905    # socket/setsockopt and other routines are undefined under SCO ODT
51906    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51907    # on later versions), says Simon Leinen: it contains gethostby*
51908    # variants that don't use the name server (or something).  -lsocket
51909    # must be given before -lnsl if both are needed.  We assume that
51910    # if connect needs -lnsl, so does gethostbyname.
51911    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51912if test "x$ac_cv_func_connect" = xyes; then :
51913
51914fi
51915
51916    if test $ac_cv_func_connect = no; then
51917      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51918$as_echo_n "checking for connect in -lsocket... " >&6; }
51919if ${ac_cv_lib_socket_connect+:} false; then :
51920  $as_echo_n "(cached) " >&6
51921else
51922  ac_check_lib_save_LIBS=$LIBS
51923LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51925/* end confdefs.h.  */
51926
51927/* Override any GCC internal prototype to avoid an error.
51928   Use char because int might match the return type of a GCC
51929   builtin and then its argument prototype would still apply.  */
51930#ifdef __cplusplus
51931extern "C"
51932#endif
51933char connect ();
51934int
51935main ()
51936{
51937return connect ();
51938  ;
51939  return 0;
51940}
51941_ACEOF
51942if ac_fn_cxx_try_link "$LINENO"; then :
51943  ac_cv_lib_socket_connect=yes
51944else
51945  ac_cv_lib_socket_connect=no
51946fi
51947rm -f core conftest.err conftest.$ac_objext \
51948    conftest$ac_exeext conftest.$ac_ext
51949LIBS=$ac_check_lib_save_LIBS
51950fi
51951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51952$as_echo "$ac_cv_lib_socket_connect" >&6; }
51953if test "x$ac_cv_lib_socket_connect" = xyes; then :
51954  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51955fi
51956
51957    fi
51958
51959    # Guillermo Gomez says -lposix is necessary on A/UX.
51960    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51961if test "x$ac_cv_func_remove" = xyes; then :
51962
51963fi
51964
51965    if test $ac_cv_func_remove = no; then
51966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51967$as_echo_n "checking for remove in -lposix... " >&6; }
51968if ${ac_cv_lib_posix_remove+:} false; then :
51969  $as_echo_n "(cached) " >&6
51970else
51971  ac_check_lib_save_LIBS=$LIBS
51972LIBS="-lposix  $LIBS"
51973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51974/* end confdefs.h.  */
51975
51976/* Override any GCC internal prototype to avoid an error.
51977   Use char because int might match the return type of a GCC
51978   builtin and then its argument prototype would still apply.  */
51979#ifdef __cplusplus
51980extern "C"
51981#endif
51982char remove ();
51983int
51984main ()
51985{
51986return remove ();
51987  ;
51988  return 0;
51989}
51990_ACEOF
51991if ac_fn_cxx_try_link "$LINENO"; then :
51992  ac_cv_lib_posix_remove=yes
51993else
51994  ac_cv_lib_posix_remove=no
51995fi
51996rm -f core conftest.err conftest.$ac_objext \
51997    conftest$ac_exeext conftest.$ac_ext
51998LIBS=$ac_check_lib_save_LIBS
51999fi
52000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
52001$as_echo "$ac_cv_lib_posix_remove" >&6; }
52002if test "x$ac_cv_lib_posix_remove" = xyes; then :
52003  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
52004fi
52005
52006    fi
52007
52008    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
52009    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
52010if test "x$ac_cv_func_shmat" = xyes; then :
52011
52012fi
52013
52014    if test $ac_cv_func_shmat = no; then
52015      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
52016$as_echo_n "checking for shmat in -lipc... " >&6; }
52017if ${ac_cv_lib_ipc_shmat+:} false; then :
52018  $as_echo_n "(cached) " >&6
52019else
52020  ac_check_lib_save_LIBS=$LIBS
52021LIBS="-lipc  $LIBS"
52022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52023/* end confdefs.h.  */
52024
52025/* Override any GCC internal prototype to avoid an error.
52026   Use char because int might match the return type of a GCC
52027   builtin and then its argument prototype would still apply.  */
52028#ifdef __cplusplus
52029extern "C"
52030#endif
52031char shmat ();
52032int
52033main ()
52034{
52035return shmat ();
52036  ;
52037  return 0;
52038}
52039_ACEOF
52040if ac_fn_cxx_try_link "$LINENO"; then :
52041  ac_cv_lib_ipc_shmat=yes
52042else
52043  ac_cv_lib_ipc_shmat=no
52044fi
52045rm -f core conftest.err conftest.$ac_objext \
52046    conftest$ac_exeext conftest.$ac_ext
52047LIBS=$ac_check_lib_save_LIBS
52048fi
52049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
52050$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
52051if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
52052  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
52053fi
52054
52055    fi
52056  fi
52057
52058  # Check for libraries that X11R6 Xt/Xaw programs need.
52059  ac_save_LDFLAGS=$LDFLAGS
52060  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
52061  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
52062  # check for ICE first), but we must link in the order -lSM -lICE or
52063  # we get undefined symbols.  So assume we have SM if we have ICE.
52064  # These have to be linked with before -lX11, unlike the other
52065  # libraries we check for below, so use a different variable.
52066  # John Interrante, Karl Berry
52067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
52068$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
52069if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
52070  $as_echo_n "(cached) " >&6
52071else
52072  ac_check_lib_save_LIBS=$LIBS
52073LIBS="-lICE $X_EXTRA_LIBS $LIBS"
52074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52075/* end confdefs.h.  */
52076
52077/* Override any GCC internal prototype to avoid an error.
52078   Use char because int might match the return type of a GCC
52079   builtin and then its argument prototype would still apply.  */
52080#ifdef __cplusplus
52081extern "C"
52082#endif
52083char IceConnectionNumber ();
52084int
52085main ()
52086{
52087return IceConnectionNumber ();
52088  ;
52089  return 0;
52090}
52091_ACEOF
52092if ac_fn_cxx_try_link "$LINENO"; then :
52093  ac_cv_lib_ICE_IceConnectionNumber=yes
52094else
52095  ac_cv_lib_ICE_IceConnectionNumber=no
52096fi
52097rm -f core conftest.err conftest.$ac_objext \
52098    conftest$ac_exeext conftest.$ac_ext
52099LIBS=$ac_check_lib_save_LIBS
52100fi
52101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
52102$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
52103if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
52104  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
52105fi
52106
52107  LDFLAGS=$ac_save_LDFLAGS
52108
52109fi
52110
52111
52112    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
52113    # this doesn't make sense so we remove it.
52114    if test "x$COMPILE_TYPE" = xcross; then
52115      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
52116    fi
52117
52118    if test "x$no_x" = xyes; then
52119
52120  # Print a helpful message on how to acquire the necessary build dependency.
52121  # x11 is the help tag: freetype, cups, alsa etc
52122  MISSING_DEPENDENCY=x11
52123
52124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52125    cygwin_help $MISSING_DEPENDENCY
52126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52127    msys_help $MISSING_DEPENDENCY
52128  else
52129    PKGHANDLER_COMMAND=
52130
52131    case $PKGHANDLER in
52132      apt-get)
52133        apt_help     $MISSING_DEPENDENCY ;;
52134      yum)
52135        yum_help     $MISSING_DEPENDENCY ;;
52136      port)
52137        port_help    $MISSING_DEPENDENCY ;;
52138      pkgutil)
52139        pkgutil_help $MISSING_DEPENDENCY ;;
52140      pkgadd)
52141        pkgadd_help  $MISSING_DEPENDENCY ;;
52142    esac
52143
52144    if test "x$PKGHANDLER_COMMAND" != x; then
52145      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52146    fi
52147  fi
52148
52149      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
52150    fi
52151
52152    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52153      OPENWIN_HOME="/usr/openwin"
52154      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
52155      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
52156          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
52157          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
52158          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
52159    fi
52160
52161    ac_ext=c
52162ac_cpp='$CPP $CPPFLAGS'
52163ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52164ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52165ac_compiler_gnu=$ac_cv_c_compiler_gnu
52166
52167    OLD_CFLAGS="$CFLAGS"
52168    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
52169
52170    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
52171    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
52172do :
52173  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
52174ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
52175          # include <X11/Xlib.h>
52176          # include <X11/Xutil.h>
52177
52178
52179"
52180if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
52181  cat >>confdefs.h <<_ACEOF
52182#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
52183_ACEOF
52184 X11_HEADERS_OK=yes
52185else
52186  X11_HEADERS_OK=no; break
52187fi
52188
52189done
52190
52191
52192    if test "x$X11_HEADERS_OK" = xno; then
52193
52194  # Print a helpful message on how to acquire the necessary build dependency.
52195  # x11 is the help tag: freetype, cups, alsa etc
52196  MISSING_DEPENDENCY=x11
52197
52198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52199    cygwin_help $MISSING_DEPENDENCY
52200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52201    msys_help $MISSING_DEPENDENCY
52202  else
52203    PKGHANDLER_COMMAND=
52204
52205    case $PKGHANDLER in
52206      apt-get)
52207        apt_help     $MISSING_DEPENDENCY ;;
52208      yum)
52209        yum_help     $MISSING_DEPENDENCY ;;
52210      port)
52211        port_help    $MISSING_DEPENDENCY ;;
52212      pkgutil)
52213        pkgutil_help $MISSING_DEPENDENCY ;;
52214      pkgadd)
52215        pkgadd_help  $MISSING_DEPENDENCY ;;
52216    esac
52217
52218    if test "x$PKGHANDLER_COMMAND" != x; then
52219      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52220    fi
52221  fi
52222
52223      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
52224    fi
52225
52226    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
52227    # defined in libawt_xawt.
52228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
52229$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
52230    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52231/* end confdefs.h.  */
52232#include <X11/extensions/Xrender.h>
52233int
52234main ()
52235{
52236XLinearGradient x;
52237  ;
52238  return 0;
52239}
52240_ACEOF
52241if ac_fn_c_try_compile "$LINENO"; then :
52242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52243$as_echo "yes" >&6; }
52244else
52245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52246$as_echo "no" >&6; }
52247         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
52248fi
52249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52250
52251    CFLAGS="$OLD_CFLAGS"
52252    ac_ext=cpp
52253ac_cpp='$CXXCPP $CPPFLAGS'
52254ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52255ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52256ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52257
52258  fi # NEEDS_LIB_X11
52259
52260
52261
52262
52263
52264
52265# Check whether --with-cups was given.
52266if test "${with_cups+set}" = set; then :
52267  withval=$with_cups;
52268fi
52269
52270
52271# Check whether --with-cups-include was given.
52272if test "${with_cups_include+set}" = set; then :
52273  withval=$with_cups_include;
52274fi
52275
52276
52277  if test "x$NEEDS_LIB_CUPS" = xfalse; then
52278    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
52279        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
52280      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
52281$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
52282    fi
52283    CUPS_CFLAGS=
52284  else
52285    CUPS_FOUND=no
52286
52287    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
52288      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
52289    fi
52290
52291    if test "x${with_cups}" != x; then
52292      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
52293$as_echo_n "checking for cups headers... " >&6; }
52294      if test -s "${with_cups}/include/cups/cups.h"; then
52295        CUPS_CFLAGS="-I${with_cups}/include"
52296        CUPS_FOUND=yes
52297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
52298$as_echo "$CUPS_FOUND" >&6; }
52299      else
52300        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
52301      fi
52302    fi
52303    if test "x${with_cups_include}" != x; then
52304      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
52305$as_echo_n "checking for cups headers... " >&6; }
52306      if test -s "${with_cups_include}/cups/cups.h"; then
52307        CUPS_CFLAGS="-I${with_cups_include}"
52308        CUPS_FOUND=yes
52309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
52310$as_echo "$CUPS_FOUND" >&6; }
52311      else
52312        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
52313      fi
52314    fi
52315    if test "x$CUPS_FOUND" = xno; then
52316      # Are the cups headers installed in the default /usr/include location?
52317      for ac_header in cups/cups.h cups/ppd.h
52318do :
52319  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
52320ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
52321if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
52322  cat >>confdefs.h <<_ACEOF
52323#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
52324_ACEOF
52325
52326          CUPS_FOUND=yes
52327          CUPS_CFLAGS=
52328          DEFAULT_CUPS=yes
52329
52330fi
52331
52332done
52333
52334    fi
52335    if test "x$CUPS_FOUND" = xno; then
52336      # Getting nervous now? Lets poke around for standard Solaris third-party
52337      # package installation locations.
52338      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
52339$as_echo_n "checking for cups headers... " >&6; }
52340      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
52341        # An SFW package seems to be installed!
52342        CUPS_FOUND=yes
52343        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
52344      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
52345        # A CSW package seems to be installed!
52346        CUPS_FOUND=yes
52347        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
52348      fi
52349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
52350$as_echo "$CUPS_FOUND" >&6; }
52351    fi
52352    if test "x$CUPS_FOUND" = xno; then
52353
52354  # Print a helpful message on how to acquire the necessary build dependency.
52355  # cups is the help tag: freetype, cups, alsa etc
52356  MISSING_DEPENDENCY=cups
52357
52358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52359    cygwin_help $MISSING_DEPENDENCY
52360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52361    msys_help $MISSING_DEPENDENCY
52362  else
52363    PKGHANDLER_COMMAND=
52364
52365    case $PKGHANDLER in
52366      apt-get)
52367        apt_help     $MISSING_DEPENDENCY ;;
52368      yum)
52369        yum_help     $MISSING_DEPENDENCY ;;
52370      port)
52371        port_help    $MISSING_DEPENDENCY ;;
52372      pkgutil)
52373        pkgutil_help $MISSING_DEPENDENCY ;;
52374      pkgadd)
52375        pkgadd_help  $MISSING_DEPENDENCY ;;
52376    esac
52377
52378    if test "x$PKGHANDLER_COMMAND" != x; then
52379      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52380    fi
52381  fi
52382
52383      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
52384    fi
52385  fi
52386
52387
52388
52389
52390
52391# Check whether --with-freetype was given.
52392if test "${with_freetype+set}" = set; then :
52393  withval=$with_freetype;
52394fi
52395
52396
52397# Check whether --with-freetype-include was given.
52398if test "${with_freetype_include+set}" = set; then :
52399  withval=$with_freetype_include;
52400fi
52401
52402
52403# Check whether --with-freetype-lib was given.
52404if test "${with_freetype_lib+set}" = set; then :
52405  withval=$with_freetype_lib;
52406fi
52407
52408
52409# Check whether --with-freetype-src was given.
52410if test "${with_freetype_src+set}" = set; then :
52411  withval=$with_freetype_src;
52412fi
52413
52414  # Check whether --enable-freetype-bundling was given.
52415if test "${enable_freetype_bundling+set}" = set; then :
52416  enableval=$enable_freetype_bundling;
52417fi
52418
52419
52420  # Need to specify explicitly since it needs to be overridden on some versions of macosx
52421  FREETYPE_BASE_NAME=freetype
52422  FREETYPE_CFLAGS=
52423  FREETYPE_LIBS=
52424  FREETYPE_BUNDLE_LIB_PATH=
52425
52426  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
52427    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
52428        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
52429        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
52430        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
52431      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
52432$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
52433    fi
52434    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
52435      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
52436$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
52437    fi
52438  else
52439    # freetype is needed to build; go get it!
52440
52441    BUNDLE_FREETYPE="$enable_freetype_bundling"
52442
52443    if  test "x$with_freetype_src" != x; then
52444      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52445        # Try to build freetype if --with-freetype-src was given on Windows
52446
52447  FREETYPE_SRC_PATH="$with_freetype_src"
52448  BUILD_FREETYPE=yes
52449
52450  # Check if the freetype sources are acessible..
52451  if ! test -d $FREETYPE_SRC_PATH; then
52452    { $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
52453$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
52454    BUILD_FREETYPE=no
52455  fi
52456  # ..and contain a vc2010 project file
52457  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
52458  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
52459    { $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
52460$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
52461    BUILD_FREETYPE=no
52462  fi
52463  # Now check if configure found a version of 'msbuild.exe'
52464  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
52465    { $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
52466$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;}
52467    BUILD_FREETYPE=no
52468  fi
52469
52470  # Ready to go..
52471  if test "x$BUILD_FREETYPE" = xyes; then
52472    # msbuild requires trailing slashes for output directories
52473    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
52474    freetype_lib_path_unix="$freetype_lib_path"
52475    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
52476
52477  unix_path="$vcxproj_path"
52478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52479    windows_path=`$CYGPATH -m "$unix_path"`
52480    vcxproj_path="$windows_path"
52481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52482    windows_path=`cmd //c echo $unix_path`
52483    vcxproj_path="$windows_path"
52484  fi
52485
52486
52487  unix_path="$freetype_lib_path"
52488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52489    windows_path=`$CYGPATH -m "$unix_path"`
52490    freetype_lib_path="$windows_path"
52491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52492    windows_path=`cmd //c echo $unix_path`
52493    freetype_lib_path="$windows_path"
52494  fi
52495
52496
52497  unix_path="$freetype_obj_path"
52498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52499    windows_path=`$CYGPATH -m "$unix_path"`
52500    freetype_obj_path="$windows_path"
52501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52502    windows_path=`cmd //c echo $unix_path`
52503    freetype_obj_path="$windows_path"
52504  fi
52505
52506    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52507      freetype_platform=x64
52508    else
52509      freetype_platform=win32
52510    fi
52511
52512    # The original freetype project file is for VS 2010 (i.e. 'v100'),
52513    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
52514    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
52515    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
52516    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
52517$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
52518
52519    # First we try to build the freetype.dll
52520    $ECHO -e "@echo off\n"\
52521        "$MSBUILD $vcxproj_path "\
52522        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
52523        "/p:Configuration=\"Release Multithreaded\" "\
52524        "/p:Platform=$freetype_platform "\
52525        "/p:ConfigurationType=DynamicLibrary "\
52526        "/p:TargetName=freetype "\
52527        "/p:OutDir=\"$freetype_lib_path\" "\
52528        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
52529    cmd /c freetype.bat
52530
52531    if test -s "$freetype_lib_path_unix/freetype.dll"; then
52532      # If that succeeds we also build freetype.lib
52533      $ECHO -e "@echo off\n"\
52534          "$MSBUILD $vcxproj_path "\
52535          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
52536          "/p:Configuration=\"Release Multithreaded\" "\
52537          "/p:Platform=$freetype_platform "\
52538          "/p:ConfigurationType=StaticLibrary "\
52539          "/p:TargetName=freetype "\
52540          "/p:OutDir=\"$freetype_lib_path\" "\
52541          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
52542      cmd /c freetype.bat
52543
52544      if test -s "$freetype_lib_path_unix/freetype.lib"; then
52545        # Once we build both, lib and dll, set freetype lib and include path appropriately
52546        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
52547        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
52548        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
52549$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
52550      else
52551        BUILD_FREETYPE=no
52552      fi
52553    else
52554      BUILD_FREETYPE=no
52555    fi
52556  fi
52557
52558        if test "x$BUILD_FREETYPE" = xyes; then
52559          # Okay, we built it. Check that it works.
52560
52561  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52562  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52563  METHOD="--with-freetype-src"
52564
52565  # Let's start with an optimistic view of the world :-)
52566  FOUND_FREETYPE=yes
52567
52568  # First look for the canonical freetype main include file ft2build.h.
52569  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52570    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52571    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52572    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52573      # Fail.
52574      FOUND_FREETYPE=no
52575    fi
52576  fi
52577
52578  if test "x$FOUND_FREETYPE" = xyes; then
52579    # Include file found, let's continue the sanity check.
52580    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52581$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52582
52583    # Reset to default value
52584    FREETYPE_BASE_NAME=freetype
52585    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52586    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52587      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52588          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52589        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52590        # for the .6 version explicitly.
52591        FREETYPE_BASE_NAME=freetype.6
52592        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52593        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52594$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52595      else
52596        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52597$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52598        FOUND_FREETYPE=no
52599      fi
52600    else
52601      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52602        # On Windows, we will need both .lib and .dll file.
52603        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52604          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52605$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52606          FOUND_FREETYPE=no
52607        fi
52608      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52609          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52610        # Found lib in isa dir, use that instead.
52611        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52612        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52613$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52614      fi
52615    fi
52616  fi
52617
52618  if test "x$FOUND_FREETYPE" = xyes; then
52619
52620  # Only process if variable expands to non-empty
52621
52622  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52624
52625  # Input might be given as Windows format, start by converting to
52626  # unix format.
52627  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52628  new_path=`$CYGPATH -u "$path"`
52629
52630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52633  # "foo.exe" is OK but "foo" is an error.
52634  #
52635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52636  # It is also a way to make sure we got the proper file name for the real test later on.
52637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52638  if test "x$test_shortpath" = x; then
52639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52641    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52642  fi
52643
52644  # Call helper function which possibly converts this using DOS-style short mode.
52645  # If so, the updated path is stored in $new_path.
52646
52647  input_path="$new_path"
52648  # Check if we need to convert this using DOS-style short mode. If the path
52649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52650  # take no chances and rewrite it.
52651  # Note: m4 eats our [], so we need to use [ and ] instead.
52652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52653  if test "x$has_forbidden_chars" != x; then
52654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52658      # Going to short mode and back again did indeed matter. Since short mode is
52659      # case insensitive, let's make it lowercase to improve readability.
52660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52661      # Now convert it back to Unix-style (cygpath)
52662      input_path=`$CYGPATH -u "$shortmode_path"`
52663      new_path="$input_path"
52664    fi
52665  fi
52666
52667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52668  if test "x$test_cygdrive_prefix" = x; then
52669    # As a simple fix, exclude /usr/bin since it's not a real path.
52670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52672      # a path prefixed by /cygdrive for fixpath to work.
52673      new_path="$CYGWIN_ROOT_PATH$input_path"
52674    fi
52675  fi
52676
52677
52678  if test "x$path" != "x$new_path"; then
52679    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52682  fi
52683
52684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52685
52686  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52687  has_colon=`$ECHO $path | $GREP ^.:`
52688  new_path="$path"
52689  if test "x$has_colon" = x; then
52690    # Not in mixed or Windows style, start by that.
52691    new_path=`cmd //c echo $path`
52692  fi
52693
52694
52695  input_path="$new_path"
52696  # Check if we need to convert this using DOS-style short mode. If the path
52697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52698  # take no chances and rewrite it.
52699  # Note: m4 eats our [], so we need to use [ and ] instead.
52700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52701  if test "x$has_forbidden_chars" != x; then
52702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52704  fi
52705
52706
52707  windows_path="$new_path"
52708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52709    unix_path=`$CYGPATH -u "$windows_path"`
52710    new_path="$unix_path"
52711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52713    new_path="$unix_path"
52714  fi
52715
52716  if test "x$path" != "x$new_path"; then
52717    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52720  fi
52721
52722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52724
52725    else
52726      # We're on a unix platform. Hooray! :)
52727      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52728      has_space=`$ECHO "$path" | $GREP " "`
52729      if test "x$has_space" != x; then
52730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52733      fi
52734
52735      # Use eval to expand a potential ~
52736      eval path="$path"
52737      if test ! -f "$path" && test ! -d "$path"; then
52738        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52739      fi
52740
52741      if test -d "$path"; then
52742        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52743      else
52744        dir="`$DIRNAME "$path"`"
52745        base="`$BASENAME "$path"`"
52746        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52747      fi
52748    fi
52749  fi
52750
52751
52752  # Only process if variable expands to non-empty
52753
52754  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52756
52757  # Input might be given as Windows format, start by converting to
52758  # unix format.
52759  path="$POTENTIAL_FREETYPE_LIB_PATH"
52760  new_path=`$CYGPATH -u "$path"`
52761
52762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52765  # "foo.exe" is OK but "foo" is an error.
52766  #
52767  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52768  # It is also a way to make sure we got the proper file name for the real test later on.
52769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52770  if test "x$test_shortpath" = x; then
52771    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52772$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52773    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52774  fi
52775
52776  # Call helper function which possibly converts this using DOS-style short mode.
52777  # If so, the updated path is stored in $new_path.
52778
52779  input_path="$new_path"
52780  # Check if we need to convert this using DOS-style short mode. If the path
52781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52782  # take no chances and rewrite it.
52783  # Note: m4 eats our [], so we need to use [ and ] instead.
52784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52785  if test "x$has_forbidden_chars" != x; then
52786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52790      # Going to short mode and back again did indeed matter. Since short mode is
52791      # case insensitive, let's make it lowercase to improve readability.
52792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52793      # Now convert it back to Unix-style (cygpath)
52794      input_path=`$CYGPATH -u "$shortmode_path"`
52795      new_path="$input_path"
52796    fi
52797  fi
52798
52799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52800  if test "x$test_cygdrive_prefix" = x; then
52801    # As a simple fix, exclude /usr/bin since it's not a real path.
52802    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52804      # a path prefixed by /cygdrive for fixpath to work.
52805      new_path="$CYGWIN_ROOT_PATH$input_path"
52806    fi
52807  fi
52808
52809
52810  if test "x$path" != "x$new_path"; then
52811    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52813$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52814  fi
52815
52816    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52817
52818  path="$POTENTIAL_FREETYPE_LIB_PATH"
52819  has_colon=`$ECHO $path | $GREP ^.:`
52820  new_path="$path"
52821  if test "x$has_colon" = x; then
52822    # Not in mixed or Windows style, start by that.
52823    new_path=`cmd //c echo $path`
52824  fi
52825
52826
52827  input_path="$new_path"
52828  # Check if we need to convert this using DOS-style short mode. If the path
52829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52830  # take no chances and rewrite it.
52831  # Note: m4 eats our [], so we need to use [ and ] instead.
52832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52833  if test "x$has_forbidden_chars" != x; then
52834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52836  fi
52837
52838
52839  windows_path="$new_path"
52840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52841    unix_path=`$CYGPATH -u "$windows_path"`
52842    new_path="$unix_path"
52843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52845    new_path="$unix_path"
52846  fi
52847
52848  if test "x$path" != "x$new_path"; then
52849    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52851$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52852  fi
52853
52854  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52855  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52856
52857    else
52858      # We're on a unix platform. Hooray! :)
52859      path="$POTENTIAL_FREETYPE_LIB_PATH"
52860      has_space=`$ECHO "$path" | $GREP " "`
52861      if test "x$has_space" != x; then
52862        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52863$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52864        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52865      fi
52866
52867      # Use eval to expand a potential ~
52868      eval path="$path"
52869      if test ! -f "$path" && test ! -d "$path"; then
52870        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52871      fi
52872
52873      if test -d "$path"; then
52874        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52875      else
52876        dir="`$DIRNAME "$path"`"
52877        base="`$BASENAME "$path"`"
52878        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52879      fi
52880    fi
52881  fi
52882
52883
52884    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52886$as_echo_n "checking for freetype includes... " >&6; }
52887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52888$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52889    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52891$as_echo_n "checking for freetype libraries... " >&6; }
52892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52893$as_echo "$FREETYPE_LIB_PATH" >&6; }
52894  fi
52895
52896          if test "x$FOUND_FREETYPE" != xyes; then
52897            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
52898          fi
52899        else
52900          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52901$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52902          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52903        fi
52904      else
52905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52906$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52907      fi
52908    fi
52909
52910    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52911      # User has specified settings
52912
52913      if test "x$BUNDLE_FREETYPE" = x; then
52914        # If not specified, default is to bundle freetype
52915        BUNDLE_FREETYPE=yes
52916      fi
52917
52918      if test "x$with_freetype" != x; then
52919        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52920        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52921      fi
52922
52923      # Allow --with-freetype-lib and --with-freetype-include to override
52924      if test "x$with_freetype_include" != x; then
52925        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52926      fi
52927      if test "x$with_freetype_lib" != x; then
52928        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52929      fi
52930
52931      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52932        # Okay, we got it. Check that it works.
52933
52934  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52935  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52936  METHOD="--with-freetype"
52937
52938  # Let's start with an optimistic view of the world :-)
52939  FOUND_FREETYPE=yes
52940
52941  # First look for the canonical freetype main include file ft2build.h.
52942  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52943    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52944    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52945    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52946      # Fail.
52947      FOUND_FREETYPE=no
52948    fi
52949  fi
52950
52951  if test "x$FOUND_FREETYPE" = xyes; then
52952    # Include file found, let's continue the sanity check.
52953    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52954$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52955
52956    # Reset to default value
52957    FREETYPE_BASE_NAME=freetype
52958    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52959    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52960      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52961          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52962        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52963        # for the .6 version explicitly.
52964        FREETYPE_BASE_NAME=freetype.6
52965        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52966        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52967$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52968      else
52969        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52970$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52971        FOUND_FREETYPE=no
52972      fi
52973    else
52974      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52975        # On Windows, we will need both .lib and .dll file.
52976        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52977          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52978$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52979          FOUND_FREETYPE=no
52980        fi
52981      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52982          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52983        # Found lib in isa dir, use that instead.
52984        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52985        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52986$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52987      fi
52988    fi
52989  fi
52990
52991  if test "x$FOUND_FREETYPE" = xyes; then
52992
52993  # Only process if variable expands to non-empty
52994
52995  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52997
52998  # Input might be given as Windows format, start by converting to
52999  # unix format.
53000  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53001  new_path=`$CYGPATH -u "$path"`
53002
53003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53006  # "foo.exe" is OK but "foo" is an error.
53007  #
53008  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53009  # It is also a way to make sure we got the proper file name for the real test later on.
53010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53011  if test "x$test_shortpath" = x; then
53012    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53013$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53014    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53015  fi
53016
53017  # Call helper function which possibly converts this using DOS-style short mode.
53018  # If so, the updated path is stored in $new_path.
53019
53020  input_path="$new_path"
53021  # Check if we need to convert this using DOS-style short mode. If the path
53022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53023  # take no chances and rewrite it.
53024  # Note: m4 eats our [], so we need to use [ and ] instead.
53025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53026  if test "x$has_forbidden_chars" != x; then
53027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53031      # Going to short mode and back again did indeed matter. Since short mode is
53032      # case insensitive, let's make it lowercase to improve readability.
53033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53034      # Now convert it back to Unix-style (cygpath)
53035      input_path=`$CYGPATH -u "$shortmode_path"`
53036      new_path="$input_path"
53037    fi
53038  fi
53039
53040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53041  if test "x$test_cygdrive_prefix" = x; then
53042    # As a simple fix, exclude /usr/bin since it's not a real path.
53043    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53045      # a path prefixed by /cygdrive for fixpath to work.
53046      new_path="$CYGWIN_ROOT_PATH$input_path"
53047    fi
53048  fi
53049
53050
53051  if test "x$path" != "x$new_path"; then
53052    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53054$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53055  fi
53056
53057    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53058
53059  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53060  has_colon=`$ECHO $path | $GREP ^.:`
53061  new_path="$path"
53062  if test "x$has_colon" = x; then
53063    # Not in mixed or Windows style, start by that.
53064    new_path=`cmd //c echo $path`
53065  fi
53066
53067
53068  input_path="$new_path"
53069  # Check if we need to convert this using DOS-style short mode. If the path
53070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53071  # take no chances and rewrite it.
53072  # Note: m4 eats our [], so we need to use [ and ] instead.
53073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53074  if test "x$has_forbidden_chars" != x; then
53075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53077  fi
53078
53079
53080  windows_path="$new_path"
53081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53082    unix_path=`$CYGPATH -u "$windows_path"`
53083    new_path="$unix_path"
53084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53086    new_path="$unix_path"
53087  fi
53088
53089  if test "x$path" != "x$new_path"; then
53090    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53092$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53093  fi
53094
53095  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53096  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53097
53098    else
53099      # We're on a unix platform. Hooray! :)
53100      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53101      has_space=`$ECHO "$path" | $GREP " "`
53102      if test "x$has_space" != x; then
53103        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53104$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53105        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53106      fi
53107
53108      # Use eval to expand a potential ~
53109      eval path="$path"
53110      if test ! -f "$path" && test ! -d "$path"; then
53111        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53112      fi
53113
53114      if test -d "$path"; then
53115        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53116      else
53117        dir="`$DIRNAME "$path"`"
53118        base="`$BASENAME "$path"`"
53119        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53120      fi
53121    fi
53122  fi
53123
53124
53125  # Only process if variable expands to non-empty
53126
53127  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53128    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53129
53130  # Input might be given as Windows format, start by converting to
53131  # unix format.
53132  path="$POTENTIAL_FREETYPE_LIB_PATH"
53133  new_path=`$CYGPATH -u "$path"`
53134
53135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53138  # "foo.exe" is OK but "foo" is an error.
53139  #
53140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53141  # It is also a way to make sure we got the proper file name for the real test later on.
53142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53143  if test "x$test_shortpath" = x; then
53144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53145$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53146    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53147  fi
53148
53149  # Call helper function which possibly converts this using DOS-style short mode.
53150  # If so, the updated path is stored in $new_path.
53151
53152  input_path="$new_path"
53153  # Check if we need to convert this using DOS-style short mode. If the path
53154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53155  # take no chances and rewrite it.
53156  # Note: m4 eats our [], so we need to use [ and ] instead.
53157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53158  if test "x$has_forbidden_chars" != x; then
53159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53163      # Going to short mode and back again did indeed matter. Since short mode is
53164      # case insensitive, let's make it lowercase to improve readability.
53165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53166      # Now convert it back to Unix-style (cygpath)
53167      input_path=`$CYGPATH -u "$shortmode_path"`
53168      new_path="$input_path"
53169    fi
53170  fi
53171
53172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53173  if test "x$test_cygdrive_prefix" = x; then
53174    # As a simple fix, exclude /usr/bin since it's not a real path.
53175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53177      # a path prefixed by /cygdrive for fixpath to work.
53178      new_path="$CYGWIN_ROOT_PATH$input_path"
53179    fi
53180  fi
53181
53182
53183  if test "x$path" != "x$new_path"; then
53184    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53186$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53187  fi
53188
53189    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53190
53191  path="$POTENTIAL_FREETYPE_LIB_PATH"
53192  has_colon=`$ECHO $path | $GREP ^.:`
53193  new_path="$path"
53194  if test "x$has_colon" = x; then
53195    # Not in mixed or Windows style, start by that.
53196    new_path=`cmd //c echo $path`
53197  fi
53198
53199
53200  input_path="$new_path"
53201  # Check if we need to convert this using DOS-style short mode. If the path
53202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53203  # take no chances and rewrite it.
53204  # Note: m4 eats our [], so we need to use [ and ] instead.
53205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53206  if test "x$has_forbidden_chars" != x; then
53207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53209  fi
53210
53211
53212  windows_path="$new_path"
53213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53214    unix_path=`$CYGPATH -u "$windows_path"`
53215    new_path="$unix_path"
53216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53218    new_path="$unix_path"
53219  fi
53220
53221  if test "x$path" != "x$new_path"; then
53222    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53224$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53225  fi
53226
53227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53229
53230    else
53231      # We're on a unix platform. Hooray! :)
53232      path="$POTENTIAL_FREETYPE_LIB_PATH"
53233      has_space=`$ECHO "$path" | $GREP " "`
53234      if test "x$has_space" != x; then
53235        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53236$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53237        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53238      fi
53239
53240      # Use eval to expand a potential ~
53241      eval path="$path"
53242      if test ! -f "$path" && test ! -d "$path"; then
53243        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53244      fi
53245
53246      if test -d "$path"; then
53247        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53248      else
53249        dir="`$DIRNAME "$path"`"
53250        base="`$BASENAME "$path"`"
53251        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53252      fi
53253    fi
53254  fi
53255
53256
53257    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53259$as_echo_n "checking for freetype includes... " >&6; }
53260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53261$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53262    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53264$as_echo_n "checking for freetype libraries... " >&6; }
53265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53266$as_echo "$FREETYPE_LIB_PATH" >&6; }
53267  fi
53268
53269        if test "x$FOUND_FREETYPE" != xyes; then
53270          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
53271        fi
53272      else
53273        # User specified only one of lib or include. This is an error.
53274        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
53275          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
53276$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
53277          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
53278        else
53279          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
53280$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
53281          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
53282        fi
53283      fi
53284    else
53285      # User did not specify settings, but we need freetype. Try to locate it.
53286
53287      if test "x$BUNDLE_FREETYPE" = x; then
53288        # If not specified, default is to bundle freetype only on windows
53289        if test "x$OPENJDK_TARGET_OS" = xwindows; then
53290          BUNDLE_FREETYPE=yes
53291        else
53292          BUNDLE_FREETYPE=no
53293        fi
53294      fi
53295
53296      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
53297      if test "x$SYSROOT" = x; then
53298        if test "x$FOUND_FREETYPE" != xyes; then
53299          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
53300          if test "x$PKG_CONFIG" != x; then
53301
53302pkg_failed=no
53303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
53304$as_echo_n "checking for FREETYPE... " >&6; }
53305
53306if test -n "$FREETYPE_CFLAGS"; then
53307    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
53308 elif test -n "$PKG_CONFIG"; then
53309    if test -n "$PKG_CONFIG" && \
53310    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
53311  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
53312  ac_status=$?
53313  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53314  test $ac_status = 0; }; then
53315  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
53316else
53317  pkg_failed=yes
53318fi
53319 else
53320    pkg_failed=untried
53321fi
53322if test -n "$FREETYPE_LIBS"; then
53323    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
53324 elif test -n "$PKG_CONFIG"; then
53325    if test -n "$PKG_CONFIG" && \
53326    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
53327  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
53328  ac_status=$?
53329  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53330  test $ac_status = 0; }; then
53331  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
53332else
53333  pkg_failed=yes
53334fi
53335 else
53336    pkg_failed=untried
53337fi
53338
53339
53340
53341if test $pkg_failed = yes; then
53342
53343if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53344        _pkg_short_errors_supported=yes
53345else
53346        _pkg_short_errors_supported=no
53347fi
53348        if test $_pkg_short_errors_supported = yes; then
53349	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
53350        else
53351	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
53352        fi
53353	# Put the nasty error message in config.log where it belongs
53354	echo "$FREETYPE_PKG_ERRORS" >&5
53355
53356	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53357$as_echo "no" >&6; }
53358                FOUND_FREETYPE=no
53359elif test $pkg_failed = untried; then
53360	FOUND_FREETYPE=no
53361else
53362	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
53363	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
53364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53365$as_echo "yes" >&6; }
53366	FOUND_FREETYPE=yes
53367fi
53368            if test "x$FOUND_FREETYPE" = xyes; then
53369              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
53370              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
53371              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
53372              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
53373                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
53374              fi
53375              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
53376              if test "x$BUNDLE_FREETYPE" = xyes; then
53377                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
53378$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
53379                FOUND_FREETYPE=no
53380              else
53381                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
53382$as_echo_n "checking for freetype... " >&6; }
53383                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
53384$as_echo "yes (using pkg-config)" >&6; }
53385              fi
53386            fi
53387          fi
53388        fi
53389      fi
53390
53391      if test "x$FOUND_FREETYPE" != xyes; then
53392        # Check in well-known locations
53393        if test "x$OPENJDK_TARGET_OS" = xwindows; then
53394          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
53395
53396  windows_path="$FREETYPE_BASE_DIR"
53397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53398    unix_path=`$CYGPATH -u "$windows_path"`
53399    FREETYPE_BASE_DIR="$unix_path"
53400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53402    FREETYPE_BASE_DIR="$unix_path"
53403  fi
53404
53405
53406  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53407  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53408  METHOD="well-known location"
53409
53410  # Let's start with an optimistic view of the world :-)
53411  FOUND_FREETYPE=yes
53412
53413  # First look for the canonical freetype main include file ft2build.h.
53414  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53415    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53416    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53417    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53418      # Fail.
53419      FOUND_FREETYPE=no
53420    fi
53421  fi
53422
53423  if test "x$FOUND_FREETYPE" = xyes; then
53424    # Include file found, let's continue the sanity check.
53425    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53426$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53427
53428    # Reset to default value
53429    FREETYPE_BASE_NAME=freetype
53430    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53431    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53432      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53433          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53434        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53435        # for the .6 version explicitly.
53436        FREETYPE_BASE_NAME=freetype.6
53437        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53438        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53439$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53440      else
53441        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53442$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53443        FOUND_FREETYPE=no
53444      fi
53445    else
53446      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53447        # On Windows, we will need both .lib and .dll file.
53448        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53449          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53450$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53451          FOUND_FREETYPE=no
53452        fi
53453      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53454          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53455        # Found lib in isa dir, use that instead.
53456        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53457        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53458$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53459      fi
53460    fi
53461  fi
53462
53463  if test "x$FOUND_FREETYPE" = xyes; then
53464
53465  # Only process if variable expands to non-empty
53466
53467  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53469
53470  # Input might be given as Windows format, start by converting to
53471  # unix format.
53472  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53473  new_path=`$CYGPATH -u "$path"`
53474
53475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53478  # "foo.exe" is OK but "foo" is an error.
53479  #
53480  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53481  # It is also a way to make sure we got the proper file name for the real test later on.
53482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53483  if test "x$test_shortpath" = x; then
53484    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53485$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53486    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53487  fi
53488
53489  # Call helper function which possibly converts this using DOS-style short mode.
53490  # If so, the updated path is stored in $new_path.
53491
53492  input_path="$new_path"
53493  # Check if we need to convert this using DOS-style short mode. If the path
53494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53495  # take no chances and rewrite it.
53496  # Note: m4 eats our [], so we need to use [ and ] instead.
53497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53498  if test "x$has_forbidden_chars" != x; then
53499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53503      # Going to short mode and back again did indeed matter. Since short mode is
53504      # case insensitive, let's make it lowercase to improve readability.
53505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53506      # Now convert it back to Unix-style (cygpath)
53507      input_path=`$CYGPATH -u "$shortmode_path"`
53508      new_path="$input_path"
53509    fi
53510  fi
53511
53512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53513  if test "x$test_cygdrive_prefix" = x; then
53514    # As a simple fix, exclude /usr/bin since it's not a real path.
53515    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53517      # a path prefixed by /cygdrive for fixpath to work.
53518      new_path="$CYGWIN_ROOT_PATH$input_path"
53519    fi
53520  fi
53521
53522
53523  if test "x$path" != "x$new_path"; then
53524    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53526$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53527  fi
53528
53529    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53530
53531  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53532  has_colon=`$ECHO $path | $GREP ^.:`
53533  new_path="$path"
53534  if test "x$has_colon" = x; then
53535    # Not in mixed or Windows style, start by that.
53536    new_path=`cmd //c echo $path`
53537  fi
53538
53539
53540  input_path="$new_path"
53541  # Check if we need to convert this using DOS-style short mode. If the path
53542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53543  # take no chances and rewrite it.
53544  # Note: m4 eats our [], so we need to use [ and ] instead.
53545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53546  if test "x$has_forbidden_chars" != x; then
53547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53549  fi
53550
53551
53552  windows_path="$new_path"
53553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53554    unix_path=`$CYGPATH -u "$windows_path"`
53555    new_path="$unix_path"
53556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53558    new_path="$unix_path"
53559  fi
53560
53561  if test "x$path" != "x$new_path"; then
53562    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53564$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53565  fi
53566
53567  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53568  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53569
53570    else
53571      # We're on a unix platform. Hooray! :)
53572      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53573      has_space=`$ECHO "$path" | $GREP " "`
53574      if test "x$has_space" != x; then
53575        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53576$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53577        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53578      fi
53579
53580      # Use eval to expand a potential ~
53581      eval path="$path"
53582      if test ! -f "$path" && test ! -d "$path"; then
53583        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53584      fi
53585
53586      if test -d "$path"; then
53587        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53588      else
53589        dir="`$DIRNAME "$path"`"
53590        base="`$BASENAME "$path"`"
53591        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53592      fi
53593    fi
53594  fi
53595
53596
53597  # Only process if variable expands to non-empty
53598
53599  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53601
53602  # Input might be given as Windows format, start by converting to
53603  # unix format.
53604  path="$POTENTIAL_FREETYPE_LIB_PATH"
53605  new_path=`$CYGPATH -u "$path"`
53606
53607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53610  # "foo.exe" is OK but "foo" is an error.
53611  #
53612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53613  # It is also a way to make sure we got the proper file name for the real test later on.
53614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53615  if test "x$test_shortpath" = x; then
53616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53618    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53619  fi
53620
53621  # Call helper function which possibly converts this using DOS-style short mode.
53622  # If so, the updated path is stored in $new_path.
53623
53624  input_path="$new_path"
53625  # Check if we need to convert this using DOS-style short mode. If the path
53626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53627  # take no chances and rewrite it.
53628  # Note: m4 eats our [], so we need to use [ and ] instead.
53629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53630  if test "x$has_forbidden_chars" != x; then
53631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53635      # Going to short mode and back again did indeed matter. Since short mode is
53636      # case insensitive, let's make it lowercase to improve readability.
53637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53638      # Now convert it back to Unix-style (cygpath)
53639      input_path=`$CYGPATH -u "$shortmode_path"`
53640      new_path="$input_path"
53641    fi
53642  fi
53643
53644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53645  if test "x$test_cygdrive_prefix" = x; then
53646    # As a simple fix, exclude /usr/bin since it's not a real path.
53647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53649      # a path prefixed by /cygdrive for fixpath to work.
53650      new_path="$CYGWIN_ROOT_PATH$input_path"
53651    fi
53652  fi
53653
53654
53655  if test "x$path" != "x$new_path"; then
53656    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53658$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53659  fi
53660
53661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53662
53663  path="$POTENTIAL_FREETYPE_LIB_PATH"
53664  has_colon=`$ECHO $path | $GREP ^.:`
53665  new_path="$path"
53666  if test "x$has_colon" = x; then
53667    # Not in mixed or Windows style, start by that.
53668    new_path=`cmd //c echo $path`
53669  fi
53670
53671
53672  input_path="$new_path"
53673  # Check if we need to convert this using DOS-style short mode. If the path
53674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53675  # take no chances and rewrite it.
53676  # Note: m4 eats our [], so we need to use [ and ] instead.
53677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53678  if test "x$has_forbidden_chars" != x; then
53679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53681  fi
53682
53683
53684  windows_path="$new_path"
53685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53686    unix_path=`$CYGPATH -u "$windows_path"`
53687    new_path="$unix_path"
53688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53690    new_path="$unix_path"
53691  fi
53692
53693  if test "x$path" != "x$new_path"; then
53694    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53696$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53697  fi
53698
53699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53701
53702    else
53703      # We're on a unix platform. Hooray! :)
53704      path="$POTENTIAL_FREETYPE_LIB_PATH"
53705      has_space=`$ECHO "$path" | $GREP " "`
53706      if test "x$has_space" != x; then
53707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53708$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53709        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53710      fi
53711
53712      # Use eval to expand a potential ~
53713      eval path="$path"
53714      if test ! -f "$path" && test ! -d "$path"; then
53715        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53716      fi
53717
53718      if test -d "$path"; then
53719        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53720      else
53721        dir="`$DIRNAME "$path"`"
53722        base="`$BASENAME "$path"`"
53723        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53724      fi
53725    fi
53726  fi
53727
53728
53729    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53730    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53731$as_echo_n "checking for freetype includes... " >&6; }
53732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53733$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53734    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53735    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53736$as_echo_n "checking for freetype libraries... " >&6; }
53737    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53738$as_echo "$FREETYPE_LIB_PATH" >&6; }
53739  fi
53740
53741          if test "x$FOUND_FREETYPE" != xyes; then
53742            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
53743
53744  windows_path="$FREETYPE_BASE_DIR"
53745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53746    unix_path=`$CYGPATH -u "$windows_path"`
53747    FREETYPE_BASE_DIR="$unix_path"
53748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53750    FREETYPE_BASE_DIR="$unix_path"
53751  fi
53752
53753
53754  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53755  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53756  METHOD="well-known location"
53757
53758  # Let's start with an optimistic view of the world :-)
53759  FOUND_FREETYPE=yes
53760
53761  # First look for the canonical freetype main include file ft2build.h.
53762  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53763    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53764    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53765    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53766      # Fail.
53767      FOUND_FREETYPE=no
53768    fi
53769  fi
53770
53771  if test "x$FOUND_FREETYPE" = xyes; then
53772    # Include file found, let's continue the sanity check.
53773    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53774$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53775
53776    # Reset to default value
53777    FREETYPE_BASE_NAME=freetype
53778    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53779    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53780      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53781          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53782        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53783        # for the .6 version explicitly.
53784        FREETYPE_BASE_NAME=freetype.6
53785        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53786        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53787$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53788      else
53789        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53790$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53791        FOUND_FREETYPE=no
53792      fi
53793    else
53794      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53795        # On Windows, we will need both .lib and .dll file.
53796        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53797          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53798$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53799          FOUND_FREETYPE=no
53800        fi
53801      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53802          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53803        # Found lib in isa dir, use that instead.
53804        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53805        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53806$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53807      fi
53808    fi
53809  fi
53810
53811  if test "x$FOUND_FREETYPE" = xyes; then
53812
53813  # Only process if variable expands to non-empty
53814
53815  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53817
53818  # Input might be given as Windows format, start by converting to
53819  # unix format.
53820  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53821  new_path=`$CYGPATH -u "$path"`
53822
53823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53826  # "foo.exe" is OK but "foo" is an error.
53827  #
53828  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53829  # It is also a way to make sure we got the proper file name for the real test later on.
53830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53831  if test "x$test_shortpath" = x; then
53832    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53833$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53834    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53835  fi
53836
53837  # Call helper function which possibly converts this using DOS-style short mode.
53838  # If so, the updated path is stored in $new_path.
53839
53840  input_path="$new_path"
53841  # Check if we need to convert this using DOS-style short mode. If the path
53842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53843  # take no chances and rewrite it.
53844  # Note: m4 eats our [], so we need to use [ and ] instead.
53845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53846  if test "x$has_forbidden_chars" != x; then
53847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53851      # Going to short mode and back again did indeed matter. Since short mode is
53852      # case insensitive, let's make it lowercase to improve readability.
53853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53854      # Now convert it back to Unix-style (cygpath)
53855      input_path=`$CYGPATH -u "$shortmode_path"`
53856      new_path="$input_path"
53857    fi
53858  fi
53859
53860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53861  if test "x$test_cygdrive_prefix" = x; then
53862    # As a simple fix, exclude /usr/bin since it's not a real path.
53863    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53865      # a path prefixed by /cygdrive for fixpath to work.
53866      new_path="$CYGWIN_ROOT_PATH$input_path"
53867    fi
53868  fi
53869
53870
53871  if test "x$path" != "x$new_path"; then
53872    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53874$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53875  fi
53876
53877    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53878
53879  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53880  has_colon=`$ECHO $path | $GREP ^.:`
53881  new_path="$path"
53882  if test "x$has_colon" = x; then
53883    # Not in mixed or Windows style, start by that.
53884    new_path=`cmd //c echo $path`
53885  fi
53886
53887
53888  input_path="$new_path"
53889  # Check if we need to convert this using DOS-style short mode. If the path
53890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53891  # take no chances and rewrite it.
53892  # Note: m4 eats our [], so we need to use [ and ] instead.
53893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53894  if test "x$has_forbidden_chars" != x; then
53895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53897  fi
53898
53899
53900  windows_path="$new_path"
53901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53902    unix_path=`$CYGPATH -u "$windows_path"`
53903    new_path="$unix_path"
53904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53906    new_path="$unix_path"
53907  fi
53908
53909  if test "x$path" != "x$new_path"; then
53910    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53912$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53913  fi
53914
53915  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53916  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53917
53918    else
53919      # We're on a unix platform. Hooray! :)
53920      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53921      has_space=`$ECHO "$path" | $GREP " "`
53922      if test "x$has_space" != x; then
53923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53924$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53925        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53926      fi
53927
53928      # Use eval to expand a potential ~
53929      eval path="$path"
53930      if test ! -f "$path" && test ! -d "$path"; then
53931        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53932      fi
53933
53934      if test -d "$path"; then
53935        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53936      else
53937        dir="`$DIRNAME "$path"`"
53938        base="`$BASENAME "$path"`"
53939        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53940      fi
53941    fi
53942  fi
53943
53944
53945  # Only process if variable expands to non-empty
53946
53947  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53948    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53949
53950  # Input might be given as Windows format, start by converting to
53951  # unix format.
53952  path="$POTENTIAL_FREETYPE_LIB_PATH"
53953  new_path=`$CYGPATH -u "$path"`
53954
53955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53958  # "foo.exe" is OK but "foo" is an error.
53959  #
53960  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53961  # It is also a way to make sure we got the proper file name for the real test later on.
53962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53963  if test "x$test_shortpath" = x; then
53964    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53965$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53966    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53967  fi
53968
53969  # Call helper function which possibly converts this using DOS-style short mode.
53970  # If so, the updated path is stored in $new_path.
53971
53972  input_path="$new_path"
53973  # Check if we need to convert this using DOS-style short mode. If the path
53974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53975  # take no chances and rewrite it.
53976  # Note: m4 eats our [], so we need to use [ and ] instead.
53977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53978  if test "x$has_forbidden_chars" != x; then
53979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53983      # Going to short mode and back again did indeed matter. Since short mode is
53984      # case insensitive, let's make it lowercase to improve readability.
53985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53986      # Now convert it back to Unix-style (cygpath)
53987      input_path=`$CYGPATH -u "$shortmode_path"`
53988      new_path="$input_path"
53989    fi
53990  fi
53991
53992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53993  if test "x$test_cygdrive_prefix" = x; then
53994    # As a simple fix, exclude /usr/bin since it's not a real path.
53995    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53997      # a path prefixed by /cygdrive for fixpath to work.
53998      new_path="$CYGWIN_ROOT_PATH$input_path"
53999    fi
54000  fi
54001
54002
54003  if test "x$path" != "x$new_path"; then
54004    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54006$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54007  fi
54008
54009    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54010
54011  path="$POTENTIAL_FREETYPE_LIB_PATH"
54012  has_colon=`$ECHO $path | $GREP ^.:`
54013  new_path="$path"
54014  if test "x$has_colon" = x; then
54015    # Not in mixed or Windows style, start by that.
54016    new_path=`cmd //c echo $path`
54017  fi
54018
54019
54020  input_path="$new_path"
54021  # Check if we need to convert this using DOS-style short mode. If the path
54022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54023  # take no chances and rewrite it.
54024  # Note: m4 eats our [], so we need to use [ and ] instead.
54025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54026  if test "x$has_forbidden_chars" != x; then
54027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54029  fi
54030
54031
54032  windows_path="$new_path"
54033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54034    unix_path=`$CYGPATH -u "$windows_path"`
54035    new_path="$unix_path"
54036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54038    new_path="$unix_path"
54039  fi
54040
54041  if test "x$path" != "x$new_path"; then
54042    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54044$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54045  fi
54046
54047  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54048  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54049
54050    else
54051      # We're on a unix platform. Hooray! :)
54052      path="$POTENTIAL_FREETYPE_LIB_PATH"
54053      has_space=`$ECHO "$path" | $GREP " "`
54054      if test "x$has_space" != x; then
54055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54056$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54057        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54058      fi
54059
54060      # Use eval to expand a potential ~
54061      eval path="$path"
54062      if test ! -f "$path" && test ! -d "$path"; then
54063        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54064      fi
54065
54066      if test -d "$path"; then
54067        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54068      else
54069        dir="`$DIRNAME "$path"`"
54070        base="`$BASENAME "$path"`"
54071        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54072      fi
54073    fi
54074  fi
54075
54076
54077    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54079$as_echo_n "checking for freetype includes... " >&6; }
54080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54081$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54082    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54084$as_echo_n "checking for freetype libraries... " >&6; }
54085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54086$as_echo "$FREETYPE_LIB_PATH" >&6; }
54087  fi
54088
54089          fi
54090          if test "x$FOUND_FREETYPE" != xyes; then
54091            FREETYPE_BASE_DIR="$HOME/freetype"
54092
54093  windows_path="$FREETYPE_BASE_DIR"
54094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54095    unix_path=`$CYGPATH -u "$windows_path"`
54096    FREETYPE_BASE_DIR="$unix_path"
54097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54099    FREETYPE_BASE_DIR="$unix_path"
54100  fi
54101
54102            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54103
54104  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54105  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54106  METHOD="well-known location"
54107
54108  # Let's start with an optimistic view of the world :-)
54109  FOUND_FREETYPE=yes
54110
54111  # First look for the canonical freetype main include file ft2build.h.
54112  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54113    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54114    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54115    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54116      # Fail.
54117      FOUND_FREETYPE=no
54118    fi
54119  fi
54120
54121  if test "x$FOUND_FREETYPE" = xyes; then
54122    # Include file found, let's continue the sanity check.
54123    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54124$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54125
54126    # Reset to default value
54127    FREETYPE_BASE_NAME=freetype
54128    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54129    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54130      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54131          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54132        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54133        # for the .6 version explicitly.
54134        FREETYPE_BASE_NAME=freetype.6
54135        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54136        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54137$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54138      else
54139        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54140$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54141        FOUND_FREETYPE=no
54142      fi
54143    else
54144      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54145        # On Windows, we will need both .lib and .dll file.
54146        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54147          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54148$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54149          FOUND_FREETYPE=no
54150        fi
54151      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54152          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54153        # Found lib in isa dir, use that instead.
54154        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54155        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54156$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54157      fi
54158    fi
54159  fi
54160
54161  if test "x$FOUND_FREETYPE" = xyes; then
54162
54163  # Only process if variable expands to non-empty
54164
54165  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54166    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54167
54168  # Input might be given as Windows format, start by converting to
54169  # unix format.
54170  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54171  new_path=`$CYGPATH -u "$path"`
54172
54173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54176  # "foo.exe" is OK but "foo" is an error.
54177  #
54178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54179  # It is also a way to make sure we got the proper file name for the real test later on.
54180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54181  if test "x$test_shortpath" = x; then
54182    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54183$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54184    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54185  fi
54186
54187  # Call helper function which possibly converts this using DOS-style short mode.
54188  # If so, the updated path is stored in $new_path.
54189
54190  input_path="$new_path"
54191  # Check if we need to convert this using DOS-style short mode. If the path
54192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54193  # take no chances and rewrite it.
54194  # Note: m4 eats our [], so we need to use [ and ] instead.
54195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54196  if test "x$has_forbidden_chars" != x; then
54197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54201      # Going to short mode and back again did indeed matter. Since short mode is
54202      # case insensitive, let's make it lowercase to improve readability.
54203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54204      # Now convert it back to Unix-style (cygpath)
54205      input_path=`$CYGPATH -u "$shortmode_path"`
54206      new_path="$input_path"
54207    fi
54208  fi
54209
54210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54211  if test "x$test_cygdrive_prefix" = x; then
54212    # As a simple fix, exclude /usr/bin since it's not a real path.
54213    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54215      # a path prefixed by /cygdrive for fixpath to work.
54216      new_path="$CYGWIN_ROOT_PATH$input_path"
54217    fi
54218  fi
54219
54220
54221  if test "x$path" != "x$new_path"; then
54222    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54224$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54225  fi
54226
54227    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54228
54229  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54230  has_colon=`$ECHO $path | $GREP ^.:`
54231  new_path="$path"
54232  if test "x$has_colon" = x; then
54233    # Not in mixed or Windows style, start by that.
54234    new_path=`cmd //c echo $path`
54235  fi
54236
54237
54238  input_path="$new_path"
54239  # Check if we need to convert this using DOS-style short mode. If the path
54240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54241  # take no chances and rewrite it.
54242  # Note: m4 eats our [], so we need to use [ and ] instead.
54243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54244  if test "x$has_forbidden_chars" != x; then
54245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54247  fi
54248
54249
54250  windows_path="$new_path"
54251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54252    unix_path=`$CYGPATH -u "$windows_path"`
54253    new_path="$unix_path"
54254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54256    new_path="$unix_path"
54257  fi
54258
54259  if test "x$path" != "x$new_path"; then
54260    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54262$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54263  fi
54264
54265  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54266  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54267
54268    else
54269      # We're on a unix platform. Hooray! :)
54270      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54271      has_space=`$ECHO "$path" | $GREP " "`
54272      if test "x$has_space" != x; then
54273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54274$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54275        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54276      fi
54277
54278      # Use eval to expand a potential ~
54279      eval path="$path"
54280      if test ! -f "$path" && test ! -d "$path"; then
54281        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54282      fi
54283
54284      if test -d "$path"; then
54285        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54286      else
54287        dir="`$DIRNAME "$path"`"
54288        base="`$BASENAME "$path"`"
54289        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54290      fi
54291    fi
54292  fi
54293
54294
54295  # Only process if variable expands to non-empty
54296
54297  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54299
54300  # Input might be given as Windows format, start by converting to
54301  # unix format.
54302  path="$POTENTIAL_FREETYPE_LIB_PATH"
54303  new_path=`$CYGPATH -u "$path"`
54304
54305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54308  # "foo.exe" is OK but "foo" is an error.
54309  #
54310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54311  # It is also a way to make sure we got the proper file name for the real test later on.
54312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54313  if test "x$test_shortpath" = x; then
54314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54315$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54316    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54317  fi
54318
54319  # Call helper function which possibly converts this using DOS-style short mode.
54320  # If so, the updated path is stored in $new_path.
54321
54322  input_path="$new_path"
54323  # Check if we need to convert this using DOS-style short mode. If the path
54324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54325  # take no chances and rewrite it.
54326  # Note: m4 eats our [], so we need to use [ and ] instead.
54327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54328  if test "x$has_forbidden_chars" != x; then
54329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54333      # Going to short mode and back again did indeed matter. Since short mode is
54334      # case insensitive, let's make it lowercase to improve readability.
54335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54336      # Now convert it back to Unix-style (cygpath)
54337      input_path=`$CYGPATH -u "$shortmode_path"`
54338      new_path="$input_path"
54339    fi
54340  fi
54341
54342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54343  if test "x$test_cygdrive_prefix" = x; then
54344    # As a simple fix, exclude /usr/bin since it's not a real path.
54345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54347      # a path prefixed by /cygdrive for fixpath to work.
54348      new_path="$CYGWIN_ROOT_PATH$input_path"
54349    fi
54350  fi
54351
54352
54353  if test "x$path" != "x$new_path"; then
54354    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54356$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54357  fi
54358
54359    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54360
54361  path="$POTENTIAL_FREETYPE_LIB_PATH"
54362  has_colon=`$ECHO $path | $GREP ^.:`
54363  new_path="$path"
54364  if test "x$has_colon" = x; then
54365    # Not in mixed or Windows style, start by that.
54366    new_path=`cmd //c echo $path`
54367  fi
54368
54369
54370  input_path="$new_path"
54371  # Check if we need to convert this using DOS-style short mode. If the path
54372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54373  # take no chances and rewrite it.
54374  # Note: m4 eats our [], so we need to use [ and ] instead.
54375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54376  if test "x$has_forbidden_chars" != x; then
54377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54379  fi
54380
54381
54382  windows_path="$new_path"
54383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54384    unix_path=`$CYGPATH -u "$windows_path"`
54385    new_path="$unix_path"
54386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54388    new_path="$unix_path"
54389  fi
54390
54391  if test "x$path" != "x$new_path"; then
54392    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54394$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54395  fi
54396
54397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54399
54400    else
54401      # We're on a unix platform. Hooray! :)
54402      path="$POTENTIAL_FREETYPE_LIB_PATH"
54403      has_space=`$ECHO "$path" | $GREP " "`
54404      if test "x$has_space" != x; then
54405        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54406$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54407        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54408      fi
54409
54410      # Use eval to expand a potential ~
54411      eval path="$path"
54412      if test ! -f "$path" && test ! -d "$path"; then
54413        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54414      fi
54415
54416      if test -d "$path"; then
54417        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54418      else
54419        dir="`$DIRNAME "$path"`"
54420        base="`$BASENAME "$path"`"
54421        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54422      fi
54423    fi
54424  fi
54425
54426
54427    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54429$as_echo_n "checking for freetype includes... " >&6; }
54430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54431$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54432    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54434$as_echo_n "checking for freetype libraries... " >&6; }
54435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54436$as_echo "$FREETYPE_LIB_PATH" >&6; }
54437  fi
54438
54439            else
54440
54441  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54442  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54443  METHOD="well-known location"
54444
54445  # Let's start with an optimistic view of the world :-)
54446  FOUND_FREETYPE=yes
54447
54448  # First look for the canonical freetype main include file ft2build.h.
54449  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54450    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54451    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54452    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54453      # Fail.
54454      FOUND_FREETYPE=no
54455    fi
54456  fi
54457
54458  if test "x$FOUND_FREETYPE" = xyes; then
54459    # Include file found, let's continue the sanity check.
54460    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54461$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54462
54463    # Reset to default value
54464    FREETYPE_BASE_NAME=freetype
54465    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54466    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54467      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54468          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54469        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54470        # for the .6 version explicitly.
54471        FREETYPE_BASE_NAME=freetype.6
54472        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54473        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54474$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54475      else
54476        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54477$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54478        FOUND_FREETYPE=no
54479      fi
54480    else
54481      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54482        # On Windows, we will need both .lib and .dll file.
54483        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54484          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54485$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54486          FOUND_FREETYPE=no
54487        fi
54488      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54489          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54490        # Found lib in isa dir, use that instead.
54491        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54492        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54493$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54494      fi
54495    fi
54496  fi
54497
54498  if test "x$FOUND_FREETYPE" = xyes; then
54499
54500  # Only process if variable expands to non-empty
54501
54502  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != 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="$POTENTIAL_FREETYPE_INCLUDE_PATH"
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 POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54520$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54521    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$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    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54561$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54562  fi
54563
54564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54565
54566  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
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    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54599$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH 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="$POTENTIAL_FREETYPE_INCLUDE_PATH"
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 POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54611$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, 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 POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54619      fi
54620
54621      if test -d "$path"; then
54622        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54623      else
54624        dir="`$DIRNAME "$path"`"
54625        base="`$BASENAME "$path"`"
54626        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54627      fi
54628    fi
54629  fi
54630
54631
54632  # Only process if variable expands to non-empty
54633
54634  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54636
54637  # Input might be given as Windows format, start by converting to
54638  # unix format.
54639  path="$POTENTIAL_FREETYPE_LIB_PATH"
54640  new_path=`$CYGPATH -u "$path"`
54641
54642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54645  # "foo.exe" is OK but "foo" is an error.
54646  #
54647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54648  # It is also a way to make sure we got the proper file name for the real test later on.
54649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54650  if test "x$test_shortpath" = x; then
54651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54652$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54653    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54654  fi
54655
54656  # Call helper function which possibly converts this using DOS-style short mode.
54657  # If so, the updated path is stored in $new_path.
54658
54659  input_path="$new_path"
54660  # Check if we need to convert this using DOS-style short mode. If the path
54661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54662  # take no chances and rewrite it.
54663  # Note: m4 eats our [], so we need to use [ and ] instead.
54664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54665  if test "x$has_forbidden_chars" != x; then
54666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54670      # Going to short mode and back again did indeed matter. Since short mode is
54671      # case insensitive, let's make it lowercase to improve readability.
54672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54673      # Now convert it back to Unix-style (cygpath)
54674      input_path=`$CYGPATH -u "$shortmode_path"`
54675      new_path="$input_path"
54676    fi
54677  fi
54678
54679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54680  if test "x$test_cygdrive_prefix" = x; then
54681    # As a simple fix, exclude /usr/bin since it's not a real path.
54682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54684      # a path prefixed by /cygdrive for fixpath to work.
54685      new_path="$CYGWIN_ROOT_PATH$input_path"
54686    fi
54687  fi
54688
54689
54690  if test "x$path" != "x$new_path"; then
54691    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54693$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54694  fi
54695
54696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54697
54698  path="$POTENTIAL_FREETYPE_LIB_PATH"
54699  has_colon=`$ECHO $path | $GREP ^.:`
54700  new_path="$path"
54701  if test "x$has_colon" = x; then
54702    # Not in mixed or Windows style, start by that.
54703    new_path=`cmd //c echo $path`
54704  fi
54705
54706
54707  input_path="$new_path"
54708  # Check if we need to convert this using DOS-style short mode. If the path
54709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54710  # take no chances and rewrite it.
54711  # Note: m4 eats our [], so we need to use [ and ] instead.
54712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54713  if test "x$has_forbidden_chars" != x; then
54714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54716  fi
54717
54718
54719  windows_path="$new_path"
54720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54721    unix_path=`$CYGPATH -u "$windows_path"`
54722    new_path="$unix_path"
54723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54725    new_path="$unix_path"
54726  fi
54727
54728  if test "x$path" != "x$new_path"; then
54729    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54731$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54732  fi
54733
54734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54736
54737    else
54738      # We're on a unix platform. Hooray! :)
54739      path="$POTENTIAL_FREETYPE_LIB_PATH"
54740      has_space=`$ECHO "$path" | $GREP " "`
54741      if test "x$has_space" != x; then
54742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54745      fi
54746
54747      # Use eval to expand a potential ~
54748      eval path="$path"
54749      if test ! -f "$path" && test ! -d "$path"; then
54750        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54751      fi
54752
54753      if test -d "$path"; then
54754        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54755      else
54756        dir="`$DIRNAME "$path"`"
54757        base="`$BASENAME "$path"`"
54758        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54759      fi
54760    fi
54761  fi
54762
54763
54764    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54766$as_echo_n "checking for freetype includes... " >&6; }
54767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54768$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54769    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54771$as_echo_n "checking for freetype libraries... " >&6; }
54772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54773$as_echo "$FREETYPE_LIB_PATH" >&6; }
54774  fi
54775
54776            fi
54777            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
54778                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
54779              # Source is available, as a last resort try to build freetype in default location
54780
54781  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
54782  BUILD_FREETYPE=yes
54783
54784  # Check if the freetype sources are acessible..
54785  if ! test -d $FREETYPE_SRC_PATH; then
54786    { $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
54787$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
54788    BUILD_FREETYPE=no
54789  fi
54790  # ..and contain a vc2010 project file
54791  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
54792  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
54793    { $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
54794$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
54795    BUILD_FREETYPE=no
54796  fi
54797  # Now check if configure found a version of 'msbuild.exe'
54798  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
54799    { $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
54800$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;}
54801    BUILD_FREETYPE=no
54802  fi
54803
54804  # Ready to go..
54805  if test "x$BUILD_FREETYPE" = xyes; then
54806    # msbuild requires trailing slashes for output directories
54807    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
54808    freetype_lib_path_unix="$freetype_lib_path"
54809    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
54810
54811  unix_path="$vcxproj_path"
54812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54813    windows_path=`$CYGPATH -m "$unix_path"`
54814    vcxproj_path="$windows_path"
54815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54816    windows_path=`cmd //c echo $unix_path`
54817    vcxproj_path="$windows_path"
54818  fi
54819
54820
54821  unix_path="$freetype_lib_path"
54822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54823    windows_path=`$CYGPATH -m "$unix_path"`
54824    freetype_lib_path="$windows_path"
54825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54826    windows_path=`cmd //c echo $unix_path`
54827    freetype_lib_path="$windows_path"
54828  fi
54829
54830
54831  unix_path="$freetype_obj_path"
54832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54833    windows_path=`$CYGPATH -m "$unix_path"`
54834    freetype_obj_path="$windows_path"
54835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54836    windows_path=`cmd //c echo $unix_path`
54837    freetype_obj_path="$windows_path"
54838  fi
54839
54840    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54841      freetype_platform=x64
54842    else
54843      freetype_platform=win32
54844    fi
54845
54846    # The original freetype project file is for VS 2010 (i.e. 'v100'),
54847    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
54848    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
54849    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
54850    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
54851$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
54852
54853    # First we try to build the freetype.dll
54854    $ECHO -e "@echo off\n"\
54855        "$MSBUILD $vcxproj_path "\
54856        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54857        "/p:Configuration=\"Release Multithreaded\" "\
54858        "/p:Platform=$freetype_platform "\
54859        "/p:ConfigurationType=DynamicLibrary "\
54860        "/p:TargetName=freetype "\
54861        "/p:OutDir=\"$freetype_lib_path\" "\
54862        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
54863    cmd /c freetype.bat
54864
54865    if test -s "$freetype_lib_path_unix/freetype.dll"; then
54866      # If that succeeds we also build freetype.lib
54867      $ECHO -e "@echo off\n"\
54868          "$MSBUILD $vcxproj_path "\
54869          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54870          "/p:Configuration=\"Release Multithreaded\" "\
54871          "/p:Platform=$freetype_platform "\
54872          "/p:ConfigurationType=StaticLibrary "\
54873          "/p:TargetName=freetype "\
54874          "/p:OutDir=\"$freetype_lib_path\" "\
54875          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
54876      cmd /c freetype.bat
54877
54878      if test -s "$freetype_lib_path_unix/freetype.lib"; then
54879        # Once we build both, lib and dll, set freetype lib and include path appropriately
54880        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
54881        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
54882        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
54883$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
54884      else
54885        BUILD_FREETYPE=no
54886      fi
54887    else
54888      BUILD_FREETYPE=no
54889    fi
54890  fi
54891
54892              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54893
54894  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54895  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54896  METHOD="well-known location"
54897
54898  # Let's start with an optimistic view of the world :-)
54899  FOUND_FREETYPE=yes
54900
54901  # First look for the canonical freetype main include file ft2build.h.
54902  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54903    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54904    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54905    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54906      # Fail.
54907      FOUND_FREETYPE=no
54908    fi
54909  fi
54910
54911  if test "x$FOUND_FREETYPE" = xyes; then
54912    # Include file found, let's continue the sanity check.
54913    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54914$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54915
54916    # Reset to default value
54917    FREETYPE_BASE_NAME=freetype
54918    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54919    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54920      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54921          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54922        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54923        # for the .6 version explicitly.
54924        FREETYPE_BASE_NAME=freetype.6
54925        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54926        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54927$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54928      else
54929        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54930$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54931        FOUND_FREETYPE=no
54932      fi
54933    else
54934      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54935        # On Windows, we will need both .lib and .dll file.
54936        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54937          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54938$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54939          FOUND_FREETYPE=no
54940        fi
54941      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54942          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54943        # Found lib in isa dir, use that instead.
54944        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54945        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54946$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54947      fi
54948    fi
54949  fi
54950
54951  if test "x$FOUND_FREETYPE" = xyes; then
54952
54953  # Only process if variable expands to non-empty
54954
54955  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54957
54958  # Input might be given as Windows format, start by converting to
54959  # unix format.
54960  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54961  new_path=`$CYGPATH -u "$path"`
54962
54963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54966  # "foo.exe" is OK but "foo" is an error.
54967  #
54968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54969  # It is also a way to make sure we got the proper file name for the real test later on.
54970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54971  if test "x$test_shortpath" = x; then
54972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54973$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54974    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54975  fi
54976
54977  # Call helper function which possibly converts this using DOS-style short mode.
54978  # If so, the updated path is stored in $new_path.
54979
54980  input_path="$new_path"
54981  # Check if we need to convert this using DOS-style short mode. If the path
54982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54983  # take no chances and rewrite it.
54984  # Note: m4 eats our [], so we need to use [ and ] instead.
54985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54986  if test "x$has_forbidden_chars" != x; then
54987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54991      # Going to short mode and back again did indeed matter. Since short mode is
54992      # case insensitive, let's make it lowercase to improve readability.
54993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54994      # Now convert it back to Unix-style (cygpath)
54995      input_path=`$CYGPATH -u "$shortmode_path"`
54996      new_path="$input_path"
54997    fi
54998  fi
54999
55000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55001  if test "x$test_cygdrive_prefix" = x; then
55002    # As a simple fix, exclude /usr/bin since it's not a real path.
55003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55005      # a path prefixed by /cygdrive for fixpath to work.
55006      new_path="$CYGWIN_ROOT_PATH$input_path"
55007    fi
55008  fi
55009
55010
55011  if test "x$path" != "x$new_path"; then
55012    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55014$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55015  fi
55016
55017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55018
55019  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55020  has_colon=`$ECHO $path | $GREP ^.:`
55021  new_path="$path"
55022  if test "x$has_colon" = x; then
55023    # Not in mixed or Windows style, start by that.
55024    new_path=`cmd //c echo $path`
55025  fi
55026
55027
55028  input_path="$new_path"
55029  # Check if we need to convert this using DOS-style short mode. If the path
55030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55031  # take no chances and rewrite it.
55032  # Note: m4 eats our [], so we need to use [ and ] instead.
55033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55034  if test "x$has_forbidden_chars" != x; then
55035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55037  fi
55038
55039
55040  windows_path="$new_path"
55041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55042    unix_path=`$CYGPATH -u "$windows_path"`
55043    new_path="$unix_path"
55044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55046    new_path="$unix_path"
55047  fi
55048
55049  if test "x$path" != "x$new_path"; then
55050    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55052$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55053  fi
55054
55055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55057
55058    else
55059      # We're on a unix platform. Hooray! :)
55060      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55061      has_space=`$ECHO "$path" | $GREP " "`
55062      if test "x$has_space" != x; then
55063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55064$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55066      fi
55067
55068      # Use eval to expand a potential ~
55069      eval path="$path"
55070      if test ! -f "$path" && test ! -d "$path"; then
55071        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55072      fi
55073
55074      if test -d "$path"; then
55075        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55076      else
55077        dir="`$DIRNAME "$path"`"
55078        base="`$BASENAME "$path"`"
55079        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55080      fi
55081    fi
55082  fi
55083
55084
55085  # Only process if variable expands to non-empty
55086
55087  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55089
55090  # Input might be given as Windows format, start by converting to
55091  # unix format.
55092  path="$POTENTIAL_FREETYPE_LIB_PATH"
55093  new_path=`$CYGPATH -u "$path"`
55094
55095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55098  # "foo.exe" is OK but "foo" is an error.
55099  #
55100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55101  # It is also a way to make sure we got the proper file name for the real test later on.
55102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55103  if test "x$test_shortpath" = x; then
55104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55105$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55106    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55107  fi
55108
55109  # Call helper function which possibly converts this using DOS-style short mode.
55110  # If so, the updated path is stored in $new_path.
55111
55112  input_path="$new_path"
55113  # Check if we need to convert this using DOS-style short mode. If the path
55114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55115  # take no chances and rewrite it.
55116  # Note: m4 eats our [], so we need to use [ and ] instead.
55117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55118  if test "x$has_forbidden_chars" != x; then
55119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55123      # Going to short mode and back again did indeed matter. Since short mode is
55124      # case insensitive, let's make it lowercase to improve readability.
55125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55126      # Now convert it back to Unix-style (cygpath)
55127      input_path=`$CYGPATH -u "$shortmode_path"`
55128      new_path="$input_path"
55129    fi
55130  fi
55131
55132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55133  if test "x$test_cygdrive_prefix" = x; then
55134    # As a simple fix, exclude /usr/bin since it's not a real path.
55135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55137      # a path prefixed by /cygdrive for fixpath to work.
55138      new_path="$CYGWIN_ROOT_PATH$input_path"
55139    fi
55140  fi
55141
55142
55143  if test "x$path" != "x$new_path"; then
55144    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55146$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55147  fi
55148
55149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55150
55151  path="$POTENTIAL_FREETYPE_LIB_PATH"
55152  has_colon=`$ECHO $path | $GREP ^.:`
55153  new_path="$path"
55154  if test "x$has_colon" = x; then
55155    # Not in mixed or Windows style, start by that.
55156    new_path=`cmd //c echo $path`
55157  fi
55158
55159
55160  input_path="$new_path"
55161  # Check if we need to convert this using DOS-style short mode. If the path
55162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55163  # take no chances and rewrite it.
55164  # Note: m4 eats our [], so we need to use [ and ] instead.
55165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55166  if test "x$has_forbidden_chars" != x; then
55167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55169  fi
55170
55171
55172  windows_path="$new_path"
55173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55174    unix_path=`$CYGPATH -u "$windows_path"`
55175    new_path="$unix_path"
55176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55178    new_path="$unix_path"
55179  fi
55180
55181  if test "x$path" != "x$new_path"; then
55182    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55184$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55185  fi
55186
55187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55189
55190    else
55191      # We're on a unix platform. Hooray! :)
55192      path="$POTENTIAL_FREETYPE_LIB_PATH"
55193      has_space=`$ECHO "$path" | $GREP " "`
55194      if test "x$has_space" != x; then
55195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55196$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55197        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55198      fi
55199
55200      # Use eval to expand a potential ~
55201      eval path="$path"
55202      if test ! -f "$path" && test ! -d "$path"; then
55203        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55204      fi
55205
55206      if test -d "$path"; then
55207        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55208      else
55209        dir="`$DIRNAME "$path"`"
55210        base="`$BASENAME "$path"`"
55211        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55212      fi
55213    fi
55214  fi
55215
55216
55217    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55219$as_echo_n "checking for freetype includes... " >&6; }
55220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55221$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55222    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55223    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55224$as_echo_n "checking for freetype libraries... " >&6; }
55225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55226$as_echo "$FREETYPE_LIB_PATH" >&6; }
55227  fi
55228
55229              else
55230
55231  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55232  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
55233  METHOD="well-known location"
55234
55235  # Let's start with an optimistic view of the world :-)
55236  FOUND_FREETYPE=yes
55237
55238  # First look for the canonical freetype main include file ft2build.h.
55239  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55240    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55241    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55242    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55243      # Fail.
55244      FOUND_FREETYPE=no
55245    fi
55246  fi
55247
55248  if test "x$FOUND_FREETYPE" = xyes; then
55249    # Include file found, let's continue the sanity check.
55250    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55251$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55252
55253    # Reset to default value
55254    FREETYPE_BASE_NAME=freetype
55255    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55256    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55257      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55258          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55259        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55260        # for the .6 version explicitly.
55261        FREETYPE_BASE_NAME=freetype.6
55262        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55263        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55264$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55265      else
55266        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55267$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55268        FOUND_FREETYPE=no
55269      fi
55270    else
55271      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55272        # On Windows, we will need both .lib and .dll file.
55273        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55274          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55275$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55276          FOUND_FREETYPE=no
55277        fi
55278      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55279          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55280        # Found lib in isa dir, use that instead.
55281        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55282        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55283$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55284      fi
55285    fi
55286  fi
55287
55288  if test "x$FOUND_FREETYPE" = xyes; then
55289
55290  # Only process if variable expands to non-empty
55291
55292  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55294
55295  # Input might be given as Windows format, start by converting to
55296  # unix format.
55297  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55298  new_path=`$CYGPATH -u "$path"`
55299
55300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55303  # "foo.exe" is OK but "foo" is an error.
55304  #
55305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55306  # It is also a way to make sure we got the proper file name for the real test later on.
55307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55308  if test "x$test_shortpath" = x; then
55309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55310$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55311    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55312  fi
55313
55314  # Call helper function which possibly converts this using DOS-style short mode.
55315  # If so, the updated path is stored in $new_path.
55316
55317  input_path="$new_path"
55318  # Check if we need to convert this using DOS-style short mode. If the path
55319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55320  # take no chances and rewrite it.
55321  # Note: m4 eats our [], so we need to use [ and ] instead.
55322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55323  if test "x$has_forbidden_chars" != x; then
55324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55328      # Going to short mode and back again did indeed matter. Since short mode is
55329      # case insensitive, let's make it lowercase to improve readability.
55330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55331      # Now convert it back to Unix-style (cygpath)
55332      input_path=`$CYGPATH -u "$shortmode_path"`
55333      new_path="$input_path"
55334    fi
55335  fi
55336
55337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55338  if test "x$test_cygdrive_prefix" = x; then
55339    # As a simple fix, exclude /usr/bin since it's not a real path.
55340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55342      # a path prefixed by /cygdrive for fixpath to work.
55343      new_path="$CYGWIN_ROOT_PATH$input_path"
55344    fi
55345  fi
55346
55347
55348  if test "x$path" != "x$new_path"; then
55349    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55351$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55352  fi
55353
55354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55355
55356  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55357  has_colon=`$ECHO $path | $GREP ^.:`
55358  new_path="$path"
55359  if test "x$has_colon" = x; then
55360    # Not in mixed or Windows style, start by that.
55361    new_path=`cmd //c echo $path`
55362  fi
55363
55364
55365  input_path="$new_path"
55366  # Check if we need to convert this using DOS-style short mode. If the path
55367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55368  # take no chances and rewrite it.
55369  # Note: m4 eats our [], so we need to use [ and ] instead.
55370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55371  if test "x$has_forbidden_chars" != x; then
55372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55374  fi
55375
55376
55377  windows_path="$new_path"
55378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55379    unix_path=`$CYGPATH -u "$windows_path"`
55380    new_path="$unix_path"
55381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55383    new_path="$unix_path"
55384  fi
55385
55386  if test "x$path" != "x$new_path"; then
55387    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55389$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55390  fi
55391
55392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55394
55395    else
55396      # We're on a unix platform. Hooray! :)
55397      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55398      has_space=`$ECHO "$path" | $GREP " "`
55399      if test "x$has_space" != x; then
55400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55401$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55403      fi
55404
55405      # Use eval to expand a potential ~
55406      eval path="$path"
55407      if test ! -f "$path" && test ! -d "$path"; then
55408        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55409      fi
55410
55411      if test -d "$path"; then
55412        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55413      else
55414        dir="`$DIRNAME "$path"`"
55415        base="`$BASENAME "$path"`"
55416        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55417      fi
55418    fi
55419  fi
55420
55421
55422  # Only process if variable expands to non-empty
55423
55424  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55426
55427  # Input might be given as Windows format, start by converting to
55428  # unix format.
55429  path="$POTENTIAL_FREETYPE_LIB_PATH"
55430  new_path=`$CYGPATH -u "$path"`
55431
55432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55435  # "foo.exe" is OK but "foo" is an error.
55436  #
55437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55438  # It is also a way to make sure we got the proper file name for the real test later on.
55439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55440  if test "x$test_shortpath" = x; then
55441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55442$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55443    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55444  fi
55445
55446  # Call helper function which possibly converts this using DOS-style short mode.
55447  # If so, the updated path is stored in $new_path.
55448
55449  input_path="$new_path"
55450  # Check if we need to convert this using DOS-style short mode. If the path
55451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55452  # take no chances and rewrite it.
55453  # Note: m4 eats our [], so we need to use [ and ] instead.
55454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55455  if test "x$has_forbidden_chars" != x; then
55456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55460      # Going to short mode and back again did indeed matter. Since short mode is
55461      # case insensitive, let's make it lowercase to improve readability.
55462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55463      # Now convert it back to Unix-style (cygpath)
55464      input_path=`$CYGPATH -u "$shortmode_path"`
55465      new_path="$input_path"
55466    fi
55467  fi
55468
55469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55470  if test "x$test_cygdrive_prefix" = x; then
55471    # As a simple fix, exclude /usr/bin since it's not a real path.
55472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55474      # a path prefixed by /cygdrive for fixpath to work.
55475      new_path="$CYGWIN_ROOT_PATH$input_path"
55476    fi
55477  fi
55478
55479
55480  if test "x$path" != "x$new_path"; then
55481    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55483$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55484  fi
55485
55486    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55487
55488  path="$POTENTIAL_FREETYPE_LIB_PATH"
55489  has_colon=`$ECHO $path | $GREP ^.:`
55490  new_path="$path"
55491  if test "x$has_colon" = x; then
55492    # Not in mixed or Windows style, start by that.
55493    new_path=`cmd //c echo $path`
55494  fi
55495
55496
55497  input_path="$new_path"
55498  # Check if we need to convert this using DOS-style short mode. If the path
55499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55500  # take no chances and rewrite it.
55501  # Note: m4 eats our [], so we need to use [ and ] instead.
55502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55503  if test "x$has_forbidden_chars" != x; then
55504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55506  fi
55507
55508
55509  windows_path="$new_path"
55510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55511    unix_path=`$CYGPATH -u "$windows_path"`
55512    new_path="$unix_path"
55513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55515    new_path="$unix_path"
55516  fi
55517
55518  if test "x$path" != "x$new_path"; then
55519    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55521$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55522  fi
55523
55524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55526
55527    else
55528      # We're on a unix platform. Hooray! :)
55529      path="$POTENTIAL_FREETYPE_LIB_PATH"
55530      has_space=`$ECHO "$path" | $GREP " "`
55531      if test "x$has_space" != x; then
55532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55533$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55534        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55535      fi
55536
55537      # Use eval to expand a potential ~
55538      eval path="$path"
55539      if test ! -f "$path" && test ! -d "$path"; then
55540        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55541      fi
55542
55543      if test -d "$path"; then
55544        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55545      else
55546        dir="`$DIRNAME "$path"`"
55547        base="`$BASENAME "$path"`"
55548        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55549      fi
55550    fi
55551  fi
55552
55553
55554    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55556$as_echo_n "checking for freetype includes... " >&6; }
55557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55558$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55559    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55561$as_echo_n "checking for freetype libraries... " >&6; }
55562    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55563$as_echo "$FREETYPE_LIB_PATH" >&6; }
55564  fi
55565
55566              fi
55567            fi
55568          fi
55569        else
55570          FREETYPE_BASE_DIR="$SYSROOT/usr"
55571
55572  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55573  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55574  METHOD="well-known location"
55575
55576  # Let's start with an optimistic view of the world :-)
55577  FOUND_FREETYPE=yes
55578
55579  # First look for the canonical freetype main include file ft2build.h.
55580  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55581    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55582    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55583    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55584      # Fail.
55585      FOUND_FREETYPE=no
55586    fi
55587  fi
55588
55589  if test "x$FOUND_FREETYPE" = xyes; then
55590    # Include file found, let's continue the sanity check.
55591    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55592$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55593
55594    # Reset to default value
55595    FREETYPE_BASE_NAME=freetype
55596    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55597    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55598      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55599          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55600        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55601        # for the .6 version explicitly.
55602        FREETYPE_BASE_NAME=freetype.6
55603        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55604        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55605$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55606      else
55607        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55608$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55609        FOUND_FREETYPE=no
55610      fi
55611    else
55612      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55613        # On Windows, we will need both .lib and .dll file.
55614        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55615          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55616$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55617          FOUND_FREETYPE=no
55618        fi
55619      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55620          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55621        # Found lib in isa dir, use that instead.
55622        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55623        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55624$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55625      fi
55626    fi
55627  fi
55628
55629  if test "x$FOUND_FREETYPE" = xyes; then
55630
55631  # Only process if variable expands to non-empty
55632
55633  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55634    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55635
55636  # Input might be given as Windows format, start by converting to
55637  # unix format.
55638  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55639  new_path=`$CYGPATH -u "$path"`
55640
55641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55644  # "foo.exe" is OK but "foo" is an error.
55645  #
55646  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55647  # It is also a way to make sure we got the proper file name for the real test later on.
55648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55649  if test "x$test_shortpath" = x; then
55650    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55651$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55652    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55653  fi
55654
55655  # Call helper function which possibly converts this using DOS-style short mode.
55656  # If so, the updated path is stored in $new_path.
55657
55658  input_path="$new_path"
55659  # Check if we need to convert this using DOS-style short mode. If the path
55660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55661  # take no chances and rewrite it.
55662  # Note: m4 eats our [], so we need to use [ and ] instead.
55663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55664  if test "x$has_forbidden_chars" != x; then
55665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55669      # Going to short mode and back again did indeed matter. Since short mode is
55670      # case insensitive, let's make it lowercase to improve readability.
55671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55672      # Now convert it back to Unix-style (cygpath)
55673      input_path=`$CYGPATH -u "$shortmode_path"`
55674      new_path="$input_path"
55675    fi
55676  fi
55677
55678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55679  if test "x$test_cygdrive_prefix" = x; then
55680    # As a simple fix, exclude /usr/bin since it's not a real path.
55681    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55683      # a path prefixed by /cygdrive for fixpath to work.
55684      new_path="$CYGWIN_ROOT_PATH$input_path"
55685    fi
55686  fi
55687
55688
55689  if test "x$path" != "x$new_path"; then
55690    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55692$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55693  fi
55694
55695    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55696
55697  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55698  has_colon=`$ECHO $path | $GREP ^.:`
55699  new_path="$path"
55700  if test "x$has_colon" = x; then
55701    # Not in mixed or Windows style, start by that.
55702    new_path=`cmd //c echo $path`
55703  fi
55704
55705
55706  input_path="$new_path"
55707  # Check if we need to convert this using DOS-style short mode. If the path
55708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55709  # take no chances and rewrite it.
55710  # Note: m4 eats our [], so we need to use [ and ] instead.
55711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55712  if test "x$has_forbidden_chars" != x; then
55713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55715  fi
55716
55717
55718  windows_path="$new_path"
55719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55720    unix_path=`$CYGPATH -u "$windows_path"`
55721    new_path="$unix_path"
55722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55724    new_path="$unix_path"
55725  fi
55726
55727  if test "x$path" != "x$new_path"; then
55728    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55730$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55731  fi
55732
55733  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55734  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55735
55736    else
55737      # We're on a unix platform. Hooray! :)
55738      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55739      has_space=`$ECHO "$path" | $GREP " "`
55740      if test "x$has_space" != x; then
55741        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55742$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55743        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55744      fi
55745
55746      # Use eval to expand a potential ~
55747      eval path="$path"
55748      if test ! -f "$path" && test ! -d "$path"; then
55749        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55750      fi
55751
55752      if test -d "$path"; then
55753        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55754      else
55755        dir="`$DIRNAME "$path"`"
55756        base="`$BASENAME "$path"`"
55757        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55758      fi
55759    fi
55760  fi
55761
55762
55763  # Only process if variable expands to non-empty
55764
55765  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55767
55768  # Input might be given as Windows format, start by converting to
55769  # unix format.
55770  path="$POTENTIAL_FREETYPE_LIB_PATH"
55771  new_path=`$CYGPATH -u "$path"`
55772
55773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55776  # "foo.exe" is OK but "foo" is an error.
55777  #
55778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55779  # It is also a way to make sure we got the proper file name for the real test later on.
55780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55781  if test "x$test_shortpath" = x; then
55782    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55783$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55784    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55785  fi
55786
55787  # Call helper function which possibly converts this using DOS-style short mode.
55788  # If so, the updated path is stored in $new_path.
55789
55790  input_path="$new_path"
55791  # Check if we need to convert this using DOS-style short mode. If the path
55792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55793  # take no chances and rewrite it.
55794  # Note: m4 eats our [], so we need to use [ and ] instead.
55795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55796  if test "x$has_forbidden_chars" != x; then
55797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55801      # Going to short mode and back again did indeed matter. Since short mode is
55802      # case insensitive, let's make it lowercase to improve readability.
55803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55804      # Now convert it back to Unix-style (cygpath)
55805      input_path=`$CYGPATH -u "$shortmode_path"`
55806      new_path="$input_path"
55807    fi
55808  fi
55809
55810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55811  if test "x$test_cygdrive_prefix" = x; then
55812    # As a simple fix, exclude /usr/bin since it's not a real path.
55813    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55815      # a path prefixed by /cygdrive for fixpath to work.
55816      new_path="$CYGWIN_ROOT_PATH$input_path"
55817    fi
55818  fi
55819
55820
55821  if test "x$path" != "x$new_path"; then
55822    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55824$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55825  fi
55826
55827    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55828
55829  path="$POTENTIAL_FREETYPE_LIB_PATH"
55830  has_colon=`$ECHO $path | $GREP ^.:`
55831  new_path="$path"
55832  if test "x$has_colon" = x; then
55833    # Not in mixed or Windows style, start by that.
55834    new_path=`cmd //c echo $path`
55835  fi
55836
55837
55838  input_path="$new_path"
55839  # Check if we need to convert this using DOS-style short mode. If the path
55840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55841  # take no chances and rewrite it.
55842  # Note: m4 eats our [], so we need to use [ and ] instead.
55843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55844  if test "x$has_forbidden_chars" != x; then
55845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55847  fi
55848
55849
55850  windows_path="$new_path"
55851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55852    unix_path=`$CYGPATH -u "$windows_path"`
55853    new_path="$unix_path"
55854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55856    new_path="$unix_path"
55857  fi
55858
55859  if test "x$path" != "x$new_path"; then
55860    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55862$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55863  fi
55864
55865  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55866  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55867
55868    else
55869      # We're on a unix platform. Hooray! :)
55870      path="$POTENTIAL_FREETYPE_LIB_PATH"
55871      has_space=`$ECHO "$path" | $GREP " "`
55872      if test "x$has_space" != x; then
55873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55874$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55875        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55876      fi
55877
55878      # Use eval to expand a potential ~
55879      eval path="$path"
55880      if test ! -f "$path" && test ! -d "$path"; then
55881        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55882      fi
55883
55884      if test -d "$path"; then
55885        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55886      else
55887        dir="`$DIRNAME "$path"`"
55888        base="`$BASENAME "$path"`"
55889        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55890      fi
55891    fi
55892  fi
55893
55894
55895    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55897$as_echo_n "checking for freetype includes... " >&6; }
55898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55899$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55900    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55902$as_echo_n "checking for freetype libraries... " >&6; }
55903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55904$as_echo "$FREETYPE_LIB_PATH" >&6; }
55905  fi
55906
55907
55908          if test "x$FOUND_FREETYPE" != xyes; then
55909            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
55910
55911  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55912  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55913  METHOD="well-known location"
55914
55915  # Let's start with an optimistic view of the world :-)
55916  FOUND_FREETYPE=yes
55917
55918  # First look for the canonical freetype main include file ft2build.h.
55919  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55920    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55921    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55922    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55923      # Fail.
55924      FOUND_FREETYPE=no
55925    fi
55926  fi
55927
55928  if test "x$FOUND_FREETYPE" = xyes; then
55929    # Include file found, let's continue the sanity check.
55930    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55931$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55932
55933    # Reset to default value
55934    FREETYPE_BASE_NAME=freetype
55935    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55936    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55937      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55938          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55939        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55940        # for the .6 version explicitly.
55941        FREETYPE_BASE_NAME=freetype.6
55942        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55943        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55944$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55945      else
55946        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55947$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55948        FOUND_FREETYPE=no
55949      fi
55950    else
55951      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55952        # On Windows, we will need both .lib and .dll file.
55953        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55954          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55955$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55956          FOUND_FREETYPE=no
55957        fi
55958      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55959          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55960        # Found lib in isa dir, use that instead.
55961        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55962        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55963$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55964      fi
55965    fi
55966  fi
55967
55968  if test "x$FOUND_FREETYPE" = xyes; then
55969
55970  # Only process if variable expands to non-empty
55971
55972  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55974
55975  # Input might be given as Windows format, start by converting to
55976  # unix format.
55977  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55978  new_path=`$CYGPATH -u "$path"`
55979
55980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55983  # "foo.exe" is OK but "foo" is an error.
55984  #
55985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55986  # It is also a way to make sure we got the proper file name for the real test later on.
55987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55988  if test "x$test_shortpath" = x; then
55989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55990$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55991    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55992  fi
55993
55994  # Call helper function which possibly converts this using DOS-style short mode.
55995  # If so, the updated path is stored in $new_path.
55996
55997  input_path="$new_path"
55998  # Check if we need to convert this using DOS-style short mode. If the path
55999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56000  # take no chances and rewrite it.
56001  # Note: m4 eats our [], so we need to use [ and ] instead.
56002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56003  if test "x$has_forbidden_chars" != x; then
56004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56008      # Going to short mode and back again did indeed matter. Since short mode is
56009      # case insensitive, let's make it lowercase to improve readability.
56010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56011      # Now convert it back to Unix-style (cygpath)
56012      input_path=`$CYGPATH -u "$shortmode_path"`
56013      new_path="$input_path"
56014    fi
56015  fi
56016
56017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56018  if test "x$test_cygdrive_prefix" = x; then
56019    # As a simple fix, exclude /usr/bin since it's not a real path.
56020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56022      # a path prefixed by /cygdrive for fixpath to work.
56023      new_path="$CYGWIN_ROOT_PATH$input_path"
56024    fi
56025  fi
56026
56027
56028  if test "x$path" != "x$new_path"; then
56029    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56031$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56032  fi
56033
56034    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56035
56036  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56037  has_colon=`$ECHO $path | $GREP ^.:`
56038  new_path="$path"
56039  if test "x$has_colon" = x; then
56040    # Not in mixed or Windows style, start by that.
56041    new_path=`cmd //c echo $path`
56042  fi
56043
56044
56045  input_path="$new_path"
56046  # Check if we need to convert this using DOS-style short mode. If the path
56047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56048  # take no chances and rewrite it.
56049  # Note: m4 eats our [], so we need to use [ and ] instead.
56050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56051  if test "x$has_forbidden_chars" != x; then
56052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56054  fi
56055
56056
56057  windows_path="$new_path"
56058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56059    unix_path=`$CYGPATH -u "$windows_path"`
56060    new_path="$unix_path"
56061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56063    new_path="$unix_path"
56064  fi
56065
56066  if test "x$path" != "x$new_path"; then
56067    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56069$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56070  fi
56071
56072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56074
56075    else
56076      # We're on a unix platform. Hooray! :)
56077      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56078      has_space=`$ECHO "$path" | $GREP " "`
56079      if test "x$has_space" != x; then
56080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56081$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56082        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56083      fi
56084
56085      # Use eval to expand a potential ~
56086      eval path="$path"
56087      if test ! -f "$path" && test ! -d "$path"; then
56088        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56089      fi
56090
56091      if test -d "$path"; then
56092        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56093      else
56094        dir="`$DIRNAME "$path"`"
56095        base="`$BASENAME "$path"`"
56096        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56097      fi
56098    fi
56099  fi
56100
56101
56102  # Only process if variable expands to non-empty
56103
56104  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56105    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56106
56107  # Input might be given as Windows format, start by converting to
56108  # unix format.
56109  path="$POTENTIAL_FREETYPE_LIB_PATH"
56110  new_path=`$CYGPATH -u "$path"`
56111
56112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56115  # "foo.exe" is OK but "foo" is an error.
56116  #
56117  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56118  # It is also a way to make sure we got the proper file name for the real test later on.
56119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56120  if test "x$test_shortpath" = x; then
56121    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56122$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56123    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56124  fi
56125
56126  # Call helper function which possibly converts this using DOS-style short mode.
56127  # If so, the updated path is stored in $new_path.
56128
56129  input_path="$new_path"
56130  # Check if we need to convert this using DOS-style short mode. If the path
56131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56132  # take no chances and rewrite it.
56133  # Note: m4 eats our [], so we need to use [ and ] instead.
56134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56135  if test "x$has_forbidden_chars" != x; then
56136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56140      # Going to short mode and back again did indeed matter. Since short mode is
56141      # case insensitive, let's make it lowercase to improve readability.
56142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56143      # Now convert it back to Unix-style (cygpath)
56144      input_path=`$CYGPATH -u "$shortmode_path"`
56145      new_path="$input_path"
56146    fi
56147  fi
56148
56149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56150  if test "x$test_cygdrive_prefix" = x; then
56151    # As a simple fix, exclude /usr/bin since it's not a real path.
56152    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56154      # a path prefixed by /cygdrive for fixpath to work.
56155      new_path="$CYGWIN_ROOT_PATH$input_path"
56156    fi
56157  fi
56158
56159
56160  if test "x$path" != "x$new_path"; then
56161    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56163$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56164  fi
56165
56166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56167
56168  path="$POTENTIAL_FREETYPE_LIB_PATH"
56169  has_colon=`$ECHO $path | $GREP ^.:`
56170  new_path="$path"
56171  if test "x$has_colon" = x; then
56172    # Not in mixed or Windows style, start by that.
56173    new_path=`cmd //c echo $path`
56174  fi
56175
56176
56177  input_path="$new_path"
56178  # Check if we need to convert this using DOS-style short mode. If the path
56179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56180  # take no chances and rewrite it.
56181  # Note: m4 eats our [], so we need to use [ and ] instead.
56182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56183  if test "x$has_forbidden_chars" != x; then
56184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56186  fi
56187
56188
56189  windows_path="$new_path"
56190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56191    unix_path=`$CYGPATH -u "$windows_path"`
56192    new_path="$unix_path"
56193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56195    new_path="$unix_path"
56196  fi
56197
56198  if test "x$path" != "x$new_path"; then
56199    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56202  fi
56203
56204  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56205  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56206
56207    else
56208      # We're on a unix platform. Hooray! :)
56209      path="$POTENTIAL_FREETYPE_LIB_PATH"
56210      has_space=`$ECHO "$path" | $GREP " "`
56211      if test "x$has_space" != x; then
56212        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56214        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56215      fi
56216
56217      # Use eval to expand a potential ~
56218      eval path="$path"
56219      if test ! -f "$path" && test ! -d "$path"; then
56220        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56221      fi
56222
56223      if test -d "$path"; then
56224        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56225      else
56226        dir="`$DIRNAME "$path"`"
56227        base="`$BASENAME "$path"`"
56228        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56229      fi
56230    fi
56231  fi
56232
56233
56234    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56236$as_echo_n "checking for freetype includes... " >&6; }
56237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56238$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56239    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56241$as_echo_n "checking for freetype libraries... " >&6; }
56242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56243$as_echo "$FREETYPE_LIB_PATH" >&6; }
56244  fi
56245
56246          fi
56247
56248          if test "x$FOUND_FREETYPE" != xyes; then
56249            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
56250
56251  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56252  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
56253  METHOD="well-known location"
56254
56255  # Let's start with an optimistic view of the world :-)
56256  FOUND_FREETYPE=yes
56257
56258  # First look for the canonical freetype main include file ft2build.h.
56259  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56260    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56261    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56262    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56263      # Fail.
56264      FOUND_FREETYPE=no
56265    fi
56266  fi
56267
56268  if test "x$FOUND_FREETYPE" = xyes; then
56269    # Include file found, let's continue the sanity check.
56270    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56271$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56272
56273    # Reset to default value
56274    FREETYPE_BASE_NAME=freetype
56275    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56276    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56277      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56278          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56279        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56280        # for the .6 version explicitly.
56281        FREETYPE_BASE_NAME=freetype.6
56282        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56283        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56284$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56285      else
56286        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56287$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56288        FOUND_FREETYPE=no
56289      fi
56290    else
56291      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56292        # On Windows, we will need both .lib and .dll file.
56293        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56294          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56295$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56296          FOUND_FREETYPE=no
56297        fi
56298      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56299          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56300        # Found lib in isa dir, use that instead.
56301        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56302        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56303$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56304      fi
56305    fi
56306  fi
56307
56308  if test "x$FOUND_FREETYPE" = xyes; then
56309
56310  # Only process if variable expands to non-empty
56311
56312  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56314
56315  # Input might be given as Windows format, start by converting to
56316  # unix format.
56317  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56318  new_path=`$CYGPATH -u "$path"`
56319
56320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56323  # "foo.exe" is OK but "foo" is an error.
56324  #
56325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56326  # It is also a way to make sure we got the proper file name for the real test later on.
56327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56328  if test "x$test_shortpath" = x; then
56329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56330$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56331    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56332  fi
56333
56334  # Call helper function which possibly converts this using DOS-style short mode.
56335  # If so, the updated path is stored in $new_path.
56336
56337  input_path="$new_path"
56338  # Check if we need to convert this using DOS-style short mode. If the path
56339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56340  # take no chances and rewrite it.
56341  # Note: m4 eats our [], so we need to use [ and ] instead.
56342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56343  if test "x$has_forbidden_chars" != x; then
56344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56348      # Going to short mode and back again did indeed matter. Since short mode is
56349      # case insensitive, let's make it lowercase to improve readability.
56350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56351      # Now convert it back to Unix-style (cygpath)
56352      input_path=`$CYGPATH -u "$shortmode_path"`
56353      new_path="$input_path"
56354    fi
56355  fi
56356
56357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56358  if test "x$test_cygdrive_prefix" = x; then
56359    # As a simple fix, exclude /usr/bin since it's not a real path.
56360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56362      # a path prefixed by /cygdrive for fixpath to work.
56363      new_path="$CYGWIN_ROOT_PATH$input_path"
56364    fi
56365  fi
56366
56367
56368  if test "x$path" != "x$new_path"; then
56369    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56371$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56372  fi
56373
56374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56375
56376  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56377  has_colon=`$ECHO $path | $GREP ^.:`
56378  new_path="$path"
56379  if test "x$has_colon" = x; then
56380    # Not in mixed or Windows style, start by that.
56381    new_path=`cmd //c echo $path`
56382  fi
56383
56384
56385  input_path="$new_path"
56386  # Check if we need to convert this using DOS-style short mode. If the path
56387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56388  # take no chances and rewrite it.
56389  # Note: m4 eats our [], so we need to use [ and ] instead.
56390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56391  if test "x$has_forbidden_chars" != x; then
56392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56394  fi
56395
56396
56397  windows_path="$new_path"
56398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56399    unix_path=`$CYGPATH -u "$windows_path"`
56400    new_path="$unix_path"
56401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56403    new_path="$unix_path"
56404  fi
56405
56406  if test "x$path" != "x$new_path"; then
56407    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56409$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56410  fi
56411
56412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56414
56415    else
56416      # We're on a unix platform. Hooray! :)
56417      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56418      has_space=`$ECHO "$path" | $GREP " "`
56419      if test "x$has_space" != x; then
56420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56422        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56423      fi
56424
56425      # Use eval to expand a potential ~
56426      eval path="$path"
56427      if test ! -f "$path" && test ! -d "$path"; then
56428        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56429      fi
56430
56431      if test -d "$path"; then
56432        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56433      else
56434        dir="`$DIRNAME "$path"`"
56435        base="`$BASENAME "$path"`"
56436        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56437      fi
56438    fi
56439  fi
56440
56441
56442  # Only process if variable expands to non-empty
56443
56444  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56445    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56446
56447  # Input might be given as Windows format, start by converting to
56448  # unix format.
56449  path="$POTENTIAL_FREETYPE_LIB_PATH"
56450  new_path=`$CYGPATH -u "$path"`
56451
56452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56455  # "foo.exe" is OK but "foo" is an error.
56456  #
56457  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56458  # It is also a way to make sure we got the proper file name for the real test later on.
56459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56460  if test "x$test_shortpath" = x; then
56461    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56462$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56463    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56464  fi
56465
56466  # Call helper function which possibly converts this using DOS-style short mode.
56467  # If so, the updated path is stored in $new_path.
56468
56469  input_path="$new_path"
56470  # Check if we need to convert this using DOS-style short mode. If the path
56471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56472  # take no chances and rewrite it.
56473  # Note: m4 eats our [], so we need to use [ and ] instead.
56474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56475  if test "x$has_forbidden_chars" != x; then
56476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56480      # Going to short mode and back again did indeed matter. Since short mode is
56481      # case insensitive, let's make it lowercase to improve readability.
56482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56483      # Now convert it back to Unix-style (cygpath)
56484      input_path=`$CYGPATH -u "$shortmode_path"`
56485      new_path="$input_path"
56486    fi
56487  fi
56488
56489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56490  if test "x$test_cygdrive_prefix" = x; then
56491    # As a simple fix, exclude /usr/bin since it's not a real path.
56492    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56494      # a path prefixed by /cygdrive for fixpath to work.
56495      new_path="$CYGWIN_ROOT_PATH$input_path"
56496    fi
56497  fi
56498
56499
56500  if test "x$path" != "x$new_path"; then
56501    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56503$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56504  fi
56505
56506    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56507
56508  path="$POTENTIAL_FREETYPE_LIB_PATH"
56509  has_colon=`$ECHO $path | $GREP ^.:`
56510  new_path="$path"
56511  if test "x$has_colon" = x; then
56512    # Not in mixed or Windows style, start by that.
56513    new_path=`cmd //c echo $path`
56514  fi
56515
56516
56517  input_path="$new_path"
56518  # Check if we need to convert this using DOS-style short mode. If the path
56519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56520  # take no chances and rewrite it.
56521  # Note: m4 eats our [], so we need to use [ and ] instead.
56522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56523  if test "x$has_forbidden_chars" != x; then
56524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56526  fi
56527
56528
56529  windows_path="$new_path"
56530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56531    unix_path=`$CYGPATH -u "$windows_path"`
56532    new_path="$unix_path"
56533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56535    new_path="$unix_path"
56536  fi
56537
56538  if test "x$path" != "x$new_path"; then
56539    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56541$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56542  fi
56543
56544  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56545  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56546
56547    else
56548      # We're on a unix platform. Hooray! :)
56549      path="$POTENTIAL_FREETYPE_LIB_PATH"
56550      has_space=`$ECHO "$path" | $GREP " "`
56551      if test "x$has_space" != x; then
56552        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56553$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56554        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56555      fi
56556
56557      # Use eval to expand a potential ~
56558      eval path="$path"
56559      if test ! -f "$path" && test ! -d "$path"; then
56560        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56561      fi
56562
56563      if test -d "$path"; then
56564        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56565      else
56566        dir="`$DIRNAME "$path"`"
56567        base="`$BASENAME "$path"`"
56568        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56569      fi
56570    fi
56571  fi
56572
56573
56574    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56576$as_echo_n "checking for freetype includes... " >&6; }
56577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56578$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56579    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56581$as_echo_n "checking for freetype libraries... " >&6; }
56582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56583$as_echo "$FREETYPE_LIB_PATH" >&6; }
56584  fi
56585
56586          fi
56587
56588          if test "x$FOUND_FREETYPE" != xyes; then
56589            FREETYPE_BASE_DIR="$SYSROOT/usr"
56590            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56591
56592  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56593  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
56594  METHOD="well-known location"
56595
56596  # Let's start with an optimistic view of the world :-)
56597  FOUND_FREETYPE=yes
56598
56599  # First look for the canonical freetype main include file ft2build.h.
56600  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56601    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56602    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56603    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56604      # Fail.
56605      FOUND_FREETYPE=no
56606    fi
56607  fi
56608
56609  if test "x$FOUND_FREETYPE" = xyes; then
56610    # Include file found, let's continue the sanity check.
56611    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56612$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56613
56614    # Reset to default value
56615    FREETYPE_BASE_NAME=freetype
56616    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56617    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56618      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56619          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56620        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56621        # for the .6 version explicitly.
56622        FREETYPE_BASE_NAME=freetype.6
56623        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56624        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56625$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56626      else
56627        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56628$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56629        FOUND_FREETYPE=no
56630      fi
56631    else
56632      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56633        # On Windows, we will need both .lib and .dll file.
56634        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56635          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56636$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56637          FOUND_FREETYPE=no
56638        fi
56639      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56640          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56641        # Found lib in isa dir, use that instead.
56642        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56643        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56644$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56645      fi
56646    fi
56647  fi
56648
56649  if test "x$FOUND_FREETYPE" = xyes; then
56650
56651  # Only process if variable expands to non-empty
56652
56653  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56655
56656  # Input might be given as Windows format, start by converting to
56657  # unix format.
56658  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56659  new_path=`$CYGPATH -u "$path"`
56660
56661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56664  # "foo.exe" is OK but "foo" is an error.
56665  #
56666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56667  # It is also a way to make sure we got the proper file name for the real test later on.
56668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56669  if test "x$test_shortpath" = x; then
56670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56671$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56672    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56673  fi
56674
56675  # Call helper function which possibly converts this using DOS-style short mode.
56676  # If so, the updated path is stored in $new_path.
56677
56678  input_path="$new_path"
56679  # Check if we need to convert this using DOS-style short mode. If the path
56680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56681  # take no chances and rewrite it.
56682  # Note: m4 eats our [], so we need to use [ and ] instead.
56683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56684  if test "x$has_forbidden_chars" != x; then
56685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56689      # Going to short mode and back again did indeed matter. Since short mode is
56690      # case insensitive, let's make it lowercase to improve readability.
56691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56692      # Now convert it back to Unix-style (cygpath)
56693      input_path=`$CYGPATH -u "$shortmode_path"`
56694      new_path="$input_path"
56695    fi
56696  fi
56697
56698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56699  if test "x$test_cygdrive_prefix" = x; then
56700    # As a simple fix, exclude /usr/bin since it's not a real path.
56701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56703      # a path prefixed by /cygdrive for fixpath to work.
56704      new_path="$CYGWIN_ROOT_PATH$input_path"
56705    fi
56706  fi
56707
56708
56709  if test "x$path" != "x$new_path"; then
56710    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56712$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56713  fi
56714
56715    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56716
56717  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56718  has_colon=`$ECHO $path | $GREP ^.:`
56719  new_path="$path"
56720  if test "x$has_colon" = x; then
56721    # Not in mixed or Windows style, start by that.
56722    new_path=`cmd //c echo $path`
56723  fi
56724
56725
56726  input_path="$new_path"
56727  # Check if we need to convert this using DOS-style short mode. If the path
56728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56729  # take no chances and rewrite it.
56730  # Note: m4 eats our [], so we need to use [ and ] instead.
56731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56732  if test "x$has_forbidden_chars" != x; then
56733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56735  fi
56736
56737
56738  windows_path="$new_path"
56739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56740    unix_path=`$CYGPATH -u "$windows_path"`
56741    new_path="$unix_path"
56742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56744    new_path="$unix_path"
56745  fi
56746
56747  if test "x$path" != "x$new_path"; then
56748    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56750$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56751  fi
56752
56753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56755
56756    else
56757      # We're on a unix platform. Hooray! :)
56758      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56759      has_space=`$ECHO "$path" | $GREP " "`
56760      if test "x$has_space" != x; then
56761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56762$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56763        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56764      fi
56765
56766      # Use eval to expand a potential ~
56767      eval path="$path"
56768      if test ! -f "$path" && test ! -d "$path"; then
56769        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56770      fi
56771
56772      if test -d "$path"; then
56773        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56774      else
56775        dir="`$DIRNAME "$path"`"
56776        base="`$BASENAME "$path"`"
56777        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56778      fi
56779    fi
56780  fi
56781
56782
56783  # Only process if variable expands to non-empty
56784
56785  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56787
56788  # Input might be given as Windows format, start by converting to
56789  # unix format.
56790  path="$POTENTIAL_FREETYPE_LIB_PATH"
56791  new_path=`$CYGPATH -u "$path"`
56792
56793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56796  # "foo.exe" is OK but "foo" is an error.
56797  #
56798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56799  # It is also a way to make sure we got the proper file name for the real test later on.
56800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56801  if test "x$test_shortpath" = x; then
56802    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56803$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56804    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56805  fi
56806
56807  # Call helper function which possibly converts this using DOS-style short mode.
56808  # If so, the updated path is stored in $new_path.
56809
56810  input_path="$new_path"
56811  # Check if we need to convert this using DOS-style short mode. If the path
56812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56813  # take no chances and rewrite it.
56814  # Note: m4 eats our [], so we need to use [ and ] instead.
56815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56816  if test "x$has_forbidden_chars" != x; then
56817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56821      # Going to short mode and back again did indeed matter. Since short mode is
56822      # case insensitive, let's make it lowercase to improve readability.
56823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56824      # Now convert it back to Unix-style (cygpath)
56825      input_path=`$CYGPATH -u "$shortmode_path"`
56826      new_path="$input_path"
56827    fi
56828  fi
56829
56830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56831  if test "x$test_cygdrive_prefix" = x; then
56832    # As a simple fix, exclude /usr/bin since it's not a real path.
56833    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56835      # a path prefixed by /cygdrive for fixpath to work.
56836      new_path="$CYGWIN_ROOT_PATH$input_path"
56837    fi
56838  fi
56839
56840
56841  if test "x$path" != "x$new_path"; then
56842    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56844$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56845  fi
56846
56847    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56848
56849  path="$POTENTIAL_FREETYPE_LIB_PATH"
56850  has_colon=`$ECHO $path | $GREP ^.:`
56851  new_path="$path"
56852  if test "x$has_colon" = x; then
56853    # Not in mixed or Windows style, start by that.
56854    new_path=`cmd //c echo $path`
56855  fi
56856
56857
56858  input_path="$new_path"
56859  # Check if we need to convert this using DOS-style short mode. If the path
56860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56861  # take no chances and rewrite it.
56862  # Note: m4 eats our [], so we need to use [ and ] instead.
56863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56864  if test "x$has_forbidden_chars" != x; then
56865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56867  fi
56868
56869
56870  windows_path="$new_path"
56871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56872    unix_path=`$CYGPATH -u "$windows_path"`
56873    new_path="$unix_path"
56874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56876    new_path="$unix_path"
56877  fi
56878
56879  if test "x$path" != "x$new_path"; then
56880    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56882$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56883  fi
56884
56885  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56886  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56887
56888    else
56889      # We're on a unix platform. Hooray! :)
56890      path="$POTENTIAL_FREETYPE_LIB_PATH"
56891      has_space=`$ECHO "$path" | $GREP " "`
56892      if test "x$has_space" != x; then
56893        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56894$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56895        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56896      fi
56897
56898      # Use eval to expand a potential ~
56899      eval path="$path"
56900      if test ! -f "$path" && test ! -d "$path"; then
56901        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56902      fi
56903
56904      if test -d "$path"; then
56905        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56906      else
56907        dir="`$DIRNAME "$path"`"
56908        base="`$BASENAME "$path"`"
56909        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56910      fi
56911    fi
56912  fi
56913
56914
56915    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56917$as_echo_n "checking for freetype includes... " >&6; }
56918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56919$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56920    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56922$as_echo_n "checking for freetype libraries... " >&6; }
56923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56924$as_echo "$FREETYPE_LIB_PATH" >&6; }
56925  fi
56926
56927            else
56928
56929  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56930  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
56931  METHOD="well-known location"
56932
56933  # Let's start with an optimistic view of the world :-)
56934  FOUND_FREETYPE=yes
56935
56936  # First look for the canonical freetype main include file ft2build.h.
56937  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56938    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56939    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56940    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56941      # Fail.
56942      FOUND_FREETYPE=no
56943    fi
56944  fi
56945
56946  if test "x$FOUND_FREETYPE" = xyes; then
56947    # Include file found, let's continue the sanity check.
56948    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56949$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56950
56951    # Reset to default value
56952    FREETYPE_BASE_NAME=freetype
56953    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56954    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56955      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56956          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56957        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56958        # for the .6 version explicitly.
56959        FREETYPE_BASE_NAME=freetype.6
56960        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56961        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56962$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56963      else
56964        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56965$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56966        FOUND_FREETYPE=no
56967      fi
56968    else
56969      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56970        # On Windows, we will need both .lib and .dll file.
56971        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56972          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56973$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56974          FOUND_FREETYPE=no
56975        fi
56976      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56977          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56978        # Found lib in isa dir, use that instead.
56979        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56980        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56981$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56982      fi
56983    fi
56984  fi
56985
56986  if test "x$FOUND_FREETYPE" = xyes; then
56987
56988  # Only process if variable expands to non-empty
56989
56990  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56992
56993  # Input might be given as Windows format, start by converting to
56994  # unix format.
56995  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56996  new_path=`$CYGPATH -u "$path"`
56997
56998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57001  # "foo.exe" is OK but "foo" is an error.
57002  #
57003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57004  # It is also a way to make sure we got the proper file name for the real test later on.
57005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57006  if test "x$test_shortpath" = x; then
57007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57008$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57009    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57010  fi
57011
57012  # Call helper function which possibly converts this using DOS-style short mode.
57013  # If so, the updated path is stored in $new_path.
57014
57015  input_path="$new_path"
57016  # Check if we need to convert this using DOS-style short mode. If the path
57017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57018  # take no chances and rewrite it.
57019  # Note: m4 eats our [], so we need to use [ and ] instead.
57020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57021  if test "x$has_forbidden_chars" != x; then
57022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57026      # Going to short mode and back again did indeed matter. Since short mode is
57027      # case insensitive, let's make it lowercase to improve readability.
57028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57029      # Now convert it back to Unix-style (cygpath)
57030      input_path=`$CYGPATH -u "$shortmode_path"`
57031      new_path="$input_path"
57032    fi
57033  fi
57034
57035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57036  if test "x$test_cygdrive_prefix" = x; then
57037    # As a simple fix, exclude /usr/bin since it's not a real path.
57038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57040      # a path prefixed by /cygdrive for fixpath to work.
57041      new_path="$CYGWIN_ROOT_PATH$input_path"
57042    fi
57043  fi
57044
57045
57046  if test "x$path" != "x$new_path"; then
57047    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57050  fi
57051
57052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57053
57054  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57055  has_colon=`$ECHO $path | $GREP ^.:`
57056  new_path="$path"
57057  if test "x$has_colon" = x; then
57058    # Not in mixed or Windows style, start by that.
57059    new_path=`cmd //c echo $path`
57060  fi
57061
57062
57063  input_path="$new_path"
57064  # Check if we need to convert this using DOS-style short mode. If the path
57065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57066  # take no chances and rewrite it.
57067  # Note: m4 eats our [], so we need to use [ and ] instead.
57068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57069  if test "x$has_forbidden_chars" != x; then
57070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57072  fi
57073
57074
57075  windows_path="$new_path"
57076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57077    unix_path=`$CYGPATH -u "$windows_path"`
57078    new_path="$unix_path"
57079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57081    new_path="$unix_path"
57082  fi
57083
57084  if test "x$path" != "x$new_path"; then
57085    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57087$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57088  fi
57089
57090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57092
57093    else
57094      # We're on a unix platform. Hooray! :)
57095      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57096      has_space=`$ECHO "$path" | $GREP " "`
57097      if test "x$has_space" != x; then
57098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57099$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57100        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57101      fi
57102
57103      # Use eval to expand a potential ~
57104      eval path="$path"
57105      if test ! -f "$path" && test ! -d "$path"; then
57106        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57107      fi
57108
57109      if test -d "$path"; then
57110        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57111      else
57112        dir="`$DIRNAME "$path"`"
57113        base="`$BASENAME "$path"`"
57114        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57115      fi
57116    fi
57117  fi
57118
57119
57120  # Only process if variable expands to non-empty
57121
57122  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57124
57125  # Input might be given as Windows format, start by converting to
57126  # unix format.
57127  path="$POTENTIAL_FREETYPE_LIB_PATH"
57128  new_path=`$CYGPATH -u "$path"`
57129
57130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57133  # "foo.exe" is OK but "foo" is an error.
57134  #
57135  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57136  # It is also a way to make sure we got the proper file name for the real test later on.
57137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57138  if test "x$test_shortpath" = x; then
57139    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57140$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57141    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57142  fi
57143
57144  # Call helper function which possibly converts this using DOS-style short mode.
57145  # If so, the updated path is stored in $new_path.
57146
57147  input_path="$new_path"
57148  # Check if we need to convert this using DOS-style short mode. If the path
57149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57150  # take no chances and rewrite it.
57151  # Note: m4 eats our [], so we need to use [ and ] instead.
57152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57153  if test "x$has_forbidden_chars" != x; then
57154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57158      # Going to short mode and back again did indeed matter. Since short mode is
57159      # case insensitive, let's make it lowercase to improve readability.
57160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57161      # Now convert it back to Unix-style (cygpath)
57162      input_path=`$CYGPATH -u "$shortmode_path"`
57163      new_path="$input_path"
57164    fi
57165  fi
57166
57167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57168  if test "x$test_cygdrive_prefix" = x; then
57169    # As a simple fix, exclude /usr/bin since it's not a real path.
57170    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57172      # a path prefixed by /cygdrive for fixpath to work.
57173      new_path="$CYGWIN_ROOT_PATH$input_path"
57174    fi
57175  fi
57176
57177
57178  if test "x$path" != "x$new_path"; then
57179    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57181$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57182  fi
57183
57184    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57185
57186  path="$POTENTIAL_FREETYPE_LIB_PATH"
57187  has_colon=`$ECHO $path | $GREP ^.:`
57188  new_path="$path"
57189  if test "x$has_colon" = x; then
57190    # Not in mixed or Windows style, start by that.
57191    new_path=`cmd //c echo $path`
57192  fi
57193
57194
57195  input_path="$new_path"
57196  # Check if we need to convert this using DOS-style short mode. If the path
57197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57198  # take no chances and rewrite it.
57199  # Note: m4 eats our [], so we need to use [ and ] instead.
57200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57201  if test "x$has_forbidden_chars" != x; then
57202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57204  fi
57205
57206
57207  windows_path="$new_path"
57208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57209    unix_path=`$CYGPATH -u "$windows_path"`
57210    new_path="$unix_path"
57211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57213    new_path="$unix_path"
57214  fi
57215
57216  if test "x$path" != "x$new_path"; then
57217    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57219$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57220  fi
57221
57222  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57223  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57224
57225    else
57226      # We're on a unix platform. Hooray! :)
57227      path="$POTENTIAL_FREETYPE_LIB_PATH"
57228      has_space=`$ECHO "$path" | $GREP " "`
57229      if test "x$has_space" != x; then
57230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57231$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57232        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57233      fi
57234
57235      # Use eval to expand a potential ~
57236      eval path="$path"
57237      if test ! -f "$path" && test ! -d "$path"; then
57238        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57239      fi
57240
57241      if test -d "$path"; then
57242        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57243      else
57244        dir="`$DIRNAME "$path"`"
57245        base="`$BASENAME "$path"`"
57246        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57247      fi
57248    fi
57249  fi
57250
57251
57252    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57254$as_echo_n "checking for freetype includes... " >&6; }
57255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57256$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57257    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57259$as_echo_n "checking for freetype libraries... " >&6; }
57260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57261$as_echo "$FREETYPE_LIB_PATH" >&6; }
57262  fi
57263
57264              if test "x$FOUND_FREETYPE" != xyes; then
57265
57266  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57267  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
57268  METHOD="well-known location"
57269
57270  # Let's start with an optimistic view of the world :-)
57271  FOUND_FREETYPE=yes
57272
57273  # First look for the canonical freetype main include file ft2build.h.
57274  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57275    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57276    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57277    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57278      # Fail.
57279      FOUND_FREETYPE=no
57280    fi
57281  fi
57282
57283  if test "x$FOUND_FREETYPE" = xyes; then
57284    # Include file found, let's continue the sanity check.
57285    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57286$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57287
57288    # Reset to default value
57289    FREETYPE_BASE_NAME=freetype
57290    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57291    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57292      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57293          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57294        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57295        # for the .6 version explicitly.
57296        FREETYPE_BASE_NAME=freetype.6
57297        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57298        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57299$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57300      else
57301        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57302$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57303        FOUND_FREETYPE=no
57304      fi
57305    else
57306      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57307        # On Windows, we will need both .lib and .dll file.
57308        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57309          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57310$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57311          FOUND_FREETYPE=no
57312        fi
57313      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57314          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57315        # Found lib in isa dir, use that instead.
57316        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57317        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57318$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57319      fi
57320    fi
57321  fi
57322
57323  if test "x$FOUND_FREETYPE" = xyes; then
57324
57325  # Only process if variable expands to non-empty
57326
57327  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57329
57330  # Input might be given as Windows format, start by converting to
57331  # unix format.
57332  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57333  new_path=`$CYGPATH -u "$path"`
57334
57335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57338  # "foo.exe" is OK but "foo" is an error.
57339  #
57340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57341  # It is also a way to make sure we got the proper file name for the real test later on.
57342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57343  if test "x$test_shortpath" = x; then
57344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57346    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57347  fi
57348
57349  # Call helper function which possibly converts this using DOS-style short mode.
57350  # If so, the updated path is stored in $new_path.
57351
57352  input_path="$new_path"
57353  # Check if we need to convert this using DOS-style short mode. If the path
57354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57355  # take no chances and rewrite it.
57356  # Note: m4 eats our [], so we need to use [ and ] instead.
57357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57358  if test "x$has_forbidden_chars" != x; then
57359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57363      # Going to short mode and back again did indeed matter. Since short mode is
57364      # case insensitive, let's make it lowercase to improve readability.
57365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57366      # Now convert it back to Unix-style (cygpath)
57367      input_path=`$CYGPATH -u "$shortmode_path"`
57368      new_path="$input_path"
57369    fi
57370  fi
57371
57372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57373  if test "x$test_cygdrive_prefix" = x; then
57374    # As a simple fix, exclude /usr/bin since it's not a real path.
57375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57377      # a path prefixed by /cygdrive for fixpath to work.
57378      new_path="$CYGWIN_ROOT_PATH$input_path"
57379    fi
57380  fi
57381
57382
57383  if test "x$path" != "x$new_path"; then
57384    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57386$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57387  fi
57388
57389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57390
57391  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57392  has_colon=`$ECHO $path | $GREP ^.:`
57393  new_path="$path"
57394  if test "x$has_colon" = x; then
57395    # Not in mixed or Windows style, start by that.
57396    new_path=`cmd //c echo $path`
57397  fi
57398
57399
57400  input_path="$new_path"
57401  # Check if we need to convert this using DOS-style short mode. If the path
57402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57403  # take no chances and rewrite it.
57404  # Note: m4 eats our [], so we need to use [ and ] instead.
57405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57406  if test "x$has_forbidden_chars" != x; then
57407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57409  fi
57410
57411
57412  windows_path="$new_path"
57413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57414    unix_path=`$CYGPATH -u "$windows_path"`
57415    new_path="$unix_path"
57416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57418    new_path="$unix_path"
57419  fi
57420
57421  if test "x$path" != "x$new_path"; then
57422    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57424$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57425  fi
57426
57427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57429
57430    else
57431      # We're on a unix platform. Hooray! :)
57432      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57433      has_space=`$ECHO "$path" | $GREP " "`
57434      if test "x$has_space" != x; then
57435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57436$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57437        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57438      fi
57439
57440      # Use eval to expand a potential ~
57441      eval path="$path"
57442      if test ! -f "$path" && test ! -d "$path"; then
57443        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57444      fi
57445
57446      if test -d "$path"; then
57447        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57448      else
57449        dir="`$DIRNAME "$path"`"
57450        base="`$BASENAME "$path"`"
57451        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57452      fi
57453    fi
57454  fi
57455
57456
57457  # Only process if variable expands to non-empty
57458
57459  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57460    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57461
57462  # Input might be given as Windows format, start by converting to
57463  # unix format.
57464  path="$POTENTIAL_FREETYPE_LIB_PATH"
57465  new_path=`$CYGPATH -u "$path"`
57466
57467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57470  # "foo.exe" is OK but "foo" is an error.
57471  #
57472  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57473  # It is also a way to make sure we got the proper file name for the real test later on.
57474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57475  if test "x$test_shortpath" = x; then
57476    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57477$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57478    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57479  fi
57480
57481  # Call helper function which possibly converts this using DOS-style short mode.
57482  # If so, the updated path is stored in $new_path.
57483
57484  input_path="$new_path"
57485  # Check if we need to convert this using DOS-style short mode. If the path
57486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57487  # take no chances and rewrite it.
57488  # Note: m4 eats our [], so we need to use [ and ] instead.
57489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57490  if test "x$has_forbidden_chars" != x; then
57491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57495      # Going to short mode and back again did indeed matter. Since short mode is
57496      # case insensitive, let's make it lowercase to improve readability.
57497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57498      # Now convert it back to Unix-style (cygpath)
57499      input_path=`$CYGPATH -u "$shortmode_path"`
57500      new_path="$input_path"
57501    fi
57502  fi
57503
57504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57505  if test "x$test_cygdrive_prefix" = x; then
57506    # As a simple fix, exclude /usr/bin since it's not a real path.
57507    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57509      # a path prefixed by /cygdrive for fixpath to work.
57510      new_path="$CYGWIN_ROOT_PATH$input_path"
57511    fi
57512  fi
57513
57514
57515  if test "x$path" != "x$new_path"; then
57516    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57518$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57519  fi
57520
57521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57522
57523  path="$POTENTIAL_FREETYPE_LIB_PATH"
57524  has_colon=`$ECHO $path | $GREP ^.:`
57525  new_path="$path"
57526  if test "x$has_colon" = x; then
57527    # Not in mixed or Windows style, start by that.
57528    new_path=`cmd //c echo $path`
57529  fi
57530
57531
57532  input_path="$new_path"
57533  # Check if we need to convert this using DOS-style short mode. If the path
57534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57535  # take no chances and rewrite it.
57536  # Note: m4 eats our [], so we need to use [ and ] instead.
57537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57538  if test "x$has_forbidden_chars" != x; then
57539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57541  fi
57542
57543
57544  windows_path="$new_path"
57545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57546    unix_path=`$CYGPATH -u "$windows_path"`
57547    new_path="$unix_path"
57548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57550    new_path="$unix_path"
57551  fi
57552
57553  if test "x$path" != "x$new_path"; then
57554    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57556$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57557  fi
57558
57559  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57560  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57561
57562    else
57563      # We're on a unix platform. Hooray! :)
57564      path="$POTENTIAL_FREETYPE_LIB_PATH"
57565      has_space=`$ECHO "$path" | $GREP " "`
57566      if test "x$has_space" != x; then
57567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57568$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57569        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57570      fi
57571
57572      # Use eval to expand a potential ~
57573      eval path="$path"
57574      if test ! -f "$path" && test ! -d "$path"; then
57575        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57576      fi
57577
57578      if test -d "$path"; then
57579        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57580      else
57581        dir="`$DIRNAME "$path"`"
57582        base="`$BASENAME "$path"`"
57583        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57584      fi
57585    fi
57586  fi
57587
57588
57589    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57591$as_echo_n "checking for freetype includes... " >&6; }
57592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57593$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57594    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57595    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57596$as_echo_n "checking for freetype libraries... " >&6; }
57597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57598$as_echo "$FREETYPE_LIB_PATH" >&6; }
57599  fi
57600
57601              fi
57602            fi
57603          fi
57604        fi
57605      fi # end check in well-known locations
57606
57607      if test "x$FOUND_FREETYPE" != xyes; then
57608
57609  # Print a helpful message on how to acquire the necessary build dependency.
57610  # freetype is the help tag: freetype, cups, alsa etc
57611  MISSING_DEPENDENCY=freetype
57612
57613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57614    cygwin_help $MISSING_DEPENDENCY
57615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57616    msys_help $MISSING_DEPENDENCY
57617  else
57618    PKGHANDLER_COMMAND=
57619
57620    case $PKGHANDLER in
57621      apt-get)
57622        apt_help     $MISSING_DEPENDENCY ;;
57623      yum)
57624        yum_help     $MISSING_DEPENDENCY ;;
57625      port)
57626        port_help    $MISSING_DEPENDENCY ;;
57627      pkgutil)
57628        pkgutil_help $MISSING_DEPENDENCY ;;
57629      pkgadd)
57630        pkgadd_help  $MISSING_DEPENDENCY ;;
57631    esac
57632
57633    if test "x$PKGHANDLER_COMMAND" != x; then
57634      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57635    fi
57636  fi
57637
57638        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
57639      fi
57640    fi # end user specified settings
57641
57642    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
57643    if test "x$FREETYPE_CFLAGS" = x; then
57644
57645  # Only process if variable expands to non-empty
57646
57647  if test "x$FREETYPE_INCLUDE_PATH" != x; then
57648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57649
57650  # Input might be given as Windows format, start by converting to
57651  # unix format.
57652  path="$FREETYPE_INCLUDE_PATH"
57653  new_path=`$CYGPATH -u "$path"`
57654
57655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57658  # "foo.exe" is OK but "foo" is an error.
57659  #
57660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57661  # It is also a way to make sure we got the proper file name for the real test later on.
57662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57663  if test "x$test_shortpath" = x; then
57664    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57665$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57666    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
57667  fi
57668
57669  # Call helper function which possibly converts this using DOS-style short mode.
57670  # If so, the updated path is stored in $new_path.
57671
57672  input_path="$new_path"
57673  # Check if we need to convert this using DOS-style short mode. If the path
57674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57675  # take no chances and rewrite it.
57676  # Note: m4 eats our [], so we need to use [ and ] instead.
57677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57678  if test "x$has_forbidden_chars" != x; then
57679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57683      # Going to short mode and back again did indeed matter. Since short mode is
57684      # case insensitive, let's make it lowercase to improve readability.
57685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57686      # Now convert it back to Unix-style (cygpath)
57687      input_path=`$CYGPATH -u "$shortmode_path"`
57688      new_path="$input_path"
57689    fi
57690  fi
57691
57692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57693  if test "x$test_cygdrive_prefix" = x; then
57694    # As a simple fix, exclude /usr/bin since it's not a real path.
57695    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57697      # a path prefixed by /cygdrive for fixpath to work.
57698      new_path="$CYGWIN_ROOT_PATH$input_path"
57699    fi
57700  fi
57701
57702
57703  if test "x$path" != "x$new_path"; then
57704    FREETYPE_INCLUDE_PATH="$new_path"
57705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57706$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57707  fi
57708
57709    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57710
57711  path="$FREETYPE_INCLUDE_PATH"
57712  has_colon=`$ECHO $path | $GREP ^.:`
57713  new_path="$path"
57714  if test "x$has_colon" = x; then
57715    # Not in mixed or Windows style, start by that.
57716    new_path=`cmd //c echo $path`
57717  fi
57718
57719
57720  input_path="$new_path"
57721  # Check if we need to convert this using DOS-style short mode. If the path
57722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57723  # take no chances and rewrite it.
57724  # Note: m4 eats our [], so we need to use [ and ] instead.
57725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57726  if test "x$has_forbidden_chars" != x; then
57727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57729  fi
57730
57731
57732  windows_path="$new_path"
57733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57734    unix_path=`$CYGPATH -u "$windows_path"`
57735    new_path="$unix_path"
57736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57738    new_path="$unix_path"
57739  fi
57740
57741  if test "x$path" != "x$new_path"; then
57742    FREETYPE_INCLUDE_PATH="$new_path"
57743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57744$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57745  fi
57746
57747  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57748  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57749
57750    else
57751      # We're on a unix platform. Hooray! :)
57752      path="$FREETYPE_INCLUDE_PATH"
57753      has_space=`$ECHO "$path" | $GREP " "`
57754      if test "x$has_space" != x; then
57755        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57756$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57757        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57758      fi
57759
57760      # Use eval to expand a potential ~
57761      eval path="$path"
57762      if test ! -f "$path" && test ! -d "$path"; then
57763        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57764      fi
57765
57766      if test -d "$path"; then
57767        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57768      else
57769        dir="`$DIRNAME "$path"`"
57770        base="`$BASENAME "$path"`"
57771        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57772      fi
57773    fi
57774  fi
57775
57776      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
57777        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
57778      else
57779        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
57780      fi
57781    fi
57782
57783    if test "x$FREETYPE_LIBS" = x; then
57784
57785  # Only process if variable expands to non-empty
57786
57787  if test "x$FREETYPE_LIB_PATH" != x; then
57788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57789
57790  # Input might be given as Windows format, start by converting to
57791  # unix format.
57792  path="$FREETYPE_LIB_PATH"
57793  new_path=`$CYGPATH -u "$path"`
57794
57795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57798  # "foo.exe" is OK but "foo" is an error.
57799  #
57800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57801  # It is also a way to make sure we got the proper file name for the real test later on.
57802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57803  if test "x$test_shortpath" = x; then
57804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57805$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57806    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
57807  fi
57808
57809  # Call helper function which possibly converts this using DOS-style short mode.
57810  # If so, the updated path is stored in $new_path.
57811
57812  input_path="$new_path"
57813  # Check if we need to convert this using DOS-style short mode. If the path
57814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57815  # take no chances and rewrite it.
57816  # Note: m4 eats our [], so we need to use [ and ] instead.
57817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57818  if test "x$has_forbidden_chars" != x; then
57819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57823      # Going to short mode and back again did indeed matter. Since short mode is
57824      # case insensitive, let's make it lowercase to improve readability.
57825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57826      # Now convert it back to Unix-style (cygpath)
57827      input_path=`$CYGPATH -u "$shortmode_path"`
57828      new_path="$input_path"
57829    fi
57830  fi
57831
57832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57833  if test "x$test_cygdrive_prefix" = x; then
57834    # As a simple fix, exclude /usr/bin since it's not a real path.
57835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57837      # a path prefixed by /cygdrive for fixpath to work.
57838      new_path="$CYGWIN_ROOT_PATH$input_path"
57839    fi
57840  fi
57841
57842
57843  if test "x$path" != "x$new_path"; then
57844    FREETYPE_LIB_PATH="$new_path"
57845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57846$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57847  fi
57848
57849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57850
57851  path="$FREETYPE_LIB_PATH"
57852  has_colon=`$ECHO $path | $GREP ^.:`
57853  new_path="$path"
57854  if test "x$has_colon" = x; then
57855    # Not in mixed or Windows style, start by that.
57856    new_path=`cmd //c echo $path`
57857  fi
57858
57859
57860  input_path="$new_path"
57861  # Check if we need to convert this using DOS-style short mode. If the path
57862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57863  # take no chances and rewrite it.
57864  # Note: m4 eats our [], so we need to use [ and ] instead.
57865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57866  if test "x$has_forbidden_chars" != x; then
57867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57869  fi
57870
57871
57872  windows_path="$new_path"
57873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57874    unix_path=`$CYGPATH -u "$windows_path"`
57875    new_path="$unix_path"
57876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57878    new_path="$unix_path"
57879  fi
57880
57881  if test "x$path" != "x$new_path"; then
57882    FREETYPE_LIB_PATH="$new_path"
57883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57884$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57885  fi
57886
57887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57889
57890    else
57891      # We're on a unix platform. Hooray! :)
57892      path="$FREETYPE_LIB_PATH"
57893      has_space=`$ECHO "$path" | $GREP " "`
57894      if test "x$has_space" != x; then
57895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57896$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57898      fi
57899
57900      # Use eval to expand a potential ~
57901      eval path="$path"
57902      if test ! -f "$path" && test ! -d "$path"; then
57903        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57904      fi
57905
57906      if test -d "$path"; then
57907        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57908      else
57909        dir="`$DIRNAME "$path"`"
57910        base="`$BASENAME "$path"`"
57911        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57912      fi
57913    fi
57914  fi
57915
57916      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57917        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
57918      else
57919        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
57920      fi
57921    fi
57922
57923    # Try to compile it
57924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
57925$as_echo_n "checking if we can compile and link with freetype... " >&6; }
57926    ac_ext=cpp
57927ac_cpp='$CXXCPP $CPPFLAGS'
57928ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57929ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57930ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57931
57932    PREV_CXXCFLAGS="$CXXFLAGS"
57933    PREV_LIBS="$LIBS"
57934    PREV_CXX="$CXX"
57935    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
57936    LIBS="$LIBS $FREETYPE_LIBS"
57937    CXX="$FIXPATH $CXX"
57938    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57939/* end confdefs.h.  */
57940
57941          #include<ft2build.h>
57942          #include FT_FREETYPE_H
57943          int main () {
57944            FT_Init_FreeType(NULL);
57945            return 0;
57946          }
57947
57948_ACEOF
57949if ac_fn_cxx_try_link "$LINENO"; then :
57950
57951          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57952$as_echo "yes" >&6; }
57953
57954else
57955
57956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57957$as_echo "no" >&6; }
57958          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
57959$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
57960          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
57961$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
57962
57963
57964  # Print a helpful message on how to acquire the necessary build dependency.
57965  # freetype is the help tag: freetype, cups, alsa etc
57966  MISSING_DEPENDENCY=freetype
57967
57968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57969    cygwin_help $MISSING_DEPENDENCY
57970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57971    msys_help $MISSING_DEPENDENCY
57972  else
57973    PKGHANDLER_COMMAND=
57974
57975    case $PKGHANDLER in
57976      apt-get)
57977        apt_help     $MISSING_DEPENDENCY ;;
57978      yum)
57979        yum_help     $MISSING_DEPENDENCY ;;
57980      port)
57981        port_help    $MISSING_DEPENDENCY ;;
57982      pkgutil)
57983        pkgutil_help $MISSING_DEPENDENCY ;;
57984      pkgadd)
57985        pkgadd_help  $MISSING_DEPENDENCY ;;
57986    esac
57987
57988    if test "x$PKGHANDLER_COMMAND" != x; then
57989      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57990    fi
57991  fi
57992
57993
57994          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
57995
57996
57997fi
57998rm -f core conftest.err conftest.$ac_objext \
57999    conftest$ac_exeext conftest.$ac_ext
58000    CXXCFLAGS="$PREV_CXXFLAGS"
58001    LIBS="$PREV_LIBS"
58002    CXX="$PREV_CXX"
58003    ac_ext=cpp
58004ac_cpp='$CXXCPP $CPPFLAGS'
58005ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58006ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58007ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58008
58009
58010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
58011$as_echo_n "checking if we should bundle freetype... " >&6; }
58012    if test "x$BUNDLE_FREETYPE" = xyes; then
58013      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
58014    fi
58015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
58016$as_echo "$BUNDLE_FREETYPE" >&6; }
58017
58018  fi # end freetype needed
58019
58020
58021
58022
58023
58024
58025
58026# Check whether --with-alsa was given.
58027if test "${with_alsa+set}" = set; then :
58028  withval=$with_alsa;
58029fi
58030
58031
58032# Check whether --with-alsa-include was given.
58033if test "${with_alsa_include+set}" = set; then :
58034  withval=$with_alsa_include;
58035fi
58036
58037
58038# Check whether --with-alsa-lib was given.
58039if test "${with_alsa_lib+set}" = set; then :
58040  withval=$with_alsa_lib;
58041fi
58042
58043
58044  if test "x$NEEDS_LIB_ALSA" = xfalse; then
58045    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
58046        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
58047        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
58048      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
58049$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
58050    fi
58051    ALSA_CFLAGS=
58052    ALSA_LIBS=
58053  else
58054    ALSA_FOUND=no
58055
58056    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
58057      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
58058    fi
58059
58060    if test "x${with_alsa}" != x; then
58061      ALSA_LIBS="-L${with_alsa}/lib -lasound"
58062      ALSA_CFLAGS="-I${with_alsa}/include"
58063      ALSA_FOUND=yes
58064    fi
58065    if test "x${with_alsa_include}" != x; then
58066      ALSA_CFLAGS="-I${with_alsa_include}"
58067      ALSA_FOUND=yes
58068    fi
58069    if test "x${with_alsa_lib}" != x; then
58070      ALSA_LIBS="-L${with_alsa_lib} -lasound"
58071      ALSA_FOUND=yes
58072    fi
58073    # Do not try pkg-config if we have a sysroot set.
58074    if test "x$SYSROOT" = x; then
58075      if test "x$ALSA_FOUND" = xno; then
58076
58077pkg_failed=no
58078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
58079$as_echo_n "checking for ALSA... " >&6; }
58080
58081if test -n "$ALSA_CFLAGS"; then
58082    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
58083 elif test -n "$PKG_CONFIG"; then
58084    if test -n "$PKG_CONFIG" && \
58085    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
58086  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
58087  ac_status=$?
58088  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58089  test $ac_status = 0; }; then
58090  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
58091else
58092  pkg_failed=yes
58093fi
58094 else
58095    pkg_failed=untried
58096fi
58097if test -n "$ALSA_LIBS"; then
58098    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
58099 elif test -n "$PKG_CONFIG"; then
58100    if test -n "$PKG_CONFIG" && \
58101    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
58102  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
58103  ac_status=$?
58104  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58105  test $ac_status = 0; }; then
58106  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
58107else
58108  pkg_failed=yes
58109fi
58110 else
58111    pkg_failed=untried
58112fi
58113
58114
58115
58116if test $pkg_failed = yes; then
58117
58118if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58119        _pkg_short_errors_supported=yes
58120else
58121        _pkg_short_errors_supported=no
58122fi
58123        if test $_pkg_short_errors_supported = yes; then
58124	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
58125        else
58126	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
58127        fi
58128	# Put the nasty error message in config.log where it belongs
58129	echo "$ALSA_PKG_ERRORS" >&5
58130
58131	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58132$as_echo "no" >&6; }
58133                ALSA_FOUND=no
58134elif test $pkg_failed = untried; then
58135	ALSA_FOUND=no
58136else
58137	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
58138	ALSA_LIBS=$pkg_cv_ALSA_LIBS
58139        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58140$as_echo "yes" >&6; }
58141	ALSA_FOUND=yes
58142fi
58143      fi
58144    fi
58145    if test "x$ALSA_FOUND" = xno; then
58146      for ac_header in alsa/asoundlib.h
58147do :
58148  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
58149if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
58150  cat >>confdefs.h <<_ACEOF
58151#define HAVE_ALSA_ASOUNDLIB_H 1
58152_ACEOF
58153
58154            ALSA_FOUND=yes
58155            ALSA_CFLAGS=-Iignoreme
58156            ALSA_LIBS=-lasound
58157            DEFAULT_ALSA=yes
58158
58159else
58160  ALSA_FOUND=no
58161
58162fi
58163
58164done
58165
58166    fi
58167    if test "x$ALSA_FOUND" = xno; then
58168
58169  # Print a helpful message on how to acquire the necessary build dependency.
58170  # alsa is the help tag: freetype, cups, alsa etc
58171  MISSING_DEPENDENCY=alsa
58172
58173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58174    cygwin_help $MISSING_DEPENDENCY
58175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58176    msys_help $MISSING_DEPENDENCY
58177  else
58178    PKGHANDLER_COMMAND=
58179
58180    case $PKGHANDLER in
58181      apt-get)
58182        apt_help     $MISSING_DEPENDENCY ;;
58183      yum)
58184        yum_help     $MISSING_DEPENDENCY ;;
58185      port)
58186        port_help    $MISSING_DEPENDENCY ;;
58187      pkgutil)
58188        pkgutil_help $MISSING_DEPENDENCY ;;
58189      pkgadd)
58190        pkgadd_help  $MISSING_DEPENDENCY ;;
58191    esac
58192
58193    if test "x$PKGHANDLER_COMMAND" != x; then
58194      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58195    fi
58196  fi
58197
58198      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
58199    fi
58200  fi
58201
58202
58203
58204
58205
58206
58207# Check whether --with-libffi was given.
58208if test "${with_libffi+set}" = set; then :
58209  withval=$with_libffi;
58210fi
58211
58212
58213# Check whether --with-libffi-include was given.
58214if test "${with_libffi_include+set}" = set; then :
58215  withval=$with_libffi_include;
58216fi
58217
58218
58219# Check whether --with-libffi-lib was given.
58220if test "${with_libffi_lib+set}" = set; then :
58221  withval=$with_libffi_lib;
58222fi
58223
58224
58225  if test "x$NEEDS_LIB_FFI" = xfalse; then
58226    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
58227        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
58228        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
58229      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
58230$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
58231    fi
58232    LIBFFI_CFLAGS=
58233    LIBFFI_LIBS=
58234  else
58235    LIBFFI_FOUND=no
58236
58237    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
58238      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
58239    fi
58240
58241    if test "x${with_libffi}" != x; then
58242      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
58243      LIBFFI_CFLAGS="-I${with_libffi}/include"
58244      LIBFFI_FOUND=yes
58245    fi
58246    if test "x${with_libffi_include}" != x; then
58247      LIBFFI_CFLAGS="-I${with_libffi_include}"
58248      LIBFFI_FOUND=yes
58249    fi
58250    if test "x${with_libffi_lib}" != x; then
58251      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
58252      LIBFFI_FOUND=yes
58253    fi
58254    # Do not try pkg-config if we have a sysroot set.
58255    if test "x$SYSROOT" = x; then
58256      if test "x$LIBFFI_FOUND" = xno; then
58257        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
58258
58259pkg_failed=no
58260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
58261$as_echo_n "checking for LIBFFI... " >&6; }
58262
58263if test -n "$LIBFFI_CFLAGS"; then
58264    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
58265 elif test -n "$PKG_CONFIG"; then
58266    if test -n "$PKG_CONFIG" && \
58267    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
58268  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
58269  ac_status=$?
58270  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58271  test $ac_status = 0; }; then
58272  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
58273else
58274  pkg_failed=yes
58275fi
58276 else
58277    pkg_failed=untried
58278fi
58279if test -n "$LIBFFI_LIBS"; then
58280    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
58281 elif test -n "$PKG_CONFIG"; then
58282    if test -n "$PKG_CONFIG" && \
58283    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
58284  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
58285  ac_status=$?
58286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58287  test $ac_status = 0; }; then
58288  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
58289else
58290  pkg_failed=yes
58291fi
58292 else
58293    pkg_failed=untried
58294fi
58295
58296
58297
58298if test $pkg_failed = yes; then
58299
58300if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58301        _pkg_short_errors_supported=yes
58302else
58303        _pkg_short_errors_supported=no
58304fi
58305        if test $_pkg_short_errors_supported = yes; then
58306	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
58307        else
58308	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
58309        fi
58310	# Put the nasty error message in config.log where it belongs
58311	echo "$LIBFFI_PKG_ERRORS" >&5
58312
58313	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58314$as_echo "no" >&6; }
58315                LIBFFI_FOUND=no
58316elif test $pkg_failed = untried; then
58317	LIBFFI_FOUND=no
58318else
58319	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
58320	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
58321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58322$as_echo "yes" >&6; }
58323	LIBFFI_FOUND=yes
58324fi
58325      fi
58326    fi
58327    if test "x$LIBFFI_FOUND" = xno; then
58328      for ac_header in ffi.h
58329do :
58330  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
58331if test "x$ac_cv_header_ffi_h" = xyes; then :
58332  cat >>confdefs.h <<_ACEOF
58333#define HAVE_FFI_H 1
58334_ACEOF
58335
58336            LIBFFI_FOUND=yes
58337            LIBFFI_CFLAGS=
58338            LIBFFI_LIBS=-lffi
58339
58340else
58341  LIBFFI_FOUND=no
58342
58343fi
58344
58345done
58346
58347    fi
58348    if test "x$LIBFFI_FOUND" = xno; then
58349
58350  # Print a helpful message on how to acquire the necessary build dependency.
58351  # ffi is the help tag: freetype, cups, alsa etc
58352  MISSING_DEPENDENCY=ffi
58353
58354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58355    cygwin_help $MISSING_DEPENDENCY
58356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58357    msys_help $MISSING_DEPENDENCY
58358  else
58359    PKGHANDLER_COMMAND=
58360
58361    case $PKGHANDLER in
58362      apt-get)
58363        apt_help     $MISSING_DEPENDENCY ;;
58364      yum)
58365        yum_help     $MISSING_DEPENDENCY ;;
58366      port)
58367        port_help    $MISSING_DEPENDENCY ;;
58368      pkgutil)
58369        pkgutil_help $MISSING_DEPENDENCY ;;
58370      pkgadd)
58371        pkgadd_help  $MISSING_DEPENDENCY ;;
58372    esac
58373
58374    if test "x$PKGHANDLER_COMMAND" != x; then
58375      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58376    fi
58377  fi
58378
58379      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
58380    fi
58381
58382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
58383$as_echo_n "checking if libffi works... " >&6; }
58384    ac_ext=c
58385ac_cpp='$CPP $CPPFLAGS'
58386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58388ac_compiler_gnu=$ac_cv_c_compiler_gnu
58389
58390    OLD_CFLAGS="$CFLAGS"
58391    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
58392    OLD_LIBS="$LIBS"
58393    LIBS="$LIBS $LIBFFI_LIBS"
58394    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58395/* end confdefs.h.  */
58396#include <ffi.h>
58397int
58398main ()
58399{
58400
58401          ffi_call(NULL, NULL, NULL, NULL);
58402          return 0;
58403
58404  ;
58405  return 0;
58406}
58407_ACEOF
58408if ac_fn_c_try_link "$LINENO"; then :
58409  LIBFFI_WORKS=yes
58410else
58411  LIBFFI_WORKS=no
58412
58413fi
58414rm -f core conftest.err conftest.$ac_objext \
58415    conftest$ac_exeext conftest.$ac_ext
58416    CFLAGS="$OLD_CFLAGS"
58417    LIBS="$OLD_LIBS"
58418    ac_ext=cpp
58419ac_cpp='$CXXCPP $CPPFLAGS'
58420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58423
58424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
58425$as_echo "$LIBFFI_WORKS" >&6; }
58426
58427    if test "x$LIBFFI_WORKS" = xno; then
58428
58429  # Print a helpful message on how to acquire the necessary build dependency.
58430  # ffi is the help tag: freetype, cups, alsa etc
58431  MISSING_DEPENDENCY=ffi
58432
58433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58434    cygwin_help $MISSING_DEPENDENCY
58435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58436    msys_help $MISSING_DEPENDENCY
58437  else
58438    PKGHANDLER_COMMAND=
58439
58440    case $PKGHANDLER in
58441      apt-get)
58442        apt_help     $MISSING_DEPENDENCY ;;
58443      yum)
58444        yum_help     $MISSING_DEPENDENCY ;;
58445      port)
58446        port_help    $MISSING_DEPENDENCY ;;
58447      pkgutil)
58448        pkgutil_help $MISSING_DEPENDENCY ;;
58449      pkgadd)
58450        pkgadd_help  $MISSING_DEPENDENCY ;;
58451    esac
58452
58453    if test "x$PKGHANDLER_COMMAND" != x; then
58454      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58455    fi
58456  fi
58457
58458      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
58459    fi
58460  fi
58461
58462
58463
58464
58465
58466  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
58467    # Extract the first word of "llvm-config", so it can be a program name with args.
58468set dummy llvm-config; ac_word=$2
58469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58470$as_echo_n "checking for $ac_word... " >&6; }
58471if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
58472  $as_echo_n "(cached) " >&6
58473else
58474  if test -n "$LLVM_CONFIG"; then
58475  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
58476else
58477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58478for as_dir in $PATH
58479do
58480  IFS=$as_save_IFS
58481  test -z "$as_dir" && as_dir=.
58482    for ac_exec_ext in '' $ac_executable_extensions; do
58483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58484    ac_cv_prog_LLVM_CONFIG="llvm-config"
58485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58486    break 2
58487  fi
58488done
58489  done
58490IFS=$as_save_IFS
58491
58492fi
58493fi
58494LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
58495if test -n "$LLVM_CONFIG"; then
58496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
58497$as_echo "$LLVM_CONFIG" >&6; }
58498else
58499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58500$as_echo "no" >&6; }
58501fi
58502
58503
58504
58505    if test "x$LLVM_CONFIG" != xllvm-config; then
58506      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
58507    fi
58508
58509    llvm_components="jit mcjit engine nativecodegen native"
58510    unset LLVM_CFLAGS
58511    for flag in $("$LLVM_CONFIG" --cxxflags); do
58512      if echo "${flag}" | grep -q '^-[ID]'; then
58513        if test "${flag}" != "-D_DEBUG" ; then
58514          if test "${LLVM_CFLAGS}" != "" ; then
58515            LLVM_CFLAGS="${LLVM_CFLAGS} "
58516          fi
58517          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
58518        fi
58519      fi
58520    done
58521    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
58522    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
58523
58524    unset LLVM_LDFLAGS
58525    for flag in $("${LLVM_CONFIG}" --ldflags); do
58526      if echo "${flag}" | grep -q '^-L'; then
58527        if test "${LLVM_LDFLAGS}" != ""; then
58528          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
58529        fi
58530        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
58531      fi
58532    done
58533
58534    unset LLVM_LIBS
58535    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
58536      if echo "${flag}" | grep -q '^-l'; then
58537        if test "${LLVM_LIBS}" != ""; then
58538          LLVM_LIBS="${LLVM_LIBS} "
58539        fi
58540        LLVM_LIBS="${LLVM_LIBS}${flag}"
58541      fi
58542    done
58543
58544
58545
58546
58547  fi
58548
58549
58550
58551# Check whether --with-libjpeg was given.
58552if test "${with_libjpeg+set}" = set; then :
58553  withval=$with_libjpeg;
58554fi
58555
58556
58557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
58558$as_echo_n "checking for which libjpeg to use... " >&6; }
58559  # default is bundled
58560  DEFAULT_LIBJPEG=bundled
58561  # if user didn't specify, use DEFAULT_LIBJPEG
58562  if test "x${with_libjpeg}" = "x"; then
58563    with_libjpeg=${DEFAULT_LIBJPEG}
58564  fi
58565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
58566$as_echo "${with_libjpeg}" >&6; }
58567
58568  if test "x${with_libjpeg}" = "xbundled"; then
58569    USE_EXTERNAL_LIBJPEG=false
58570  elif test "x${with_libjpeg}" = "xsystem"; then
58571    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
58572if test "x$ac_cv_header_jpeglib_h" = xyes; then :
58573
58574else
58575   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
58576fi
58577
58578
58579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
58580$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
58581if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
58582  $as_echo_n "(cached) " >&6
58583else
58584  ac_check_lib_save_LIBS=$LIBS
58585LIBS="-ljpeg  $LIBS"
58586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58587/* end confdefs.h.  */
58588
58589/* Override any GCC internal prototype to avoid an error.
58590   Use char because int might match the return type of a GCC
58591   builtin and then its argument prototype would still apply.  */
58592#ifdef __cplusplus
58593extern "C"
58594#endif
58595char jpeg_CreateDecompress ();
58596int
58597main ()
58598{
58599return jpeg_CreateDecompress ();
58600  ;
58601  return 0;
58602}
58603_ACEOF
58604if ac_fn_cxx_try_link "$LINENO"; then :
58605  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
58606else
58607  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
58608fi
58609rm -f core conftest.err conftest.$ac_objext \
58610    conftest$ac_exeext conftest.$ac_ext
58611LIBS=$ac_check_lib_save_LIBS
58612fi
58613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
58614$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
58615if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
58616  cat >>confdefs.h <<_ACEOF
58617#define HAVE_LIBJPEG 1
58618_ACEOF
58619
58620  LIBS="-ljpeg $LIBS"
58621
58622else
58623   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
58624fi
58625
58626
58627    USE_EXTERNAL_LIBJPEG=true
58628  else
58629    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
58630  fi
58631
58632
58633
58634
58635
58636# Check whether --with-giflib was given.
58637if test "${with_giflib+set}" = set; then :
58638  withval=$with_giflib;
58639fi
58640
58641
58642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
58643$as_echo_n "checking for which giflib to use... " >&6; }
58644  # default is bundled
58645  DEFAULT_GIFLIB=bundled
58646  # if user didn't specify, use DEFAULT_GIFLIB
58647  if test "x${with_giflib}" = "x"; then
58648    with_giflib=${DEFAULT_GIFLIB}
58649  fi
58650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
58651$as_echo "${with_giflib}" >&6; }
58652
58653  if test "x${with_giflib}" = "xbundled"; then
58654    USE_EXTERNAL_LIBGIF=false
58655  elif test "x${with_giflib}" = "xsystem"; then
58656    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
58657if test "x$ac_cv_header_gif_lib_h" = xyes; then :
58658
58659else
58660   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
58661fi
58662
58663
58664    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
58665$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
58666if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
58667  $as_echo_n "(cached) " >&6
58668else
58669  ac_check_lib_save_LIBS=$LIBS
58670LIBS="-lgif  $LIBS"
58671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58672/* end confdefs.h.  */
58673
58674/* Override any GCC internal prototype to avoid an error.
58675   Use char because int might match the return type of a GCC
58676   builtin and then its argument prototype would still apply.  */
58677#ifdef __cplusplus
58678extern "C"
58679#endif
58680char DGifGetCode ();
58681int
58682main ()
58683{
58684return DGifGetCode ();
58685  ;
58686  return 0;
58687}
58688_ACEOF
58689if ac_fn_cxx_try_link "$LINENO"; then :
58690  ac_cv_lib_gif_DGifGetCode=yes
58691else
58692  ac_cv_lib_gif_DGifGetCode=no
58693fi
58694rm -f core conftest.err conftest.$ac_objext \
58695    conftest$ac_exeext conftest.$ac_ext
58696LIBS=$ac_check_lib_save_LIBS
58697fi
58698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
58699$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
58700if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
58701  cat >>confdefs.h <<_ACEOF
58702#define HAVE_LIBGIF 1
58703_ACEOF
58704
58705  LIBS="-lgif $LIBS"
58706
58707else
58708   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
58709fi
58710
58711
58712    USE_EXTERNAL_LIBGIF=true
58713  else
58714    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
58715  fi
58716
58717
58718
58719
58720
58721# Check whether --with-libpng was given.
58722if test "${with_libpng+set}" = set; then :
58723  withval=$with_libpng;
58724fi
58725
58726
58727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
58728$as_echo_n "checking for which libpng to use... " >&6; }
58729
58730  # default is bundled
58731  DEFAULT_LIBPNG=bundled
58732  # if user didn't specify, use DEFAULT_LIBPNG
58733  if test "x${with_libpng}" = "x"; then
58734      with_libpng=${DEFAULT_LIBPNG}
58735  fi
58736
58737  if test "x${with_libpng}" = "xbundled"; then
58738      USE_EXTERNAL_LIBPNG=false
58739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58740$as_echo "bundled" >&6; }
58741  elif test "x${with_libpng}" = "xsystem"; then
58742
58743pkg_failed=no
58744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
58745$as_echo_n "checking for PNG... " >&6; }
58746
58747if test -n "$PNG_CFLAGS"; then
58748    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
58749 elif test -n "$PKG_CONFIG"; then
58750    if test -n "$PKG_CONFIG" && \
58751    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58752  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58753  ac_status=$?
58754  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58755  test $ac_status = 0; }; then
58756  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
58757else
58758  pkg_failed=yes
58759fi
58760 else
58761    pkg_failed=untried
58762fi
58763if test -n "$PNG_LIBS"; then
58764    pkg_cv_PNG_LIBS="$PNG_LIBS"
58765 elif test -n "$PKG_CONFIG"; then
58766    if test -n "$PKG_CONFIG" && \
58767    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58768  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58769  ac_status=$?
58770  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58771  test $ac_status = 0; }; then
58772  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
58773else
58774  pkg_failed=yes
58775fi
58776 else
58777    pkg_failed=untried
58778fi
58779
58780
58781
58782if test $pkg_failed = yes; then
58783
58784if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58785        _pkg_short_errors_supported=yes
58786else
58787        _pkg_short_errors_supported=no
58788fi
58789        if test $_pkg_short_errors_supported = yes; then
58790	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
58791        else
58792	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
58793        fi
58794	# Put the nasty error message in config.log where it belongs
58795	echo "$PNG_PKG_ERRORS" >&5
58796
58797	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58798$as_echo "no" >&6; }
58799                 LIBPNG_FOUND=no
58800elif test $pkg_failed = untried; then
58801	 LIBPNG_FOUND=no
58802else
58803	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
58804	PNG_LIBS=$pkg_cv_PNG_LIBS
58805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58806$as_echo "yes" >&6; }
58807	 LIBPNG_FOUND=yes
58808fi
58809      if test "x${LIBPNG_FOUND}" = "xyes"; then
58810          USE_EXTERNAL_LIBPNG=true
58811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58812$as_echo "system" >&6; }
58813      else
58814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58815$as_echo "system not found" >&6; }
58816          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
58817      fi
58818  else
58819      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
58820  fi
58821
58822
58823
58824
58825
58826# Check whether --with-zlib was given.
58827if test "${with_zlib+set}" = set; then :
58828  withval=$with_zlib;
58829fi
58830
58831
58832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
58833$as_echo_n "checking for compress in -lz... " >&6; }
58834if ${ac_cv_lib_z_compress+:} false; then :
58835  $as_echo_n "(cached) " >&6
58836else
58837  ac_check_lib_save_LIBS=$LIBS
58838LIBS="-lz  $LIBS"
58839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58840/* end confdefs.h.  */
58841
58842/* Override any GCC internal prototype to avoid an error.
58843   Use char because int might match the return type of a GCC
58844   builtin and then its argument prototype would still apply.  */
58845#ifdef __cplusplus
58846extern "C"
58847#endif
58848char compress ();
58849int
58850main ()
58851{
58852return compress ();
58853  ;
58854  return 0;
58855}
58856_ACEOF
58857if ac_fn_cxx_try_link "$LINENO"; then :
58858  ac_cv_lib_z_compress=yes
58859else
58860  ac_cv_lib_z_compress=no
58861fi
58862rm -f core conftest.err conftest.$ac_objext \
58863    conftest$ac_exeext conftest.$ac_ext
58864LIBS=$ac_check_lib_save_LIBS
58865fi
58866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
58867$as_echo "$ac_cv_lib_z_compress" >&6; }
58868if test "x$ac_cv_lib_z_compress" = xyes; then :
58869   ZLIB_FOUND=yes
58870else
58871   ZLIB_FOUND=no
58872fi
58873
58874
58875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
58876$as_echo_n "checking for which zlib to use... " >&6; }
58877
58878  DEFAULT_ZLIB=bundled
58879  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
58880    # On macosx default is system...on others default is bundled
58881    DEFAULT_ZLIB=system
58882  fi
58883
58884  if test "x${ZLIB_FOUND}" != "xyes"; then
58885    # If we don't find any system...set default to bundled
58886    DEFAULT_ZLIB=bundled
58887  fi
58888
58889  # If user didn't specify, use DEFAULT_ZLIB
58890  if test "x${with_zlib}" = "x"; then
58891    with_zlib=${DEFAULT_ZLIB}
58892  fi
58893
58894  if test "x${with_zlib}" = "xbundled"; then
58895    USE_EXTERNAL_LIBZ=false
58896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58897$as_echo "bundled" >&6; }
58898  elif test "x${with_zlib}" = "xsystem"; then
58899    if test "x${ZLIB_FOUND}" = "xyes"; then
58900      USE_EXTERNAL_LIBZ=true
58901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58902$as_echo "system" >&6; }
58903    else
58904      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58905$as_echo "system not found" >&6; }
58906      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
58907    fi
58908  else
58909    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
58910  fi
58911
58912
58913
58914
58915
58916# Check whether --with-lcms was given.
58917if test "${with_lcms+set}" = set; then :
58918  withval=$with_lcms;
58919fi
58920
58921
58922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
58923$as_echo_n "checking for which lcms to use... " >&6; }
58924
58925  DEFAULT_LCMS=bundled
58926  # If user didn't specify, use DEFAULT_LCMS
58927  if test "x${with_lcms}" = "x"; then
58928      with_lcms=${DEFAULT_LCMS}
58929  fi
58930
58931  if test "x${with_lcms}" = "xbundled"; then
58932    USE_EXTERNAL_LCMS=false
58933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58934$as_echo "bundled" >&6; }
58935  elif test "x${with_lcms}" = "xsystem"; then
58936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58937$as_echo "system" >&6; }
58938
58939pkg_failed=no
58940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
58941$as_echo_n "checking for LCMS... " >&6; }
58942
58943if test -n "$LCMS_CFLAGS"; then
58944    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
58945 elif test -n "$PKG_CONFIG"; then
58946    if test -n "$PKG_CONFIG" && \
58947    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58948  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58949  ac_status=$?
58950  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58951  test $ac_status = 0; }; then
58952  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
58953else
58954  pkg_failed=yes
58955fi
58956 else
58957    pkg_failed=untried
58958fi
58959if test -n "$LCMS_LIBS"; then
58960    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
58961 elif test -n "$PKG_CONFIG"; then
58962    if test -n "$PKG_CONFIG" && \
58963    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58964  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58965  ac_status=$?
58966  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58967  test $ac_status = 0; }; then
58968  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
58969else
58970  pkg_failed=yes
58971fi
58972 else
58973    pkg_failed=untried
58974fi
58975
58976
58977
58978if test $pkg_failed = yes; then
58979
58980if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58981        _pkg_short_errors_supported=yes
58982else
58983        _pkg_short_errors_supported=no
58984fi
58985        if test $_pkg_short_errors_supported = yes; then
58986	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
58987        else
58988	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
58989        fi
58990	# Put the nasty error message in config.log where it belongs
58991	echo "$LCMS_PKG_ERRORS" >&5
58992
58993	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58994$as_echo "no" >&6; }
58995                LCMS_FOUND=no
58996elif test $pkg_failed = untried; then
58997	LCMS_FOUND=no
58998else
58999	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
59000	LCMS_LIBS=$pkg_cv_LCMS_LIBS
59001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59002$as_echo "yes" >&6; }
59003	LCMS_FOUND=yes
59004fi
59005    if test "x${LCMS_FOUND}" = "xyes"; then
59006      USE_EXTERNAL_LCMS=true
59007    else
59008      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
59009    fi
59010  else
59011    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
59012  fi
59013
59014
59015
59016
59017
59018
59019
59020
59021
59022
59023
59024  # Setup libm (the maths library)
59025  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
59026$as_echo_n "checking for cos in -lm... " >&6; }
59027if ${ac_cv_lib_m_cos+:} false; then :
59028  $as_echo_n "(cached) " >&6
59029else
59030  ac_check_lib_save_LIBS=$LIBS
59031LIBS="-lm  $LIBS"
59032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59033/* end confdefs.h.  */
59034
59035/* Override any GCC internal prototype to avoid an error.
59036   Use char because int might match the return type of a GCC
59037   builtin and then its argument prototype would still apply.  */
59038#ifdef __cplusplus
59039extern "C"
59040#endif
59041char cos ();
59042int
59043main ()
59044{
59045return cos ();
59046  ;
59047  return 0;
59048}
59049_ACEOF
59050if ac_fn_cxx_try_link "$LINENO"; then :
59051  ac_cv_lib_m_cos=yes
59052else
59053  ac_cv_lib_m_cos=no
59054fi
59055rm -f core conftest.err conftest.$ac_objext \
59056    conftest$ac_exeext conftest.$ac_ext
59057LIBS=$ac_check_lib_save_LIBS
59058fi
59059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
59060$as_echo "$ac_cv_lib_m_cos" >&6; }
59061if test "x$ac_cv_lib_m_cos" = xyes; then :
59062  cat >>confdefs.h <<_ACEOF
59063#define HAVE_LIBM 1
59064_ACEOF
59065
59066  LIBS="-lm $LIBS"
59067
59068else
59069
59070      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
59071$as_echo "$as_me: Maths library was not found" >&6;}
59072
59073fi
59074
59075  LIBM=-lm
59076
59077
59078  # Setup libdl (for dynamic library loading)
59079  save_LIBS="$LIBS"
59080  LIBS=""
59081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
59082$as_echo_n "checking for dlopen in -ldl... " >&6; }
59083if ${ac_cv_lib_dl_dlopen+:} false; then :
59084  $as_echo_n "(cached) " >&6
59085else
59086  ac_check_lib_save_LIBS=$LIBS
59087LIBS="-ldl  $LIBS"
59088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59089/* end confdefs.h.  */
59090
59091/* Override any GCC internal prototype to avoid an error.
59092   Use char because int might match the return type of a GCC
59093   builtin and then its argument prototype would still apply.  */
59094#ifdef __cplusplus
59095extern "C"
59096#endif
59097char dlopen ();
59098int
59099main ()
59100{
59101return dlopen ();
59102  ;
59103  return 0;
59104}
59105_ACEOF
59106if ac_fn_cxx_try_link "$LINENO"; then :
59107  ac_cv_lib_dl_dlopen=yes
59108else
59109  ac_cv_lib_dl_dlopen=no
59110fi
59111rm -f core conftest.err conftest.$ac_objext \
59112    conftest$ac_exeext conftest.$ac_ext
59113LIBS=$ac_check_lib_save_LIBS
59114fi
59115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
59116$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
59117if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
59118  cat >>confdefs.h <<_ACEOF
59119#define HAVE_LIBDL 1
59120_ACEOF
59121
59122  LIBS="-ldl $LIBS"
59123
59124fi
59125
59126  LIBDL="$LIBS"
59127
59128  LIBS="$save_LIBS"
59129
59130  # Deprecated libraries, keep the flags for backwards compatibility
59131  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
59132
59133
59134# Check whether --with-dxsdk was given.
59135if test "${with_dxsdk+set}" = set; then :
59136  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
59137$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
59138fi
59139
59140
59141
59142
59143# Check whether --with-dxsdk-lib was given.
59144if test "${with_dxsdk_lib+set}" = set; then :
59145  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
59146$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
59147fi
59148
59149
59150
59151
59152# Check whether --with-dxsdk-include was given.
59153if test "${with_dxsdk_include+set}" = set; then :
59154  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
59155$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
59156fi
59157
59158
59159  fi
59160
59161  # Control if libzip can use mmap. Available for purposes of overriding.
59162  LIBZIP_CAN_USE_MMAP=true
59163
59164
59165
59166
59167
59168
59169
59170
59171
59172
59173
59174
59175
59176
59177###############################################################################
59178#
59179# We need to do some final tweaking, when everything else is done.
59180#
59181###############################################################################
59182
59183
59184  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
59185
59186
59187
59188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
59189$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
59190
59191  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
59192    ENABLE_INTREE_EC=yes
59193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59194$as_echo "yes" >&6; }
59195  else
59196    ENABLE_INTREE_EC=no
59197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59198$as_echo "no" >&6; }
59199  fi
59200
59201
59202
59203
59204###############################################################################
59205#
59206# Configure parts of the build that only affect the build performance,
59207# not the result.
59208#
59209###############################################################################
59210
59211
59212  # How many cores do we have on this build system?
59213
59214# Check whether --with-num-cores was given.
59215if test "${with_num_cores+set}" = set; then :
59216  withval=$with_num_cores;
59217fi
59218
59219  if test "x$with_num_cores" = x; then
59220    # The number of cores were not specified, try to probe them.
59221
59222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
59223$as_echo_n "checking for number of cores... " >&6; }
59224  NUM_CORES=1
59225  FOUND_CORES=no
59226
59227  if test -f /proc/cpuinfo; then
59228    # Looks like a Linux (or cygwin) system
59229    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
59230    FOUND_CORES=yes
59231  elif test -x /usr/sbin/psrinfo; then
59232    # Looks like a Solaris system
59233    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
59234    FOUND_CORES=yes
59235  elif test -x /usr/sbin/system_profiler; then
59236    # Looks like a MacOSX system
59237    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
59238    FOUND_CORES=yes
59239  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
59240    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
59241    FOUND_CORES=yes
59242  elif test -n "$NUMBER_OF_PROCESSORS"; then
59243    # On windows, look in the env
59244    NUM_CORES=$NUMBER_OF_PROCESSORS
59245    FOUND_CORES=yes
59246  fi
59247
59248  if test "x$FOUND_CORES" = xyes; then
59249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
59250$as_echo "$NUM_CORES" >&6; }
59251  else
59252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
59253$as_echo "could not detect number of cores, defaulting to 1" >&6; }
59254    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
59255$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
59256  fi
59257
59258  else
59259    NUM_CORES=$with_num_cores
59260  fi
59261
59262
59263
59264  # How much memory do we have on this build system?
59265
59266# Check whether --with-memory-size was given.
59267if test "${with_memory_size+set}" = set; then :
59268  withval=$with_memory_size;
59269fi
59270
59271  if test "x$with_memory_size" = x; then
59272    # The memory size was not specified, try to probe it.
59273
59274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
59275$as_echo_n "checking for memory size... " >&6; }
59276  # Default to 1024 MB
59277  MEMORY_SIZE=1024
59278  FOUND_MEM=no
59279
59280  if test -f /proc/meminfo; then
59281    # Looks like a Linux (or cygwin) system
59282    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
59283    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
59284    FOUND_MEM=yes
59285  elif test -x /usr/sbin/prtconf; then
59286    # Looks like a Solaris or AIX system
59287    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
59288    FOUND_MEM=yes
59289  elif test -x /usr/sbin/system_profiler; then
59290    # Looks like a MacOSX system
59291    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
59292    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
59293    FOUND_MEM=yes
59294  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
59295    # Windows, but without cygwin
59296    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
59297    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
59298    FOUND_MEM=yes
59299  fi
59300
59301  if test "x$FOUND_MEM" = xyes; then
59302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
59303$as_echo "$MEMORY_SIZE MB" >&6; }
59304  else
59305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
59306$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
59307    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
59308$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
59309  fi
59310
59311  else
59312    MEMORY_SIZE=$with_memory_size
59313  fi
59314
59315
59316
59317  # Provide a decent default number of parallel jobs for make depending on
59318  # number of cores, amount of memory and machine architecture.
59319
59320# Check whether --with-jobs was given.
59321if test "${with_jobs+set}" = set; then :
59322  withval=$with_jobs;
59323fi
59324
59325  if test "x$with_jobs" = x; then
59326    # Number of jobs was not specified, calculate.
59327    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
59328$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
59329    # Approximate memory in GB.
59330    memory_gb=`expr $MEMORY_SIZE / 1024`
59331    # Pick the lowest of memory in gb and number of cores.
59332    if test "$memory_gb" -lt "$NUM_CORES"; then
59333      JOBS="$memory_gb"
59334    else
59335      JOBS="$NUM_CORES"
59336    fi
59337    if test "$JOBS" -eq "0"; then
59338      JOBS=1
59339    fi
59340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
59341$as_echo "$JOBS" >&6; }
59342  else
59343    JOBS=$with_jobs
59344  fi
59345
59346
59347
59348  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
59349
59350# Check whether --with-test-jobs was given.
59351if test "${with_test_jobs+set}" = set; then :
59352  withval=$with_test_jobs;
59353fi
59354
59355  if test "x$with_test_jobs" = x; then
59356      TEST_JOBS=0
59357  else
59358      TEST_JOBS=$with_test_jobs
59359  fi
59360
59361
59362
59363# Setup arguments for the boot jdk (after cores and memory have been setup)
59364
59365  ##############################################################################
59366  #
59367  # Specify jvm options for anything that is run with the Boot JDK.
59368  # Not all JVM:s accept the same arguments on the command line.
59369  #
59370
59371# Check whether --with-boot-jdk-jvmargs was given.
59372if test "${with_boot_jdk_jvmargs+set}" = set; then :
59373  withval=$with_boot_jdk_jvmargs;
59374fi
59375
59376
59377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
59378$as_echo_n "checking flags for boot jdk java command ... " >&6; }
59379
59380  # Disable special log output when a debug build is used as Boot JDK...
59381
59382  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
59383  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
59384  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
59385  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59386  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59387  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59388    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
59389    JVM_ARG_OK=true
59390  else
59391    $ECHO "Arg failed:" >&5
59392    $ECHO "$OUTPUT" >&5
59393    JVM_ARG_OK=false
59394  fi
59395
59396
59397  # Apply user provided options.
59398
59399  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
59400  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
59401  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
59402  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59403  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59404  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59405    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
59406    JVM_ARG_OK=true
59407  else
59408    $ECHO "Arg failed:" >&5
59409    $ECHO "$OUTPUT" >&5
59410    JVM_ARG_OK=false
59411  fi
59412
59413
59414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
59415$as_echo "$boot_jdk_jvmargs" >&6; }
59416
59417  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
59418  JAVA_FLAGS=$boot_jdk_jvmargs
59419
59420
59421
59422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
59423$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
59424
59425  # Starting amount of heap memory.
59426
59427  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
59428  $ECHO "Command: $JAVA -Xms64M -version" >&5
59429  OUTPUT=`$JAVA -Xms64M -version 2>&1`
59430  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59431  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59432  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59433    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
59434    JVM_ARG_OK=true
59435  else
59436    $ECHO "Arg failed:" >&5
59437    $ECHO "$OUTPUT" >&5
59438    JVM_ARG_OK=false
59439  fi
59440
59441
59442  # Maximum amount of heap memory.
59443  # Maximum stack size.
59444  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
59445  if test "x$BOOT_JDK_BITS" = "x32"; then
59446    if test "$JVM_MAX_HEAP" -gt "1100"; then
59447      JVM_MAX_HEAP=1100
59448    elif test "$JVM_MAX_HEAP" -lt "512"; then
59449      JVM_MAX_HEAP=512
59450    fi
59451    STACK_SIZE=768
59452  else
59453    # Running a 64 bit JVM allows for and requires a bigger heap
59454    if test "$JVM_MAX_HEAP" -gt "1600"; then
59455      JVM_MAX_HEAP=1600
59456    elif test "$JVM_MAX_HEAP" -lt "512"; then
59457      JVM_MAX_HEAP=512
59458    fi
59459    STACK_SIZE=1536
59460  fi
59461
59462  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
59463  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
59464  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
59465  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59466  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59467  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59468    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
59469    JVM_ARG_OK=true
59470  else
59471    $ECHO "Arg failed:" >&5
59472    $ECHO "$OUTPUT" >&5
59473    JVM_ARG_OK=false
59474  fi
59475
59476
59477  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
59478  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
59479  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
59480  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59481  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59482  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59483    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
59484    JVM_ARG_OK=true
59485  else
59486    $ECHO "Arg failed:" >&5
59487    $ECHO "$OUTPUT" >&5
59488    JVM_ARG_OK=false
59489  fi
59490
59491
59492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
59493$as_echo "$boot_jdk_jvmargs_big" >&6; }
59494
59495  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
59496
59497
59498  # By default, the main javac compilations use big
59499  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
59500
59501
59502  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
59503$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
59504
59505  # Use serial gc for small short lived tools if possible
59506
59507  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
59508  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
59509  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
59510  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59511  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59512  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59513    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
59514    JVM_ARG_OK=true
59515  else
59516    $ECHO "Arg failed:" >&5
59517    $ECHO "$OUTPUT" >&5
59518    JVM_ARG_OK=false
59519  fi
59520
59521
59522  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
59523  $ECHO "Command: $JAVA -Xms32M -version" >&5
59524  OUTPUT=`$JAVA -Xms32M -version 2>&1`
59525  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59526  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59527  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59528    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
59529    JVM_ARG_OK=true
59530  else
59531    $ECHO "Arg failed:" >&5
59532    $ECHO "$OUTPUT" >&5
59533    JVM_ARG_OK=false
59534  fi
59535
59536
59537  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
59538  $ECHO "Command: $JAVA -Xmx512M -version" >&5
59539  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
59540  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59541  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59542  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59543    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
59544    JVM_ARG_OK=true
59545  else
59546    $ECHO "Arg failed:" >&5
59547    $ECHO "$OUTPUT" >&5
59548    JVM_ARG_OK=false
59549  fi
59550
59551
59552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
59553$as_echo "$boot_jdk_jvmargs_small" >&6; }
59554
59555  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
59556
59557
59558  JAVA_TOOL_FLAGS_SMALL=""
59559  for f in $JAVA_FLAGS_SMALL; do
59560    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
59561  done
59562
59563
59564
59565# Setup smart javac (after cores and memory have been setup)
59566
59567
59568# Check whether --with-sjavac-server-java was given.
59569if test "${with_sjavac_server_java+set}" = set; then :
59570  withval=$with_sjavac_server_java;
59571fi
59572
59573
59574  if test "x$with_sjavac_server_java" != x; then
59575    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
59576    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
59577    if test "x$FOUND_VERSION" = x; then
59578      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
59579    fi
59580  else
59581    SJAVAC_SERVER_JAVA="$JAVA"
59582  fi
59583
59584
59585  if test "$MEMORY_SIZE" -gt "3000"; then
59586
59587  $ECHO "Check if jvm arg is ok: -d64" >&5
59588  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
59589  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
59590  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59591  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59592  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59593    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
59594    JVM_ARG_OK=true
59595  else
59596    $ECHO "Arg failed:" >&5
59597    $ECHO "$OUTPUT" >&5
59598    JVM_ARG_OK=false
59599  fi
59600
59601    if test "$JVM_ARG_OK" = true; then
59602      JVM_64BIT=true
59603      JVM_ARG_OK=false
59604    fi
59605  fi
59606
59607  MX_VALUE=`expr $MEMORY_SIZE / 2`
59608  if test "$JVM_64BIT" = true; then
59609    # Set ms lower than mx since more than one instance of the server might
59610    # get launched at the same time before they figure out which instance won.
59611    MS_VALUE=512
59612    if test "$MX_VALUE" -gt "2048"; then
59613      MX_VALUE=2048
59614    fi
59615  else
59616    MS_VALUE=256
59617    if test "$MX_VALUE" -gt "1500"; then
59618      MX_VALUE=1500
59619    fi
59620  fi
59621  if test "$MX_VALUE" -lt "512"; then
59622    MX_VALUE=512
59623  fi
59624
59625  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
59626  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
59627  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
59628  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59629  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59630  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59631    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
59632    JVM_ARG_OK=true
59633  else
59634    $ECHO "Arg failed:" >&5
59635    $ECHO "$OUTPUT" >&5
59636    JVM_ARG_OK=false
59637  fi
59638
59639
59640
59641  # Check whether --enable-sjavac was given.
59642if test "${enable_sjavac+set}" = set; then :
59643  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
59644else
59645  ENABLE_SJAVAC="no"
59646fi
59647
59648  if test "x$JVM_ARG_OK" = "xfalse"; then
59649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
59650$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
59651    ENABLE_SJAVAC="no"
59652  fi
59653  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
59654$as_echo_n "checking whether to use sjavac... " >&6; }
59655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
59656$as_echo "$ENABLE_SJAVAC" >&6; }
59657
59658
59659  # Check whether --enable-javac-server was given.
59660if test "${enable_javac_server+set}" = set; then :
59661  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
59662else
59663  ENABLE_JAVAC_SERVER="yes"
59664fi
59665
59666  if test "x$JVM_ARG_OK" = "xfalse"; then
59667    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
59668$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
59669    ENABLE_JAVAC_SERVER="no"
59670  fi
59671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
59672$as_echo_n "checking whether to use javac server... " >&6; }
59673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
59674$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
59675
59676
59677  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
59678    # When using a server javac, the small client instances do not need much
59679    # resources.
59680    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
59681  fi
59682
59683
59684# Setup use of icecc if requested
59685
59686  # Check whether --enable-icecc was given.
59687if test "${enable_icecc+set}" = set; then :
59688  enableval=$enable_icecc;
59689fi
59690
59691
59692  if test "x${enable_icecc}" = "xyes"; then
59693
59694
59695
59696  # Publish this variable in the help.
59697
59698
59699  if [ -z "${ICECC_CMD+x}" ]; then
59700    # The variable is not set by user, try to locate tool using the code snippet
59701    for ac_prog in icecc
59702do
59703  # Extract the first word of "$ac_prog", so it can be a program name with args.
59704set dummy $ac_prog; ac_word=$2
59705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59706$as_echo_n "checking for $ac_word... " >&6; }
59707if ${ac_cv_path_ICECC_CMD+:} false; then :
59708  $as_echo_n "(cached) " >&6
59709else
59710  case $ICECC_CMD in
59711  [\\/]* | ?:[\\/]*)
59712  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59713  ;;
59714  *)
59715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59716for as_dir in $PATH
59717do
59718  IFS=$as_save_IFS
59719  test -z "$as_dir" && as_dir=.
59720    for ac_exec_ext in '' $ac_executable_extensions; do
59721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59722    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59724    break 2
59725  fi
59726done
59727  done
59728IFS=$as_save_IFS
59729
59730  ;;
59731esac
59732fi
59733ICECC_CMD=$ac_cv_path_ICECC_CMD
59734if test -n "$ICECC_CMD"; then
59735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59736$as_echo "$ICECC_CMD" >&6; }
59737else
59738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59739$as_echo "no" >&6; }
59740fi
59741
59742
59743  test -n "$ICECC_CMD" && break
59744done
59745
59746  else
59747    # The variable is set, but is it from the command line or the environment?
59748
59749    # Try to remove the string !ICECC_CMD! from our list.
59750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
59751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59752      # If it failed, the variable was not from the command line. Ignore it,
59753      # but warn the user (except for BASH, which is always set by the calling BASH).
59754      if test "xICECC_CMD" != xBASH; then
59755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
59756$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
59757      fi
59758      # Try to locate tool using the code snippet
59759      for ac_prog in icecc
59760do
59761  # Extract the first word of "$ac_prog", so it can be a program name with args.
59762set dummy $ac_prog; ac_word=$2
59763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59764$as_echo_n "checking for $ac_word... " >&6; }
59765if ${ac_cv_path_ICECC_CMD+:} false; then :
59766  $as_echo_n "(cached) " >&6
59767else
59768  case $ICECC_CMD in
59769  [\\/]* | ?:[\\/]*)
59770  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59771  ;;
59772  *)
59773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59774for as_dir in $PATH
59775do
59776  IFS=$as_save_IFS
59777  test -z "$as_dir" && as_dir=.
59778    for ac_exec_ext in '' $ac_executable_extensions; do
59779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59780    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59782    break 2
59783  fi
59784done
59785  done
59786IFS=$as_save_IFS
59787
59788  ;;
59789esac
59790fi
59791ICECC_CMD=$ac_cv_path_ICECC_CMD
59792if test -n "$ICECC_CMD"; then
59793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59794$as_echo "$ICECC_CMD" >&6; }
59795else
59796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59797$as_echo "no" >&6; }
59798fi
59799
59800
59801  test -n "$ICECC_CMD" && break
59802done
59803
59804    else
59805      # If it succeeded, then it was overridden by the user. We will use it
59806      # for the tool.
59807
59808      # First remove it from the list of overridden variables, so we can test
59809      # for unknown variables in the end.
59810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59811
59812      # Check if we try to supply an empty value
59813      if test "x$ICECC_CMD" = x; then
59814        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
59815$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
59816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59817$as_echo_n "checking for ICECC_CMD... " >&6; }
59818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59819$as_echo "disabled" >&6; }
59820      else
59821        # Check if the provided tool contains a complete path.
59822        tool_specified="$ICECC_CMD"
59823        tool_basename="${tool_specified##*/}"
59824        if test "x$tool_basename" = "x$tool_specified"; then
59825          # A command without a complete path is provided, search $PATH.
59826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
59827$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
59828          # Extract the first word of "$tool_basename", so it can be a program name with args.
59829set dummy $tool_basename; ac_word=$2
59830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59831$as_echo_n "checking for $ac_word... " >&6; }
59832if ${ac_cv_path_ICECC_CMD+:} false; then :
59833  $as_echo_n "(cached) " >&6
59834else
59835  case $ICECC_CMD in
59836  [\\/]* | ?:[\\/]*)
59837  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59838  ;;
59839  *)
59840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59841for as_dir in $PATH
59842do
59843  IFS=$as_save_IFS
59844  test -z "$as_dir" && as_dir=.
59845    for ac_exec_ext in '' $ac_executable_extensions; do
59846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59847    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59849    break 2
59850  fi
59851done
59852  done
59853IFS=$as_save_IFS
59854
59855  ;;
59856esac
59857fi
59858ICECC_CMD=$ac_cv_path_ICECC_CMD
59859if test -n "$ICECC_CMD"; then
59860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59861$as_echo "$ICECC_CMD" >&6; }
59862else
59863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59864$as_echo "no" >&6; }
59865fi
59866
59867
59868          if test "x$ICECC_CMD" = x; then
59869            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59870          fi
59871        else
59872          # Otherwise we believe it is a complete path. Use it as it is.
59873          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
59874$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
59875          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59876$as_echo_n "checking for ICECC_CMD... " >&6; }
59877          if test ! -x "$tool_specified"; then
59878            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59879$as_echo "not found" >&6; }
59880            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
59881          fi
59882          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59883$as_echo "$tool_specified" >&6; }
59884        fi
59885      fi
59886    fi
59887
59888  fi
59889
59890
59891
59892  if test "x$ICECC_CMD" = x; then
59893    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
59894  fi
59895
59896
59897    old_path="$PATH"
59898
59899    # Look for icecc-create-env in some known places
59900    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
59901
59902
59903
59904  # Publish this variable in the help.
59905
59906
59907  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
59908    # The variable is not set by user, try to locate tool using the code snippet
59909    for ac_prog in icecc-create-env
59910do
59911  # Extract the first word of "$ac_prog", so it can be a program name with args.
59912set dummy $ac_prog; ac_word=$2
59913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59914$as_echo_n "checking for $ac_word... " >&6; }
59915if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59916  $as_echo_n "(cached) " >&6
59917else
59918  case $ICECC_CREATE_ENV in
59919  [\\/]* | ?:[\\/]*)
59920  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59921  ;;
59922  *)
59923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59924for as_dir in $PATH
59925do
59926  IFS=$as_save_IFS
59927  test -z "$as_dir" && as_dir=.
59928    for ac_exec_ext in '' $ac_executable_extensions; do
59929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59930    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59932    break 2
59933  fi
59934done
59935  done
59936IFS=$as_save_IFS
59937
59938  ;;
59939esac
59940fi
59941ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59942if test -n "$ICECC_CREATE_ENV"; then
59943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59944$as_echo "$ICECC_CREATE_ENV" >&6; }
59945else
59946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59947$as_echo "no" >&6; }
59948fi
59949
59950
59951  test -n "$ICECC_CREATE_ENV" && break
59952done
59953
59954  else
59955    # The variable is set, but is it from the command line or the environment?
59956
59957    # Try to remove the string !ICECC_CREATE_ENV! from our list.
59958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
59959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59960      # If it failed, the variable was not from the command line. Ignore it,
59961      # but warn the user (except for BASH, which is always set by the calling BASH).
59962      if test "xICECC_CREATE_ENV" != xBASH; then
59963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
59964$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
59965      fi
59966      # Try to locate tool using the code snippet
59967      for ac_prog in icecc-create-env
59968do
59969  # Extract the first word of "$ac_prog", so it can be a program name with args.
59970set dummy $ac_prog; ac_word=$2
59971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59972$as_echo_n "checking for $ac_word... " >&6; }
59973if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59974  $as_echo_n "(cached) " >&6
59975else
59976  case $ICECC_CREATE_ENV in
59977  [\\/]* | ?:[\\/]*)
59978  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59979  ;;
59980  *)
59981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59982for as_dir in $PATH
59983do
59984  IFS=$as_save_IFS
59985  test -z "$as_dir" && as_dir=.
59986    for ac_exec_ext in '' $ac_executable_extensions; do
59987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59988    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59990    break 2
59991  fi
59992done
59993  done
59994IFS=$as_save_IFS
59995
59996  ;;
59997esac
59998fi
59999ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
60000if test -n "$ICECC_CREATE_ENV"; then
60001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
60002$as_echo "$ICECC_CREATE_ENV" >&6; }
60003else
60004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60005$as_echo "no" >&6; }
60006fi
60007
60008
60009  test -n "$ICECC_CREATE_ENV" && break
60010done
60011
60012    else
60013      # If it succeeded, then it was overridden by the user. We will use it
60014      # for the tool.
60015
60016      # First remove it from the list of overridden variables, so we can test
60017      # for unknown variables in the end.
60018      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60019
60020      # Check if we try to supply an empty value
60021      if test "x$ICECC_CREATE_ENV" = x; then
60022        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
60023$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
60024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
60025$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
60026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60027$as_echo "disabled" >&6; }
60028      else
60029        # Check if the provided tool contains a complete path.
60030        tool_specified="$ICECC_CREATE_ENV"
60031        tool_basename="${tool_specified##*/}"
60032        if test "x$tool_basename" = "x$tool_specified"; then
60033          # A command without a complete path is provided, search $PATH.
60034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
60035$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
60036          # Extract the first word of "$tool_basename", so it can be a program name with args.
60037set dummy $tool_basename; ac_word=$2
60038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60039$as_echo_n "checking for $ac_word... " >&6; }
60040if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
60041  $as_echo_n "(cached) " >&6
60042else
60043  case $ICECC_CREATE_ENV in
60044  [\\/]* | ?:[\\/]*)
60045  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
60046  ;;
60047  *)
60048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60049for as_dir in $PATH
60050do
60051  IFS=$as_save_IFS
60052  test -z "$as_dir" && as_dir=.
60053    for ac_exec_ext in '' $ac_executable_extensions; do
60054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60055    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
60056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60057    break 2
60058  fi
60059done
60060  done
60061IFS=$as_save_IFS
60062
60063  ;;
60064esac
60065fi
60066ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
60067if test -n "$ICECC_CREATE_ENV"; then
60068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
60069$as_echo "$ICECC_CREATE_ENV" >&6; }
60070else
60071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60072$as_echo "no" >&6; }
60073fi
60074
60075
60076          if test "x$ICECC_CREATE_ENV" = x; then
60077            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60078          fi
60079        else
60080          # Otherwise we believe it is a complete path. Use it as it is.
60081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
60082$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
60083          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
60084$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
60085          if test ! -x "$tool_specified"; then
60086            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60087$as_echo "not found" >&6; }
60088            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
60089          fi
60090          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60091$as_echo "$tool_specified" >&6; }
60092        fi
60093      fi
60094    fi
60095
60096  fi
60097
60098
60099
60100  if test "x$ICECC_CREATE_ENV" = x; then
60101    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
60102  fi
60103
60104
60105    # Use icecc-create-env to create a minimal compilation environment that can
60106    # be sent to the other hosts in the icecream cluster.
60107    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
60108    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
60109    # Older versions of icecc does not have the --gcc parameter
60110    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
60111      icecc_gcc_arg="--gcc"
60112    fi
60113    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
60114
60115  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60116      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
60117          ${icecc_create_env_log} 2>&1
60118  if test "$?" != "0"; then
60119    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60120$as_echo "$as_me: icecc-create-env output:" >&6;}
60121    cat \
60122          ${icecc_create_env_log}
60123    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60124  fi
60125
60126    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
60127      # For clang, the icecc compilerwrapper is needed. It usually resides next
60128      # to icecc-create-env.
60129
60130
60131
60132  # Publish this variable in the help.
60133
60134
60135  if [ -z "${ICECC_WRAPPER+x}" ]; then
60136    # The variable is not set by user, try to locate tool using the code snippet
60137    for ac_prog in compilerwrapper
60138do
60139  # Extract the first word of "$ac_prog", so it can be a program name with args.
60140set dummy $ac_prog; ac_word=$2
60141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60142$as_echo_n "checking for $ac_word... " >&6; }
60143if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
60144  $as_echo_n "(cached) " >&6
60145else
60146  case $ICECC_WRAPPER in
60147  [\\/]* | ?:[\\/]*)
60148  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
60149  ;;
60150  *)
60151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60152for as_dir in $PATH
60153do
60154  IFS=$as_save_IFS
60155  test -z "$as_dir" && as_dir=.
60156    for ac_exec_ext in '' $ac_executable_extensions; do
60157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60158    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
60159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60160    break 2
60161  fi
60162done
60163  done
60164IFS=$as_save_IFS
60165
60166  ;;
60167esac
60168fi
60169ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
60170if test -n "$ICECC_WRAPPER"; then
60171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
60172$as_echo "$ICECC_WRAPPER" >&6; }
60173else
60174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60175$as_echo "no" >&6; }
60176fi
60177
60178
60179  test -n "$ICECC_WRAPPER" && break
60180done
60181
60182  else
60183    # The variable is set, but is it from the command line or the environment?
60184
60185    # Try to remove the string !ICECC_WRAPPER! from our list.
60186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
60187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
60188      # If it failed, the variable was not from the command line. Ignore it,
60189      # but warn the user (except for BASH, which is always set by the calling BASH).
60190      if test "xICECC_WRAPPER" != xBASH; then
60191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
60192$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
60193      fi
60194      # Try to locate tool using the code snippet
60195      for ac_prog in compilerwrapper
60196do
60197  # Extract the first word of "$ac_prog", so it can be a program name with args.
60198set dummy $ac_prog; ac_word=$2
60199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60200$as_echo_n "checking for $ac_word... " >&6; }
60201if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
60202  $as_echo_n "(cached) " >&6
60203else
60204  case $ICECC_WRAPPER in
60205  [\\/]* | ?:[\\/]*)
60206  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
60207  ;;
60208  *)
60209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60210for as_dir in $PATH
60211do
60212  IFS=$as_save_IFS
60213  test -z "$as_dir" && as_dir=.
60214    for ac_exec_ext in '' $ac_executable_extensions; do
60215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60216    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
60217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60218    break 2
60219  fi
60220done
60221  done
60222IFS=$as_save_IFS
60223
60224  ;;
60225esac
60226fi
60227ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
60228if test -n "$ICECC_WRAPPER"; then
60229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
60230$as_echo "$ICECC_WRAPPER" >&6; }
60231else
60232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60233$as_echo "no" >&6; }
60234fi
60235
60236
60237  test -n "$ICECC_WRAPPER" && break
60238done
60239
60240    else
60241      # If it succeeded, then it was overridden by the user. We will use it
60242      # for the tool.
60243
60244      # First remove it from the list of overridden variables, so we can test
60245      # for unknown variables in the end.
60246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60247
60248      # Check if we try to supply an empty value
60249      if test "x$ICECC_WRAPPER" = x; then
60250        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
60251$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
60252        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
60253$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
60254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60255$as_echo "disabled" >&6; }
60256      else
60257        # Check if the provided tool contains a complete path.
60258        tool_specified="$ICECC_WRAPPER"
60259        tool_basename="${tool_specified##*/}"
60260        if test "x$tool_basename" = "x$tool_specified"; then
60261          # A command without a complete path is provided, search $PATH.
60262          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
60263$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
60264          # Extract the first word of "$tool_basename", so it can be a program name with args.
60265set dummy $tool_basename; ac_word=$2
60266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60267$as_echo_n "checking for $ac_word... " >&6; }
60268if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
60269  $as_echo_n "(cached) " >&6
60270else
60271  case $ICECC_WRAPPER in
60272  [\\/]* | ?:[\\/]*)
60273  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
60274  ;;
60275  *)
60276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60277for as_dir in $PATH
60278do
60279  IFS=$as_save_IFS
60280  test -z "$as_dir" && as_dir=.
60281    for ac_exec_ext in '' $ac_executable_extensions; do
60282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60283    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
60284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60285    break 2
60286  fi
60287done
60288  done
60289IFS=$as_save_IFS
60290
60291  ;;
60292esac
60293fi
60294ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
60295if test -n "$ICECC_WRAPPER"; then
60296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
60297$as_echo "$ICECC_WRAPPER" >&6; }
60298else
60299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60300$as_echo "no" >&6; }
60301fi
60302
60303
60304          if test "x$ICECC_WRAPPER" = x; then
60305            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60306          fi
60307        else
60308          # Otherwise we believe it is a complete path. Use it as it is.
60309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
60310$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
60311          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
60312$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
60313          if test ! -x "$tool_specified"; then
60314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60315$as_echo "not found" >&6; }
60316            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
60317          fi
60318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60319$as_echo "$tool_specified" >&6; }
60320        fi
60321      fi
60322    fi
60323
60324  fi
60325
60326
60327
60328  if test "x$ICECC_WRAPPER" = x; then
60329    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
60330  fi
60331
60332
60333
60334  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60335      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1
60336  if test "$?" != "0"; then
60337    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60338$as_echo "$as_me: icecc-create-env output:" >&6;}
60339    cat ${icecc_create_env_log}
60340    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60341  fi
60342
60343    else
60344      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
60345    fi
60346    PATH="$old_path"
60347    # The bundle with the compiler gets a name based on checksums. Parse log file
60348    # to find it.
60349    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
60350    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
60351    if test ! -f ${ICECC_ENV_BUNDLE}; then
60352      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
60353    fi
60354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
60355$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
60356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
60357$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
60358    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
60359
60360    if test "x${COMPILE_TYPE}" = "xcross"; then
60361      # If cross compiling, create a separate env package for the build compiler
60362      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
60363      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
60364      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
60365
60366  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60367      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
60368            ${icecc_create_env_log_build} 2>&1
60369  if test "$?" != "0"; then
60370    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60371$as_echo "$as_me: icecc-create-env output:" >&6;}
60372    cat \
60373            ${icecc_create_env_log_build}
60374    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60375  fi
60376
60377      elif test "x${BUILD_CC##*/}" = "xclang"; then
60378
60379  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60380      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1
60381  if test "$?" != "0"; then
60382    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60383$as_echo "$as_me: icecc-create-env output:" >&6;}
60384    cat ${icecc_create_env_log_build}
60385    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60386  fi
60387
60388      else
60389        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
60390      fi
60391      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
60392      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
60393      if test ! -f ${ICECC_ENV_BUNDLE}; then
60394        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
60395      fi
60396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
60397$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
60398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
60399$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
60400      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
60401          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
60402    else
60403      BUILD_ICECC="${ICECC}"
60404    fi
60405
60406
60407  fi
60408
60409
60410# Can the C/C++ compiler use precompiled headers?
60411
60412
60413  ###############################################################################
60414  #
60415  # Can the C/C++ compiler use precompiled headers?
60416  #
60417  # Check whether --enable-precompiled-headers was given.
60418if test "${enable_precompiled_headers+set}" = set; then :
60419  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
60420else
60421  ENABLE_PRECOMPH=yes
60422fi
60423
60424
60425  USE_PRECOMPILED_HEADER=1
60426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
60427$as_echo_n "checking If precompiled header is enabled... " >&6; }
60428  if test "x$ENABLE_PRECOMPH" = xno; then
60429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
60430$as_echo "no, forced" >&6; }
60431    USE_PRECOMPILED_HEADER=0
60432  elif test "x$ICECC" != "x"; then
60433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
60434$as_echo "no, does not work effectively with icecc" >&6; }
60435    USE_PRECOMPILED_HEADER=0
60436  else
60437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60438$as_echo "yes" >&6; }
60439  fi
60440
60441  if test "x$ENABLE_PRECOMPH" = xyes; then
60442    # Check that the compiler actually supports precomp headers.
60443    if test "x$TOOLCHAIN_TYPE" = xgcc; then
60444      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
60445$as_echo_n "checking that precompiled headers work... " >&6; }
60446      echo "int alfa();" > conftest.h
60447      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
60448      if test ! -f conftest.hpp.gch; then
60449        USE_PRECOMPILED_HEADER=0
60450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60451$as_echo "no" >&6; }
60452      else
60453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60454$as_echo "yes" >&6; }
60455      fi
60456      rm -f conftest.h conftest.hpp.gch
60457    fi
60458  fi
60459
60460
60461
60462
60463# Setup use of ccache, if available
60464
60465  # Check whether --enable-ccache was given.
60466if test "${enable_ccache+set}" = set; then :
60467  enableval=$enable_ccache;
60468fi
60469
60470
60471  CCACHE=
60472  CCACHE_STATUS=
60473  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
60474$as_echo_n "checking is ccache enabled... " >&6; }
60475  if test "x$enable_ccache" = xyes; then
60476    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
60477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60478$as_echo "yes" >&6; }
60479      OLD_PATH="$PATH"
60480      if test "x$TOOLCHAIN_PATH" != x; then
60481        PATH=$TOOLCHAIN_PATH:$PATH
60482      fi
60483
60484
60485
60486  # Publish this variable in the help.
60487
60488
60489  if [ -z "${CCACHE+x}" ]; then
60490    # The variable is not set by user, try to locate tool using the code snippet
60491    for ac_prog in ccache
60492do
60493  # Extract the first word of "$ac_prog", so it can be a program name with args.
60494set dummy $ac_prog; ac_word=$2
60495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60496$as_echo_n "checking for $ac_word... " >&6; }
60497if ${ac_cv_path_CCACHE+:} false; then :
60498  $as_echo_n "(cached) " >&6
60499else
60500  case $CCACHE in
60501  [\\/]* | ?:[\\/]*)
60502  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60503  ;;
60504  *)
60505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60506for as_dir in $PATH
60507do
60508  IFS=$as_save_IFS
60509  test -z "$as_dir" && as_dir=.
60510    for ac_exec_ext in '' $ac_executable_extensions; do
60511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60512    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60514    break 2
60515  fi
60516done
60517  done
60518IFS=$as_save_IFS
60519
60520  ;;
60521esac
60522fi
60523CCACHE=$ac_cv_path_CCACHE
60524if test -n "$CCACHE"; then
60525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60526$as_echo "$CCACHE" >&6; }
60527else
60528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60529$as_echo "no" >&6; }
60530fi
60531
60532
60533  test -n "$CCACHE" && break
60534done
60535
60536  else
60537    # The variable is set, but is it from the command line or the environment?
60538
60539    # Try to remove the string !CCACHE! from our list.
60540    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
60541    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
60542      # If it failed, the variable was not from the command line. Ignore it,
60543      # but warn the user (except for BASH, which is always set by the calling BASH).
60544      if test "xCCACHE" != xBASH; then
60545        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
60546$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
60547      fi
60548      # Try to locate tool using the code snippet
60549      for ac_prog in ccache
60550do
60551  # Extract the first word of "$ac_prog", so it can be a program name with args.
60552set dummy $ac_prog; ac_word=$2
60553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60554$as_echo_n "checking for $ac_word... " >&6; }
60555if ${ac_cv_path_CCACHE+:} false; then :
60556  $as_echo_n "(cached) " >&6
60557else
60558  case $CCACHE in
60559  [\\/]* | ?:[\\/]*)
60560  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60561  ;;
60562  *)
60563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60564for as_dir in $PATH
60565do
60566  IFS=$as_save_IFS
60567  test -z "$as_dir" && as_dir=.
60568    for ac_exec_ext in '' $ac_executable_extensions; do
60569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60570    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60572    break 2
60573  fi
60574done
60575  done
60576IFS=$as_save_IFS
60577
60578  ;;
60579esac
60580fi
60581CCACHE=$ac_cv_path_CCACHE
60582if test -n "$CCACHE"; then
60583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60584$as_echo "$CCACHE" >&6; }
60585else
60586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60587$as_echo "no" >&6; }
60588fi
60589
60590
60591  test -n "$CCACHE" && break
60592done
60593
60594    else
60595      # If it succeeded, then it was overridden by the user. We will use it
60596      # for the tool.
60597
60598      # First remove it from the list of overridden variables, so we can test
60599      # for unknown variables in the end.
60600      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60601
60602      # Check if we try to supply an empty value
60603      if test "x$CCACHE" = x; then
60604        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
60605$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
60606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60607$as_echo_n "checking for CCACHE... " >&6; }
60608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60609$as_echo "disabled" >&6; }
60610      else
60611        # Check if the provided tool contains a complete path.
60612        tool_specified="$CCACHE"
60613        tool_basename="${tool_specified##*/}"
60614        if test "x$tool_basename" = "x$tool_specified"; then
60615          # A command without a complete path is provided, search $PATH.
60616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
60617$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
60618          # Extract the first word of "$tool_basename", so it can be a program name with args.
60619set dummy $tool_basename; ac_word=$2
60620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60621$as_echo_n "checking for $ac_word... " >&6; }
60622if ${ac_cv_path_CCACHE+:} false; then :
60623  $as_echo_n "(cached) " >&6
60624else
60625  case $CCACHE in
60626  [\\/]* | ?:[\\/]*)
60627  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60628  ;;
60629  *)
60630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60631for as_dir in $PATH
60632do
60633  IFS=$as_save_IFS
60634  test -z "$as_dir" && as_dir=.
60635    for ac_exec_ext in '' $ac_executable_extensions; do
60636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60637    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60639    break 2
60640  fi
60641done
60642  done
60643IFS=$as_save_IFS
60644
60645  ;;
60646esac
60647fi
60648CCACHE=$ac_cv_path_CCACHE
60649if test -n "$CCACHE"; then
60650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60651$as_echo "$CCACHE" >&6; }
60652else
60653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60654$as_echo "no" >&6; }
60655fi
60656
60657
60658          if test "x$CCACHE" = x; then
60659            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60660          fi
60661        else
60662          # Otherwise we believe it is a complete path. Use it as it is.
60663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
60664$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
60665          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60666$as_echo_n "checking for CCACHE... " >&6; }
60667          if test ! -x "$tool_specified"; then
60668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60669$as_echo "not found" >&6; }
60670            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
60671          fi
60672          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60673$as_echo "$tool_specified" >&6; }
60674        fi
60675      fi
60676    fi
60677
60678  fi
60679
60680
60681
60682  if test "x$CCACHE" = x; then
60683    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
60684  fi
60685
60686
60687      PATH="$OLD_PATH"
60688      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
60689      CCACHE_STATUS="Active ($CCACHE_VERSION)"
60690    else
60691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60692$as_echo "no" >&6; }
60693      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
60694$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
60695    fi
60696  elif test "x$enable_ccache" = xno; then
60697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
60698$as_echo "no, explicitly disabled" >&6; }
60699    CCACHE_STATUS="Disabled"
60700  elif test "x$enable_ccache" = x; then
60701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60702$as_echo "no" >&6; }
60703  else
60704    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
60705$as_echo "unknown" >&6; }
60706    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
60707  fi
60708
60709
60710
60711# Check whether --with-ccache-dir was given.
60712if test "${with_ccache_dir+set}" = set; then :
60713  withval=$with_ccache_dir;
60714fi
60715
60716
60717  if test "x$with_ccache_dir" != x; then
60718    # When using a non home ccache directory, assume the use is to share ccache files
60719    # with other users. Thus change the umask.
60720    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
60721    if test "x$CCACHE" = x; then
60722      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
60723$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
60724    fi
60725  fi
60726
60727  if test "x$CCACHE" != x; then
60728
60729  if test "x$CCACHE" != x; then
60730    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
60731      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
60732          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
60733      if test "x$HAS_BAD_CCACHE" != "x"; then
60734        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
60735      fi
60736      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
60737$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
60738      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
60739      PUSHED_FLAGS="$CXXFLAGS"
60740      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
60741      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60742/* end confdefs.h.  */
60743
60744int
60745main ()
60746{
60747
60748  ;
60749  return 0;
60750}
60751_ACEOF
60752if ac_fn_cxx_try_compile "$LINENO"; then :
60753  CC_KNOWS_CCACHE_TRICK=yes
60754else
60755  CC_KNOWS_CCACHE_TRICK=no
60756fi
60757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60758      CXXFLAGS="$PUSHED_FLAGS"
60759      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
60760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60761$as_echo "yes" >&6; }
60762        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
60763
60764        CCACHE_SLOPPINESS=pch_defines,time_macros
60765      else
60766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60767$as_echo "no" >&6; }
60768        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
60769      fi
60770    fi
60771
60772    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
60773        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
60774
60775    if test "x$SET_CCACHE_DIR" != x; then
60776      mkdir -p $CCACHE_DIR > /dev/null 2>&1
60777      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
60778    fi
60779  fi
60780
60781  fi
60782
60783
60784###############################################################################
60785#
60786# And now the finish...
60787#
60788###############################################################################
60789
60790# Check for some common pitfalls
60791
60792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60793    file_to_test="$SRC_ROOT/LICENSE"
60794    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
60795      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
60796    fi
60797  fi
60798
60799
60800  # Did user specify any unknown variables?
60801
60802  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
60803    # Replace the separating ! with spaces before presenting for end user.
60804    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
60805    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
60806$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
60807  fi
60808
60809
60810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
60811$as_echo_n "checking if build directory is on local disk... " >&6; }
60812
60813  # df -l lists only local disks; if the given directory is not found then
60814  # a non-zero exit code is given
60815  if test "x$DF" = x; then
60816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60817      # msys does not have df; use Windows "net use" instead.
60818      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
60819      if test "x$IS_NETWORK_DISK" = x; then
60820        OUTPUT_DIR_IS_LOCAL="yes"
60821      else
60822        OUTPUT_DIR_IS_LOCAL="no"
60823      fi
60824    else
60825      # No df here, say it's local
60826      OUTPUT_DIR_IS_LOCAL="yes"
60827    fi
60828  else
60829    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
60830      OUTPUT_DIR_IS_LOCAL="yes"
60831    else
60832      OUTPUT_DIR_IS_LOCAL="no"
60833    fi
60834  fi
60835
60836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
60837$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
60838
60839
60840
60841  # Check if the user has any old-style ALT_ variables set.
60842  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
60843
60844  # Before generating output files, test if they exist. If they do, this is a reconfigure.
60845  # Since we can't properly handle the dependencies for this, warn the user about the situation
60846  if test -e $OUTPUT_ROOT/spec.gmk; then
60847    IS_RECONFIGURE=yes
60848  else
60849    IS_RECONFIGURE=no
60850  fi
60851
60852
60853# At the end, call the custom hook. (Dummy macro if no custom sources available)
60854
60855
60856# We're messing a bit with internal autoconf variables to put the config.status
60857# in the output directory instead of the current directory.
60858CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
60859
60860# Create the actual output files. Now the main work of configure is done.
60861cat >confcache <<\_ACEOF
60862# This file is a shell script that caches the results of configure
60863# tests run on this system so they can be shared between configure
60864# scripts and configure runs, see configure's option --config-cache.
60865# It is not useful on other systems.  If it contains results you don't
60866# want to keep, you may remove or edit it.
60867#
60868# config.status only pays attention to the cache file if you give it
60869# the --recheck option to rerun configure.
60870#
60871# `ac_cv_env_foo' variables (set or unset) will be overridden when
60872# loading this file, other *unset* `ac_cv_foo' will be assigned the
60873# following values.
60874
60875_ACEOF
60876
60877# The following way of writing the cache mishandles newlines in values,
60878# but we know of no workaround that is simple, portable, and efficient.
60879# So, we kill variables containing newlines.
60880# Ultrix sh set writes to stderr and can't be redirected directly,
60881# and sets the high bit in the cache file unless we assign to the vars.
60882(
60883  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
60884    eval ac_val=\$$ac_var
60885    case $ac_val in #(
60886    *${as_nl}*)
60887      case $ac_var in #(
60888      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
60889$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
60890      esac
60891      case $ac_var in #(
60892      _ | IFS | as_nl) ;; #(
60893      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
60894      *) { eval $ac_var=; unset $ac_var;} ;;
60895      esac ;;
60896    esac
60897  done
60898
60899  (set) 2>&1 |
60900    case $as_nl`(ac_space=' '; set) 2>&1` in #(
60901    *${as_nl}ac_space=\ *)
60902      # `set' does not quote correctly, so add quotes: double-quote
60903      # substitution turns \\\\ into \\, and sed turns \\ into \.
60904      sed -n \
60905	"s/'/'\\\\''/g;
60906	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
60907      ;; #(
60908    *)
60909      # `set' quotes correctly as required by POSIX, so do not add quotes.
60910      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
60911      ;;
60912    esac |
60913    sort
60914) |
60915  sed '
60916     /^ac_cv_env_/b end
60917     t clear
60918     :clear
60919     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
60920     t end
60921     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
60922     :end' >>confcache
60923if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
60924  if test -w "$cache_file"; then
60925    if test "x$cache_file" != "x/dev/null"; then
60926      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
60927$as_echo "$as_me: updating cache $cache_file" >&6;}
60928      if test ! -f "$cache_file" || test -h "$cache_file"; then
60929	cat confcache >"$cache_file"
60930      else
60931        case $cache_file in #(
60932        */* | ?:*)
60933	  mv -f confcache "$cache_file"$$ &&
60934	  mv -f "$cache_file"$$ "$cache_file" ;; #(
60935        *)
60936	  mv -f confcache "$cache_file" ;;
60937	esac
60938      fi
60939    fi
60940  else
60941    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
60942$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
60943  fi
60944fi
60945rm -f confcache
60946
60947test "x$prefix" = xNONE && prefix=$ac_default_prefix
60948# Let make expand exec_prefix.
60949test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
60950
60951# Transform confdefs.h into DEFS.
60952# Protect against shell expansion while executing Makefile rules.
60953# Protect against Makefile macro expansion.
60954#
60955# If the first sed substitution is executed (which looks for macros that
60956# take arguments), then branch to the quote section.  Otherwise,
60957# look for a macro that doesn't take arguments.
60958ac_script='
60959:mline
60960/\\$/{
60961 N
60962 s,\\\n,,
60963 b mline
60964}
60965t clear
60966:clear
60967s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
60968t quote
60969s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
60970t quote
60971b any
60972:quote
60973s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
60974s/\[/\\&/g
60975s/\]/\\&/g
60976s/\$/$$/g
60977H
60978:any
60979${
60980	g
60981	s/^\n//
60982	s/\n/ /g
60983	p
60984}
60985'
60986DEFS=`sed -n "$ac_script" confdefs.h`
60987
60988
60989ac_libobjs=
60990ac_ltlibobjs=
60991U=
60992for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
60993  # 1. Remove the extension, and $U if already installed.
60994  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
60995  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
60996  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
60997  #    will be set to the directory where LIBOBJS objects are built.
60998  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
60999  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
61000done
61001LIBOBJS=$ac_libobjs
61002
61003LTLIBOBJS=$ac_ltlibobjs
61004
61005
61006
61007: "${CONFIG_STATUS=./config.status}"
61008ac_write_fail=0
61009ac_clean_files_save=$ac_clean_files
61010ac_clean_files="$ac_clean_files $CONFIG_STATUS"
61011{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
61012$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
61013as_write_fail=0
61014cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
61015#! $SHELL
61016# Generated by $as_me.
61017# Run this file to recreate the current configuration.
61018# Compiler output produced by configure, useful for debugging
61019# configure, is in config.log if it exists.
61020
61021debug=false
61022ac_cs_recheck=false
61023ac_cs_silent=false
61024
61025SHELL=\${CONFIG_SHELL-$SHELL}
61026export SHELL
61027_ASEOF
61028cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
61029## -------------------- ##
61030## M4sh Initialization. ##
61031## -------------------- ##
61032
61033# Be more Bourne compatible
61034DUALCASE=1; export DUALCASE # for MKS sh
61035if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
61036  emulate sh
61037  NULLCMD=:
61038  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
61039  # is contrary to our usage.  Disable this feature.
61040  alias -g '${1+"$@"}'='"$@"'
61041  setopt NO_GLOB_SUBST
61042else
61043  case `(set -o) 2>/dev/null` in #(
61044  *posix*) :
61045    set -o posix ;; #(
61046  *) :
61047     ;;
61048esac
61049fi
61050
61051
61052as_nl='
61053'
61054export as_nl
61055# Printing a long string crashes Solaris 7 /usr/bin/printf.
61056as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
61057as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
61058as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
61059# Prefer a ksh shell builtin over an external printf program on Solaris,
61060# but without wasting forks for bash or zsh.
61061if test -z "$BASH_VERSION$ZSH_VERSION" \
61062    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
61063  as_echo='print -r --'
61064  as_echo_n='print -rn --'
61065elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
61066  as_echo='printf %s\n'
61067  as_echo_n='printf %s'
61068else
61069  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
61070    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61071    as_echo_n='/usr/ucb/echo -n'
61072  else
61073    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61074    as_echo_n_body='eval
61075      arg=$1;
61076      case $arg in #(
61077      *"$as_nl"*)
61078	expr "X$arg" : "X\\(.*\\)$as_nl";
61079	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
61080      esac;
61081      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
61082    '
61083    export as_echo_n_body
61084    as_echo_n='sh -c $as_echo_n_body as_echo'
61085  fi
61086  export as_echo_body
61087  as_echo='sh -c $as_echo_body as_echo'
61088fi
61089
61090# The user is always right.
61091if test "${PATH_SEPARATOR+set}" != set; then
61092  PATH_SEPARATOR=:
61093  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
61094    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
61095      PATH_SEPARATOR=';'
61096  }
61097fi
61098
61099
61100# IFS
61101# We need space, tab and new line, in precisely that order.  Quoting is
61102# there to prevent editors from complaining about space-tab.
61103# (If _AS_PATH_WALK were called with IFS unset, it would disable word
61104# splitting by setting IFS to empty value.)
61105IFS=" ""	$as_nl"
61106
61107# Find who we are.  Look in the path if we contain no directory separator.
61108as_myself=
61109case $0 in #((
61110  *[\\/]* ) as_myself=$0 ;;
61111  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61112for as_dir in $PATH
61113do
61114  IFS=$as_save_IFS
61115  test -z "$as_dir" && as_dir=.
61116    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
61117  done
61118IFS=$as_save_IFS
61119
61120     ;;
61121esac
61122# We did not find ourselves, most probably we were run as `sh COMMAND'
61123# in which case we are not to be found in the path.
61124if test "x$as_myself" = x; then
61125  as_myself=$0
61126fi
61127if test ! -f "$as_myself"; then
61128  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
61129  exit 1
61130fi
61131
61132# Unset variables that we do not need and which cause bugs (e.g. in
61133# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
61134# suppresses any "Segmentation fault" message there.  '((' could
61135# trigger a bug in pdksh 5.2.14.
61136for as_var in BASH_ENV ENV MAIL MAILPATH
61137do eval test x\${$as_var+set} = xset \
61138  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
61139done
61140PS1='$ '
61141PS2='> '
61142PS4='+ '
61143
61144# NLS nuisances.
61145LC_ALL=C
61146export LC_ALL
61147LANGUAGE=C
61148export LANGUAGE
61149
61150# CDPATH.
61151(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
61152
61153
61154# as_fn_error STATUS ERROR [LINENO LOG_FD]
61155# ----------------------------------------
61156# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
61157# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
61158# script with STATUS, using 1 if that was 0.
61159as_fn_error ()
61160{
61161  as_status=$1; test $as_status -eq 0 && as_status=1
61162  if test "$4"; then
61163    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
61164    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
61165  fi
61166  $as_echo "$as_me: error: $2" >&2
61167  as_fn_exit $as_status
61168} # as_fn_error
61169
61170
61171# as_fn_set_status STATUS
61172# -----------------------
61173# Set $? to STATUS, without forking.
61174as_fn_set_status ()
61175{
61176  return $1
61177} # as_fn_set_status
61178
61179# as_fn_exit STATUS
61180# -----------------
61181# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
61182as_fn_exit ()
61183{
61184  set +e
61185  as_fn_set_status $1
61186  exit $1
61187} # as_fn_exit
61188
61189# as_fn_unset VAR
61190# ---------------
61191# Portably unset VAR.
61192as_fn_unset ()
61193{
61194  { eval $1=; unset $1;}
61195}
61196as_unset=as_fn_unset
61197# as_fn_append VAR VALUE
61198# ----------------------
61199# Append the text in VALUE to the end of the definition contained in VAR. Take
61200# advantage of any shell optimizations that allow amortized linear growth over
61201# repeated appends, instead of the typical quadratic growth present in naive
61202# implementations.
61203if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
61204  eval 'as_fn_append ()
61205  {
61206    eval $1+=\$2
61207  }'
61208else
61209  as_fn_append ()
61210  {
61211    eval $1=\$$1\$2
61212  }
61213fi # as_fn_append
61214
61215# as_fn_arith ARG...
61216# ------------------
61217# Perform arithmetic evaluation on the ARGs, and store the result in the
61218# global $as_val. Take advantage of shells that can avoid forks. The arguments
61219# must be portable across $(()) and expr.
61220if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
61221  eval 'as_fn_arith ()
61222  {
61223    as_val=$(( $* ))
61224  }'
61225else
61226  as_fn_arith ()
61227  {
61228    as_val=`expr "$@" || test $? -eq 1`
61229  }
61230fi # as_fn_arith
61231
61232
61233if expr a : '\(a\)' >/dev/null 2>&1 &&
61234   test "X`expr 00001 : '.*\(...\)'`" = X001; then
61235  as_expr=expr
61236else
61237  as_expr=false
61238fi
61239
61240if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
61241  as_basename=basename
61242else
61243  as_basename=false
61244fi
61245
61246if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
61247  as_dirname=dirname
61248else
61249  as_dirname=false
61250fi
61251
61252as_me=`$as_basename -- "$0" ||
61253$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
61254	 X"$0" : 'X\(//\)$' \| \
61255	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
61256$as_echo X/"$0" |
61257    sed '/^.*\/\([^/][^/]*\)\/*$/{
61258	    s//\1/
61259	    q
61260	  }
61261	  /^X\/\(\/\/\)$/{
61262	    s//\1/
61263	    q
61264	  }
61265	  /^X\/\(\/\).*/{
61266	    s//\1/
61267	    q
61268	  }
61269	  s/.*/./; q'`
61270
61271# Avoid depending upon Character Ranges.
61272as_cr_letters='abcdefghijklmnopqrstuvwxyz'
61273as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
61274as_cr_Letters=$as_cr_letters$as_cr_LETTERS
61275as_cr_digits='0123456789'
61276as_cr_alnum=$as_cr_Letters$as_cr_digits
61277
61278ECHO_C= ECHO_N= ECHO_T=
61279case `echo -n x` in #(((((
61280-n*)
61281  case `echo 'xy\c'` in
61282  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
61283  xy)  ECHO_C='\c';;
61284  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
61285       ECHO_T='	';;
61286  esac;;
61287*)
61288  ECHO_N='-n';;
61289esac
61290
61291rm -f conf$$ conf$$.exe conf$$.file
61292if test -d conf$$.dir; then
61293  rm -f conf$$.dir/conf$$.file
61294else
61295  rm -f conf$$.dir
61296  mkdir conf$$.dir 2>/dev/null
61297fi
61298if (echo >conf$$.file) 2>/dev/null; then
61299  if ln -s conf$$.file conf$$ 2>/dev/null; then
61300    as_ln_s='ln -s'
61301    # ... but there are two gotchas:
61302    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
61303    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
61304    # In both cases, we have to default to `cp -pR'.
61305    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
61306      as_ln_s='cp -pR'
61307  elif ln conf$$.file conf$$ 2>/dev/null; then
61308    as_ln_s=ln
61309  else
61310    as_ln_s='cp -pR'
61311  fi
61312else
61313  as_ln_s='cp -pR'
61314fi
61315rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
61316rmdir conf$$.dir 2>/dev/null
61317
61318
61319# as_fn_mkdir_p
61320# -------------
61321# Create "$as_dir" as a directory, including parents if necessary.
61322as_fn_mkdir_p ()
61323{
61324
61325  case $as_dir in #(
61326  -*) as_dir=./$as_dir;;
61327  esac
61328  test -d "$as_dir" || eval $as_mkdir_p || {
61329    as_dirs=
61330    while :; do
61331      case $as_dir in #(
61332      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
61333      *) as_qdir=$as_dir;;
61334      esac
61335      as_dirs="'$as_qdir' $as_dirs"
61336      as_dir=`$as_dirname -- "$as_dir" ||
61337$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61338	 X"$as_dir" : 'X\(//\)[^/]' \| \
61339	 X"$as_dir" : 'X\(//\)$' \| \
61340	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
61341$as_echo X"$as_dir" |
61342    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61343	    s//\1/
61344	    q
61345	  }
61346	  /^X\(\/\/\)[^/].*/{
61347	    s//\1/
61348	    q
61349	  }
61350	  /^X\(\/\/\)$/{
61351	    s//\1/
61352	    q
61353	  }
61354	  /^X\(\/\).*/{
61355	    s//\1/
61356	    q
61357	  }
61358	  s/.*/./; q'`
61359      test -d "$as_dir" && break
61360    done
61361    test -z "$as_dirs" || eval "mkdir $as_dirs"
61362  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
61363
61364
61365} # as_fn_mkdir_p
61366if mkdir -p . 2>/dev/null; then
61367  as_mkdir_p='mkdir -p "$as_dir"'
61368else
61369  test -d ./-p && rmdir ./-p
61370  as_mkdir_p=false
61371fi
61372
61373
61374# as_fn_executable_p FILE
61375# -----------------------
61376# Test if FILE is an executable regular file.
61377as_fn_executable_p ()
61378{
61379  test -f "$1" && test -x "$1"
61380} # as_fn_executable_p
61381as_test_x='test -x'
61382as_executable_p=as_fn_executable_p
61383
61384# Sed expression to map a string onto a valid CPP name.
61385as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
61386
61387# Sed expression to map a string onto a valid variable name.
61388as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
61389
61390
61391exec 6>&1
61392## ----------------------------------- ##
61393## Main body of $CONFIG_STATUS script. ##
61394## ----------------------------------- ##
61395_ASEOF
61396test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
61397
61398cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61399# Save the log message, to keep $0 and so on meaningful, and to
61400# report actual input values of CONFIG_FILES etc. instead of their
61401# values after options handling.
61402ac_log="
61403This file was extended by OpenJDK $as_me jdk9, which was
61404generated by GNU Autoconf 2.69.  Invocation command line was
61405
61406  CONFIG_FILES    = $CONFIG_FILES
61407  CONFIG_HEADERS  = $CONFIG_HEADERS
61408  CONFIG_LINKS    = $CONFIG_LINKS
61409  CONFIG_COMMANDS = $CONFIG_COMMANDS
61410  $ $0 $@
61411
61412on `(hostname || uname -n) 2>/dev/null | sed 1q`
61413"
61414
61415_ACEOF
61416
61417case $ac_config_files in *"
61418"*) set x $ac_config_files; shift; ac_config_files=$*;;
61419esac
61420
61421
61422
61423cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61424# Files that config.status was made for.
61425config_files="$ac_config_files"
61426
61427_ACEOF
61428
61429cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61430ac_cs_usage="\
61431\`$as_me' instantiates files and other configuration actions
61432from templates according to the current configuration.  Unless the files
61433and actions are specified as TAGs, all are instantiated by default.
61434
61435Usage: $0 [OPTION]... [TAG]...
61436
61437  -h, --help       print this help, then exit
61438  -V, --version    print version number and configuration settings, then exit
61439      --config     print configuration, then exit
61440  -q, --quiet, --silent
61441                   do not print progress messages
61442  -d, --debug      don't remove temporary files
61443      --recheck    update $as_me by reconfiguring in the same conditions
61444      --file=FILE[:TEMPLATE]
61445                   instantiate the configuration file FILE
61446
61447Configuration files:
61448$config_files
61449
61450Report bugs to <build-dev@openjdk.java.net>.
61451OpenJDK home page: <http://openjdk.java.net>."
61452
61453_ACEOF
61454cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61455ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
61456ac_cs_version="\\
61457OpenJDK config.status jdk9
61458configured by $0, generated by GNU Autoconf 2.69,
61459  with options \\"\$ac_cs_config\\"
61460
61461Copyright (C) 2012 Free Software Foundation, Inc.
61462This config.status script is free software; the Free Software Foundation
61463gives unlimited permission to copy, distribute and modify it."
61464
61465ac_pwd='$ac_pwd'
61466srcdir='$srcdir'
61467AWK='$AWK'
61468test -n "\$AWK" || AWK=awk
61469_ACEOF
61470
61471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61472# The default lists apply if the user does not specify any file.
61473ac_need_defaults=:
61474while test $# != 0
61475do
61476  case $1 in
61477  --*=?*)
61478    ac_option=`expr "X$1" : 'X\([^=]*\)='`
61479    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
61480    ac_shift=:
61481    ;;
61482  --*=)
61483    ac_option=`expr "X$1" : 'X\([^=]*\)='`
61484    ac_optarg=
61485    ac_shift=:
61486    ;;
61487  *)
61488    ac_option=$1
61489    ac_optarg=$2
61490    ac_shift=shift
61491    ;;
61492  esac
61493
61494  case $ac_option in
61495  # Handling of the options.
61496  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
61497    ac_cs_recheck=: ;;
61498  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
61499    $as_echo "$ac_cs_version"; exit ;;
61500  --config | --confi | --conf | --con | --co | --c )
61501    $as_echo "$ac_cs_config"; exit ;;
61502  --debug | --debu | --deb | --de | --d | -d )
61503    debug=: ;;
61504  --file | --fil | --fi | --f )
61505    $ac_shift
61506    case $ac_optarg in
61507    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
61508    '') as_fn_error $? "missing file argument" ;;
61509    esac
61510    as_fn_append CONFIG_FILES " '$ac_optarg'"
61511    ac_need_defaults=false;;
61512  --he | --h |  --help | --hel | -h )
61513    $as_echo "$ac_cs_usage"; exit ;;
61514  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
61515  | -silent | --silent | --silen | --sile | --sil | --si | --s)
61516    ac_cs_silent=: ;;
61517
61518  # This is an error.
61519  -*) as_fn_error $? "unrecognized option: \`$1'
61520Try \`$0 --help' for more information." ;;
61521
61522  *) as_fn_append ac_config_targets " $1"
61523     ac_need_defaults=false ;;
61524
61525  esac
61526  shift
61527done
61528
61529ac_configure_extra_args=
61530
61531if $ac_cs_silent; then
61532  exec 6>/dev/null
61533  ac_configure_extra_args="$ac_configure_extra_args --silent"
61534fi
61535
61536_ACEOF
61537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61538if \$ac_cs_recheck; then
61539  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
61540  shift
61541  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
61542  CONFIG_SHELL='$SHELL'
61543  export CONFIG_SHELL
61544  exec "\$@"
61545fi
61546
61547_ACEOF
61548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61549exec 5>>config.log
61550{
61551  echo
61552  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
61553## Running $as_me. ##
61554_ASBOX
61555  $as_echo "$ac_log"
61556} >&5
61557
61558_ACEOF
61559cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61560_ACEOF
61561
61562cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61563
61564# Handling of arguments.
61565for ac_config_target in $ac_config_targets
61566do
61567  case $ac_config_target in
61568    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
61569    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
61570    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
61571    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
61572    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
61573
61574  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
61575  esac
61576done
61577
61578
61579# If the user did not use the arguments to specify the items to instantiate,
61580# then the envvar interface is used.  Set only those that are not.
61581# We use the long form for the default assignment because of an extremely
61582# bizarre bug on SunOS 4.1.3.
61583if $ac_need_defaults; then
61584  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
61585fi
61586
61587# Have a temporary directory for convenience.  Make it in the build tree
61588# simply because there is no reason against having it here, and in addition,
61589# creating and moving files from /tmp can sometimes cause problems.
61590# Hook for its removal unless debugging.
61591# Note that there is a small window in which the directory will not be cleaned:
61592# after its creation but before its name has been assigned to `$tmp'.
61593$debug ||
61594{
61595  tmp= ac_tmp=
61596  trap 'exit_status=$?
61597  : "${ac_tmp:=$tmp}"
61598  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
61599' 0
61600  trap 'as_fn_exit 1' 1 2 13 15
61601}
61602# Create a (secure) tmp directory for tmp files.
61603
61604{
61605  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
61606  test -d "$tmp"
61607}  ||
61608{
61609  tmp=./conf$$-$RANDOM
61610  (umask 077 && mkdir "$tmp")
61611} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
61612ac_tmp=$tmp
61613
61614# Set up the scripts for CONFIG_FILES section.
61615# No need to generate them if there are no CONFIG_FILES.
61616# This happens for instance with `./config.status config.h'.
61617if test -n "$CONFIG_FILES"; then
61618
61619
61620ac_cr=`echo X | tr X '\015'`
61621# On cygwin, bash can eat \r inside `` if the user requested igncr.
61622# But we know of no other shell where ac_cr would be empty at this
61623# point, so we can use a bashism as a fallback.
61624if test "x$ac_cr" = x; then
61625  eval ac_cr=\$\'\\r\'
61626fi
61627ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
61628if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
61629  ac_cs_awk_cr='\\r'
61630else
61631  ac_cs_awk_cr=$ac_cr
61632fi
61633
61634echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
61635_ACEOF
61636
61637
61638{
61639  echo "cat >conf$$subs.awk <<_ACEOF" &&
61640  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
61641  echo "_ACEOF"
61642} >conf$$subs.sh ||
61643  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61644ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
61645ac_delim='%!_!# '
61646for ac_last_try in false false false false false :; do
61647  . ./conf$$subs.sh ||
61648    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61649
61650  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
61651  if test $ac_delim_n = $ac_delim_num; then
61652    break
61653  elif $ac_last_try; then
61654    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61655  else
61656    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
61657  fi
61658done
61659rm -f conf$$subs.sh
61660
61661cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61662cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
61663_ACEOF
61664sed -n '
61665h
61666s/^/S["/; s/!.*/"]=/
61667p
61668g
61669s/^[^!]*!//
61670:repl
61671t repl
61672s/'"$ac_delim"'$//
61673t delim
61674:nl
61675h
61676s/\(.\{148\}\)..*/\1/
61677t more1
61678s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
61679p
61680n
61681b repl
61682:more1
61683s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61684p
61685g
61686s/.\{148\}//
61687t nl
61688:delim
61689h
61690s/\(.\{148\}\)..*/\1/
61691t more2
61692s/["\\]/\\&/g; s/^/"/; s/$/"/
61693p
61694b
61695:more2
61696s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61697p
61698g
61699s/.\{148\}//
61700t delim
61701' <conf$$subs.awk | sed '
61702/^[^""]/{
61703  N
61704  s/\n//
61705}
61706' >>$CONFIG_STATUS || ac_write_fail=1
61707rm -f conf$$subs.awk
61708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61709_ACAWK
61710cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
61711  for (key in S) S_is_set[key] = 1
61712  FS = ""
61713
61714}
61715{
61716  line = $ 0
61717  nfields = split(line, field, "@")
61718  substed = 0
61719  len = length(field[1])
61720  for (i = 2; i < nfields; i++) {
61721    key = field[i]
61722    keylen = length(key)
61723    if (S_is_set[key]) {
61724      value = S[key]
61725      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
61726      len += length(value) + length(field[++i])
61727      substed = 1
61728    } else
61729      len += 1 + keylen
61730  }
61731
61732  print line
61733}
61734
61735_ACAWK
61736_ACEOF
61737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61738if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
61739  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
61740else
61741  cat
61742fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
61743  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
61744_ACEOF
61745
61746# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
61747# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
61748# trailing colons and then remove the whole line if VPATH becomes empty
61749# (actually we leave an empty line to preserve line numbers).
61750if test "x$srcdir" = x.; then
61751  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
61752h
61753s///
61754s/^/:/
61755s/[	 ]*$/:/
61756s/:\$(srcdir):/:/g
61757s/:\${srcdir}:/:/g
61758s/:@srcdir@:/:/g
61759s/^:*//
61760s/:*$//
61761x
61762s/\(=[	 ]*\).*/\1/
61763G
61764s/\n//
61765s/^[^=]*=[	 ]*$//
61766}'
61767fi
61768
61769cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61770fi # test -n "$CONFIG_FILES"
61771
61772
61773eval set X "  :F $CONFIG_FILES      "
61774shift
61775for ac_tag
61776do
61777  case $ac_tag in
61778  :[FHLC]) ac_mode=$ac_tag; continue;;
61779  esac
61780  case $ac_mode$ac_tag in
61781  :[FHL]*:*);;
61782  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
61783  :[FH]-) ac_tag=-:-;;
61784  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
61785  esac
61786  ac_save_IFS=$IFS
61787  IFS=:
61788  set x $ac_tag
61789  IFS=$ac_save_IFS
61790  shift
61791  ac_file=$1
61792  shift
61793
61794  case $ac_mode in
61795  :L) ac_source=$1;;
61796  :[FH])
61797    ac_file_inputs=
61798    for ac_f
61799    do
61800      case $ac_f in
61801      -) ac_f="$ac_tmp/stdin";;
61802      *) # Look for the file first in the build tree, then in the source tree
61803	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
61804	 # because $ac_f cannot contain `:'.
61805	 test -f "$ac_f" ||
61806	   case $ac_f in
61807	   [\\/$]*) false;;
61808	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
61809	   esac ||
61810	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
61811      esac
61812      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
61813      as_fn_append ac_file_inputs " '$ac_f'"
61814    done
61815
61816    # Let's still pretend it is `configure' which instantiates (i.e., don't
61817    # use $as_me), people would be surprised to read:
61818    #    /* config.h.  Generated by config.status.  */
61819    configure_input='Generated from '`
61820	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
61821	`' by configure.'
61822    if test x"$ac_file" != x-; then
61823      configure_input="$ac_file.  $configure_input"
61824      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
61825$as_echo "$as_me: creating $ac_file" >&6;}
61826    fi
61827    # Neutralize special characters interpreted by sed in replacement strings.
61828    case $configure_input in #(
61829    *\&* | *\|* | *\\* )
61830       ac_sed_conf_input=`$as_echo "$configure_input" |
61831       sed 's/[\\\\&|]/\\\\&/g'`;; #(
61832    *) ac_sed_conf_input=$configure_input;;
61833    esac
61834
61835    case $ac_tag in
61836    *:-:* | *:-) cat >"$ac_tmp/stdin" \
61837      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
61838    esac
61839    ;;
61840  esac
61841
61842  ac_dir=`$as_dirname -- "$ac_file" ||
61843$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61844	 X"$ac_file" : 'X\(//\)[^/]' \| \
61845	 X"$ac_file" : 'X\(//\)$' \| \
61846	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
61847$as_echo X"$ac_file" |
61848    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61849	    s//\1/
61850	    q
61851	  }
61852	  /^X\(\/\/\)[^/].*/{
61853	    s//\1/
61854	    q
61855	  }
61856	  /^X\(\/\/\)$/{
61857	    s//\1/
61858	    q
61859	  }
61860	  /^X\(\/\).*/{
61861	    s//\1/
61862	    q
61863	  }
61864	  s/.*/./; q'`
61865  as_dir="$ac_dir"; as_fn_mkdir_p
61866  ac_builddir=.
61867
61868case "$ac_dir" in
61869.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
61870*)
61871  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
61872  # A ".." for each directory in $ac_dir_suffix.
61873  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
61874  case $ac_top_builddir_sub in
61875  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
61876  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
61877  esac ;;
61878esac
61879ac_abs_top_builddir=$ac_pwd
61880ac_abs_builddir=$ac_pwd$ac_dir_suffix
61881# for backward compatibility:
61882ac_top_builddir=$ac_top_build_prefix
61883
61884case $srcdir in
61885  .)  # We are building in place.
61886    ac_srcdir=.
61887    ac_top_srcdir=$ac_top_builddir_sub
61888    ac_abs_top_srcdir=$ac_pwd ;;
61889  [\\/]* | ?:[\\/]* )  # Absolute name.
61890    ac_srcdir=$srcdir$ac_dir_suffix;
61891    ac_top_srcdir=$srcdir
61892    ac_abs_top_srcdir=$srcdir ;;
61893  *) # Relative name.
61894    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
61895    ac_top_srcdir=$ac_top_build_prefix$srcdir
61896    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
61897esac
61898ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
61899
61900
61901  case $ac_mode in
61902  :F)
61903  #
61904  # CONFIG_FILE
61905  #
61906
61907_ACEOF
61908
61909cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61910# If the template does not know about datarootdir, expand it.
61911# FIXME: This hack should be removed a few years after 2.60.
61912ac_datarootdir_hack=; ac_datarootdir_seen=
61913ac_sed_dataroot='
61914/datarootdir/ {
61915  p
61916  q
61917}
61918/@datadir@/p
61919/@docdir@/p
61920/@infodir@/p
61921/@localedir@/p
61922/@mandir@/p'
61923case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
61924*datarootdir*) ac_datarootdir_seen=yes;;
61925*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
61926  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
61927$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
61928_ACEOF
61929cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61930  ac_datarootdir_hack='
61931  s&@datadir@&$datadir&g
61932  s&@docdir@&$docdir&g
61933  s&@infodir@&$infodir&g
61934  s&@localedir@&$localedir&g
61935  s&@mandir@&$mandir&g
61936  s&\\\${datarootdir}&$datarootdir&g' ;;
61937esac
61938_ACEOF
61939
61940# Neutralize VPATH when `$srcdir' = `.'.
61941# Shell code in configure.ac might set extrasub.
61942# FIXME: do we really want to maintain this feature?
61943cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61944ac_sed_extra="$ac_vpsub
61945$extrasub
61946_ACEOF
61947cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61948:t
61949/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
61950s|@configure_input@|$ac_sed_conf_input|;t t
61951s&@top_builddir@&$ac_top_builddir_sub&;t t
61952s&@top_build_prefix@&$ac_top_build_prefix&;t t
61953s&@srcdir@&$ac_srcdir&;t t
61954s&@abs_srcdir@&$ac_abs_srcdir&;t t
61955s&@top_srcdir@&$ac_top_srcdir&;t t
61956s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
61957s&@builddir@&$ac_builddir&;t t
61958s&@abs_builddir@&$ac_abs_builddir&;t t
61959s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
61960$ac_datarootdir_hack
61961"
61962eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
61963  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61964
61965test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
61966  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
61967  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
61968      "$ac_tmp/out"`; test -z "$ac_out"; } &&
61969  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61970which seems to be undefined.  Please make sure it is defined" >&5
61971$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61972which seems to be undefined.  Please make sure it is defined" >&2;}
61973
61974  rm -f "$ac_tmp/stdin"
61975  case $ac_file in
61976  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
61977  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
61978  esac \
61979  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61980 ;;
61981
61982
61983
61984  esac
61985
61986done # for ac_tag
61987
61988
61989as_fn_exit 0
61990_ACEOF
61991ac_clean_files=$ac_clean_files_save
61992
61993test $ac_write_fail = 0 ||
61994  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
61995
61996
61997# configure is writing to config.log, and then calls config.status.
61998# config.status does its own redirection, appending to config.log.
61999# Unfortunately, on DOS this fails, as config.log is still kept open
62000# by configure, so config.status won't be able to write to it; its
62001# output is simply discarded.  So we exec the FD to /dev/null,
62002# effectively closing config.log, so it can be properly (re)opened and
62003# appended to by config.status.  When coming back to configure, we
62004# need to make the FD available again.
62005if test "$no_create" != yes; then
62006  ac_cs_success=:
62007  ac_config_status_args=
62008  test "$silent" = yes &&
62009    ac_config_status_args="$ac_config_status_args --quiet"
62010  exec 5>/dev/null
62011  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
62012  exec 5>>config.log
62013  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
62014  # would make configure fail if this is the last instruction.
62015  $ac_cs_success || as_fn_exit 1
62016fi
62017if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
62018  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
62019$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
62020fi
62021
62022
62023# After AC_OUTPUT, we need to do final work
62024
62025
62026  # Try to move config.log (generated by autoconf) to the configure-support directory.
62027  if test -e ./config.log; then
62028    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
62029  fi
62030
62031  # Rotate our log file (configure.log)
62032  if test -e "$OUTPUT_ROOT/configure.log.old"; then
62033    $RM -f "$OUTPUT_ROOT/configure.log.old"
62034  fi
62035  if test -e "$OUTPUT_ROOT/configure.log"; then
62036    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
62037  fi
62038
62039  # Move configure.log from current directory to the build output root
62040  if test -e ./configure.log; then
62041    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
62042  fi
62043
62044  # Make the compare script executable
62045  $CHMOD +x $OUTPUT_ROOT/compare.sh
62046
62047
62048# Finally output some useful information to the user
62049
62050  # Finally output some useful information to the user
62051
62052  printf "\n"
62053  printf "====================================================\n"
62054  if test "x$no_create" != "xyes"; then
62055    if test "x$IS_RECONFIGURE" != "xyes"; then
62056      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
62057    else
62058      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
62059    fi
62060  else
62061    if test "x$IS_RECONFIGURE" != "xyes"; then
62062      printf "A configuration has been successfully checked but not created\n"
62063    else
62064      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
62065    fi
62066  fi
62067  if test "x$CONFIGURE_COMMAND_LINE" != x; then
62068    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
62069  else
62070    printf "using default settings.\n"
62071  fi
62072
62073  printf "\n"
62074  printf "Configuration summary:\n"
62075  printf "* Debug level:    $DEBUG_LEVEL\n"
62076  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
62077  printf "* JDK variant:    $JDK_VARIANT\n"
62078  printf "* JVM variants:   $with_jvm_variants\n"
62079  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
62080  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
62081
62082  printf "\n"
62083  printf "Tools summary:\n"
62084  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
62085    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
62086  fi
62087  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
62088  if test "x$TOOLCHAIN_VERSION" != "x"; then
62089    print_version=" $TOOLCHAIN_VERSION"
62090  fi
62091  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
62092  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
62093  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
62094
62095  printf "\n"
62096  printf "Build performance summary:\n"
62097  printf "* Cores to use:   $JOBS\n"
62098  printf "* Memory limit:   $MEMORY_SIZE MB\n"
62099  if test "x$CCACHE_STATUS" != "x"; then
62100    printf "* ccache status:  $CCACHE_STATUS\n"
62101  fi
62102  printf "\n"
62103
62104  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
62105    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
62106    printf "will result in longer build times.\n"
62107    printf "\n"
62108  fi
62109
62110  if test "x$FOUND_ALT_VARIABLES" != "x"; then
62111    printf "WARNING: You have old-style ALT_ environment variables set.\n"
62112    printf "These are not respected, and will be ignored. It is recommended\n"
62113    printf "that you clean your environment. The following variables are set:\n"
62114    printf "$FOUND_ALT_VARIABLES\n"
62115    printf "\n"
62116  fi
62117
62118  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
62119    printf "WARNING: Your build output directory is not on a local disk.\n"
62120    printf "This will severely degrade build performance!\n"
62121    printf "It is recommended that you create an output directory on a local disk,\n"
62122    printf "and run the configure script again from that directory.\n"
62123    printf "\n"
62124  fi
62125
62126  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
62127    printf "WARNING: The result of this configuration has overridden an older\n"
62128    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
62129    printf "proper build. Failure to do so might result in strange build problems.\n"
62130    printf "\n"
62131  fi
62132
62133  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
62134    printf "WARNING: The result of this configuration was not saved.\n"
62135    printf "You should run without '--no-create | -n' to create the configuration.\n"
62136    printf "\n"
62137  fi
62138
62139
62140
62141  # Locate config.log.
62142  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
62143    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
62144  elif test -e "./config.log"; then
62145    CONFIG_LOG_PATH="."
62146  fi
62147
62148  if test -e "$CONFIG_LOG_PATH/config.log"; then
62149    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
62150    if test $? -eq 0; then
62151      printf "The following warnings were produced. Repeated here for convenience:\n"
62152      # We must quote sed expression (using []) to stop m4 from eating the [].
62153      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
62154      printf "\n"
62155    fi
62156  fi
62157
62158