generated-configure.sh revision 1741:879da33f4837
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
635ENABLE_JAVAC_SERVER
636ENABLE_SJAVAC
637SJAVAC_SERVER_JAVA_FLAGS
638SJAVAC_SERVER_JAVA
639JAVA_TOOL_FLAGS_SMALL
640JAVA_FLAGS_SMALL
641JAVA_FLAGS_BIG
642JAVA_FLAGS
643JOBS
644MEMORY_SIZE
645NUM_CORES
646ENABLE_INTREE_EC
647SALIB_NAME
648HOTSPOT_MAKE_ARGS
649LIBZIP_CAN_USE_MMAP
650LIBDL
651LIBM
652USE_EXTERNAL_LCMS
653LCMS_LIBS
654LCMS_CFLAGS
655USE_EXTERNAL_LIBZ
656USE_EXTERNAL_LIBPNG
657PNG_LIBS
658PNG_CFLAGS
659USE_EXTERNAL_LIBGIF
660USE_EXTERNAL_LIBJPEG
661LLVM_LIBS
662LLVM_LDFLAGS
663LLVM_CFLAGS
664LLVM_CONFIG
665LIBFFI_LIBS
666LIBFFI_CFLAGS
667ALSA_LIBS
668ALSA_CFLAGS
669FREETYPE_BUNDLE_LIB_PATH
670FREETYPE_LIBS
671FREETYPE_CFLAGS
672CUPS_CFLAGS
673X_EXTRA_LIBS
674X_LIBS
675X_PRE_LIBS
676X_CFLAGS
677XMKMF
678MSVCP_DLL
679MSVCR_DLL
680LIBCXX
681STATIC_CXX_SETTING
682FIXPATH
683GCOV_ENABLED
684ZIP_DEBUGINFO_FILES
685ENABLE_DEBUG_SYMBOLS
686CFLAGS_WARNINGS_ARE_ERRORS
687DISABLE_WARNING_PREFIX
688WARNINGS_AS_ERRORS
689COMPILER_SUPPORTS_TARGET_BITS_FLAG
690ZERO_ARCHFLAG
691LDFLAGS_TESTEXE
692LDFLAGS_TESTLIB
693LDFLAGS_CXX_JDK
694JDKEXE_LIBS
695JDKLIB_LIBS
696LDFLAGS_JDKEXE
697LDFLAGS_JDKLIB
698CXXFLAGS_TESTEXE
699CXXFLAGS_TESTLIB
700CFLAGS_TESTEXE
701CFLAGS_TESTLIB
702CXXFLAGS_JDKEXE
703CXXFLAGS_JDKLIB
704CFLAGS_JDKEXE
705CFLAGS_JDKLIB
706MACOSX_VERSION_MIN
707CXX_O_FLAG_NONE
708CXX_O_FLAG_DEBUG
709CXX_O_FLAG_NORM
710CXX_O_FLAG_HI
711CXX_O_FLAG_HIGHEST
712C_O_FLAG_NONE
713C_O_FLAG_DEBUG
714C_O_FLAG_NORM
715C_O_FLAG_HI
716C_O_FLAG_HIGHEST
717CXXFLAGS_DEBUG_SYMBOLS
718CFLAGS_DEBUG_SYMBOLS
719CXX_FLAG_DEPS
720C_FLAG_DEPS
721SET_SHARED_LIBRARY_MAPFILE
722SET_SHARED_LIBRARY_NAME
723SET_SHARED_LIBRARY_ORIGIN
724SET_EXECUTABLE_ORIGIN
725CXX_FLAG_REORDER
726C_FLAG_REORDER
727RC_FLAGS
728AR_OUT_OPTION
729LD_OUT_OPTION
730EXE_OUT_OPTION
731CC_OUT_OPTION
732STRIPFLAGS
733ARFLAGS
734COMPILER_TARGET_BITS_FLAG
735JT_HOME
736JTREGEXE
737USING_BROKEN_SUSE_LD
738PACKAGE_PATH
739USE_CLANG
740HOTSPOT_LD
741HOTSPOT_CXX
742HOTSPOT_RC
743HOTSPOT_MT
744BUILD_LD
745BUILD_CXX
746BUILD_CC
747BUILD_SYSROOT_LDFLAGS
748BUILD_SYSROOT_CFLAGS
749ac_ct_OBJDUMP
750OBJDUMP
751ac_ct_OBJCOPY
752OBJCOPY
753ac_ct_NM
754ac_ct_STRIP
755GNM
756NM
757STRIP
758MSBUILD
759DUMPBIN
760RC
761MT
762LIPO
763ac_ct_AR
764AR
765AS
766LDCXX
767LD
768CXXCPP
769CPP
770ac_ct_CXX
771CXXFLAGS
772CXX
773ac_ct_PROPER_COMPILER_CXX
774PROPER_COMPILER_CXX
775TOOLCHAIN_PATH_CXX
776POTENTIAL_CXX
777OBJEXT
778EXEEXT
779ac_ct_CC
780CPPFLAGS
781LDFLAGS
782CFLAGS
783CC
784ac_ct_PROPER_COMPILER_CC
785PROPER_COMPILER_CC
786TOOLCHAIN_PATH_CC
787POTENTIAL_CC
788VS_LIB
789VS_INCLUDE
790VS_PATH
791CYGWIN_LINK
792SYSROOT_LDFLAGS
793SYSROOT_CFLAGS
794LEGACY_EXTRA_LDFLAGS
795LEGACY_EXTRA_CXXFLAGS
796LEGACY_EXTRA_CFLAGS
797EXE_SUFFIX
798OBJ_SUFFIX
799STATIC_LIBRARY
800SHARED_LIBRARY
801STATIC_LIBRARY_SUFFIX
802SHARED_LIBRARY_SUFFIX
803LIBRARY_PREFIX
804TOOLCHAIN_TYPE
805STATIC_BUILD
806BUILD_HOTSPOT
807HOTSPOT_DIST
808BUILD_OUTPUT
809OVERRIDE_SRC_ROOT
810ADD_SRC_ROOT
811JDK_TOPDIR
812NASHORN_TOPDIR
813HOTSPOT_TOPDIR
814JAXWS_TOPDIR
815JAXP_TOPDIR
816CORBA_TOPDIR
817LANGTOOLS_TOPDIR
818BOOT_JDK_BITS
819JAVAC_FLAGS
820BOOT_JDK_SOURCETARGET
821JARSIGNER
822JAR
823JAVAH
824JAVAC
825JAVA
826BOOT_JDK
827JAVA_CHECK
828JAVAC_CHECK
829COOKED_BUILD_NUMBER
830JDK_VERSION
831COPYRIGHT_YEAR
832MACOSX_BUNDLE_ID_BASE
833MACOSX_BUNDLE_NAME_BASE
834COMPANY_NAME
835JDK_RC_PLATFORM_NAME
836PRODUCT_SUFFIX
837PRODUCT_NAME
838LAUNCHER_NAME
839MILESTONE
840JDK_BUILD_NUMBER
841JDK_UPDATE_VERSION
842JDK_MICRO_VERSION
843JDK_MINOR_VERSION
844JDK_MAJOR_VERSION
845USER_RELEASE_SUFFIX
846COMPRESS_JARS
847UNLIMITED_CRYPTO
848CACERTS_FILE
849TEST_IN_BUILD
850BUILD_HEADLESS
851SUPPORT_HEADFUL
852SUPPORT_HEADLESS
853OS_VERSION_MICRO
854OS_VERSION_MINOR
855OS_VERSION_MAJOR
856PKG_CONFIG
857BASH_ARGS
858SETFILE
859CODESIGN
860XATTR
861DSYMUTIL
862IS_GNU_TIME
863PATCH
864TIME
865STAT
866HG
867READELF
868OTOOL
869LDD
870ZIP
871UNZIP
872FIND_DELETE
873OUTPUT_SYNC
874OUTPUT_SYNC_SUPPORTED
875CHECK_TOOLSDIR_MAKE
876CHECK_TOOLSDIR_GMAKE
877CHECK_MAKE
878CHECK_GMAKE
879MAKE
880PKGHANDLER
881CONFIGURESUPPORT_OUTPUTDIR
882OUTPUT_ROOT
883CONF_NAME
884SPEC
885SDKROOT
886XCODEBUILD
887BUILD_VARIANT_RELEASE
888DEBUG_CLASSFILES
889FASTDEBUG
890VARIANT
891DEBUG_LEVEL
892MACOSX_UNIVERSAL
893INCLUDE_SA
894JVM_VARIANT_CORE
895JVM_VARIANT_ZEROSHARK
896JVM_VARIANT_ZERO
897JVM_VARIANT_KERNEL
898JVM_VARIANT_MINIMAL1
899JVM_VARIANT_CLIENT
900JVM_VARIANT_SERVER
901JVM_VARIANTS
902JVM_INTERPRETER
903JDK_VARIANT
904SET_OPENJDK
905CANONICAL_TOPDIR
906ORIGINAL_TOPDIR
907TOPDIR
908PATH_SEP
909ZERO_ARCHDEF
910DEFINE_CROSS_COMPILE_ARCH
911LP64
912OPENJDK_TARGET_OS_EXPORT_DIR
913OPENJDK_TARGET_CPU_JLI_CFLAGS
914OPENJDK_TARGET_CPU_OSARCH
915OPENJDK_TARGET_CPU_ISADIR
916OPENJDK_TARGET_CPU_LIBDIR
917OPENJDK_TARGET_CPU_LEGACY_LIB
918OPENJDK_TARGET_CPU_LEGACY
919REQUIRED_OS_VERSION
920REQUIRED_OS_NAME
921COMPILE_TYPE
922OPENJDK_TARGET_CPU_ENDIAN
923OPENJDK_TARGET_CPU_BITS
924OPENJDK_TARGET_CPU_ARCH
925OPENJDK_TARGET_CPU
926OPENJDK_TARGET_OS_ENV
927OPENJDK_TARGET_OS_TYPE
928OPENJDK_TARGET_OS
929OPENJDK_BUILD_CPU_ENDIAN
930OPENJDK_BUILD_CPU_BITS
931OPENJDK_BUILD_CPU_ARCH
932OPENJDK_BUILD_CPU
933OPENJDK_BUILD_OS_ENV
934OPENJDK_BUILD_OS_TYPE
935OPENJDK_BUILD_OS
936OPENJDK_BUILD_AUTOCONF_NAME
937OPENJDK_TARGET_AUTOCONF_NAME
938target_os
939target_vendor
940target_cpu
941target
942host_os
943host_vendor
944host_cpu
945host
946build_os
947build_vendor
948build_cpu
949build
950NICE
951CPIO
952DF
953READLINK
954CYGPATH
955SED
956FGREP
957EGREP
958GREP
959AWK
960XARGS
961WHICH
962WC
963UNIQ
964UNAME
965TR
966TOUCH
967TEE
968TAR
969TAIL
970SORT
971SH
972RMDIR
973RM
974PRINTF
975NAWK
976MV
977MKTEMP
978MKDIR
979LS
980LN
981HEAD
982FIND
983FILE
984EXPR
985ECHO
986DIRNAME
987DIFF
988DATE
989CUT
990CP
991COMM
992CMP
993CHMOD
994CAT
995BASH
996BASENAME
997DATE_WHEN_CONFIGURED
998ORIGINAL_PATH
999CONFIGURE_COMMAND_LINE
1000target_alias
1001host_alias
1002build_alias
1003LIBS
1004ECHO_T
1005ECHO_N
1006ECHO_C
1007DEFS
1008mandir
1009localedir
1010libdir
1011psdir
1012pdfdir
1013dvidir
1014htmldir
1015infodir
1016docdir
1017oldincludedir
1018includedir
1019localstatedir
1020sharedstatedir
1021sysconfdir
1022datadir
1023datarootdir
1024libexecdir
1025sbindir
1026bindir
1027program_transform_name
1028prefix
1029exec_prefix
1030PACKAGE_URL
1031PACKAGE_BUGREPORT
1032PACKAGE_STRING
1033PACKAGE_VERSION
1034PACKAGE_TARNAME
1035PACKAGE_NAME
1036PATH_SEPARATOR
1037SHELL'
1038ac_subst_files=''
1039ac_user_opts='
1040enable_option_checking
1041with_target_bits
1042enable_openjdk_only
1043with_custom_make_dir
1044with_jdk_variant
1045with_jvm_interpreter
1046with_jvm_variants
1047enable_debug
1048with_debug_level
1049with_devkit
1050with_sys_root
1051with_sysroot
1052with_tools_dir
1053with_toolchain_path
1054with_extra_path
1055with_sdk_name
1056with_conf_name
1057with_output_sync
1058enable_headful
1059enable_hotspot_test_in_build
1060with_cacerts_file
1061enable_unlimited_crypto
1062with_milestone
1063with_update_version
1064with_user_release_suffix
1065with_build_number
1066with_copyright_year
1067with_boot_jdk
1068with_add_source_root
1069with_override_source_root
1070with_adds_and_overrides
1071with_override_langtools
1072with_override_corba
1073with_override_jaxp
1074with_override_jaxws
1075with_override_hotspot
1076with_override_nashorn
1077with_override_jdk
1078with_import_hotspot
1079enable_static_build
1080with_toolchain_type
1081with_extra_cflags
1082with_extra_cxxflags
1083with_extra_ldflags
1084with_toolchain_version
1085with_build_devkit
1086with_jtreg
1087enable_warnings_as_errors
1088enable_debug_symbols
1089enable_zip_debug_info
1090enable_native_coverage
1091with_stdc__lib
1092with_msvcr_dll
1093with_msvcp_dll
1094with_x
1095with_cups
1096with_cups_include
1097with_freetype
1098with_freetype_include
1099with_freetype_lib
1100with_freetype_src
1101enable_freetype_bundling
1102with_alsa
1103with_alsa_include
1104with_alsa_lib
1105with_libffi
1106with_libffi_include
1107with_libffi_lib
1108with_libjpeg
1109with_giflib
1110with_libpng
1111with_zlib
1112with_lcms
1113with_dxsdk
1114with_dxsdk_lib
1115with_dxsdk_include
1116with_num_cores
1117with_memory_size
1118with_jobs
1119with_boot_jdk_jvmargs
1120with_sjavac_server_java
1121enable_sjavac
1122enable_javac_server
1123enable_precompiled_headers
1124enable_ccache
1125with_ccache_dir
1126'
1127      ac_precious_vars='build_alias
1128host_alias
1129target_alias
1130BASENAME
1131BASH
1132CAT
1133CHMOD
1134CMP
1135COMM
1136CP
1137CUT
1138DATE
1139DIFF
1140DIRNAME
1141ECHO
1142EXPR
1143FILE
1144FIND
1145HEAD
1146LN
1147LS
1148MKDIR
1149MKTEMP
1150MV
1151NAWK
1152PRINTF
1153RM
1154RMDIR
1155SH
1156SORT
1157TAIL
1158TAR
1159TEE
1160TOUCH
1161TR
1162UNAME
1163UNIQ
1164WC
1165WHICH
1166XARGS
1167AWK
1168GREP
1169EGREP
1170FGREP
1171SED
1172CYGPATH
1173READLINK
1174DF
1175CPIO
1176NICE
1177MAKE
1178UNZIP
1179ZIP
1180LDD
1181OTOOL
1182READELF
1183HG
1184STAT
1185TIME
1186PATCH
1187DSYMUTIL
1188XATTR
1189CODESIGN
1190SETFILE
1191PKG_CONFIG
1192JAVA
1193JAVAC
1194JAVAH
1195JAR
1196JARSIGNER
1197CC
1198CFLAGS
1199LDFLAGS
1200LIBS
1201CPPFLAGS
1202CXX
1203CXXFLAGS
1204CCC
1205CPP
1206CXXCPP
1207AS
1208AR
1209LIPO
1210STRIP
1211NM
1212GNM
1213OBJCOPY
1214OBJDUMP
1215BUILD_CC
1216BUILD_CXX
1217JTREGEXE
1218XMKMF
1219FREETYPE_CFLAGS
1220FREETYPE_LIBS
1221ALSA_CFLAGS
1222ALSA_LIBS
1223LIBFFI_CFLAGS
1224LIBFFI_LIBS
1225PNG_CFLAGS
1226PNG_LIBS
1227LCMS_CFLAGS
1228LCMS_LIBS
1229CCACHE'
1230
1231
1232# Initialize some variables set by options.
1233ac_init_help=
1234ac_init_version=false
1235ac_unrecognized_opts=
1236ac_unrecognized_sep=
1237# The variables have the same names as the options, with
1238# dashes changed to underlines.
1239cache_file=/dev/null
1240exec_prefix=NONE
1241no_create=
1242no_recursion=
1243prefix=NONE
1244program_prefix=NONE
1245program_suffix=NONE
1246program_transform_name=s,x,x,
1247silent=
1248site=
1249srcdir=
1250verbose=
1251x_includes=NONE
1252x_libraries=NONE
1253
1254# Installation directory options.
1255# These are left unexpanded so users can "make install exec_prefix=/foo"
1256# and all the variables that are supposed to be based on exec_prefix
1257# by default will actually change.
1258# Use braces instead of parens because sh, perl, etc. also accept them.
1259# (The list follows the same order as the GNU Coding Standards.)
1260bindir='${exec_prefix}/bin'
1261sbindir='${exec_prefix}/sbin'
1262libexecdir='${exec_prefix}/libexec'
1263datarootdir='${prefix}/share'
1264datadir='${datarootdir}'
1265sysconfdir='${prefix}/etc'
1266sharedstatedir='${prefix}/com'
1267localstatedir='${prefix}/var'
1268includedir='${prefix}/include'
1269oldincludedir='/usr/include'
1270docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1271infodir='${datarootdir}/info'
1272htmldir='${docdir}'
1273dvidir='${docdir}'
1274pdfdir='${docdir}'
1275psdir='${docdir}'
1276libdir='${exec_prefix}/lib'
1277localedir='${datarootdir}/locale'
1278mandir='${datarootdir}/man'
1279
1280ac_prev=
1281ac_dashdash=
1282for ac_option
1283do
1284  # If the previous option needs an argument, assign it.
1285  if test -n "$ac_prev"; then
1286    eval $ac_prev=\$ac_option
1287    ac_prev=
1288    continue
1289  fi
1290
1291  case $ac_option in
1292  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1293  *=)   ac_optarg= ;;
1294  *)    ac_optarg=yes ;;
1295  esac
1296
1297  # Accept the important Cygnus configure options, so we can diagnose typos.
1298
1299  case $ac_dashdash$ac_option in
1300  --)
1301    ac_dashdash=yes ;;
1302
1303  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1304    ac_prev=bindir ;;
1305  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1306    bindir=$ac_optarg ;;
1307
1308  -build | --build | --buil | --bui | --bu)
1309    ac_prev=build_alias ;;
1310  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1311    build_alias=$ac_optarg ;;
1312
1313  -cache-file | --cache-file | --cache-fil | --cache-fi \
1314  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1315    ac_prev=cache_file ;;
1316  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1317  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1318    cache_file=$ac_optarg ;;
1319
1320  --config-cache | -C)
1321    cache_file=config.cache ;;
1322
1323  -datadir | --datadir | --datadi | --datad)
1324    ac_prev=datadir ;;
1325  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1326    datadir=$ac_optarg ;;
1327
1328  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1329  | --dataroo | --dataro | --datar)
1330    ac_prev=datarootdir ;;
1331  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1332  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1333    datarootdir=$ac_optarg ;;
1334
1335  -disable-* | --disable-*)
1336    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1337    # Reject names that are not valid shell variable names.
1338    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1339      as_fn_error $? "invalid feature name: $ac_useropt"
1340    ac_useropt_orig=$ac_useropt
1341    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1342    case $ac_user_opts in
1343      *"
1344"enable_$ac_useropt"
1345"*) ;;
1346      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1347	 ac_unrecognized_sep=', ';;
1348    esac
1349    eval enable_$ac_useropt=no ;;
1350
1351  -docdir | --docdir | --docdi | --doc | --do)
1352    ac_prev=docdir ;;
1353  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1354    docdir=$ac_optarg ;;
1355
1356  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1357    ac_prev=dvidir ;;
1358  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1359    dvidir=$ac_optarg ;;
1360
1361  -enable-* | --enable-*)
1362    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1363    # Reject names that are not valid shell variable names.
1364    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1365      as_fn_error $? "invalid feature name: $ac_useropt"
1366    ac_useropt_orig=$ac_useropt
1367    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1368    case $ac_user_opts in
1369      *"
1370"enable_$ac_useropt"
1371"*) ;;
1372      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1373	 ac_unrecognized_sep=', ';;
1374    esac
1375    eval enable_$ac_useropt=\$ac_optarg ;;
1376
1377  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1378  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1379  | --exec | --exe | --ex)
1380    ac_prev=exec_prefix ;;
1381  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1382  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1383  | --exec=* | --exe=* | --ex=*)
1384    exec_prefix=$ac_optarg ;;
1385
1386  -gas | --gas | --ga | --g)
1387    # Obsolete; use --with-gas.
1388    with_gas=yes ;;
1389
1390  -help | --help | --hel | --he | -h)
1391    ac_init_help=long ;;
1392  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1393    ac_init_help=recursive ;;
1394  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1395    ac_init_help=short ;;
1396
1397  -host | --host | --hos | --ho)
1398    ac_prev=host_alias ;;
1399  -host=* | --host=* | --hos=* | --ho=*)
1400    host_alias=$ac_optarg ;;
1401
1402  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1403    ac_prev=htmldir ;;
1404  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1405  | --ht=*)
1406    htmldir=$ac_optarg ;;
1407
1408  -includedir | --includedir | --includedi | --included | --include \
1409  | --includ | --inclu | --incl | --inc)
1410    ac_prev=includedir ;;
1411  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1412  | --includ=* | --inclu=* | --incl=* | --inc=*)
1413    includedir=$ac_optarg ;;
1414
1415  -infodir | --infodir | --infodi | --infod | --info | --inf)
1416    ac_prev=infodir ;;
1417  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1418    infodir=$ac_optarg ;;
1419
1420  -libdir | --libdir | --libdi | --libd)
1421    ac_prev=libdir ;;
1422  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1423    libdir=$ac_optarg ;;
1424
1425  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1426  | --libexe | --libex | --libe)
1427    ac_prev=libexecdir ;;
1428  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1429  | --libexe=* | --libex=* | --libe=*)
1430    libexecdir=$ac_optarg ;;
1431
1432  -localedir | --localedir | --localedi | --localed | --locale)
1433    ac_prev=localedir ;;
1434  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1435    localedir=$ac_optarg ;;
1436
1437  -localstatedir | --localstatedir | --localstatedi | --localstated \
1438  | --localstate | --localstat | --localsta | --localst | --locals)
1439    ac_prev=localstatedir ;;
1440  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1441  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1442    localstatedir=$ac_optarg ;;
1443
1444  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1445    ac_prev=mandir ;;
1446  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1447    mandir=$ac_optarg ;;
1448
1449  -nfp | --nfp | --nf)
1450    # Obsolete; use --without-fp.
1451    with_fp=no ;;
1452
1453  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1454  | --no-cr | --no-c | -n)
1455    no_create=yes ;;
1456
1457  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1458  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1459    no_recursion=yes ;;
1460
1461  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1462  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1463  | --oldin | --oldi | --old | --ol | --o)
1464    ac_prev=oldincludedir ;;
1465  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1466  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1467  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1468    oldincludedir=$ac_optarg ;;
1469
1470  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1471    ac_prev=prefix ;;
1472  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1473    prefix=$ac_optarg ;;
1474
1475  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1476  | --program-pre | --program-pr | --program-p)
1477    ac_prev=program_prefix ;;
1478  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1479  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1480    program_prefix=$ac_optarg ;;
1481
1482  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1483  | --program-suf | --program-su | --program-s)
1484    ac_prev=program_suffix ;;
1485  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1486  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1487    program_suffix=$ac_optarg ;;
1488
1489  -program-transform-name | --program-transform-name \
1490  | --program-transform-nam | --program-transform-na \
1491  | --program-transform-n | --program-transform- \
1492  | --program-transform | --program-transfor \
1493  | --program-transfo | --program-transf \
1494  | --program-trans | --program-tran \
1495  | --progr-tra | --program-tr | --program-t)
1496    ac_prev=program_transform_name ;;
1497  -program-transform-name=* | --program-transform-name=* \
1498  | --program-transform-nam=* | --program-transform-na=* \
1499  | --program-transform-n=* | --program-transform-=* \
1500  | --program-transform=* | --program-transfor=* \
1501  | --program-transfo=* | --program-transf=* \
1502  | --program-trans=* | --program-tran=* \
1503  | --progr-tra=* | --program-tr=* | --program-t=*)
1504    program_transform_name=$ac_optarg ;;
1505
1506  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1507    ac_prev=pdfdir ;;
1508  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1509    pdfdir=$ac_optarg ;;
1510
1511  -psdir | --psdir | --psdi | --psd | --ps)
1512    ac_prev=psdir ;;
1513  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1514    psdir=$ac_optarg ;;
1515
1516  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1517  | -silent | --silent | --silen | --sile | --sil)
1518    silent=yes ;;
1519
1520  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1521    ac_prev=sbindir ;;
1522  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1523  | --sbi=* | --sb=*)
1524    sbindir=$ac_optarg ;;
1525
1526  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1527  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1528  | --sharedst | --shareds | --shared | --share | --shar \
1529  | --sha | --sh)
1530    ac_prev=sharedstatedir ;;
1531  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1532  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1533  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1534  | --sha=* | --sh=*)
1535    sharedstatedir=$ac_optarg ;;
1536
1537  -site | --site | --sit)
1538    ac_prev=site ;;
1539  -site=* | --site=* | --sit=*)
1540    site=$ac_optarg ;;
1541
1542  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1543    ac_prev=srcdir ;;
1544  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1545    srcdir=$ac_optarg ;;
1546
1547  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1548  | --syscon | --sysco | --sysc | --sys | --sy)
1549    ac_prev=sysconfdir ;;
1550  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1551  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1552    sysconfdir=$ac_optarg ;;
1553
1554  -target | --target | --targe | --targ | --tar | --ta | --t)
1555    ac_prev=target_alias ;;
1556  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1557    target_alias=$ac_optarg ;;
1558
1559  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1560    verbose=yes ;;
1561
1562  -version | --version | --versio | --versi | --vers | -V)
1563    ac_init_version=: ;;
1564
1565  -with-* | --with-*)
1566    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1567    # Reject names that are not valid shell variable names.
1568    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1569      as_fn_error $? "invalid package name: $ac_useropt"
1570    ac_useropt_orig=$ac_useropt
1571    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1572    case $ac_user_opts in
1573      *"
1574"with_$ac_useropt"
1575"*) ;;
1576      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1577	 ac_unrecognized_sep=', ';;
1578    esac
1579    eval with_$ac_useropt=\$ac_optarg ;;
1580
1581  -without-* | --without-*)
1582    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1583    # Reject names that are not valid shell variable names.
1584    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1585      as_fn_error $? "invalid package name: $ac_useropt"
1586    ac_useropt_orig=$ac_useropt
1587    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1588    case $ac_user_opts in
1589      *"
1590"with_$ac_useropt"
1591"*) ;;
1592      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1593	 ac_unrecognized_sep=', ';;
1594    esac
1595    eval with_$ac_useropt=no ;;
1596
1597  --x)
1598    # Obsolete; use --with-x.
1599    with_x=yes ;;
1600
1601  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1602  | --x-incl | --x-inc | --x-in | --x-i)
1603    ac_prev=x_includes ;;
1604  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1605  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1606    x_includes=$ac_optarg ;;
1607
1608  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1609  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1610    ac_prev=x_libraries ;;
1611  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1612  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1613    x_libraries=$ac_optarg ;;
1614
1615  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1616Try \`$0 --help' for more information"
1617    ;;
1618
1619  *=*)
1620    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1621    # Reject names that are not valid shell variable names.
1622    case $ac_envvar in #(
1623      '' | [0-9]* | *[!_$as_cr_alnum]* )
1624      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1625    esac
1626    eval $ac_envvar=\$ac_optarg
1627    export $ac_envvar ;;
1628
1629  *)
1630    # FIXME: should be removed in autoconf 3.0.
1631    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1632    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1633      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1634    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1635    ;;
1636
1637  esac
1638done
1639
1640if test -n "$ac_prev"; then
1641  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1642  as_fn_error $? "missing argument to $ac_option"
1643fi
1644
1645if test -n "$ac_unrecognized_opts"; then
1646  case $enable_option_checking in
1647    no) ;;
1648    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1649    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1650  esac
1651fi
1652
1653# Check all directory arguments for consistency.
1654for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1655		datadir sysconfdir sharedstatedir localstatedir includedir \
1656		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1657		libdir localedir mandir
1658do
1659  eval ac_val=\$$ac_var
1660  # Remove trailing slashes.
1661  case $ac_val in
1662    */ )
1663      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1664      eval $ac_var=\$ac_val;;
1665  esac
1666  # Be sure to have absolute directory names.
1667  case $ac_val in
1668    [\\/$]* | ?:[\\/]* )  continue;;
1669    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1670  esac
1671  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1672done
1673
1674# There might be people who depend on the old broken behavior: `$host'
1675# used to hold the argument of --host etc.
1676# FIXME: To remove some day.
1677build=$build_alias
1678host=$host_alias
1679target=$target_alias
1680
1681# FIXME: To remove some day.
1682if test "x$host_alias" != x; then
1683  if test "x$build_alias" = x; then
1684    cross_compiling=maybe
1685  elif test "x$build_alias" != "x$host_alias"; then
1686    cross_compiling=yes
1687  fi
1688fi
1689
1690ac_tool_prefix=
1691test -n "$host_alias" && ac_tool_prefix=$host_alias-
1692
1693test "$silent" = yes && exec 6>/dev/null
1694
1695
1696ac_pwd=`pwd` && test -n "$ac_pwd" &&
1697ac_ls_di=`ls -di .` &&
1698ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1699  as_fn_error $? "working directory cannot be determined"
1700test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1701  as_fn_error $? "pwd does not report name of working directory"
1702
1703
1704# Find the source files, if location was not specified.
1705if test -z "$srcdir"; then
1706  ac_srcdir_defaulted=yes
1707  # Try the directory containing this script, then the parent directory.
1708  ac_confdir=`$as_dirname -- "$as_myself" ||
1709$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1710	 X"$as_myself" : 'X\(//\)[^/]' \| \
1711	 X"$as_myself" : 'X\(//\)$' \| \
1712	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1713$as_echo X"$as_myself" |
1714    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1715	    s//\1/
1716	    q
1717	  }
1718	  /^X\(\/\/\)[^/].*/{
1719	    s//\1/
1720	    q
1721	  }
1722	  /^X\(\/\/\)$/{
1723	    s//\1/
1724	    q
1725	  }
1726	  /^X\(\/\).*/{
1727	    s//\1/
1728	    q
1729	  }
1730	  s/.*/./; q'`
1731  srcdir=$ac_confdir
1732  if test ! -r "$srcdir/$ac_unique_file"; then
1733    srcdir=..
1734  fi
1735else
1736  ac_srcdir_defaulted=no
1737fi
1738if test ! -r "$srcdir/$ac_unique_file"; then
1739  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1740  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1741fi
1742ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1743ac_abs_confdir=`(
1744	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1745	pwd)`
1746# When building in place, set srcdir=.
1747if test "$ac_abs_confdir" = "$ac_pwd"; then
1748  srcdir=.
1749fi
1750# Remove unnecessary trailing slashes from srcdir.
1751# Double slashes in file names in object file debugging info
1752# mess up M-x gdb in Emacs.
1753case $srcdir in
1754*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1755esac
1756for ac_var in $ac_precious_vars; do
1757  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1758  eval ac_env_${ac_var}_value=\$${ac_var}
1759  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1760  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1761done
1762
1763#
1764# Report the --help message.
1765#
1766if test "$ac_init_help" = "long"; then
1767  # Omit some internal or obsolete options to make the list less imposing.
1768  # This message is too long to be a string in the A/UX 3.1 sh.
1769  cat <<_ACEOF
1770\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1771
1772Usage: $0 [OPTION]... [VAR=VALUE]...
1773
1774To assign environment variables (e.g., CC, CFLAGS...), specify them as
1775VAR=VALUE.  See below for descriptions of some of the useful variables.
1776
1777Defaults for the options are specified in brackets.
1778
1779Configuration:
1780  -h, --help              display this help and exit
1781      --help=short        display options specific to this package
1782      --help=recursive    display the short help of all the included packages
1783  -V, --version           display version information and exit
1784  -q, --quiet, --silent   do not print \`checking ...' messages
1785      --cache-file=FILE   cache test results in FILE [disabled]
1786  -C, --config-cache      alias for \`--cache-file=config.cache'
1787  -n, --no-create         do not create output files
1788      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1789
1790Installation directories:
1791  --prefix=PREFIX         install architecture-independent files in PREFIX
1792                          [$ac_default_prefix]
1793  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1794                          [PREFIX]
1795
1796By default, \`make install' will install all the files in
1797\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1798an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1799for instance \`--prefix=\$HOME'.
1800
1801For better control, use the options below.
1802
1803Fine tuning of the installation directories:
1804  --bindir=DIR            user executables [EPREFIX/bin]
1805  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1806  --libexecdir=DIR        program executables [EPREFIX/libexec]
1807  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1808  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1809  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1810  --libdir=DIR            object code libraries [EPREFIX/lib]
1811  --includedir=DIR        C header files [PREFIX/include]
1812  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1813  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1814  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1815  --infodir=DIR           info documentation [DATAROOTDIR/info]
1816  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1817  --mandir=DIR            man documentation [DATAROOTDIR/man]
1818  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1819  --htmldir=DIR           html documentation [DOCDIR]
1820  --dvidir=DIR            dvi documentation [DOCDIR]
1821  --pdfdir=DIR            pdf documentation [DOCDIR]
1822  --psdir=DIR             ps documentation [DOCDIR]
1823_ACEOF
1824
1825  cat <<\_ACEOF
1826
1827X features:
1828  --x-includes=DIR    X include files are in DIR
1829  --x-libraries=DIR   X library files are in DIR
1830
1831System types:
1832  --build=BUILD     configure for building on BUILD [guessed]
1833  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1834  --target=TARGET   configure for building compilers for TARGET [HOST]
1835_ACEOF
1836fi
1837
1838if test -n "$ac_init_help"; then
1839  case $ac_init_help in
1840     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1841   esac
1842  cat <<\_ACEOF
1843
1844Optional Features:
1845  --disable-option-checking  ignore unrecognized --enable/--with options
1846  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1847  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1848  --enable-openjdk-only   suppress building custom source even if present
1849                          [disabled]
1850  --enable-debug          set the debug level to fastdebug (shorthand for
1851                          --with-debug-level=fastdebug) [disabled]
1852  --disable-headful       disable building headful support (graphical UI
1853                          support) [enabled]
1854  --enable-hotspot-test-in-build
1855                          run the Queens test after Hotspot build [disabled]
1856  --enable-unlimited-crypto
1857                          Enable unlimited crypto policy [disabled]
1858  --enable-static-build   enable static library build [disabled]
1859  --disable-warnings-as-errors
1860                          do not consider native warnings to be an error
1861                          [enabled]
1862  --disable-debug-symbols disable generation of debug symbols [enabled]
1863  --disable-zip-debug-info
1864                          disable zipping of debug-info files [enabled]
1865  --enable-native-coverage
1866                          enable native compilation with code coverage
1867                          data[disabled]
1868  --disable-freetype-bundling
1869                          disable bundling of the freetype library with the
1870                          build result [enabled on Windows or when using
1871                          --with-freetype, disabled otherwise]
1872  --enable-sjavac         use sjavac to do fast incremental compiles
1873                          [disabled]
1874  --enable-javac-server   use only the server part of sjavac for faster javac
1875                          compiles [disabled]
1876  --disable-precompiled-headers
1877                          disable using precompiled headers when compiling C++
1878                          [enabled]
1879  --enable-ccache         enable using ccache to speed up recompilations
1880                          [disabled]
1881
1882Optional Packages:
1883  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1884  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1885  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1886                          support it), e.g. --with-target-bits=32 [guessed]
1887  --with-custom-make-dir  Deprecated. Option is kept for backwards
1888                          compatibility and is ignored
1889  --with-jdk-variant      JDK variant to build (normal) [normal]
1890  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1891  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1892                          client, minimal1, kernel, zero, zeroshark, core)
1893                          [server]
1894  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1895                          optimized (HotSpot build only)) [release]
1896  --with-devkit           use this devkit for compilers, tools and resources
1897  --with-sys-root         alias for --with-sysroot for backwards compatability
1898  --with-sysroot          use this directory as sysroot
1899  --with-tools-dir        alias for --with-toolchain-path for backwards
1900                          compatibility
1901  --with-toolchain-path   prepend these directories when searching for
1902                          toolchain binaries (compilers etc)
1903  --with-extra-path       prepend these directories to the default path
1904  --with-sdk-name         use the platform SDK of the given name. [macosx]
1905  --with-conf-name        use this as the name of the configuration [generated
1906                          from important configuration options]
1907  --with-output-sync      set make output sync type if supported by make.
1908                          [recurse]
1909  --with-cacerts-file     specify alternative cacerts file
1910  --with-milestone        Set milestone value for build [internal]
1911  --with-update-version   Set update version value for build [b00]
1912  --with-user-release-suffix
1913                          Add a custom string to the version string if build
1914                          number is not set.[username_builddateb00]
1915  --with-build-number     Set build number value for build [b00]
1916  --with-copyright-year   Set copyright year value for build [current year]
1917  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1918  --with-add-source-root  for each and every source directory, look in this
1919                          additional source root for the same directory; if it
1920                          exists and have files in it, include it in the build
1921  --with-override-source-root
1922                          for each and every source directory, look in this
1923                          override source root for the same directory; if it
1924                          exists, use that directory instead and ignore the
1925                          directory in the original source root
1926  --with-adds-and-overrides
1927                          use the subdirs 'adds' and 'overrides' in the
1928                          specified directory as add-source-root and
1929                          override-source-root
1930  --with-override-langtools
1931                          use this langtools dir for the build
1932  --with-override-corba   use this corba dir for the build
1933  --with-override-jaxp    use this jaxp dir for the build
1934  --with-override-jaxws   use this jaxws dir for the build
1935  --with-override-hotspot use this hotspot dir for the build
1936  --with-override-nashorn use this nashorn dir for the build
1937  --with-override-jdk     use this jdk dir for the build
1938  --with-import-hotspot   import hotspot binaries from this jdk image or
1939                          hotspot build dist dir instead of building from
1940                          source
1941  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1942                          to show possible values [platform dependent]
1943  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1944  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1945  --with-extra-ldflags    extra flags to be used when linking jdk
1946  --with-toolchain-version
1947                          the version of the toolchain to look for, use
1948                          '--help' to show possible values [platform
1949                          dependent]
1950  --with-build-devkit     Devkit to use for the build platform toolchain
1951  --with-jtreg            Regression Test Harness [probed]
1952  --with-stdc++lib=<static>,<dynamic>,<default>
1953                          force linking of the C++ runtime on Linux to either
1954                          static or dynamic, default is static with dynamic as
1955                          fallback
1956  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1957                          (Windows only) [probed]
1958  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1959                          (Windows only) [probed]
1960  --with-x                use the X Window System
1961  --with-cups             specify prefix directory for the cups package
1962                          (expecting the headers under PATH/include)
1963  --with-cups-include     specify directory for the cups include files
1964  --with-freetype         specify prefix directory for the freetype package
1965                          (expecting the libraries under PATH/lib and the
1966                          headers under PATH/include)
1967  --with-freetype-include specify directory for the freetype include files
1968  --with-freetype-lib     specify directory for the freetype library
1969  --with-freetype-src     specify directory with freetype sources to
1970                          automatically build the library (experimental,
1971                          Windows-only)
1972  --with-alsa             specify prefix directory for the alsa package
1973                          (expecting the libraries under PATH/lib and the
1974                          headers under PATH/include)
1975  --with-alsa-include     specify directory for the alsa include files
1976  --with-alsa-lib         specify directory for the alsa library
1977  --with-libffi           specify prefix directory for the libffi package
1978                          (expecting the libraries under PATH/lib and the
1979                          headers under PATH/include)
1980  --with-libffi-include   specify directory for the libffi include files
1981  --with-libffi-lib       specify directory for the libffi library
1982  --with-libjpeg          use libjpeg from build system or OpenJDK source
1983                          (system, bundled) [bundled]
1984  --with-giflib           use giflib from build system or OpenJDK source
1985                          (system, bundled) [bundled]
1986  --with-libpng           use libpng from build system or OpenJDK source
1987                          (system, bundled) [bundled]
1988  --with-zlib             use zlib from build system or OpenJDK source
1989                          (system, bundled) [bundled]
1990  --with-lcms             use lcms2 from build system or OpenJDK source
1991                          (system, bundled) [bundled]
1992  --with-dxsdk            Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1995                          compatibility and is ignored
1996  --with-dxsdk-include    Deprecated. Option is kept for backwards
1997                          compatibility and is ignored
1998  --with-num-cores        number of cores in the build system, e.g.
1999                          --with-num-cores=8 [probed]
2000  --with-memory-size      memory (in MB) available in the build system, e.g.
2001                          --with-memory-size=1024 [probed]
2002  --with-jobs             number of parallel jobs to let make run [calculated
2003                          based on cores and memory]
2004  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2005                          invocations of boot JDK, overriding the default
2006                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2007                          -enableassertions"
2008  --with-sjavac-server-java
2009                          use this java binary for running the sjavac
2010                          background server [Boot JDK java]
2011  --with-ccache-dir       where to store ccache files [~/.ccache]
2012
2013Some influential environment variables:
2014  BASENAME    Override default value for BASENAME
2015  BASH        Override default value for BASH
2016  CAT         Override default value for CAT
2017  CHMOD       Override default value for CHMOD
2018  CMP         Override default value for CMP
2019  COMM        Override default value for COMM
2020  CP          Override default value for CP
2021  CUT         Override default value for CUT
2022  DATE        Override default value for DATE
2023  DIFF        Override default value for DIFF
2024  DIRNAME     Override default value for DIRNAME
2025  ECHO        Override default value for ECHO
2026  EXPR        Override default value for EXPR
2027  FILE        Override default value for FILE
2028  FIND        Override default value for FIND
2029  HEAD        Override default value for HEAD
2030  LN          Override default value for LN
2031  LS          Override default value for LS
2032  MKDIR       Override default value for MKDIR
2033  MKTEMP      Override default value for MKTEMP
2034  MV          Override default value for MV
2035  NAWK        Override default value for NAWK
2036  PRINTF      Override default value for PRINTF
2037  RM          Override default value for RM
2038  RMDIR       Override default value for RMDIR
2039  SH          Override default value for SH
2040  SORT        Override default value for SORT
2041  TAIL        Override default value for TAIL
2042  TAR         Override default value for TAR
2043  TEE         Override default value for TEE
2044  TOUCH       Override default value for TOUCH
2045  TR          Override default value for TR
2046  UNAME       Override default value for UNAME
2047  UNIQ        Override default value for UNIQ
2048  WC          Override default value for WC
2049  WHICH       Override default value for WHICH
2050  XARGS       Override default value for XARGS
2051  AWK         Override default value for AWK
2052  GREP        Override default value for GREP
2053  EGREP       Override default value for EGREP
2054  FGREP       Override default value for FGREP
2055  SED         Override default value for SED
2056  CYGPATH     Override default value for CYGPATH
2057  READLINK    Override default value for READLINK
2058  DF          Override default value for DF
2059  CPIO        Override default value for CPIO
2060  NICE        Override default value for NICE
2061  MAKE        Override default value for MAKE
2062  UNZIP       Override default value for UNZIP
2063  ZIP         Override default value for ZIP
2064  LDD         Override default value for LDD
2065  OTOOL       Override default value for OTOOL
2066  READELF     Override default value for READELF
2067  HG          Override default value for HG
2068  STAT        Override default value for STAT
2069  TIME        Override default value for TIME
2070  PATCH       Override default value for PATCH
2071  DSYMUTIL    Override default value for DSYMUTIL
2072  XATTR       Override default value for XATTR
2073  CODESIGN    Override default value for CODESIGN
2074  SETFILE     Override default value for SETFILE
2075  PKG_CONFIG  path to pkg-config utility
2076  JAVA        Override default value for JAVA
2077  JAVAC       Override default value for JAVAC
2078  JAVAH       Override default value for JAVAH
2079  JAR         Override default value for JAR
2080  JARSIGNER   Override default value for JARSIGNER
2081  CC          C compiler command
2082  CFLAGS      C compiler flags
2083  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2084              nonstandard directory <lib dir>
2085  LIBS        libraries to pass to the linker, e.g. -l<library>
2086  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2087              you have headers in a nonstandard directory <include dir>
2088  CXX         C++ compiler command
2089  CXXFLAGS    C++ compiler flags
2090  CPP         C preprocessor
2091  CXXCPP      C++ preprocessor
2092  AS          Override default value for AS
2093  AR          Override default value for AR
2094  LIPO        Override default value for LIPO
2095  STRIP       Override default value for STRIP
2096  NM          Override default value for NM
2097  GNM         Override default value for GNM
2098  OBJCOPY     Override default value for OBJCOPY
2099  OBJDUMP     Override default value for OBJDUMP
2100  BUILD_CC    Override default value for BUILD_CC
2101  BUILD_CXX   Override default value for BUILD_CXX
2102  JTREGEXE    Override default value for JTREGEXE
2103  XMKMF       Path to xmkmf, Makefile generator for X Window System
2104  FREETYPE_CFLAGS
2105              C compiler flags for FREETYPE, overriding pkg-config
2106  FREETYPE_LIBS
2107              linker flags for FREETYPE, overriding pkg-config
2108  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2109  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2110  LIBFFI_CFLAGS
2111              C compiler flags for LIBFFI, overriding pkg-config
2112  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2113  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2114  PNG_LIBS    linker flags for PNG, overriding pkg-config
2115  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2116  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2117  CCACHE      Override default value for CCACHE
2118
2119Use these variables to override the choices made by `configure' or to help
2120it to find libraries and programs with nonstandard names/locations.
2121
2122Report bugs to <build-dev@openjdk.java.net>.
2123OpenJDK home page: <http://openjdk.java.net>.
2124_ACEOF
2125ac_status=$?
2126fi
2127
2128if test "$ac_init_help" = "recursive"; then
2129  # If there are subdirs, report their specific --help.
2130  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2131    test -d "$ac_dir" ||
2132      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2133      continue
2134    ac_builddir=.
2135
2136case "$ac_dir" in
2137.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2138*)
2139  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2140  # A ".." for each directory in $ac_dir_suffix.
2141  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2142  case $ac_top_builddir_sub in
2143  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2144  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2145  esac ;;
2146esac
2147ac_abs_top_builddir=$ac_pwd
2148ac_abs_builddir=$ac_pwd$ac_dir_suffix
2149# for backward compatibility:
2150ac_top_builddir=$ac_top_build_prefix
2151
2152case $srcdir in
2153  .)  # We are building in place.
2154    ac_srcdir=.
2155    ac_top_srcdir=$ac_top_builddir_sub
2156    ac_abs_top_srcdir=$ac_pwd ;;
2157  [\\/]* | ?:[\\/]* )  # Absolute name.
2158    ac_srcdir=$srcdir$ac_dir_suffix;
2159    ac_top_srcdir=$srcdir
2160    ac_abs_top_srcdir=$srcdir ;;
2161  *) # Relative name.
2162    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2163    ac_top_srcdir=$ac_top_build_prefix$srcdir
2164    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2165esac
2166ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2167
2168    cd "$ac_dir" || { ac_status=$?; continue; }
2169    # Check for guested configure.
2170    if test -f "$ac_srcdir/configure.gnu"; then
2171      echo &&
2172      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2173    elif test -f "$ac_srcdir/configure"; then
2174      echo &&
2175      $SHELL "$ac_srcdir/configure" --help=recursive
2176    else
2177      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2178    fi || ac_status=$?
2179    cd "$ac_pwd" || { ac_status=$?; break; }
2180  done
2181fi
2182
2183test -n "$ac_init_help" && exit $ac_status
2184if $ac_init_version; then
2185  cat <<\_ACEOF
2186OpenJDK configure jdk9
2187generated by GNU Autoconf 2.69
2188
2189Copyright (C) 2012 Free Software Foundation, Inc.
2190This configure script is free software; the Free Software Foundation
2191gives unlimited permission to copy, distribute and modify it.
2192_ACEOF
2193  exit
2194fi
2195
2196## ------------------------ ##
2197## Autoconf initialization. ##
2198## ------------------------ ##
2199
2200# ac_fn_c_try_compile LINENO
2201# --------------------------
2202# Try to compile conftest.$ac_ext, and return whether this succeeded.
2203ac_fn_c_try_compile ()
2204{
2205  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2206  rm -f conftest.$ac_objext
2207  if { { ac_try="$ac_compile"
2208case "(($ac_try" in
2209  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2210  *) ac_try_echo=$ac_try;;
2211esac
2212eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2213$as_echo "$ac_try_echo"; } >&5
2214  (eval "$ac_compile") 2>conftest.err
2215  ac_status=$?
2216  if test -s conftest.err; then
2217    grep -v '^ *+' conftest.err >conftest.er1
2218    cat conftest.er1 >&5
2219    mv -f conftest.er1 conftest.err
2220  fi
2221  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2222  test $ac_status = 0; } && {
2223	 test -z "$ac_c_werror_flag" ||
2224	 test ! -s conftest.err
2225       } && test -s conftest.$ac_objext; then :
2226  ac_retval=0
2227else
2228  $as_echo "$as_me: failed program was:" >&5
2229sed 's/^/| /' conftest.$ac_ext >&5
2230
2231	ac_retval=1
2232fi
2233  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2234  as_fn_set_status $ac_retval
2235
2236} # ac_fn_c_try_compile
2237
2238# ac_fn_cxx_try_compile LINENO
2239# ----------------------------
2240# Try to compile conftest.$ac_ext, and return whether this succeeded.
2241ac_fn_cxx_try_compile ()
2242{
2243  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244  rm -f conftest.$ac_objext
2245  if { { ac_try="$ac_compile"
2246case "(($ac_try" in
2247  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2248  *) ac_try_echo=$ac_try;;
2249esac
2250eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2251$as_echo "$ac_try_echo"; } >&5
2252  (eval "$ac_compile") 2>conftest.err
2253  ac_status=$?
2254  if test -s conftest.err; then
2255    grep -v '^ *+' conftest.err >conftest.er1
2256    cat conftest.er1 >&5
2257    mv -f conftest.er1 conftest.err
2258  fi
2259  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2260  test $ac_status = 0; } && {
2261	 test -z "$ac_cxx_werror_flag" ||
2262	 test ! -s conftest.err
2263       } && test -s conftest.$ac_objext; then :
2264  ac_retval=0
2265else
2266  $as_echo "$as_me: failed program was:" >&5
2267sed 's/^/| /' conftest.$ac_ext >&5
2268
2269	ac_retval=1
2270fi
2271  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2272  as_fn_set_status $ac_retval
2273
2274} # ac_fn_cxx_try_compile
2275
2276# ac_fn_c_try_cpp LINENO
2277# ----------------------
2278# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2279ac_fn_c_try_cpp ()
2280{
2281  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2282  if { { ac_try="$ac_cpp conftest.$ac_ext"
2283case "(($ac_try" in
2284  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2285  *) ac_try_echo=$ac_try;;
2286esac
2287eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2288$as_echo "$ac_try_echo"; } >&5
2289  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2290  ac_status=$?
2291  if test -s conftest.err; then
2292    grep -v '^ *+' conftest.err >conftest.er1
2293    cat conftest.er1 >&5
2294    mv -f conftest.er1 conftest.err
2295  fi
2296  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2297  test $ac_status = 0; } > conftest.i && {
2298	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2299	 test ! -s conftest.err
2300       }; then :
2301  ac_retval=0
2302else
2303  $as_echo "$as_me: failed program was:" >&5
2304sed 's/^/| /' conftest.$ac_ext >&5
2305
2306    ac_retval=1
2307fi
2308  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2309  as_fn_set_status $ac_retval
2310
2311} # ac_fn_c_try_cpp
2312
2313# ac_fn_cxx_try_cpp LINENO
2314# ------------------------
2315# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2316ac_fn_cxx_try_cpp ()
2317{
2318  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2319  if { { ac_try="$ac_cpp conftest.$ac_ext"
2320case "(($ac_try" in
2321  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2322  *) ac_try_echo=$ac_try;;
2323esac
2324eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2325$as_echo "$ac_try_echo"; } >&5
2326  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2327  ac_status=$?
2328  if test -s conftest.err; then
2329    grep -v '^ *+' conftest.err >conftest.er1
2330    cat conftest.er1 >&5
2331    mv -f conftest.er1 conftest.err
2332  fi
2333  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2334  test $ac_status = 0; } > conftest.i && {
2335	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2336	 test ! -s conftest.err
2337       }; then :
2338  ac_retval=0
2339else
2340  $as_echo "$as_me: failed program was:" >&5
2341sed 's/^/| /' conftest.$ac_ext >&5
2342
2343    ac_retval=1
2344fi
2345  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2346  as_fn_set_status $ac_retval
2347
2348} # ac_fn_cxx_try_cpp
2349
2350# ac_fn_c_try_link LINENO
2351# -----------------------
2352# Try to link conftest.$ac_ext, and return whether this succeeded.
2353ac_fn_c_try_link ()
2354{
2355  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2356  rm -f conftest.$ac_objext conftest$ac_exeext
2357  if { { ac_try="$ac_link"
2358case "(($ac_try" in
2359  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2360  *) ac_try_echo=$ac_try;;
2361esac
2362eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2363$as_echo "$ac_try_echo"; } >&5
2364  (eval "$ac_link") 2>conftest.err
2365  ac_status=$?
2366  if test -s conftest.err; then
2367    grep -v '^ *+' conftest.err >conftest.er1
2368    cat conftest.er1 >&5
2369    mv -f conftest.er1 conftest.err
2370  fi
2371  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2372  test $ac_status = 0; } && {
2373	 test -z "$ac_c_werror_flag" ||
2374	 test ! -s conftest.err
2375       } && test -s conftest$ac_exeext && {
2376	 test "$cross_compiling" = yes ||
2377	 test -x conftest$ac_exeext
2378       }; then :
2379  ac_retval=0
2380else
2381  $as_echo "$as_me: failed program was:" >&5
2382sed 's/^/| /' conftest.$ac_ext >&5
2383
2384	ac_retval=1
2385fi
2386  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2387  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2388  # interfere with the next link command; also delete a directory that is
2389  # left behind by Apple's compiler.  We do this before executing the actions.
2390  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2391  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2392  as_fn_set_status $ac_retval
2393
2394} # ac_fn_c_try_link
2395
2396# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2397# ---------------------------------------------------------
2398# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2399# the include files in INCLUDES and setting the cache variable VAR
2400# accordingly.
2401ac_fn_cxx_check_header_mongrel ()
2402{
2403  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2404  if eval \${$3+:} false; then :
2405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2406$as_echo_n "checking for $2... " >&6; }
2407if eval \${$3+:} false; then :
2408  $as_echo_n "(cached) " >&6
2409fi
2410eval ac_res=\$$3
2411	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2412$as_echo "$ac_res" >&6; }
2413else
2414  # Is the header compilable?
2415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2416$as_echo_n "checking $2 usability... " >&6; }
2417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2418/* end confdefs.h.  */
2419$4
2420#include <$2>
2421_ACEOF
2422if ac_fn_cxx_try_compile "$LINENO"; then :
2423  ac_header_compiler=yes
2424else
2425  ac_header_compiler=no
2426fi
2427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2429$as_echo "$ac_header_compiler" >&6; }
2430
2431# Is the header present?
2432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2433$as_echo_n "checking $2 presence... " >&6; }
2434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2435/* end confdefs.h.  */
2436#include <$2>
2437_ACEOF
2438if ac_fn_cxx_try_cpp "$LINENO"; then :
2439  ac_header_preproc=yes
2440else
2441  ac_header_preproc=no
2442fi
2443rm -f conftest.err conftest.i conftest.$ac_ext
2444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2445$as_echo "$ac_header_preproc" >&6; }
2446
2447# So?  What about this header?
2448case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2449  yes:no: )
2450    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2451$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2452    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2453$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2454    ;;
2455  no:yes:* )
2456    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2457$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2458    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2459$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2461$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2462    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2463$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2464    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2465$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2466( $as_echo "## ----------------------------------------- ##
2467## Report this to build-dev@openjdk.java.net ##
2468## ----------------------------------------- ##"
2469     ) | sed "s/^/$as_me: WARNING:     /" >&2
2470    ;;
2471esac
2472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2473$as_echo_n "checking for $2... " >&6; }
2474if eval \${$3+:} false; then :
2475  $as_echo_n "(cached) " >&6
2476else
2477  eval "$3=\$ac_header_compiler"
2478fi
2479eval ac_res=\$$3
2480	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2481$as_echo "$ac_res" >&6; }
2482fi
2483  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2484
2485} # ac_fn_cxx_check_header_mongrel
2486
2487# ac_fn_cxx_try_run LINENO
2488# ------------------------
2489# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2490# that executables *can* be run.
2491ac_fn_cxx_try_run ()
2492{
2493  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494  if { { ac_try="$ac_link"
2495case "(($ac_try" in
2496  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2497  *) ac_try_echo=$ac_try;;
2498esac
2499eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2500$as_echo "$ac_try_echo"; } >&5
2501  (eval "$ac_link") 2>&5
2502  ac_status=$?
2503  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2504  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2505  { { case "(($ac_try" in
2506  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2507  *) ac_try_echo=$ac_try;;
2508esac
2509eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2510$as_echo "$ac_try_echo"; } >&5
2511  (eval "$ac_try") 2>&5
2512  ac_status=$?
2513  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2514  test $ac_status = 0; }; }; then :
2515  ac_retval=0
2516else
2517  $as_echo "$as_me: program exited with status $ac_status" >&5
2518       $as_echo "$as_me: failed program was:" >&5
2519sed 's/^/| /' conftest.$ac_ext >&5
2520
2521       ac_retval=$ac_status
2522fi
2523  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2524  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2525  as_fn_set_status $ac_retval
2526
2527} # ac_fn_cxx_try_run
2528
2529# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2530# ---------------------------------------------------------
2531# Tests whether HEADER exists and can be compiled using the include files in
2532# INCLUDES, setting the cache variable VAR accordingly.
2533ac_fn_cxx_check_header_compile ()
2534{
2535  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2537$as_echo_n "checking for $2... " >&6; }
2538if eval \${$3+:} false; then :
2539  $as_echo_n "(cached) " >&6
2540else
2541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2542/* end confdefs.h.  */
2543$4
2544#include <$2>
2545_ACEOF
2546if ac_fn_cxx_try_compile "$LINENO"; then :
2547  eval "$3=yes"
2548else
2549  eval "$3=no"
2550fi
2551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2552fi
2553eval ac_res=\$$3
2554	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2555$as_echo "$ac_res" >&6; }
2556  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2557
2558} # ac_fn_cxx_check_header_compile
2559
2560# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2561# ----------------------------------------------
2562# Tries to find the compile-time value of EXPR in a program that includes
2563# INCLUDES, setting VAR accordingly. Returns whether the value could be
2564# computed
2565ac_fn_cxx_compute_int ()
2566{
2567  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2568  if test "$cross_compiling" = yes; then
2569    # Depending upon the size, compute the lo and hi bounds.
2570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2571/* end confdefs.h.  */
2572$4
2573int
2574main ()
2575{
2576static int test_array [1 - 2 * !(($2) >= 0)];
2577test_array [0] = 0;
2578return test_array [0];
2579
2580  ;
2581  return 0;
2582}
2583_ACEOF
2584if ac_fn_cxx_try_compile "$LINENO"; then :
2585  ac_lo=0 ac_mid=0
2586  while :; do
2587    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2588/* end confdefs.h.  */
2589$4
2590int
2591main ()
2592{
2593static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2594test_array [0] = 0;
2595return test_array [0];
2596
2597  ;
2598  return 0;
2599}
2600_ACEOF
2601if ac_fn_cxx_try_compile "$LINENO"; then :
2602  ac_hi=$ac_mid; break
2603else
2604  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2605			if test $ac_lo -le $ac_mid; then
2606			  ac_lo= ac_hi=
2607			  break
2608			fi
2609			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2610fi
2611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2612  done
2613else
2614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2615/* end confdefs.h.  */
2616$4
2617int
2618main ()
2619{
2620static int test_array [1 - 2 * !(($2) < 0)];
2621test_array [0] = 0;
2622return test_array [0];
2623
2624  ;
2625  return 0;
2626}
2627_ACEOF
2628if ac_fn_cxx_try_compile "$LINENO"; then :
2629  ac_hi=-1 ac_mid=-1
2630  while :; do
2631    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2632/* end confdefs.h.  */
2633$4
2634int
2635main ()
2636{
2637static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2638test_array [0] = 0;
2639return test_array [0];
2640
2641  ;
2642  return 0;
2643}
2644_ACEOF
2645if ac_fn_cxx_try_compile "$LINENO"; then :
2646  ac_lo=$ac_mid; break
2647else
2648  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2649			if test $ac_mid -le $ac_hi; then
2650			  ac_lo= ac_hi=
2651			  break
2652			fi
2653			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2654fi
2655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2656  done
2657else
2658  ac_lo= ac_hi=
2659fi
2660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2661fi
2662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2663# Binary search between lo and hi bounds.
2664while test "x$ac_lo" != "x$ac_hi"; do
2665  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2667/* end confdefs.h.  */
2668$4
2669int
2670main ()
2671{
2672static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2673test_array [0] = 0;
2674return test_array [0];
2675
2676  ;
2677  return 0;
2678}
2679_ACEOF
2680if ac_fn_cxx_try_compile "$LINENO"; then :
2681  ac_hi=$ac_mid
2682else
2683  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2684fi
2685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2686done
2687case $ac_lo in #((
2688?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2689'') ac_retval=1 ;;
2690esac
2691  else
2692    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2693/* end confdefs.h.  */
2694$4
2695static long int longval () { return $2; }
2696static unsigned long int ulongval () { return $2; }
2697#include <stdio.h>
2698#include <stdlib.h>
2699int
2700main ()
2701{
2702
2703  FILE *f = fopen ("conftest.val", "w");
2704  if (! f)
2705    return 1;
2706  if (($2) < 0)
2707    {
2708      long int i = longval ();
2709      if (i != ($2))
2710	return 1;
2711      fprintf (f, "%ld", i);
2712    }
2713  else
2714    {
2715      unsigned long int i = ulongval ();
2716      if (i != ($2))
2717	return 1;
2718      fprintf (f, "%lu", i);
2719    }
2720  /* Do not output a trailing newline, as this causes \r\n confusion
2721     on some platforms.  */
2722  return ferror (f) || fclose (f) != 0;
2723
2724  ;
2725  return 0;
2726}
2727_ACEOF
2728if ac_fn_cxx_try_run "$LINENO"; then :
2729  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2730else
2731  ac_retval=1
2732fi
2733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2734  conftest.$ac_objext conftest.beam conftest.$ac_ext
2735rm -f conftest.val
2736
2737  fi
2738  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2739  as_fn_set_status $ac_retval
2740
2741} # ac_fn_cxx_compute_int
2742
2743# ac_fn_cxx_try_link LINENO
2744# -------------------------
2745# Try to link conftest.$ac_ext, and return whether this succeeded.
2746ac_fn_cxx_try_link ()
2747{
2748  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2749  rm -f conftest.$ac_objext conftest$ac_exeext
2750  if { { ac_try="$ac_link"
2751case "(($ac_try" in
2752  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2753  *) ac_try_echo=$ac_try;;
2754esac
2755eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2756$as_echo "$ac_try_echo"; } >&5
2757  (eval "$ac_link") 2>conftest.err
2758  ac_status=$?
2759  if test -s conftest.err; then
2760    grep -v '^ *+' conftest.err >conftest.er1
2761    cat conftest.er1 >&5
2762    mv -f conftest.er1 conftest.err
2763  fi
2764  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2765  test $ac_status = 0; } && {
2766	 test -z "$ac_cxx_werror_flag" ||
2767	 test ! -s conftest.err
2768       } && test -s conftest$ac_exeext && {
2769	 test "$cross_compiling" = yes ||
2770	 test -x conftest$ac_exeext
2771       }; then :
2772  ac_retval=0
2773else
2774  $as_echo "$as_me: failed program was:" >&5
2775sed 's/^/| /' conftest.$ac_ext >&5
2776
2777	ac_retval=1
2778fi
2779  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2780  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2781  # interfere with the next link command; also delete a directory that is
2782  # left behind by Apple's compiler.  We do this before executing the actions.
2783  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2784  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2785  as_fn_set_status $ac_retval
2786
2787} # ac_fn_cxx_try_link
2788
2789# ac_fn_cxx_check_func LINENO FUNC VAR
2790# ------------------------------------
2791# Tests whether FUNC exists, setting the cache variable VAR accordingly
2792ac_fn_cxx_check_func ()
2793{
2794  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2796$as_echo_n "checking for $2... " >&6; }
2797if eval \${$3+:} false; then :
2798  $as_echo_n "(cached) " >&6
2799else
2800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2801/* end confdefs.h.  */
2802/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2803   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2804#define $2 innocuous_$2
2805
2806/* System header to define __stub macros and hopefully few prototypes,
2807    which can conflict with char $2 (); below.
2808    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2809    <limits.h> exists even on freestanding compilers.  */
2810
2811#ifdef __STDC__
2812# include <limits.h>
2813#else
2814# include <assert.h>
2815#endif
2816
2817#undef $2
2818
2819/* Override any GCC internal prototype to avoid an error.
2820   Use char because int might match the return type of a GCC
2821   builtin and then its argument prototype would still apply.  */
2822#ifdef __cplusplus
2823extern "C"
2824#endif
2825char $2 ();
2826/* The GNU C library defines this for functions which it implements
2827    to always fail with ENOSYS.  Some functions are actually named
2828    something starting with __ and the normal name is an alias.  */
2829#if defined __stub_$2 || defined __stub___$2
2830choke me
2831#endif
2832
2833int
2834main ()
2835{
2836return $2 ();
2837  ;
2838  return 0;
2839}
2840_ACEOF
2841if ac_fn_cxx_try_link "$LINENO"; then :
2842  eval "$3=yes"
2843else
2844  eval "$3=no"
2845fi
2846rm -f core conftest.err conftest.$ac_objext \
2847    conftest$ac_exeext conftest.$ac_ext
2848fi
2849eval ac_res=\$$3
2850	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2851$as_echo "$ac_res" >&6; }
2852  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2853
2854} # ac_fn_cxx_check_func
2855
2856# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2857# -------------------------------------------------------
2858# Tests whether HEADER exists and can be compiled using the include files in
2859# INCLUDES, setting the cache variable VAR accordingly.
2860ac_fn_c_check_header_compile ()
2861{
2862  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2864$as_echo_n "checking for $2... " >&6; }
2865if eval \${$3+:} false; then :
2866  $as_echo_n "(cached) " >&6
2867else
2868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869/* end confdefs.h.  */
2870$4
2871#include <$2>
2872_ACEOF
2873if ac_fn_c_try_compile "$LINENO"; then :
2874  eval "$3=yes"
2875else
2876  eval "$3=no"
2877fi
2878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2879fi
2880eval ac_res=\$$3
2881	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2882$as_echo "$ac_res" >&6; }
2883  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2884
2885} # ac_fn_c_check_header_compile
2886cat >config.log <<_ACEOF
2887This file contains any messages produced by compilers while
2888running configure, to aid debugging if configure makes a mistake.
2889
2890It was created by OpenJDK $as_me jdk9, which was
2891generated by GNU Autoconf 2.69.  Invocation command line was
2892
2893  $ $0 $@
2894
2895_ACEOF
2896exec 5>>config.log
2897{
2898cat <<_ASUNAME
2899## --------- ##
2900## Platform. ##
2901## --------- ##
2902
2903hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2904uname -m = `(uname -m) 2>/dev/null || echo unknown`
2905uname -r = `(uname -r) 2>/dev/null || echo unknown`
2906uname -s = `(uname -s) 2>/dev/null || echo unknown`
2907uname -v = `(uname -v) 2>/dev/null || echo unknown`
2908
2909/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2910/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2911
2912/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2913/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2914/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2915/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2916/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2917/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2918/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2919
2920_ASUNAME
2921
2922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2923for as_dir in $PATH
2924do
2925  IFS=$as_save_IFS
2926  test -z "$as_dir" && as_dir=.
2927    $as_echo "PATH: $as_dir"
2928  done
2929IFS=$as_save_IFS
2930
2931} >&5
2932
2933cat >&5 <<_ACEOF
2934
2935
2936## ----------- ##
2937## Core tests. ##
2938## ----------- ##
2939
2940_ACEOF
2941
2942
2943# Keep a trace of the command line.
2944# Strip out --no-create and --no-recursion so they do not pile up.
2945# Strip out --silent because we don't want to record it for future runs.
2946# Also quote any args containing shell meta-characters.
2947# Make two passes to allow for proper duplicate-argument suppression.
2948ac_configure_args=
2949ac_configure_args0=
2950ac_configure_args1=
2951ac_must_keep_next=false
2952for ac_pass in 1 2
2953do
2954  for ac_arg
2955  do
2956    case $ac_arg in
2957    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2958    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2959    | -silent | --silent | --silen | --sile | --sil)
2960      continue ;;
2961    *\'*)
2962      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2963    esac
2964    case $ac_pass in
2965    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2966    2)
2967      as_fn_append ac_configure_args1 " '$ac_arg'"
2968      if test $ac_must_keep_next = true; then
2969	ac_must_keep_next=false # Got value, back to normal.
2970      else
2971	case $ac_arg in
2972	  *=* | --config-cache | -C | -disable-* | --disable-* \
2973	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2974	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2975	  | -with-* | --with-* | -without-* | --without-* | --x)
2976	    case "$ac_configure_args0 " in
2977	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2978	    esac
2979	    ;;
2980	  -* ) ac_must_keep_next=true ;;
2981	esac
2982      fi
2983      as_fn_append ac_configure_args " '$ac_arg'"
2984      ;;
2985    esac
2986  done
2987done
2988{ ac_configure_args0=; unset ac_configure_args0;}
2989{ ac_configure_args1=; unset ac_configure_args1;}
2990
2991# When interrupted or exit'd, cleanup temporary files, and complete
2992# config.log.  We remove comments because anyway the quotes in there
2993# would cause problems or look ugly.
2994# WARNING: Use '\'' to represent an apostrophe within the trap.
2995# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2996trap 'exit_status=$?
2997  # Save into config.log some information that might help in debugging.
2998  {
2999    echo
3000
3001    $as_echo "## ---------------- ##
3002## Cache variables. ##
3003## ---------------- ##"
3004    echo
3005    # The following way of writing the cache mishandles newlines in values,
3006(
3007  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3008    eval ac_val=\$$ac_var
3009    case $ac_val in #(
3010    *${as_nl}*)
3011      case $ac_var in #(
3012      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3013$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3014      esac
3015      case $ac_var in #(
3016      _ | IFS | as_nl) ;; #(
3017      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3018      *) { eval $ac_var=; unset $ac_var;} ;;
3019      esac ;;
3020    esac
3021  done
3022  (set) 2>&1 |
3023    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3024    *${as_nl}ac_space=\ *)
3025      sed -n \
3026	"s/'\''/'\''\\\\'\'''\''/g;
3027	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3028      ;; #(
3029    *)
3030      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3031      ;;
3032    esac |
3033    sort
3034)
3035    echo
3036
3037    $as_echo "## ----------------- ##
3038## Output variables. ##
3039## ----------------- ##"
3040    echo
3041    for ac_var in $ac_subst_vars
3042    do
3043      eval ac_val=\$$ac_var
3044      case $ac_val in
3045      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3046      esac
3047      $as_echo "$ac_var='\''$ac_val'\''"
3048    done | sort
3049    echo
3050
3051    if test -n "$ac_subst_files"; then
3052      $as_echo "## ------------------- ##
3053## File substitutions. ##
3054## ------------------- ##"
3055      echo
3056      for ac_var in $ac_subst_files
3057      do
3058	eval ac_val=\$$ac_var
3059	case $ac_val in
3060	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3061	esac
3062	$as_echo "$ac_var='\''$ac_val'\''"
3063      done | sort
3064      echo
3065    fi
3066
3067    if test -s confdefs.h; then
3068      $as_echo "## ----------- ##
3069## confdefs.h. ##
3070## ----------- ##"
3071      echo
3072      cat confdefs.h
3073      echo
3074    fi
3075    test "$ac_signal" != 0 &&
3076      $as_echo "$as_me: caught signal $ac_signal"
3077    $as_echo "$as_me: exit $exit_status"
3078  } >&5
3079  rm -f core *.core core.conftest.* &&
3080    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3081    exit $exit_status
3082' 0
3083for ac_signal in 1 2 13 15; do
3084  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3085done
3086ac_signal=0
3087
3088# confdefs.h avoids OS command line length limits that DEFS can exceed.
3089rm -f -r conftest* confdefs.h
3090
3091$as_echo "/* confdefs.h */" > confdefs.h
3092
3093# Predefined preprocessor variables.
3094
3095cat >>confdefs.h <<_ACEOF
3096#define PACKAGE_NAME "$PACKAGE_NAME"
3097_ACEOF
3098
3099cat >>confdefs.h <<_ACEOF
3100#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3101_ACEOF
3102
3103cat >>confdefs.h <<_ACEOF
3104#define PACKAGE_VERSION "$PACKAGE_VERSION"
3105_ACEOF
3106
3107cat >>confdefs.h <<_ACEOF
3108#define PACKAGE_STRING "$PACKAGE_STRING"
3109_ACEOF
3110
3111cat >>confdefs.h <<_ACEOF
3112#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3113_ACEOF
3114
3115cat >>confdefs.h <<_ACEOF
3116#define PACKAGE_URL "$PACKAGE_URL"
3117_ACEOF
3118
3119
3120# Let the site file select an alternate cache file if it wants to.
3121# Prefer an explicitly selected file to automatically selected ones.
3122ac_site_file1=NONE
3123ac_site_file2=NONE
3124if test -n "$CONFIG_SITE"; then
3125  # We do not want a PATH search for config.site.
3126  case $CONFIG_SITE in #((
3127    -*)  ac_site_file1=./$CONFIG_SITE;;
3128    */*) ac_site_file1=$CONFIG_SITE;;
3129    *)   ac_site_file1=./$CONFIG_SITE;;
3130  esac
3131elif test "x$prefix" != xNONE; then
3132  ac_site_file1=$prefix/share/config.site
3133  ac_site_file2=$prefix/etc/config.site
3134else
3135  ac_site_file1=$ac_default_prefix/share/config.site
3136  ac_site_file2=$ac_default_prefix/etc/config.site
3137fi
3138for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3139do
3140  test "x$ac_site_file" = xNONE && continue
3141  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3142    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3143$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3144    sed 's/^/| /' "$ac_site_file" >&5
3145    . "$ac_site_file" \
3146      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3148as_fn_error $? "failed to load site script $ac_site_file
3149See \`config.log' for more details" "$LINENO" 5; }
3150  fi
3151done
3152
3153if test -r "$cache_file"; then
3154  # Some versions of bash will fail to source /dev/null (special files
3155  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3156  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3157    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3158$as_echo "$as_me: loading cache $cache_file" >&6;}
3159    case $cache_file in
3160      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3161      *)                      . "./$cache_file";;
3162    esac
3163  fi
3164else
3165  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3166$as_echo "$as_me: creating cache $cache_file" >&6;}
3167  >$cache_file
3168fi
3169
3170# Check that the precious variables saved in the cache have kept the same
3171# value.
3172ac_cache_corrupted=false
3173for ac_var in $ac_precious_vars; do
3174  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3175  eval ac_new_set=\$ac_env_${ac_var}_set
3176  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3177  eval ac_new_val=\$ac_env_${ac_var}_value
3178  case $ac_old_set,$ac_new_set in
3179    set,)
3180      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3181$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3182      ac_cache_corrupted=: ;;
3183    ,set)
3184      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3185$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3186      ac_cache_corrupted=: ;;
3187    ,);;
3188    *)
3189      if test "x$ac_old_val" != "x$ac_new_val"; then
3190	# differences in whitespace do not lead to failure.
3191	ac_old_val_w=`echo x $ac_old_val`
3192	ac_new_val_w=`echo x $ac_new_val`
3193	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3194	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3195$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3196	  ac_cache_corrupted=:
3197	else
3198	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3199$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3200	  eval $ac_var=\$ac_old_val
3201	fi
3202	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3203$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3204	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3205$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3206      fi;;
3207  esac
3208  # Pass precious variables to config.status.
3209  if test "$ac_new_set" = set; then
3210    case $ac_new_val in
3211    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3212    *) ac_arg=$ac_var=$ac_new_val ;;
3213    esac
3214    case " $ac_configure_args " in
3215      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3216      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3217    esac
3218  fi
3219done
3220if $ac_cache_corrupted; then
3221  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3222$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3223  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3224$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3225  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3226fi
3227## -------------------- ##
3228## Main body of script. ##
3229## -------------------- ##
3230
3231ac_ext=c
3232ac_cpp='$CPP $CPPFLAGS'
3233ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3234ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3235ac_compiler_gnu=$ac_cv_c_compiler_gnu
3236
3237
3238
3239ac_aux_dir=
3240for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3241  if test -f "$ac_dir/install-sh"; then
3242    ac_aux_dir=$ac_dir
3243    ac_install_sh="$ac_aux_dir/install-sh -c"
3244    break
3245  elif test -f "$ac_dir/install.sh"; then
3246    ac_aux_dir=$ac_dir
3247    ac_install_sh="$ac_aux_dir/install.sh -c"
3248    break
3249  elif test -f "$ac_dir/shtool"; then
3250    ac_aux_dir=$ac_dir
3251    ac_install_sh="$ac_aux_dir/shtool install -c"
3252    break
3253  fi
3254done
3255if test -z "$ac_aux_dir"; then
3256  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
3257fi
3258
3259# These three variables are undocumented and unsupported,
3260# and are intended to be withdrawn in a future Autoconf release.
3261# They can cause serious problems if a builder's source tree is in a directory
3262# whose full name contains unusual characters.
3263ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3264ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3265ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3266
3267
3268# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3269
3270#
3271# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3272# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3273#
3274# This code is free software; you can redistribute it and/or modify it
3275# under the terms of the GNU General Public License version 2 only, as
3276# published by the Free Software Foundation.  Oracle designates this
3277# particular file as subject to the "Classpath" exception as provided
3278# by Oracle in the LICENSE file that accompanied this code.
3279#
3280# This code is distributed in the hope that it will be useful, but WITHOUT
3281# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3282# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3283# version 2 for more details (a copy is included in the LICENSE file that
3284# accompanied this code).
3285#
3286# You should have received a copy of the GNU General Public License version
3287# 2 along with this work; if not, write to the Free Software Foundation,
3288# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3289#
3290# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3291# or visit www.oracle.com if you need additional information or have any
3292# questions.
3293#
3294
3295#
3296# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3297#
3298# This program is free software; you can redistribute it and/or modify
3299# it under the terms of the GNU General Public License as published by
3300# the Free Software Foundation; either version 2 of the License, or
3301# (at your option) any later version.
3302#
3303# This program is distributed in the hope that it will be useful, but
3304# WITHOUT ANY WARRANTY; without even the implied warranty of
3305# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3306# General Public License for more details.
3307#
3308# You should have received a copy of the GNU General Public License
3309# along with this program; if not, write to the Free Software
3310# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3311#
3312# As a special exception to the GNU General Public License, if you
3313# distribute this file as part of a program that contains a
3314# configuration script generated by Autoconf, you may include it under
3315# the same distribution terms that you use for the rest of that program.
3316
3317# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3318# ----------------------------------
3319# PKG_PROG_PKG_CONFIG
3320
3321# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3322#
3323# Check to see whether a particular set of modules exists.  Similar
3324# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3325#
3326#
3327# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3328# this or PKG_CHECK_MODULES is called, or make sure to call
3329# PKG_CHECK_EXISTS manually
3330# --------------------------------------------------------------
3331
3332
3333
3334# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3335# ---------------------------------------------
3336# _PKG_CONFIG
3337
3338# _PKG_SHORT_ERRORS_SUPPORTED
3339# -----------------------------
3340# _PKG_SHORT_ERRORS_SUPPORTED
3341
3342
3343# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3344# [ACTION-IF-NOT-FOUND])
3345#
3346#
3347# Note that if there is a possibility the first call to
3348# PKG_CHECK_MODULES might not happen, you should be sure to include an
3349# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3350#
3351#
3352# --------------------------------------------------------------
3353# PKG_CHECK_MODULES
3354
3355
3356# Include these first...
3357#
3358# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3359# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3360#
3361# This code is free software; you can redistribute it and/or modify it
3362# under the terms of the GNU General Public License version 2 only, as
3363# published by the Free Software Foundation.  Oracle designates this
3364# particular file as subject to the "Classpath" exception as provided
3365# by Oracle in the LICENSE file that accompanied this code.
3366#
3367# This code is distributed in the hope that it will be useful, but WITHOUT
3368# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3369# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3370# version 2 for more details (a copy is included in the LICENSE file that
3371# accompanied this code).
3372#
3373# You should have received a copy of the GNU General Public License version
3374# 2 along with this work; if not, write to the Free Software Foundation,
3375# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3376#
3377# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3378# or visit www.oracle.com if you need additional information or have any
3379# questions.
3380#
3381
3382# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3383# If so, then append $1 to $2 \
3384# Also set JVM_ARG_OK to true/false depending on outcome.
3385
3386
3387# Appends a string to a path variable, only adding the : when needed.
3388
3389
3390# Prepends a string to a path variable, only adding the : when needed.
3391
3392
3393# This will make sure the given variable points to a full and proper
3394# path. This means:
3395# 1) There will be no spaces in the path. On unix platforms,
3396#    spaces in the path will result in an error. On Windows,
3397#    the path will be rewritten using short-style to be space-free.
3398# 2) The path will be absolute, and it will be in unix-style (on
3399#     cygwin).
3400# $1: The name of the variable to fix
3401
3402
3403# This will make sure the given variable points to a executable
3404# with a full and proper path. This means:
3405# 1) There will be no spaces in the path. On unix platforms,
3406#    spaces in the path will result in an error. On Windows,
3407#    the path will be rewritten using short-style to be space-free.
3408# 2) The path will be absolute, and it will be in unix-style (on
3409#     cygwin).
3410# Any arguments given to the executable is preserved.
3411# If the input variable does not have a directory specification, then
3412# it need to be in the PATH.
3413# $1: The name of the variable to fix
3414
3415
3416
3417
3418# Register a --with argument but mark it as deprecated
3419# $1: The name of the with argument to deprecate, not including --with-
3420
3421
3422# Register a --enable argument but mark it as deprecated
3423# $1: The name of the with argument to deprecate, not including --enable-
3424# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3425
3426
3427
3428
3429# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3430# $1: variable to check
3431
3432
3433# Check that there are no unprocessed overridden variables left.
3434# If so, they are an incorrect argument and we will exit with an error.
3435
3436
3437# Setup a tool for the given variable. If correctly specified by the user,
3438# use that value, otherwise search for the tool using the supplied code snippet.
3439# $1: variable to set
3440# $2: code snippet to call to look for the tool
3441# $3: code snippet to call if variable was used to find tool
3442
3443
3444# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3445# $1: variable to set
3446# $2: executable name (or list of names) to look for
3447
3448
3449# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3450# $1: variable to set
3451# $2: executable name (or list of names) to look for
3452
3453
3454# Like BASIC_PATH_PROGS but fails if no tool was found.
3455# $1: variable to set
3456# $2: executable name (or list of names) to look for
3457
3458
3459# Like BASIC_SETUP_TOOL but fails if no tool was found.
3460# $1: variable to set
3461# $2: autoconf macro to call to look for the special tool
3462
3463
3464# Setup the most fundamental tools that relies on not much else to set up,
3465# but is used by much of the early bootstrap code.
3466
3467
3468# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3469
3470
3471# Evaluates platform specific overrides for devkit variables.
3472# $1: Name of variable
3473
3474
3475
3476
3477
3478
3479#%%% Simple tools %%%
3480
3481# Check if we have found a usable version of make
3482# $1: the path to a potential make binary (or empty)
3483# $2: the description on how we found this
3484
3485
3486
3487
3488# Goes looking for a usable version of GNU make.
3489
3490
3491
3492
3493
3494
3495# Check if build directory is on local disk. If not possible to determine,
3496# we prefer to claim it's local.
3497# Argument 1: directory to test
3498# Argument 2: what to do if it is on local disk
3499# Argument 3: what to do otherwise (remote disk or failure)
3500
3501
3502# Check that source files have basic read permissions set. This might
3503# not be the case in cygwin in certain conditions.
3504
3505
3506
3507
3508# Check for support for specific options in bash
3509
3510
3511# Code to run after AC_OUTPUT
3512
3513
3514#
3515# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3516# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3517#
3518# This code is free software; you can redistribute it and/or modify it
3519# under the terms of the GNU General Public License version 2 only, as
3520# published by the Free Software Foundation.  Oracle designates this
3521# particular file as subject to the "Classpath" exception as provided
3522# by Oracle in the LICENSE file that accompanied this code.
3523#
3524# This code is distributed in the hope that it will be useful, but WITHOUT
3525# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3526# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3527# version 2 for more details (a copy is included in the LICENSE file that
3528# accompanied this code).
3529#
3530# You should have received a copy of the GNU General Public License version
3531# 2 along with this work; if not, write to the Free Software Foundation,
3532# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3533#
3534# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3535# or visit www.oracle.com if you need additional information or have any
3536# questions.
3537#
3538
3539
3540
3541
3542
3543# Helper function which possibly converts a path using DOS-style short mode.
3544# If so, the updated path is stored in $new_path.
3545# $1: The path to check
3546
3547
3548# Helper function which possibly converts a path using DOS-style short mode.
3549# If so, the updated path is stored in $new_path.
3550# $1: The path to check
3551
3552
3553# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3554# and could probably be heavily simplified. However, all changes in this
3555# area tend to need lot of testing in different scenarios, and in lack of
3556# proper unit testing, cleaning this up has not been deemed worth the effort
3557# at the moment.
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3568
3569
3570
3571
3572# ... then the rest
3573#
3574# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3575# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3576#
3577# This code is free software; you can redistribute it and/or modify it
3578# under the terms of the GNU General Public License version 2 only, as
3579# published by the Free Software Foundation.  Oracle designates this
3580# particular file as subject to the "Classpath" exception as provided
3581# by Oracle in the LICENSE file that accompanied this code.
3582#
3583# This code is distributed in the hope that it will be useful, but WITHOUT
3584# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3585# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3586# version 2 for more details (a copy is included in the LICENSE file that
3587# accompanied this code).
3588#
3589# You should have received a copy of the GNU General Public License version
3590# 2 along with this work; if not, write to the Free Software Foundation,
3591# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3592#
3593# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3594# or visit www.oracle.com if you need additional information or have any
3595# questions.
3596#
3597
3598########################################################################
3599# This file handles detection of the Boot JDK. The Boot JDK detection
3600# process has been developed as a response to solve a complex real-world
3601# problem. Initially, it was simple, but it has grown as platform after
3602# platform, idiosyncracy after idiosyncracy has been supported.
3603#
3604# The basic idea is this:
3605# 1) You need an acceptable *) JDK to use as a Boot JDK
3606# 2) There are several ways to locate a JDK, that are mostly platform
3607#    dependent **)
3608# 3) You can have multiple JDKs installed
3609# 4) If possible, configure should try to dig out an acceptable JDK
3610#    automatically, without having to resort to command-line options
3611#
3612# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3613#     javac) and not a JRE, etc.
3614#
3615# **) On Windows we typically use a well-known path.
3616#     On MacOSX we typically use the tool java_home.
3617#     On Linux we typically find javac in the $PATH, and then follow a
3618#     chain of symlinks that often ends up in a real JDK.
3619#
3620# This leads to the code where we check in different ways to locate a
3621# JDK, and if one is found, check if it is acceptable. If not, we print
3622# our reasons for rejecting it (useful when debugging non-working
3623# configure situations) and continue checking the next one.
3624########################################################################
3625
3626# Execute the check given as argument, and verify the result
3627# If the Boot JDK was previously found, do nothing
3628# $1 A command line (typically autoconf macro) to execute
3629
3630
3631# Test: Is bootjdk explicitely set by command line arguments?
3632
3633
3634# Test: Is $JAVA_HOME set?
3635
3636
3637# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3638
3639
3640# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3641# $1: Argument to the java_home binary (optional)
3642
3643
3644# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3645
3646
3647# Look for a jdk in the given path. If there are multiple, try to select the newest.
3648# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3649# $1 = Path to directory containing jdk installations.
3650# $2 = String to append to the found JDK directory to get the proper JDK home
3651
3652
3653# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3654# environmental variable as base for where to look.
3655# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3656
3657
3658# Test: Is there a JDK installed in default, well-known locations?
3659
3660
3661# Check that a command-line tool in the Boot JDK is correct
3662# $1 = name of variable to assign
3663# $2 = name of binary
3664
3665
3666###############################################################################
3667#
3668# We need a Boot JDK to bootstrap the build.
3669#
3670
3671
3672
3673
3674
3675#
3676# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3677# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3678#
3679# This code is free software; you can redistribute it and/or modify it
3680# under the terms of the GNU General Public License version 2 only, as
3681# published by the Free Software Foundation.  Oracle designates this
3682# particular file as subject to the "Classpath" exception as provided
3683# by Oracle in the LICENSE file that accompanied this code.
3684#
3685# This code is distributed in the hope that it will be useful, but WITHOUT
3686# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3687# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3688# version 2 for more details (a copy is included in the LICENSE file that
3689# accompanied this code).
3690#
3691# You should have received a copy of the GNU General Public License version
3692# 2 along with this work; if not, write to the Free Software Foundation,
3693# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3694#
3695# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3696# or visit www.oracle.com if you need additional information or have any
3697# questions.
3698#
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719#
3720# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3721# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3722#
3723# This code is free software; you can redistribute it and/or modify it
3724# under the terms of the GNU General Public License version 2 only, as
3725# published by the Free Software Foundation.  Oracle designates this
3726# particular file as subject to the "Classpath" exception as provided
3727# by Oracle in the LICENSE file that accompanied this code.
3728#
3729# This code is distributed in the hope that it will be useful, but WITHOUT
3730# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3731# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3732# version 2 for more details (a copy is included in the LICENSE file that
3733# accompanied this code).
3734#
3735# You should have received a copy of the GNU General Public License version
3736# 2 along with this work; if not, write to the Free Software Foundation,
3737# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3738#
3739# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3740# or visit www.oracle.com if you need additional information or have any
3741# questions.
3742#
3743
3744# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3745# corresponding configure arguments instead
3746
3747
3748# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3749# that configure can use them while detecting compilers.
3750# TOOLCHAIN_TYPE is available here.
3751# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3752
3753
3754
3755
3756
3757
3758# Documentation on common flags used for solstudio in HIGHEST.
3759#
3760# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3761#          done with care, there are some assumptions below that need to
3762#          be understood about the use of pointers, and IEEE behavior.
3763#
3764# -fns: Use non-standard floating point mode (not IEEE 754)
3765# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3766# -fsingle: Use single precision floating point with 'float'
3767# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3768#   (Source with excessing pointer casting and data access with mixed
3769#    pointer types are not recommended)
3770# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3771#   (If you expect perfect errno behavior, do not use this)
3772# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3773# -xrestrict: Pointer parameters to functions do not overlap
3774#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3775#    If you pass in multiple pointers to the same data, do not use this)
3776# -xlibmil: Inline some library routines
3777#   (If you expect perfect errno behavior, do not use this)
3778# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3779#   (If you expect perfect errno behavior, do not use this)
3780#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3781
3782    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3783    # Bug?
3784    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3785    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3786    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3787    #fi
3788
3789
3790
3791
3792
3793# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3794#                                   [RUN-IF-FALSE])
3795# ------------------------------------------------------------
3796# Check that the c and c++ compilers support an argument
3797
3798
3799# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3800#                                    [RUN-IF-FALSE])
3801# ------------------------------------------------------------
3802# Check that the linker support an argument
3803
3804
3805
3806
3807#
3808# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3809# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3810#
3811# This code is free software; you can redistribute it and/or modify it
3812# under the terms of the GNU General Public License version 2 only, as
3813# published by the Free Software Foundation.  Oracle designates this
3814# particular file as subject to the "Classpath" exception as provided
3815# by Oracle in the LICENSE file that accompanied this code.
3816#
3817# This code is distributed in the hope that it will be useful, but WITHOUT
3818# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3819# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3820# version 2 for more details (a copy is included in the LICENSE file that
3821# accompanied this code).
3822#
3823# You should have received a copy of the GNU General Public License version
3824# 2 along with this work; if not, write to the Free Software Foundation,
3825# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3826#
3827# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3828# or visit www.oracle.com if you need additional information or have any
3829# questions.
3830#
3831
3832
3833
3834
3835
3836cygwin_help() {
3837  case $1 in
3838    unzip)
3839      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3840      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3841      ;;
3842    zip)
3843      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3844      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3845      ;;
3846    make)
3847      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3848      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3849      ;;
3850    freetype)
3851      HELP_MSG="
3852The freetype library can now be build during the configure process.
3853Download the freetype sources and unpack them into an arbitrary directory:
3854
3855wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3856tar -xzf freetype-2.5.3.tar.gz
3857
3858Then run configure with '--with-freetype-src=<freetype_src>'. This will
3859automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3860builds or into '<freetype_src>/lib32' for 32-bit builds.
3861Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3862and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3863      ;;
3864  esac
3865}
3866
3867msys_help() {
3868  PKGHANDLER_COMMAND=""
3869}
3870
3871apt_help() {
3872  case $1 in
3873    reduced)
3874      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3875    devkit)
3876      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3877    openjdk)
3878      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3879    alsa)
3880      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3881    cups)
3882      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3883    freetype)
3884      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3885    ffi)
3886      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3887    x11)
3888      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3889    ccache)
3890      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3891  esac
3892}
3893
3894yum_help() {
3895  case $1 in
3896    devkit)
3897      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3898    openjdk)
3899      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3900    alsa)
3901      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3902    cups)
3903      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3904    freetype)
3905      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3906    x11)
3907      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3908    ccache)
3909      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3910  esac
3911}
3912
3913port_help() {
3914  PKGHANDLER_COMMAND=""
3915}
3916
3917pkgutil_help() {
3918  PKGHANDLER_COMMAND=""
3919}
3920
3921pkgadd_help() {
3922  PKGHANDLER_COMMAND=""
3923}
3924
3925# This function will check if we're called from the "configure" wrapper while
3926# printing --help. If so, we will print out additional information that can
3927# only be extracted within the autoconf script, and then exit. This must be
3928# called at the very beginning in configure.ac.
3929
3930
3931
3932
3933
3934
3935#
3936# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3937# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3938#
3939# This code is free software; you can redistribute it and/or modify it
3940# under the terms of the GNU General Public License version 2 only, as
3941# published by the Free Software Foundation.  Oracle designates this
3942# particular file as subject to the "Classpath" exception as provided
3943# by Oracle in the LICENSE file that accompanied this code.
3944#
3945# This code is distributed in the hope that it will be useful, but WITHOUT
3946# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3947# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3948# version 2 for more details (a copy is included in the LICENSE file that
3949# accompanied this code).
3950#
3951# You should have received a copy of the GNU General Public License version
3952# 2 along with this work; if not, write to the Free Software Foundation,
3953# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3954#
3955# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3956# or visit www.oracle.com if you need additional information or have any
3957# questions.
3958#
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969###############################################################################
3970#
3971# Should we build only OpenJDK even if closed sources are present?
3972#
3973
3974
3975
3976
3977###############################################################################
3978#
3979# Setup version numbers
3980#
3981
3982
3983
3984
3985
3986
3987################################################################################
3988#
3989# Gcov coverage data for hotspot
3990#
3991
3992
3993################################################################################
3994#
3995# Static build support.  When enabled will generate static
3996# libraries instead of shared libraries for all JDK libs.
3997#
3998
3999
4000
4001
4002#
4003# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4004# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4005#
4006# This code is free software; you can redistribute it and/or modify it
4007# under the terms of the GNU General Public License version 2 only, as
4008# published by the Free Software Foundation.  Oracle designates this
4009# particular file as subject to the "Classpath" exception as provided
4010# by Oracle in the LICENSE file that accompanied this code.
4011#
4012# This code is distributed in the hope that it will be useful, but WITHOUT
4013# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4014# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4015# version 2 for more details (a copy is included in the LICENSE file that
4016# accompanied this code).
4017#
4018# You should have received a copy of the GNU General Public License version
4019# 2 along with this work; if not, write to the Free Software Foundation,
4020# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4021#
4022# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4023# or visit www.oracle.com if you need additional information or have any
4024# questions.
4025#
4026
4027# Major library component reside in separate files.
4028#
4029# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4030# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4031#
4032# This code is free software; you can redistribute it and/or modify it
4033# under the terms of the GNU General Public License version 2 only, as
4034# published by the Free Software Foundation.  Oracle designates this
4035# particular file as subject to the "Classpath" exception as provided
4036# by Oracle in the LICENSE file that accompanied this code.
4037#
4038# This code is distributed in the hope that it will be useful, but WITHOUT
4039# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4040# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4041# version 2 for more details (a copy is included in the LICENSE file that
4042# accompanied this code).
4043#
4044# You should have received a copy of the GNU General Public License version
4045# 2 along with this work; if not, write to the Free Software Foundation,
4046# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4047#
4048# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4049# or visit www.oracle.com if you need additional information or have any
4050# questions.
4051#
4052
4053################################################################################
4054# Setup alsa (Advanced Linux Sound Architecture)
4055################################################################################
4056
4057
4058#
4059# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4060# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4061#
4062# This code is free software; you can redistribute it and/or modify it
4063# under the terms of the GNU General Public License version 2 only, as
4064# published by the Free Software Foundation.  Oracle designates this
4065# particular file as subject to the "Classpath" exception as provided
4066# by Oracle in the LICENSE file that accompanied this code.
4067#
4068# This code is distributed in the hope that it will be useful, but WITHOUT
4069# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4070# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4071# version 2 for more details (a copy is included in the LICENSE file that
4072# accompanied this code).
4073#
4074# You should have received a copy of the GNU General Public License version
4075# 2 along with this work; if not, write to the Free Software Foundation,
4076# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4077#
4078# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4079# or visit www.oracle.com if you need additional information or have any
4080# questions.
4081#
4082
4083################################################################################
4084# Setup bundled libraries.
4085#
4086# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4087# OpenJDK repository. Default is to use these libraries as bundled, but they
4088# might be replaced by en external version by the user.
4089################################################################################
4090
4091
4092################################################################################
4093# Setup libjpeg
4094################################################################################
4095
4096
4097################################################################################
4098# Setup giflib
4099################################################################################
4100
4101
4102################################################################################
4103# Setup libpng
4104################################################################################
4105
4106
4107################################################################################
4108# Setup zlib
4109################################################################################
4110
4111
4112################################################################################
4113# Setup lcms (Little CMS)
4114################################################################################
4115
4116
4117#
4118# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4119# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4120#
4121# This code is free software; you can redistribute it and/or modify it
4122# under the terms of the GNU General Public License version 2 only, as
4123# published by the Free Software Foundation.  Oracle designates this
4124# particular file as subject to the "Classpath" exception as provided
4125# by Oracle in the LICENSE file that accompanied this code.
4126#
4127# This code is distributed in the hope that it will be useful, but WITHOUT
4128# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4129# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4130# version 2 for more details (a copy is included in the LICENSE file that
4131# accompanied this code).
4132#
4133# You should have received a copy of the GNU General Public License version
4134# 2 along with this work; if not, write to the Free Software Foundation,
4135# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4136#
4137# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4138# or visit www.oracle.com if you need additional information or have any
4139# questions.
4140#
4141
4142################################################################################
4143# Setup cups (Common Unix Printing System)
4144################################################################################
4145
4146
4147#
4148# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4149# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4150#
4151# This code is free software; you can redistribute it and/or modify it
4152# under the terms of the GNU General Public License version 2 only, as
4153# published by the Free Software Foundation.  Oracle designates this
4154# particular file as subject to the "Classpath" exception as provided
4155# by Oracle in the LICENSE file that accompanied this code.
4156#
4157# This code is distributed in the hope that it will be useful, but WITHOUT
4158# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4159# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4160# version 2 for more details (a copy is included in the LICENSE file that
4161# accompanied this code).
4162#
4163# You should have received a copy of the GNU General Public License version
4164# 2 along with this work; if not, write to the Free Software Foundation,
4165# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4166#
4167# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4168# or visit www.oracle.com if you need additional information or have any
4169# questions.
4170#
4171
4172################################################################################
4173# Setup libffi (Foreign Function Interface)
4174################################################################################
4175
4176
4177#
4178# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4179# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4180#
4181# This code is free software; you can redistribute it and/or modify it
4182# under the terms of the GNU General Public License version 2 only, as
4183# published by the Free Software Foundation.  Oracle designates this
4184# particular file as subject to the "Classpath" exception as provided
4185# by Oracle in the LICENSE file that accompanied this code.
4186#
4187# This code is distributed in the hope that it will be useful, but WITHOUT
4188# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4189# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4190# version 2 for more details (a copy is included in the LICENSE file that
4191# accompanied this code).
4192#
4193# You should have received a copy of the GNU General Public License version
4194# 2 along with this work; if not, write to the Free Software Foundation,
4195# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4196#
4197# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4198# or visit www.oracle.com if you need additional information or have any
4199# questions.
4200#
4201
4202################################################################################
4203# Build the freetype lib from source
4204################################################################################
4205
4206
4207################################################################################
4208# Check if a potential freeype library match is correct and usable
4209################################################################################
4210
4211
4212################################################################################
4213# Setup freetype (The FreeType2 font rendering library)
4214################################################################################
4215
4216
4217#
4218# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4219# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4220#
4221# This code is free software; you can redistribute it and/or modify it
4222# under the terms of the GNU General Public License version 2 only, as
4223# published by the Free Software Foundation.  Oracle designates this
4224# particular file as subject to the "Classpath" exception as provided
4225# by Oracle in the LICENSE file that accompanied this code.
4226#
4227# This code is distributed in the hope that it will be useful, but WITHOUT
4228# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4229# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4230# version 2 for more details (a copy is included in the LICENSE file that
4231# accompanied this code).
4232#
4233# You should have received a copy of the GNU General Public License version
4234# 2 along with this work; if not, write to the Free Software Foundation,
4235# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4236#
4237# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4238# or visit www.oracle.com if you need additional information or have any
4239# questions.
4240#
4241
4242################################################################################
4243# Setup the standard C/C++ runtime libraries.
4244#
4245# Most importantly, determine if stdc++ should be linked statically or
4246# dynamically.
4247################################################################################
4248
4249
4250#
4251# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4252# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4253#
4254# This code is free software; you can redistribute it and/or modify it
4255# under the terms of the GNU General Public License version 2 only, as
4256# published by the Free Software Foundation.  Oracle designates this
4257# particular file as subject to the "Classpath" exception as provided
4258# by Oracle in the LICENSE file that accompanied this code.
4259#
4260# This code is distributed in the hope that it will be useful, but WITHOUT
4261# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4262# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4263# version 2 for more details (a copy is included in the LICENSE file that
4264# accompanied this code).
4265#
4266# You should have received a copy of the GNU General Public License version
4267# 2 along with this work; if not, write to the Free Software Foundation,
4268# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4269#
4270# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4271# or visit www.oracle.com if you need additional information or have any
4272# questions.
4273#
4274
4275################################################################################
4276# Setup X11 Windows system
4277################################################################################
4278
4279
4280
4281################################################################################
4282# Determine which libraries are needed for this configuration
4283################################################################################
4284
4285
4286################################################################################
4287# Parse library options, and setup needed libraries
4288################################################################################
4289
4290
4291################################################################################
4292# Setup llvm (Low-Level VM)
4293################################################################################
4294
4295
4296################################################################################
4297# Setup various libraries, typically small system libraries
4298################################################################################
4299
4300
4301#
4302# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4303# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4304#
4305# This code is free software; you can redistribute it and/or modify it
4306# under the terms of the GNU General Public License version 2 only, as
4307# published by the Free Software Foundation.  Oracle designates this
4308# particular file as subject to the "Classpath" exception as provided
4309# by Oracle in the LICENSE file that accompanied this code.
4310#
4311# This code is distributed in the hope that it will be useful, but WITHOUT
4312# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4313# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4314# version 2 for more details (a copy is included in the LICENSE file that
4315# accompanied this code).
4316#
4317# You should have received a copy of the GNU General Public License version
4318# 2 along with this work; if not, write to the Free Software Foundation,
4319# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4320#
4321# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4322# or visit www.oracle.com if you need additional information or have any
4323# questions.
4324#
4325
4326# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4327# Converts autoconf style CPU name to OpenJDK style, into
4328# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4329
4330
4331# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4332# Converts autoconf style OS name to OpenJDK style, into
4333# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4334
4335
4336# Expects $host_os $host_cpu $build_os and $build_cpu
4337# and $with_target_bits to have been setup!
4338#
4339# Translate the standard triplet(quadruplet) definition
4340# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4341# OPENJDK_BUILD_OS, etc.
4342
4343
4344# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4345# accordingly. Must be done after setting up build and target system, but before
4346# doing anything else with these values.
4347
4348
4349# Setup the legacy variables, for controlling the old makefiles.
4350#
4351
4352
4353
4354
4355#%%% Build and target systems %%%
4356
4357
4358
4359
4360# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4361# Add -mX to various FLAGS variables.
4362
4363
4364
4365
4366
4367
4368#
4369# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4370# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4371#
4372# This code is free software; you can redistribute it and/or modify it
4373# under the terms of the GNU General Public License version 2 only, as
4374# published by the Free Software Foundation.  Oracle designates this
4375# particular file as subject to the "Classpath" exception as provided
4376# by Oracle in the LICENSE file that accompanied this code.
4377#
4378# This code is distributed in the hope that it will be useful, but WITHOUT
4379# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4380# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4381# version 2 for more details (a copy is included in the LICENSE file that
4382# accompanied this code).
4383#
4384# You should have received a copy of the GNU General Public License version
4385# 2 along with this work; if not, write to the Free Software Foundation,
4386# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4387#
4388# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4389# or visit www.oracle.com if you need additional information or have any
4390# questions.
4391#
4392
4393
4394
4395
4396
4397
4398
4399
4400#
4401# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4402# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4403#
4404# This code is free software; you can redistribute it and/or modify it
4405# under the terms of the GNU General Public License version 2 only, as
4406# published by the Free Software Foundation.  Oracle designates this
4407# particular file as subject to the "Classpath" exception as provided
4408# by Oracle in the LICENSE file that accompanied this code.
4409#
4410# This code is distributed in the hope that it will be useful, but WITHOUT
4411# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4412# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4413# version 2 for more details (a copy is included in the LICENSE file that
4414# accompanied this code).
4415#
4416# You should have received a copy of the GNU General Public License version
4417# 2 along with this work; if not, write to the Free Software Foundation,
4418# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4419#
4420# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4421# or visit www.oracle.com if you need additional information or have any
4422# questions.
4423#
4424
4425########################################################################
4426# This file is responsible for detecting, verifying and setting up the
4427# toolchain, i.e. the compiler, linker and related utilities. It will setup
4428# proper paths to the binaries, but it will not setup any flags.
4429#
4430# The binaries used is determined by the toolchain type, which is the family of
4431# compilers and related tools that are used.
4432########################################################################
4433
4434
4435# All valid toolchains, regardless of platform (used by help.m4)
4436VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4437
4438# These toolchains are valid on different platforms
4439VALID_TOOLCHAINS_linux="gcc clang"
4440VALID_TOOLCHAINS_solaris="solstudio"
4441VALID_TOOLCHAINS_macosx="gcc clang"
4442VALID_TOOLCHAINS_aix="xlc"
4443VALID_TOOLCHAINS_windows="microsoft"
4444
4445# Toolchain descriptions
4446TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4447TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4448TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4449TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4450TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4451
4452# Setup a number of variables describing how native output files are
4453# named on this platform/toolchain.
4454
4455
4456# Determine which toolchain type to use, and make sure it is valid for this
4457# platform. Setup various information about the selected toolchain.
4458
4459
4460# Before we start detecting the toolchain executables, we might need some
4461# special setup, e.g. additional paths etc.
4462
4463
4464# Restore path, etc
4465
4466
4467# Check if a compiler is of the toolchain type we expect, and save the version
4468# information from it. If the compiler does not match the expected type,
4469# this function will abort using AC_MSG_ERROR. If it matches, the version will
4470# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4471# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4472#
4473# $1 = compiler to test (CC or CXX)
4474# $2 = human readable name of compiler (C or C++)
4475
4476
4477# Try to locate the given C or C++ compiler in the path, or otherwise.
4478#
4479# $1 = compiler to test (CC or CXX)
4480# $2 = human readable name of compiler (C or C++)
4481# $3 = list of compiler names to search for
4482
4483
4484# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4485# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4486# archiver (AR). Verify that the compilers are correct according to the
4487# toolchain type.
4488
4489
4490# Setup additional tools that is considered a part of the toolchain, but not the
4491# core part. Many of these are highly platform-specific and do not exist,
4492# and/or are not needed on all platforms.
4493
4494
4495# Setup the build tools (i.e, the compiler and linker used to build programs
4496# that should be run on the build platform, not the target platform, as a build
4497# helper). Since the non-cross-compile case uses the normal, target compilers
4498# for this, we can only do this after these have been setup.
4499
4500
4501# Setup legacy variables that are still needed as alternative ways to refer to
4502# parts of the toolchain.
4503
4504
4505# Do some additional checks on the detected tools.
4506
4507
4508# Setup the JTReg Regression Test Harness.
4509
4510
4511#
4512# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4513# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4514#
4515# This code is free software; you can redistribute it and/or modify it
4516# under the terms of the GNU General Public License version 2 only, as
4517# published by the Free Software Foundation.  Oracle designates this
4518# particular file as subject to the "Classpath" exception as provided
4519# by Oracle in the LICENSE file that accompanied this code.
4520#
4521# This code is distributed in the hope that it will be useful, but WITHOUT
4522# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4523# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4524# version 2 for more details (a copy is included in the LICENSE file that
4525# accompanied this code).
4526#
4527# You should have received a copy of the GNU General Public License version
4528# 2 along with this work; if not, write to the Free Software Foundation,
4529# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4530#
4531# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4532# or visit www.oracle.com if you need additional information or have any
4533# questions.
4534#
4535
4536################################################################################
4537# The order of these defines the priority by which we try to find them.
4538VALID_VS_VERSIONS="2013 2012 2010"
4539
4540VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4541VS_VERSION_INTERNAL_2010=100
4542VS_MSVCR_2010=msvcr100.dll
4543# We don't use msvcp on Visual Studio 2010
4544#VS_MSVCP_2010=msvcp100.dll
4545VS_ENVVAR_2010="VS100COMNTOOLS"
4546VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4547VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4548VS_VS_PLATFORM_NAME_2010="v100"
4549VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4550
4551VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4552VS_VERSION_INTERNAL_2012=110
4553VS_MSVCR_2012=msvcr110.dll
4554VS_MSVCP_2012=msvcp110.dll
4555VS_ENVVAR_2012="VS110COMNTOOLS"
4556VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4557VS_SDK_INSTALLDIR_2012=
4558VS_VS_PLATFORM_NAME_2012="v110"
4559VS_SDK_PLATFORM_NAME_2012=
4560
4561VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4562VS_VERSION_INTERNAL_2013=120
4563VS_MSVCR_2013=msvcr120.dll
4564VS_MSVCP_2013=msvcp120.dll
4565VS_ENVVAR_2013="VS120COMNTOOLS"
4566VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4567VS_SDK_INSTALLDIR_2013=
4568VS_VS_PLATFORM_NAME_2013="v120"
4569VS_SDK_PLATFORM_NAME_2013=
4570
4571################################################################################
4572
4573
4574
4575################################################################################
4576
4577
4578
4579################################################################################
4580# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4581# build environment and assigns it to VS_ENV_CMD
4582
4583
4584################################################################################
4585
4586
4587
4588################################################################################
4589# Check if the VS env variables were setup prior to running configure.
4590# If not, then find vcvarsall.bat and run it automatically, and integrate
4591# the set env variables into the spec file.
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606# This line needs to be here, verbatim, after all includes and the dummy hook
4607# definitions. It is replaced with custom functionality when building
4608# custom sources.
4609#CUSTOM_AUTOCONF_INCLUDE
4610
4611# Do not change or remove the following line, it is needed for consistency checks:
4612DATE_WHEN_GENERATED=1446135203
4613
4614###############################################################################
4615#
4616# Initialization / Boot-strapping
4617#
4618# The bootstrapping process needs to solve the "chicken or the egg" problem,
4619# thus it jumps back and forth, each time gaining something needed later on.
4620#
4621###############################################################################
4622
4623# If we are requested to print additional help, do that and then exit.
4624# This must be the very first call.
4625
4626  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4627    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4628    $PRINTF "Which are valid to use depends on the build platform.\n"
4629    for toolchain in $VALID_TOOLCHAINS_all; do
4630      # Use indirect variable referencing
4631      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4632      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4633      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4634    done
4635
4636    # And now exit directly
4637    exit 0
4638  fi
4639
4640
4641# Basic initialization that must happen first of all in the normal process.
4642
4643  # Save the original command line. This is passed to us by the wrapper configure script.
4644
4645  # Save the path variable before it gets changed
4646  ORIGINAL_PATH="$PATH"
4647
4648  DATE_WHEN_CONFIGURED=`LANG=C date`
4649
4650  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4651$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4652  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4653$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4654
4655
4656  # Start with tools that do not need have cross compilation support
4657  # and can be expected to be found in the default PATH. These tools are
4658  # used by configure.
4659
4660  # First are all the simple required tools.
4661
4662
4663
4664  # Publish this variable in the help.
4665
4666
4667  if [ -z "${BASENAME+x}" ]; then
4668    # The variable is not set by user, try to locate tool using the code snippet
4669    for ac_prog in basename
4670do
4671  # Extract the first word of "$ac_prog", so it can be a program name with args.
4672set dummy $ac_prog; ac_word=$2
4673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4674$as_echo_n "checking for $ac_word... " >&6; }
4675if ${ac_cv_path_BASENAME+:} false; then :
4676  $as_echo_n "(cached) " >&6
4677else
4678  case $BASENAME in
4679  [\\/]* | ?:[\\/]*)
4680  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4681  ;;
4682  *)
4683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4684for as_dir in $PATH
4685do
4686  IFS=$as_save_IFS
4687  test -z "$as_dir" && as_dir=.
4688    for ac_exec_ext in '' $ac_executable_extensions; do
4689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4690    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4692    break 2
4693  fi
4694done
4695  done
4696IFS=$as_save_IFS
4697
4698  ;;
4699esac
4700fi
4701BASENAME=$ac_cv_path_BASENAME
4702if test -n "$BASENAME"; then
4703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4704$as_echo "$BASENAME" >&6; }
4705else
4706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707$as_echo "no" >&6; }
4708fi
4709
4710
4711  test -n "$BASENAME" && break
4712done
4713
4714  else
4715    # The variable is set, but is it from the command line or the environment?
4716
4717    # Try to remove the string !BASENAME! from our list.
4718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4720      # If it failed, the variable was not from the command line. Ignore it,
4721      # but warn the user (except for BASH, which is always set by the calling BASH).
4722      if test "xBASENAME" != xBASH; then
4723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4724$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4725      fi
4726      # Try to locate tool using the code snippet
4727      for ac_prog in basename
4728do
4729  # Extract the first word of "$ac_prog", so it can be a program name with args.
4730set dummy $ac_prog; ac_word=$2
4731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4732$as_echo_n "checking for $ac_word... " >&6; }
4733if ${ac_cv_path_BASENAME+:} false; then :
4734  $as_echo_n "(cached) " >&6
4735else
4736  case $BASENAME in
4737  [\\/]* | ?:[\\/]*)
4738  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4739  ;;
4740  *)
4741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4742for as_dir in $PATH
4743do
4744  IFS=$as_save_IFS
4745  test -z "$as_dir" && as_dir=.
4746    for ac_exec_ext in '' $ac_executable_extensions; do
4747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4748    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4750    break 2
4751  fi
4752done
4753  done
4754IFS=$as_save_IFS
4755
4756  ;;
4757esac
4758fi
4759BASENAME=$ac_cv_path_BASENAME
4760if test -n "$BASENAME"; then
4761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4762$as_echo "$BASENAME" >&6; }
4763else
4764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4765$as_echo "no" >&6; }
4766fi
4767
4768
4769  test -n "$BASENAME" && break
4770done
4771
4772    else
4773      # If it succeeded, then it was overridden by the user. We will use it
4774      # for the tool.
4775
4776      # First remove it from the list of overridden variables, so we can test
4777      # for unknown variables in the end.
4778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4779
4780      # Check if we try to supply an empty value
4781      if test "x$BASENAME" = x; then
4782        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4783$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4785$as_echo_n "checking for BASENAME... " >&6; }
4786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4787$as_echo "disabled" >&6; }
4788      else
4789        # Check if the provided tool contains a complete path.
4790        tool_specified="$BASENAME"
4791        tool_basename="${tool_specified##*/}"
4792        if test "x$tool_basename" = "x$tool_specified"; then
4793          # A command without a complete path is provided, search $PATH.
4794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4795$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4796          # Extract the first word of "$tool_basename", so it can be a program name with args.
4797set dummy $tool_basename; ac_word=$2
4798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4799$as_echo_n "checking for $ac_word... " >&6; }
4800if ${ac_cv_path_BASENAME+:} false; then :
4801  $as_echo_n "(cached) " >&6
4802else
4803  case $BASENAME in
4804  [\\/]* | ?:[\\/]*)
4805  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4806  ;;
4807  *)
4808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4809for as_dir in $PATH
4810do
4811  IFS=$as_save_IFS
4812  test -z "$as_dir" && as_dir=.
4813    for ac_exec_ext in '' $ac_executable_extensions; do
4814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4815    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4817    break 2
4818  fi
4819done
4820  done
4821IFS=$as_save_IFS
4822
4823  ;;
4824esac
4825fi
4826BASENAME=$ac_cv_path_BASENAME
4827if test -n "$BASENAME"; then
4828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4829$as_echo "$BASENAME" >&6; }
4830else
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
4833fi
4834
4835
4836          if test "x$BASENAME" = x; then
4837            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4838          fi
4839        else
4840          # Otherwise we believe it is a complete path. Use it as it is.
4841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4842$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4843          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4844$as_echo_n "checking for BASENAME... " >&6; }
4845          if test ! -x "$tool_specified"; then
4846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4847$as_echo "not found" >&6; }
4848            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4849          fi
4850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4851$as_echo "$tool_specified" >&6; }
4852        fi
4853      fi
4854    fi
4855
4856  fi
4857
4858
4859
4860  if test "x$BASENAME" = x; then
4861    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4862  fi
4863
4864
4865
4866
4867
4868  # Publish this variable in the help.
4869
4870
4871  if [ -z "${BASH+x}" ]; then
4872    # The variable is not set by user, try to locate tool using the code snippet
4873    for ac_prog in bash
4874do
4875  # Extract the first word of "$ac_prog", so it can be a program name with args.
4876set dummy $ac_prog; ac_word=$2
4877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4878$as_echo_n "checking for $ac_word... " >&6; }
4879if ${ac_cv_path_BASH+:} false; then :
4880  $as_echo_n "(cached) " >&6
4881else
4882  case $BASH in
4883  [\\/]* | ?:[\\/]*)
4884  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4885  ;;
4886  *)
4887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4888for as_dir in $PATH
4889do
4890  IFS=$as_save_IFS
4891  test -z "$as_dir" && as_dir=.
4892    for ac_exec_ext in '' $ac_executable_extensions; do
4893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4894    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4896    break 2
4897  fi
4898done
4899  done
4900IFS=$as_save_IFS
4901
4902  ;;
4903esac
4904fi
4905BASH=$ac_cv_path_BASH
4906if test -n "$BASH"; then
4907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4908$as_echo "$BASH" >&6; }
4909else
4910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4911$as_echo "no" >&6; }
4912fi
4913
4914
4915  test -n "$BASH" && break
4916done
4917
4918  else
4919    # The variable is set, but is it from the command line or the environment?
4920
4921    # Try to remove the string !BASH! from our list.
4922    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4923    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4924      # If it failed, the variable was not from the command line. Ignore it,
4925      # but warn the user (except for BASH, which is always set by the calling BASH).
4926      if test "xBASH" != xBASH; then
4927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4928$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4929      fi
4930      # Try to locate tool using the code snippet
4931      for ac_prog in bash
4932do
4933  # Extract the first word of "$ac_prog", so it can be a program name with args.
4934set dummy $ac_prog; ac_word=$2
4935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4936$as_echo_n "checking for $ac_word... " >&6; }
4937if ${ac_cv_path_BASH+:} false; then :
4938  $as_echo_n "(cached) " >&6
4939else
4940  case $BASH in
4941  [\\/]* | ?:[\\/]*)
4942  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4943  ;;
4944  *)
4945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4946for as_dir in $PATH
4947do
4948  IFS=$as_save_IFS
4949  test -z "$as_dir" && as_dir=.
4950    for ac_exec_ext in '' $ac_executable_extensions; do
4951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4952    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4954    break 2
4955  fi
4956done
4957  done
4958IFS=$as_save_IFS
4959
4960  ;;
4961esac
4962fi
4963BASH=$ac_cv_path_BASH
4964if test -n "$BASH"; then
4965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4966$as_echo "$BASH" >&6; }
4967else
4968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4969$as_echo "no" >&6; }
4970fi
4971
4972
4973  test -n "$BASH" && break
4974done
4975
4976    else
4977      # If it succeeded, then it was overridden by the user. We will use it
4978      # for the tool.
4979
4980      # First remove it from the list of overridden variables, so we can test
4981      # for unknown variables in the end.
4982      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4983
4984      # Check if we try to supply an empty value
4985      if test "x$BASH" = x; then
4986        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
4987$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
4988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4989$as_echo_n "checking for BASH... " >&6; }
4990        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4991$as_echo "disabled" >&6; }
4992      else
4993        # Check if the provided tool contains a complete path.
4994        tool_specified="$BASH"
4995        tool_basename="${tool_specified##*/}"
4996        if test "x$tool_basename" = "x$tool_specified"; then
4997          # A command without a complete path is provided, search $PATH.
4998          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4999$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5000          # Extract the first word of "$tool_basename", so it can be a program name with args.
5001set dummy $tool_basename; ac_word=$2
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003$as_echo_n "checking for $ac_word... " >&6; }
5004if ${ac_cv_path_BASH+:} false; then :
5005  $as_echo_n "(cached) " >&6
5006else
5007  case $BASH in
5008  [\\/]* | ?:[\\/]*)
5009  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5010  ;;
5011  *)
5012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015  IFS=$as_save_IFS
5016  test -z "$as_dir" && as_dir=.
5017    for ac_exec_ext in '' $ac_executable_extensions; do
5018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5019    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021    break 2
5022  fi
5023done
5024  done
5025IFS=$as_save_IFS
5026
5027  ;;
5028esac
5029fi
5030BASH=$ac_cv_path_BASH
5031if test -n "$BASH"; then
5032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5033$as_echo "$BASH" >&6; }
5034else
5035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036$as_echo "no" >&6; }
5037fi
5038
5039
5040          if test "x$BASH" = x; then
5041            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5042          fi
5043        else
5044          # Otherwise we believe it is a complete path. Use it as it is.
5045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5046$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5047          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5048$as_echo_n "checking for BASH... " >&6; }
5049          if test ! -x "$tool_specified"; then
5050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5051$as_echo "not found" >&6; }
5052            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5053          fi
5054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5055$as_echo "$tool_specified" >&6; }
5056        fi
5057      fi
5058    fi
5059
5060  fi
5061
5062
5063
5064  if test "x$BASH" = x; then
5065    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5066  fi
5067
5068
5069
5070
5071
5072  # Publish this variable in the help.
5073
5074
5075  if [ -z "${CAT+x}" ]; then
5076    # The variable is not set by user, try to locate tool using the code snippet
5077    for ac_prog in cat
5078do
5079  # Extract the first word of "$ac_prog", so it can be a program name with args.
5080set dummy $ac_prog; ac_word=$2
5081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5082$as_echo_n "checking for $ac_word... " >&6; }
5083if ${ac_cv_path_CAT+:} false; then :
5084  $as_echo_n "(cached) " >&6
5085else
5086  case $CAT in
5087  [\\/]* | ?:[\\/]*)
5088  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5089  ;;
5090  *)
5091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5092for as_dir in $PATH
5093do
5094  IFS=$as_save_IFS
5095  test -z "$as_dir" && as_dir=.
5096    for ac_exec_ext in '' $ac_executable_extensions; do
5097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5098    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5100    break 2
5101  fi
5102done
5103  done
5104IFS=$as_save_IFS
5105
5106  ;;
5107esac
5108fi
5109CAT=$ac_cv_path_CAT
5110if test -n "$CAT"; then
5111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5112$as_echo "$CAT" >&6; }
5113else
5114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5115$as_echo "no" >&6; }
5116fi
5117
5118
5119  test -n "$CAT" && break
5120done
5121
5122  else
5123    # The variable is set, but is it from the command line or the environment?
5124
5125    # Try to remove the string !CAT! from our list.
5126    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5127    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5128      # If it failed, the variable was not from the command line. Ignore it,
5129      # but warn the user (except for BASH, which is always set by the calling BASH).
5130      if test "xCAT" != xBASH; then
5131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5132$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5133      fi
5134      # Try to locate tool using the code snippet
5135      for ac_prog in cat
5136do
5137  # Extract the first word of "$ac_prog", so it can be a program name with args.
5138set dummy $ac_prog; ac_word=$2
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5140$as_echo_n "checking for $ac_word... " >&6; }
5141if ${ac_cv_path_CAT+:} false; then :
5142  $as_echo_n "(cached) " >&6
5143else
5144  case $CAT in
5145  [\\/]* | ?:[\\/]*)
5146  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5147  ;;
5148  *)
5149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5150for as_dir in $PATH
5151do
5152  IFS=$as_save_IFS
5153  test -z "$as_dir" && as_dir=.
5154    for ac_exec_ext in '' $ac_executable_extensions; do
5155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5156    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5158    break 2
5159  fi
5160done
5161  done
5162IFS=$as_save_IFS
5163
5164  ;;
5165esac
5166fi
5167CAT=$ac_cv_path_CAT
5168if test -n "$CAT"; then
5169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5170$as_echo "$CAT" >&6; }
5171else
5172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5173$as_echo "no" >&6; }
5174fi
5175
5176
5177  test -n "$CAT" && break
5178done
5179
5180    else
5181      # If it succeeded, then it was overridden by the user. We will use it
5182      # for the tool.
5183
5184      # First remove it from the list of overridden variables, so we can test
5185      # for unknown variables in the end.
5186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5187
5188      # Check if we try to supply an empty value
5189      if test "x$CAT" = x; then
5190        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5191$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5193$as_echo_n "checking for CAT... " >&6; }
5194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5195$as_echo "disabled" >&6; }
5196      else
5197        # Check if the provided tool contains a complete path.
5198        tool_specified="$CAT"
5199        tool_basename="${tool_specified##*/}"
5200        if test "x$tool_basename" = "x$tool_specified"; then
5201          # A command without a complete path is provided, search $PATH.
5202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5203$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5204          # Extract the first word of "$tool_basename", so it can be a program name with args.
5205set dummy $tool_basename; ac_word=$2
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5207$as_echo_n "checking for $ac_word... " >&6; }
5208if ${ac_cv_path_CAT+:} false; then :
5209  $as_echo_n "(cached) " >&6
5210else
5211  case $CAT in
5212  [\\/]* | ?:[\\/]*)
5213  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5214  ;;
5215  *)
5216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5217for as_dir in $PATH
5218do
5219  IFS=$as_save_IFS
5220  test -z "$as_dir" && as_dir=.
5221    for ac_exec_ext in '' $ac_executable_extensions; do
5222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5223    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5225    break 2
5226  fi
5227done
5228  done
5229IFS=$as_save_IFS
5230
5231  ;;
5232esac
5233fi
5234CAT=$ac_cv_path_CAT
5235if test -n "$CAT"; then
5236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5237$as_echo "$CAT" >&6; }
5238else
5239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5240$as_echo "no" >&6; }
5241fi
5242
5243
5244          if test "x$CAT" = x; then
5245            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5246          fi
5247        else
5248          # Otherwise we believe it is a complete path. Use it as it is.
5249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5250$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5251          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5252$as_echo_n "checking for CAT... " >&6; }
5253          if test ! -x "$tool_specified"; then
5254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5255$as_echo "not found" >&6; }
5256            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5257          fi
5258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5259$as_echo "$tool_specified" >&6; }
5260        fi
5261      fi
5262    fi
5263
5264  fi
5265
5266
5267
5268  if test "x$CAT" = x; then
5269    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5270  fi
5271
5272
5273
5274
5275
5276  # Publish this variable in the help.
5277
5278
5279  if [ -z "${CHMOD+x}" ]; then
5280    # The variable is not set by user, try to locate tool using the code snippet
5281    for ac_prog in chmod
5282do
5283  # Extract the first word of "$ac_prog", so it can be a program name with args.
5284set dummy $ac_prog; ac_word=$2
5285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5286$as_echo_n "checking for $ac_word... " >&6; }
5287if ${ac_cv_path_CHMOD+:} false; then :
5288  $as_echo_n "(cached) " >&6
5289else
5290  case $CHMOD in
5291  [\\/]* | ?:[\\/]*)
5292  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5293  ;;
5294  *)
5295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5296for as_dir in $PATH
5297do
5298  IFS=$as_save_IFS
5299  test -z "$as_dir" && as_dir=.
5300    for ac_exec_ext in '' $ac_executable_extensions; do
5301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5302    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5304    break 2
5305  fi
5306done
5307  done
5308IFS=$as_save_IFS
5309
5310  ;;
5311esac
5312fi
5313CHMOD=$ac_cv_path_CHMOD
5314if test -n "$CHMOD"; then
5315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5316$as_echo "$CHMOD" >&6; }
5317else
5318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5319$as_echo "no" >&6; }
5320fi
5321
5322
5323  test -n "$CHMOD" && break
5324done
5325
5326  else
5327    # The variable is set, but is it from the command line or the environment?
5328
5329    # Try to remove the string !CHMOD! from our list.
5330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5332      # If it failed, the variable was not from the command line. Ignore it,
5333      # but warn the user (except for BASH, which is always set by the calling BASH).
5334      if test "xCHMOD" != xBASH; then
5335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5336$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5337      fi
5338      # Try to locate tool using the code snippet
5339      for ac_prog in chmod
5340do
5341  # Extract the first word of "$ac_prog", so it can be a program name with args.
5342set dummy $ac_prog; ac_word=$2
5343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5344$as_echo_n "checking for $ac_word... " >&6; }
5345if ${ac_cv_path_CHMOD+:} false; then :
5346  $as_echo_n "(cached) " >&6
5347else
5348  case $CHMOD in
5349  [\\/]* | ?:[\\/]*)
5350  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5351  ;;
5352  *)
5353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5354for as_dir in $PATH
5355do
5356  IFS=$as_save_IFS
5357  test -z "$as_dir" && as_dir=.
5358    for ac_exec_ext in '' $ac_executable_extensions; do
5359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5360    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5362    break 2
5363  fi
5364done
5365  done
5366IFS=$as_save_IFS
5367
5368  ;;
5369esac
5370fi
5371CHMOD=$ac_cv_path_CHMOD
5372if test -n "$CHMOD"; then
5373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5374$as_echo "$CHMOD" >&6; }
5375else
5376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5377$as_echo "no" >&6; }
5378fi
5379
5380
5381  test -n "$CHMOD" && break
5382done
5383
5384    else
5385      # If it succeeded, then it was overridden by the user. We will use it
5386      # for the tool.
5387
5388      # First remove it from the list of overridden variables, so we can test
5389      # for unknown variables in the end.
5390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5391
5392      # Check if we try to supply an empty value
5393      if test "x$CHMOD" = x; then
5394        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5395$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5397$as_echo_n "checking for CHMOD... " >&6; }
5398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5399$as_echo "disabled" >&6; }
5400      else
5401        # Check if the provided tool contains a complete path.
5402        tool_specified="$CHMOD"
5403        tool_basename="${tool_specified##*/}"
5404        if test "x$tool_basename" = "x$tool_specified"; then
5405          # A command without a complete path is provided, search $PATH.
5406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5407$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5408          # Extract the first word of "$tool_basename", so it can be a program name with args.
5409set dummy $tool_basename; ac_word=$2
5410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5411$as_echo_n "checking for $ac_word... " >&6; }
5412if ${ac_cv_path_CHMOD+:} false; then :
5413  $as_echo_n "(cached) " >&6
5414else
5415  case $CHMOD in
5416  [\\/]* | ?:[\\/]*)
5417  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5418  ;;
5419  *)
5420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5421for as_dir in $PATH
5422do
5423  IFS=$as_save_IFS
5424  test -z "$as_dir" && as_dir=.
5425    for ac_exec_ext in '' $ac_executable_extensions; do
5426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5427    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5429    break 2
5430  fi
5431done
5432  done
5433IFS=$as_save_IFS
5434
5435  ;;
5436esac
5437fi
5438CHMOD=$ac_cv_path_CHMOD
5439if test -n "$CHMOD"; then
5440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5441$as_echo "$CHMOD" >&6; }
5442else
5443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5444$as_echo "no" >&6; }
5445fi
5446
5447
5448          if test "x$CHMOD" = x; then
5449            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5450          fi
5451        else
5452          # Otherwise we believe it is a complete path. Use it as it is.
5453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5454$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5455          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5456$as_echo_n "checking for CHMOD... " >&6; }
5457          if test ! -x "$tool_specified"; then
5458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5459$as_echo "not found" >&6; }
5460            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5461          fi
5462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5463$as_echo "$tool_specified" >&6; }
5464        fi
5465      fi
5466    fi
5467
5468  fi
5469
5470
5471
5472  if test "x$CHMOD" = x; then
5473    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5474  fi
5475
5476
5477
5478
5479
5480  # Publish this variable in the help.
5481
5482
5483  if [ -z "${CMP+x}" ]; then
5484    # The variable is not set by user, try to locate tool using the code snippet
5485    for ac_prog in cmp
5486do
5487  # Extract the first word of "$ac_prog", so it can be a program name with args.
5488set dummy $ac_prog; ac_word=$2
5489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5490$as_echo_n "checking for $ac_word... " >&6; }
5491if ${ac_cv_path_CMP+:} false; then :
5492  $as_echo_n "(cached) " >&6
5493else
5494  case $CMP in
5495  [\\/]* | ?:[\\/]*)
5496  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5497  ;;
5498  *)
5499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5500for as_dir in $PATH
5501do
5502  IFS=$as_save_IFS
5503  test -z "$as_dir" && as_dir=.
5504    for ac_exec_ext in '' $ac_executable_extensions; do
5505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5506    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5508    break 2
5509  fi
5510done
5511  done
5512IFS=$as_save_IFS
5513
5514  ;;
5515esac
5516fi
5517CMP=$ac_cv_path_CMP
5518if test -n "$CMP"; then
5519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5520$as_echo "$CMP" >&6; }
5521else
5522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5523$as_echo "no" >&6; }
5524fi
5525
5526
5527  test -n "$CMP" && break
5528done
5529
5530  else
5531    # The variable is set, but is it from the command line or the environment?
5532
5533    # Try to remove the string !CMP! from our list.
5534    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5535    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5536      # If it failed, the variable was not from the command line. Ignore it,
5537      # but warn the user (except for BASH, which is always set by the calling BASH).
5538      if test "xCMP" != xBASH; then
5539        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5540$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5541      fi
5542      # Try to locate tool using the code snippet
5543      for ac_prog in cmp
5544do
5545  # Extract the first word of "$ac_prog", so it can be a program name with args.
5546set dummy $ac_prog; ac_word=$2
5547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5548$as_echo_n "checking for $ac_word... " >&6; }
5549if ${ac_cv_path_CMP+:} false; then :
5550  $as_echo_n "(cached) " >&6
5551else
5552  case $CMP in
5553  [\\/]* | ?:[\\/]*)
5554  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5555  ;;
5556  *)
5557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5558for as_dir in $PATH
5559do
5560  IFS=$as_save_IFS
5561  test -z "$as_dir" && as_dir=.
5562    for ac_exec_ext in '' $ac_executable_extensions; do
5563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5564    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5566    break 2
5567  fi
5568done
5569  done
5570IFS=$as_save_IFS
5571
5572  ;;
5573esac
5574fi
5575CMP=$ac_cv_path_CMP
5576if test -n "$CMP"; then
5577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5578$as_echo "$CMP" >&6; }
5579else
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5581$as_echo "no" >&6; }
5582fi
5583
5584
5585  test -n "$CMP" && break
5586done
5587
5588    else
5589      # If it succeeded, then it was overridden by the user. We will use it
5590      # for the tool.
5591
5592      # First remove it from the list of overridden variables, so we can test
5593      # for unknown variables in the end.
5594      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5595
5596      # Check if we try to supply an empty value
5597      if test "x$CMP" = x; then
5598        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5599$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5600        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5601$as_echo_n "checking for CMP... " >&6; }
5602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5603$as_echo "disabled" >&6; }
5604      else
5605        # Check if the provided tool contains a complete path.
5606        tool_specified="$CMP"
5607        tool_basename="${tool_specified##*/}"
5608        if test "x$tool_basename" = "x$tool_specified"; then
5609          # A command without a complete path is provided, search $PATH.
5610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5611$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5612          # Extract the first word of "$tool_basename", so it can be a program name with args.
5613set dummy $tool_basename; ac_word=$2
5614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5615$as_echo_n "checking for $ac_word... " >&6; }
5616if ${ac_cv_path_CMP+:} false; then :
5617  $as_echo_n "(cached) " >&6
5618else
5619  case $CMP in
5620  [\\/]* | ?:[\\/]*)
5621  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5622  ;;
5623  *)
5624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5625for as_dir in $PATH
5626do
5627  IFS=$as_save_IFS
5628  test -z "$as_dir" && as_dir=.
5629    for ac_exec_ext in '' $ac_executable_extensions; do
5630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5631    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5633    break 2
5634  fi
5635done
5636  done
5637IFS=$as_save_IFS
5638
5639  ;;
5640esac
5641fi
5642CMP=$ac_cv_path_CMP
5643if test -n "$CMP"; then
5644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5645$as_echo "$CMP" >&6; }
5646else
5647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5648$as_echo "no" >&6; }
5649fi
5650
5651
5652          if test "x$CMP" = x; then
5653            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5654          fi
5655        else
5656          # Otherwise we believe it is a complete path. Use it as it is.
5657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5658$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5659          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5660$as_echo_n "checking for CMP... " >&6; }
5661          if test ! -x "$tool_specified"; then
5662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5663$as_echo "not found" >&6; }
5664            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5665          fi
5666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5667$as_echo "$tool_specified" >&6; }
5668        fi
5669      fi
5670    fi
5671
5672  fi
5673
5674
5675
5676  if test "x$CMP" = x; then
5677    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5678  fi
5679
5680
5681
5682
5683
5684  # Publish this variable in the help.
5685
5686
5687  if [ -z "${COMM+x}" ]; then
5688    # The variable is not set by user, try to locate tool using the code snippet
5689    for ac_prog in comm
5690do
5691  # Extract the first word of "$ac_prog", so it can be a program name with args.
5692set dummy $ac_prog; ac_word=$2
5693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5694$as_echo_n "checking for $ac_word... " >&6; }
5695if ${ac_cv_path_COMM+:} false; then :
5696  $as_echo_n "(cached) " >&6
5697else
5698  case $COMM in
5699  [\\/]* | ?:[\\/]*)
5700  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5701  ;;
5702  *)
5703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5704for as_dir in $PATH
5705do
5706  IFS=$as_save_IFS
5707  test -z "$as_dir" && as_dir=.
5708    for ac_exec_ext in '' $ac_executable_extensions; do
5709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5710    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5712    break 2
5713  fi
5714done
5715  done
5716IFS=$as_save_IFS
5717
5718  ;;
5719esac
5720fi
5721COMM=$ac_cv_path_COMM
5722if test -n "$COMM"; then
5723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5724$as_echo "$COMM" >&6; }
5725else
5726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5727$as_echo "no" >&6; }
5728fi
5729
5730
5731  test -n "$COMM" && break
5732done
5733
5734  else
5735    # The variable is set, but is it from the command line or the environment?
5736
5737    # Try to remove the string !COMM! from our list.
5738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5740      # If it failed, the variable was not from the command line. Ignore it,
5741      # but warn the user (except for BASH, which is always set by the calling BASH).
5742      if test "xCOMM" != xBASH; then
5743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5744$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5745      fi
5746      # Try to locate tool using the code snippet
5747      for ac_prog in comm
5748do
5749  # Extract the first word of "$ac_prog", so it can be a program name with args.
5750set dummy $ac_prog; ac_word=$2
5751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5752$as_echo_n "checking for $ac_word... " >&6; }
5753if ${ac_cv_path_COMM+:} false; then :
5754  $as_echo_n "(cached) " >&6
5755else
5756  case $COMM in
5757  [\\/]* | ?:[\\/]*)
5758  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5759  ;;
5760  *)
5761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5762for as_dir in $PATH
5763do
5764  IFS=$as_save_IFS
5765  test -z "$as_dir" && as_dir=.
5766    for ac_exec_ext in '' $ac_executable_extensions; do
5767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5768    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5770    break 2
5771  fi
5772done
5773  done
5774IFS=$as_save_IFS
5775
5776  ;;
5777esac
5778fi
5779COMM=$ac_cv_path_COMM
5780if test -n "$COMM"; then
5781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5782$as_echo "$COMM" >&6; }
5783else
5784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5785$as_echo "no" >&6; }
5786fi
5787
5788
5789  test -n "$COMM" && break
5790done
5791
5792    else
5793      # If it succeeded, then it was overridden by the user. We will use it
5794      # for the tool.
5795
5796      # First remove it from the list of overridden variables, so we can test
5797      # for unknown variables in the end.
5798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5799
5800      # Check if we try to supply an empty value
5801      if test "x$COMM" = x; then
5802        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5803$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5805$as_echo_n "checking for COMM... " >&6; }
5806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5807$as_echo "disabled" >&6; }
5808      else
5809        # Check if the provided tool contains a complete path.
5810        tool_specified="$COMM"
5811        tool_basename="${tool_specified##*/}"
5812        if test "x$tool_basename" = "x$tool_specified"; then
5813          # A command without a complete path is provided, search $PATH.
5814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5815$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5816          # Extract the first word of "$tool_basename", so it can be a program name with args.
5817set dummy $tool_basename; ac_word=$2
5818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5819$as_echo_n "checking for $ac_word... " >&6; }
5820if ${ac_cv_path_COMM+:} false; then :
5821  $as_echo_n "(cached) " >&6
5822else
5823  case $COMM in
5824  [\\/]* | ?:[\\/]*)
5825  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5826  ;;
5827  *)
5828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5829for as_dir in $PATH
5830do
5831  IFS=$as_save_IFS
5832  test -z "$as_dir" && as_dir=.
5833    for ac_exec_ext in '' $ac_executable_extensions; do
5834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5835    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5837    break 2
5838  fi
5839done
5840  done
5841IFS=$as_save_IFS
5842
5843  ;;
5844esac
5845fi
5846COMM=$ac_cv_path_COMM
5847if test -n "$COMM"; then
5848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5849$as_echo "$COMM" >&6; }
5850else
5851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5852$as_echo "no" >&6; }
5853fi
5854
5855
5856          if test "x$COMM" = x; then
5857            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5858          fi
5859        else
5860          # Otherwise we believe it is a complete path. Use it as it is.
5861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5862$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5863          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5864$as_echo_n "checking for COMM... " >&6; }
5865          if test ! -x "$tool_specified"; then
5866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5867$as_echo "not found" >&6; }
5868            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5869          fi
5870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5871$as_echo "$tool_specified" >&6; }
5872        fi
5873      fi
5874    fi
5875
5876  fi
5877
5878
5879
5880  if test "x$COMM" = x; then
5881    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5882  fi
5883
5884
5885
5886
5887
5888  # Publish this variable in the help.
5889
5890
5891  if [ -z "${CP+x}" ]; then
5892    # The variable is not set by user, try to locate tool using the code snippet
5893    for ac_prog in cp
5894do
5895  # Extract the first word of "$ac_prog", so it can be a program name with args.
5896set dummy $ac_prog; ac_word=$2
5897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5898$as_echo_n "checking for $ac_word... " >&6; }
5899if ${ac_cv_path_CP+:} false; then :
5900  $as_echo_n "(cached) " >&6
5901else
5902  case $CP in
5903  [\\/]* | ?:[\\/]*)
5904  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5905  ;;
5906  *)
5907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5908for as_dir in $PATH
5909do
5910  IFS=$as_save_IFS
5911  test -z "$as_dir" && as_dir=.
5912    for ac_exec_ext in '' $ac_executable_extensions; do
5913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5914    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5916    break 2
5917  fi
5918done
5919  done
5920IFS=$as_save_IFS
5921
5922  ;;
5923esac
5924fi
5925CP=$ac_cv_path_CP
5926if test -n "$CP"; then
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5928$as_echo "$CP" >&6; }
5929else
5930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931$as_echo "no" >&6; }
5932fi
5933
5934
5935  test -n "$CP" && break
5936done
5937
5938  else
5939    # The variable is set, but is it from the command line or the environment?
5940
5941    # Try to remove the string !CP! from our list.
5942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5944      # If it failed, the variable was not from the command line. Ignore it,
5945      # but warn the user (except for BASH, which is always set by the calling BASH).
5946      if test "xCP" != xBASH; then
5947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5948$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5949      fi
5950      # Try to locate tool using the code snippet
5951      for ac_prog in cp
5952do
5953  # Extract the first word of "$ac_prog", so it can be a program name with args.
5954set dummy $ac_prog; ac_word=$2
5955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5956$as_echo_n "checking for $ac_word... " >&6; }
5957if ${ac_cv_path_CP+:} false; then :
5958  $as_echo_n "(cached) " >&6
5959else
5960  case $CP in
5961  [\\/]* | ?:[\\/]*)
5962  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5963  ;;
5964  *)
5965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH
5967do
5968  IFS=$as_save_IFS
5969  test -z "$as_dir" && as_dir=.
5970    for ac_exec_ext in '' $ac_executable_extensions; do
5971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5972    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5974    break 2
5975  fi
5976done
5977  done
5978IFS=$as_save_IFS
5979
5980  ;;
5981esac
5982fi
5983CP=$ac_cv_path_CP
5984if test -n "$CP"; then
5985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5986$as_echo "$CP" >&6; }
5987else
5988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
5990fi
5991
5992
5993  test -n "$CP" && break
5994done
5995
5996    else
5997      # If it succeeded, then it was overridden by the user. We will use it
5998      # for the tool.
5999
6000      # First remove it from the list of overridden variables, so we can test
6001      # for unknown variables in the end.
6002      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6003
6004      # Check if we try to supply an empty value
6005      if test "x$CP" = x; then
6006        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6007$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6009$as_echo_n "checking for CP... " >&6; }
6010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6011$as_echo "disabled" >&6; }
6012      else
6013        # Check if the provided tool contains a complete path.
6014        tool_specified="$CP"
6015        tool_basename="${tool_specified##*/}"
6016        if test "x$tool_basename" = "x$tool_specified"; then
6017          # A command without a complete path is provided, search $PATH.
6018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6019$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6020          # Extract the first word of "$tool_basename", so it can be a program name with args.
6021set dummy $tool_basename; ac_word=$2
6022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6023$as_echo_n "checking for $ac_word... " >&6; }
6024if ${ac_cv_path_CP+:} false; then :
6025  $as_echo_n "(cached) " >&6
6026else
6027  case $CP in
6028  [\\/]* | ?:[\\/]*)
6029  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6030  ;;
6031  *)
6032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6033for as_dir in $PATH
6034do
6035  IFS=$as_save_IFS
6036  test -z "$as_dir" && as_dir=.
6037    for ac_exec_ext in '' $ac_executable_extensions; do
6038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6039    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6041    break 2
6042  fi
6043done
6044  done
6045IFS=$as_save_IFS
6046
6047  ;;
6048esac
6049fi
6050CP=$ac_cv_path_CP
6051if test -n "$CP"; then
6052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6053$as_echo "$CP" >&6; }
6054else
6055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6056$as_echo "no" >&6; }
6057fi
6058
6059
6060          if test "x$CP" = x; then
6061            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6062          fi
6063        else
6064          # Otherwise we believe it is a complete path. Use it as it is.
6065          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6066$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6067          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6068$as_echo_n "checking for CP... " >&6; }
6069          if test ! -x "$tool_specified"; then
6070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6071$as_echo "not found" >&6; }
6072            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6073          fi
6074          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6075$as_echo "$tool_specified" >&6; }
6076        fi
6077      fi
6078    fi
6079
6080  fi
6081
6082
6083
6084  if test "x$CP" = x; then
6085    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6086  fi
6087
6088
6089
6090
6091
6092  # Publish this variable in the help.
6093
6094
6095  if [ -z "${CUT+x}" ]; then
6096    # The variable is not set by user, try to locate tool using the code snippet
6097    for ac_prog in cut
6098do
6099  # Extract the first word of "$ac_prog", so it can be a program name with args.
6100set dummy $ac_prog; ac_word=$2
6101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6102$as_echo_n "checking for $ac_word... " >&6; }
6103if ${ac_cv_path_CUT+:} false; then :
6104  $as_echo_n "(cached) " >&6
6105else
6106  case $CUT in
6107  [\\/]* | ?:[\\/]*)
6108  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6109  ;;
6110  *)
6111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114  IFS=$as_save_IFS
6115  test -z "$as_dir" && as_dir=.
6116    for ac_exec_ext in '' $ac_executable_extensions; do
6117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6118    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120    break 2
6121  fi
6122done
6123  done
6124IFS=$as_save_IFS
6125
6126  ;;
6127esac
6128fi
6129CUT=$ac_cv_path_CUT
6130if test -n "$CUT"; then
6131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6132$as_echo "$CUT" >&6; }
6133else
6134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6135$as_echo "no" >&6; }
6136fi
6137
6138
6139  test -n "$CUT" && break
6140done
6141
6142  else
6143    # The variable is set, but is it from the command line or the environment?
6144
6145    # Try to remove the string !CUT! from our list.
6146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6148      # If it failed, the variable was not from the command line. Ignore it,
6149      # but warn the user (except for BASH, which is always set by the calling BASH).
6150      if test "xCUT" != xBASH; then
6151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6152$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6153      fi
6154      # Try to locate tool using the code snippet
6155      for ac_prog in cut
6156do
6157  # Extract the first word of "$ac_prog", so it can be a program name with args.
6158set dummy $ac_prog; ac_word=$2
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6160$as_echo_n "checking for $ac_word... " >&6; }
6161if ${ac_cv_path_CUT+:} false; then :
6162  $as_echo_n "(cached) " >&6
6163else
6164  case $CUT in
6165  [\\/]* | ?:[\\/]*)
6166  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6167  ;;
6168  *)
6169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170for as_dir in $PATH
6171do
6172  IFS=$as_save_IFS
6173  test -z "$as_dir" && as_dir=.
6174    for ac_exec_ext in '' $ac_executable_extensions; do
6175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6176    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6178    break 2
6179  fi
6180done
6181  done
6182IFS=$as_save_IFS
6183
6184  ;;
6185esac
6186fi
6187CUT=$ac_cv_path_CUT
6188if test -n "$CUT"; then
6189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6190$as_echo "$CUT" >&6; }
6191else
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
6194fi
6195
6196
6197  test -n "$CUT" && break
6198done
6199
6200    else
6201      # If it succeeded, then it was overridden by the user. We will use it
6202      # for the tool.
6203
6204      # First remove it from the list of overridden variables, so we can test
6205      # for unknown variables in the end.
6206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6207
6208      # Check if we try to supply an empty value
6209      if test "x$CUT" = x; then
6210        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6211$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6213$as_echo_n "checking for CUT... " >&6; }
6214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6215$as_echo "disabled" >&6; }
6216      else
6217        # Check if the provided tool contains a complete path.
6218        tool_specified="$CUT"
6219        tool_basename="${tool_specified##*/}"
6220        if test "x$tool_basename" = "x$tool_specified"; then
6221          # A command without a complete path is provided, search $PATH.
6222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6223$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6224          # Extract the first word of "$tool_basename", so it can be a program name with args.
6225set dummy $tool_basename; ac_word=$2
6226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6227$as_echo_n "checking for $ac_word... " >&6; }
6228if ${ac_cv_path_CUT+:} false; then :
6229  $as_echo_n "(cached) " >&6
6230else
6231  case $CUT in
6232  [\\/]* | ?:[\\/]*)
6233  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6234  ;;
6235  *)
6236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237for as_dir in $PATH
6238do
6239  IFS=$as_save_IFS
6240  test -z "$as_dir" && as_dir=.
6241    for ac_exec_ext in '' $ac_executable_extensions; do
6242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6243    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6245    break 2
6246  fi
6247done
6248  done
6249IFS=$as_save_IFS
6250
6251  ;;
6252esac
6253fi
6254CUT=$ac_cv_path_CUT
6255if test -n "$CUT"; then
6256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6257$as_echo "$CUT" >&6; }
6258else
6259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6260$as_echo "no" >&6; }
6261fi
6262
6263
6264          if test "x$CUT" = x; then
6265            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6266          fi
6267        else
6268          # Otherwise we believe it is a complete path. Use it as it is.
6269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6270$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6271          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6272$as_echo_n "checking for CUT... " >&6; }
6273          if test ! -x "$tool_specified"; then
6274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6275$as_echo "not found" >&6; }
6276            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6277          fi
6278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6279$as_echo "$tool_specified" >&6; }
6280        fi
6281      fi
6282    fi
6283
6284  fi
6285
6286
6287
6288  if test "x$CUT" = x; then
6289    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6290  fi
6291
6292
6293
6294
6295
6296  # Publish this variable in the help.
6297
6298
6299  if [ -z "${DATE+x}" ]; then
6300    # The variable is not set by user, try to locate tool using the code snippet
6301    for ac_prog in date
6302do
6303  # Extract the first word of "$ac_prog", so it can be a program name with args.
6304set dummy $ac_prog; ac_word=$2
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6306$as_echo_n "checking for $ac_word... " >&6; }
6307if ${ac_cv_path_DATE+:} false; then :
6308  $as_echo_n "(cached) " >&6
6309else
6310  case $DATE in
6311  [\\/]* | ?:[\\/]*)
6312  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6313  ;;
6314  *)
6315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6316for as_dir in $PATH
6317do
6318  IFS=$as_save_IFS
6319  test -z "$as_dir" && as_dir=.
6320    for ac_exec_ext in '' $ac_executable_extensions; do
6321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6322    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6324    break 2
6325  fi
6326done
6327  done
6328IFS=$as_save_IFS
6329
6330  ;;
6331esac
6332fi
6333DATE=$ac_cv_path_DATE
6334if test -n "$DATE"; then
6335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6336$as_echo "$DATE" >&6; }
6337else
6338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6339$as_echo "no" >&6; }
6340fi
6341
6342
6343  test -n "$DATE" && break
6344done
6345
6346  else
6347    # The variable is set, but is it from the command line or the environment?
6348
6349    # Try to remove the string !DATE! from our list.
6350    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6351    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6352      # If it failed, the variable was not from the command line. Ignore it,
6353      # but warn the user (except for BASH, which is always set by the calling BASH).
6354      if test "xDATE" != xBASH; then
6355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6356$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6357      fi
6358      # Try to locate tool using the code snippet
6359      for ac_prog in date
6360do
6361  # Extract the first word of "$ac_prog", so it can be a program name with args.
6362set dummy $ac_prog; ac_word=$2
6363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6364$as_echo_n "checking for $ac_word... " >&6; }
6365if ${ac_cv_path_DATE+:} false; then :
6366  $as_echo_n "(cached) " >&6
6367else
6368  case $DATE in
6369  [\\/]* | ?:[\\/]*)
6370  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6371  ;;
6372  *)
6373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6374for as_dir in $PATH
6375do
6376  IFS=$as_save_IFS
6377  test -z "$as_dir" && as_dir=.
6378    for ac_exec_ext in '' $ac_executable_extensions; do
6379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6380    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6382    break 2
6383  fi
6384done
6385  done
6386IFS=$as_save_IFS
6387
6388  ;;
6389esac
6390fi
6391DATE=$ac_cv_path_DATE
6392if test -n "$DATE"; then
6393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6394$as_echo "$DATE" >&6; }
6395else
6396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6397$as_echo "no" >&6; }
6398fi
6399
6400
6401  test -n "$DATE" && break
6402done
6403
6404    else
6405      # If it succeeded, then it was overridden by the user. We will use it
6406      # for the tool.
6407
6408      # First remove it from the list of overridden variables, so we can test
6409      # for unknown variables in the end.
6410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6411
6412      # Check if we try to supply an empty value
6413      if test "x$DATE" = x; then
6414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6415$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6417$as_echo_n "checking for DATE... " >&6; }
6418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6419$as_echo "disabled" >&6; }
6420      else
6421        # Check if the provided tool contains a complete path.
6422        tool_specified="$DATE"
6423        tool_basename="${tool_specified##*/}"
6424        if test "x$tool_basename" = "x$tool_specified"; then
6425          # A command without a complete path is provided, search $PATH.
6426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6427$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6428          # Extract the first word of "$tool_basename", so it can be a program name with args.
6429set dummy $tool_basename; ac_word=$2
6430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6431$as_echo_n "checking for $ac_word... " >&6; }
6432if ${ac_cv_path_DATE+:} false; then :
6433  $as_echo_n "(cached) " >&6
6434else
6435  case $DATE in
6436  [\\/]* | ?:[\\/]*)
6437  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6438  ;;
6439  *)
6440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6441for as_dir in $PATH
6442do
6443  IFS=$as_save_IFS
6444  test -z "$as_dir" && as_dir=.
6445    for ac_exec_ext in '' $ac_executable_extensions; do
6446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6447    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6449    break 2
6450  fi
6451done
6452  done
6453IFS=$as_save_IFS
6454
6455  ;;
6456esac
6457fi
6458DATE=$ac_cv_path_DATE
6459if test -n "$DATE"; then
6460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6461$as_echo "$DATE" >&6; }
6462else
6463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
6465fi
6466
6467
6468          if test "x$DATE" = x; then
6469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6470          fi
6471        else
6472          # Otherwise we believe it is a complete path. Use it as it is.
6473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6474$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6476$as_echo_n "checking for DATE... " >&6; }
6477          if test ! -x "$tool_specified"; then
6478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6479$as_echo "not found" >&6; }
6480            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6481          fi
6482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6483$as_echo "$tool_specified" >&6; }
6484        fi
6485      fi
6486    fi
6487
6488  fi
6489
6490
6491
6492  if test "x$DATE" = x; then
6493    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6494  fi
6495
6496
6497
6498
6499
6500  # Publish this variable in the help.
6501
6502
6503  if [ -z "${DIFF+x}" ]; then
6504    # The variable is not set by user, try to locate tool using the code snippet
6505    for ac_prog in gdiff diff
6506do
6507  # Extract the first word of "$ac_prog", so it can be a program name with args.
6508set dummy $ac_prog; ac_word=$2
6509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6510$as_echo_n "checking for $ac_word... " >&6; }
6511if ${ac_cv_path_DIFF+:} false; then :
6512  $as_echo_n "(cached) " >&6
6513else
6514  case $DIFF in
6515  [\\/]* | ?:[\\/]*)
6516  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6517  ;;
6518  *)
6519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6520for as_dir in $PATH
6521do
6522  IFS=$as_save_IFS
6523  test -z "$as_dir" && as_dir=.
6524    for ac_exec_ext in '' $ac_executable_extensions; do
6525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6526    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6528    break 2
6529  fi
6530done
6531  done
6532IFS=$as_save_IFS
6533
6534  ;;
6535esac
6536fi
6537DIFF=$ac_cv_path_DIFF
6538if test -n "$DIFF"; then
6539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6540$as_echo "$DIFF" >&6; }
6541else
6542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6543$as_echo "no" >&6; }
6544fi
6545
6546
6547  test -n "$DIFF" && break
6548done
6549
6550  else
6551    # The variable is set, but is it from the command line or the environment?
6552
6553    # Try to remove the string !DIFF! from our list.
6554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6556      # If it failed, the variable was not from the command line. Ignore it,
6557      # but warn the user (except for BASH, which is always set by the calling BASH).
6558      if test "xDIFF" != xBASH; then
6559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6560$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6561      fi
6562      # Try to locate tool using the code snippet
6563      for ac_prog in gdiff diff
6564do
6565  # Extract the first word of "$ac_prog", so it can be a program name with args.
6566set dummy $ac_prog; ac_word=$2
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6568$as_echo_n "checking for $ac_word... " >&6; }
6569if ${ac_cv_path_DIFF+:} false; then :
6570  $as_echo_n "(cached) " >&6
6571else
6572  case $DIFF in
6573  [\\/]* | ?:[\\/]*)
6574  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6575  ;;
6576  *)
6577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6578for as_dir in $PATH
6579do
6580  IFS=$as_save_IFS
6581  test -z "$as_dir" && as_dir=.
6582    for ac_exec_ext in '' $ac_executable_extensions; do
6583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6584    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6586    break 2
6587  fi
6588done
6589  done
6590IFS=$as_save_IFS
6591
6592  ;;
6593esac
6594fi
6595DIFF=$ac_cv_path_DIFF
6596if test -n "$DIFF"; then
6597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6598$as_echo "$DIFF" >&6; }
6599else
6600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6601$as_echo "no" >&6; }
6602fi
6603
6604
6605  test -n "$DIFF" && break
6606done
6607
6608    else
6609      # If it succeeded, then it was overridden by the user. We will use it
6610      # for the tool.
6611
6612      # First remove it from the list of overridden variables, so we can test
6613      # for unknown variables in the end.
6614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6615
6616      # Check if we try to supply an empty value
6617      if test "x$DIFF" = x; then
6618        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6619$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6621$as_echo_n "checking for DIFF... " >&6; }
6622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6623$as_echo "disabled" >&6; }
6624      else
6625        # Check if the provided tool contains a complete path.
6626        tool_specified="$DIFF"
6627        tool_basename="${tool_specified##*/}"
6628        if test "x$tool_basename" = "x$tool_specified"; then
6629          # A command without a complete path is provided, search $PATH.
6630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6631$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6632          # Extract the first word of "$tool_basename", so it can be a program name with args.
6633set dummy $tool_basename; ac_word=$2
6634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6635$as_echo_n "checking for $ac_word... " >&6; }
6636if ${ac_cv_path_DIFF+:} false; then :
6637  $as_echo_n "(cached) " >&6
6638else
6639  case $DIFF in
6640  [\\/]* | ?:[\\/]*)
6641  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6642  ;;
6643  *)
6644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6645for as_dir in $PATH
6646do
6647  IFS=$as_save_IFS
6648  test -z "$as_dir" && as_dir=.
6649    for ac_exec_ext in '' $ac_executable_extensions; do
6650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6651    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6653    break 2
6654  fi
6655done
6656  done
6657IFS=$as_save_IFS
6658
6659  ;;
6660esac
6661fi
6662DIFF=$ac_cv_path_DIFF
6663if test -n "$DIFF"; then
6664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6665$as_echo "$DIFF" >&6; }
6666else
6667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6668$as_echo "no" >&6; }
6669fi
6670
6671
6672          if test "x$DIFF" = x; then
6673            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6674          fi
6675        else
6676          # Otherwise we believe it is a complete path. Use it as it is.
6677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6678$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6679          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6680$as_echo_n "checking for DIFF... " >&6; }
6681          if test ! -x "$tool_specified"; then
6682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6683$as_echo "not found" >&6; }
6684            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6685          fi
6686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6687$as_echo "$tool_specified" >&6; }
6688        fi
6689      fi
6690    fi
6691
6692  fi
6693
6694
6695
6696  if test "x$DIFF" = x; then
6697    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6698  fi
6699
6700
6701
6702
6703
6704  # Publish this variable in the help.
6705
6706
6707  if [ -z "${DIRNAME+x}" ]; then
6708    # The variable is not set by user, try to locate tool using the code snippet
6709    for ac_prog in dirname
6710do
6711  # Extract the first word of "$ac_prog", so it can be a program name with args.
6712set dummy $ac_prog; ac_word=$2
6713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6714$as_echo_n "checking for $ac_word... " >&6; }
6715if ${ac_cv_path_DIRNAME+:} false; then :
6716  $as_echo_n "(cached) " >&6
6717else
6718  case $DIRNAME in
6719  [\\/]* | ?:[\\/]*)
6720  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6721  ;;
6722  *)
6723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6724for as_dir in $PATH
6725do
6726  IFS=$as_save_IFS
6727  test -z "$as_dir" && as_dir=.
6728    for ac_exec_ext in '' $ac_executable_extensions; do
6729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6730    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6732    break 2
6733  fi
6734done
6735  done
6736IFS=$as_save_IFS
6737
6738  ;;
6739esac
6740fi
6741DIRNAME=$ac_cv_path_DIRNAME
6742if test -n "$DIRNAME"; then
6743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6744$as_echo "$DIRNAME" >&6; }
6745else
6746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6747$as_echo "no" >&6; }
6748fi
6749
6750
6751  test -n "$DIRNAME" && break
6752done
6753
6754  else
6755    # The variable is set, but is it from the command line or the environment?
6756
6757    # Try to remove the string !DIRNAME! from our list.
6758    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6759    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6760      # If it failed, the variable was not from the command line. Ignore it,
6761      # but warn the user (except for BASH, which is always set by the calling BASH).
6762      if test "xDIRNAME" != xBASH; then
6763        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6764$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6765      fi
6766      # Try to locate tool using the code snippet
6767      for ac_prog in dirname
6768do
6769  # Extract the first word of "$ac_prog", so it can be a program name with args.
6770set dummy $ac_prog; ac_word=$2
6771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6772$as_echo_n "checking for $ac_word... " >&6; }
6773if ${ac_cv_path_DIRNAME+:} false; then :
6774  $as_echo_n "(cached) " >&6
6775else
6776  case $DIRNAME in
6777  [\\/]* | ?:[\\/]*)
6778  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6779  ;;
6780  *)
6781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6782for as_dir in $PATH
6783do
6784  IFS=$as_save_IFS
6785  test -z "$as_dir" && as_dir=.
6786    for ac_exec_ext in '' $ac_executable_extensions; do
6787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6788    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6790    break 2
6791  fi
6792done
6793  done
6794IFS=$as_save_IFS
6795
6796  ;;
6797esac
6798fi
6799DIRNAME=$ac_cv_path_DIRNAME
6800if test -n "$DIRNAME"; then
6801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6802$as_echo "$DIRNAME" >&6; }
6803else
6804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6805$as_echo "no" >&6; }
6806fi
6807
6808
6809  test -n "$DIRNAME" && break
6810done
6811
6812    else
6813      # If it succeeded, then it was overridden by the user. We will use it
6814      # for the tool.
6815
6816      # First remove it from the list of overridden variables, so we can test
6817      # for unknown variables in the end.
6818      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6819
6820      # Check if we try to supply an empty value
6821      if test "x$DIRNAME" = x; then
6822        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6823$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6824        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6825$as_echo_n "checking for DIRNAME... " >&6; }
6826        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6827$as_echo "disabled" >&6; }
6828      else
6829        # Check if the provided tool contains a complete path.
6830        tool_specified="$DIRNAME"
6831        tool_basename="${tool_specified##*/}"
6832        if test "x$tool_basename" = "x$tool_specified"; then
6833          # A command without a complete path is provided, search $PATH.
6834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6835$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6836          # Extract the first word of "$tool_basename", so it can be a program name with args.
6837set dummy $tool_basename; ac_word=$2
6838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6839$as_echo_n "checking for $ac_word... " >&6; }
6840if ${ac_cv_path_DIRNAME+:} false; then :
6841  $as_echo_n "(cached) " >&6
6842else
6843  case $DIRNAME in
6844  [\\/]* | ?:[\\/]*)
6845  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6846  ;;
6847  *)
6848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6849for as_dir in $PATH
6850do
6851  IFS=$as_save_IFS
6852  test -z "$as_dir" && as_dir=.
6853    for ac_exec_ext in '' $ac_executable_extensions; do
6854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6855    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6857    break 2
6858  fi
6859done
6860  done
6861IFS=$as_save_IFS
6862
6863  ;;
6864esac
6865fi
6866DIRNAME=$ac_cv_path_DIRNAME
6867if test -n "$DIRNAME"; then
6868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6869$as_echo "$DIRNAME" >&6; }
6870else
6871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6872$as_echo "no" >&6; }
6873fi
6874
6875
6876          if test "x$DIRNAME" = x; then
6877            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6878          fi
6879        else
6880          # Otherwise we believe it is a complete path. Use it as it is.
6881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6882$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6883          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6884$as_echo_n "checking for DIRNAME... " >&6; }
6885          if test ! -x "$tool_specified"; then
6886            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6887$as_echo "not found" >&6; }
6888            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6889          fi
6890          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6891$as_echo "$tool_specified" >&6; }
6892        fi
6893      fi
6894    fi
6895
6896  fi
6897
6898
6899
6900  if test "x$DIRNAME" = x; then
6901    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6902  fi
6903
6904
6905
6906
6907
6908  # Publish this variable in the help.
6909
6910
6911  if [ -z "${ECHO+x}" ]; then
6912    # The variable is not set by user, try to locate tool using the code snippet
6913    for ac_prog in echo
6914do
6915  # Extract the first word of "$ac_prog", so it can be a program name with args.
6916set dummy $ac_prog; ac_word=$2
6917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6918$as_echo_n "checking for $ac_word... " >&6; }
6919if ${ac_cv_path_ECHO+:} false; then :
6920  $as_echo_n "(cached) " >&6
6921else
6922  case $ECHO in
6923  [\\/]* | ?:[\\/]*)
6924  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6925  ;;
6926  *)
6927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6928for as_dir in $PATH
6929do
6930  IFS=$as_save_IFS
6931  test -z "$as_dir" && as_dir=.
6932    for ac_exec_ext in '' $ac_executable_extensions; do
6933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6934    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6936    break 2
6937  fi
6938done
6939  done
6940IFS=$as_save_IFS
6941
6942  ;;
6943esac
6944fi
6945ECHO=$ac_cv_path_ECHO
6946if test -n "$ECHO"; then
6947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6948$as_echo "$ECHO" >&6; }
6949else
6950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6951$as_echo "no" >&6; }
6952fi
6953
6954
6955  test -n "$ECHO" && break
6956done
6957
6958  else
6959    # The variable is set, but is it from the command line or the environment?
6960
6961    # Try to remove the string !ECHO! from our list.
6962    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6963    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6964      # If it failed, the variable was not from the command line. Ignore it,
6965      # but warn the user (except for BASH, which is always set by the calling BASH).
6966      if test "xECHO" != xBASH; then
6967        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6968$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6969      fi
6970      # Try to locate tool using the code snippet
6971      for ac_prog in echo
6972do
6973  # Extract the first word of "$ac_prog", so it can be a program name with args.
6974set dummy $ac_prog; ac_word=$2
6975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6976$as_echo_n "checking for $ac_word... " >&6; }
6977if ${ac_cv_path_ECHO+:} false; then :
6978  $as_echo_n "(cached) " >&6
6979else
6980  case $ECHO in
6981  [\\/]* | ?:[\\/]*)
6982  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6983  ;;
6984  *)
6985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6986for as_dir in $PATH
6987do
6988  IFS=$as_save_IFS
6989  test -z "$as_dir" && as_dir=.
6990    for ac_exec_ext in '' $ac_executable_extensions; do
6991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6992    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6994    break 2
6995  fi
6996done
6997  done
6998IFS=$as_save_IFS
6999
7000  ;;
7001esac
7002fi
7003ECHO=$ac_cv_path_ECHO
7004if test -n "$ECHO"; then
7005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7006$as_echo "$ECHO" >&6; }
7007else
7008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7009$as_echo "no" >&6; }
7010fi
7011
7012
7013  test -n "$ECHO" && break
7014done
7015
7016    else
7017      # If it succeeded, then it was overridden by the user. We will use it
7018      # for the tool.
7019
7020      # First remove it from the list of overridden variables, so we can test
7021      # for unknown variables in the end.
7022      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7023
7024      # Check if we try to supply an empty value
7025      if test "x$ECHO" = x; then
7026        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7027$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7029$as_echo_n "checking for ECHO... " >&6; }
7030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7031$as_echo "disabled" >&6; }
7032      else
7033        # Check if the provided tool contains a complete path.
7034        tool_specified="$ECHO"
7035        tool_basename="${tool_specified##*/}"
7036        if test "x$tool_basename" = "x$tool_specified"; then
7037          # A command without a complete path is provided, search $PATH.
7038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7039$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7040          # Extract the first word of "$tool_basename", so it can be a program name with args.
7041set dummy $tool_basename; ac_word=$2
7042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7043$as_echo_n "checking for $ac_word... " >&6; }
7044if ${ac_cv_path_ECHO+:} false; then :
7045  $as_echo_n "(cached) " >&6
7046else
7047  case $ECHO in
7048  [\\/]* | ?:[\\/]*)
7049  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7050  ;;
7051  *)
7052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7053for as_dir in $PATH
7054do
7055  IFS=$as_save_IFS
7056  test -z "$as_dir" && as_dir=.
7057    for ac_exec_ext in '' $ac_executable_extensions; do
7058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7059    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7061    break 2
7062  fi
7063done
7064  done
7065IFS=$as_save_IFS
7066
7067  ;;
7068esac
7069fi
7070ECHO=$ac_cv_path_ECHO
7071if test -n "$ECHO"; then
7072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7073$as_echo "$ECHO" >&6; }
7074else
7075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7076$as_echo "no" >&6; }
7077fi
7078
7079
7080          if test "x$ECHO" = x; then
7081            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7082          fi
7083        else
7084          # Otherwise we believe it is a complete path. Use it as it is.
7085          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7086$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7087          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7088$as_echo_n "checking for ECHO... " >&6; }
7089          if test ! -x "$tool_specified"; then
7090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7091$as_echo "not found" >&6; }
7092            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7093          fi
7094          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7095$as_echo "$tool_specified" >&6; }
7096        fi
7097      fi
7098    fi
7099
7100  fi
7101
7102
7103
7104  if test "x$ECHO" = x; then
7105    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7106  fi
7107
7108
7109
7110
7111
7112  # Publish this variable in the help.
7113
7114
7115  if [ -z "${EXPR+x}" ]; then
7116    # The variable is not set by user, try to locate tool using the code snippet
7117    for ac_prog in expr
7118do
7119  # Extract the first word of "$ac_prog", so it can be a program name with args.
7120set dummy $ac_prog; ac_word=$2
7121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7122$as_echo_n "checking for $ac_word... " >&6; }
7123if ${ac_cv_path_EXPR+:} false; then :
7124  $as_echo_n "(cached) " >&6
7125else
7126  case $EXPR in
7127  [\\/]* | ?:[\\/]*)
7128  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7129  ;;
7130  *)
7131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7132for as_dir in $PATH
7133do
7134  IFS=$as_save_IFS
7135  test -z "$as_dir" && as_dir=.
7136    for ac_exec_ext in '' $ac_executable_extensions; do
7137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7138    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7140    break 2
7141  fi
7142done
7143  done
7144IFS=$as_save_IFS
7145
7146  ;;
7147esac
7148fi
7149EXPR=$ac_cv_path_EXPR
7150if test -n "$EXPR"; then
7151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7152$as_echo "$EXPR" >&6; }
7153else
7154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7155$as_echo "no" >&6; }
7156fi
7157
7158
7159  test -n "$EXPR" && break
7160done
7161
7162  else
7163    # The variable is set, but is it from the command line or the environment?
7164
7165    # Try to remove the string !EXPR! from our list.
7166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7168      # If it failed, the variable was not from the command line. Ignore it,
7169      # but warn the user (except for BASH, which is always set by the calling BASH).
7170      if test "xEXPR" != xBASH; then
7171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7172$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7173      fi
7174      # Try to locate tool using the code snippet
7175      for ac_prog in expr
7176do
7177  # Extract the first word of "$ac_prog", so it can be a program name with args.
7178set dummy $ac_prog; ac_word=$2
7179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7180$as_echo_n "checking for $ac_word... " >&6; }
7181if ${ac_cv_path_EXPR+:} false; then :
7182  $as_echo_n "(cached) " >&6
7183else
7184  case $EXPR in
7185  [\\/]* | ?:[\\/]*)
7186  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7187  ;;
7188  *)
7189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7190for as_dir in $PATH
7191do
7192  IFS=$as_save_IFS
7193  test -z "$as_dir" && as_dir=.
7194    for ac_exec_ext in '' $ac_executable_extensions; do
7195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7196    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7198    break 2
7199  fi
7200done
7201  done
7202IFS=$as_save_IFS
7203
7204  ;;
7205esac
7206fi
7207EXPR=$ac_cv_path_EXPR
7208if test -n "$EXPR"; then
7209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7210$as_echo "$EXPR" >&6; }
7211else
7212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7213$as_echo "no" >&6; }
7214fi
7215
7216
7217  test -n "$EXPR" && break
7218done
7219
7220    else
7221      # If it succeeded, then it was overridden by the user. We will use it
7222      # for the tool.
7223
7224      # First remove it from the list of overridden variables, so we can test
7225      # for unknown variables in the end.
7226      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7227
7228      # Check if we try to supply an empty value
7229      if test "x$EXPR" = x; then
7230        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7231$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7232        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7233$as_echo_n "checking for EXPR... " >&6; }
7234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7235$as_echo "disabled" >&6; }
7236      else
7237        # Check if the provided tool contains a complete path.
7238        tool_specified="$EXPR"
7239        tool_basename="${tool_specified##*/}"
7240        if test "x$tool_basename" = "x$tool_specified"; then
7241          # A command without a complete path is provided, search $PATH.
7242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7243$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7244          # Extract the first word of "$tool_basename", so it can be a program name with args.
7245set dummy $tool_basename; ac_word=$2
7246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7247$as_echo_n "checking for $ac_word... " >&6; }
7248if ${ac_cv_path_EXPR+:} false; then :
7249  $as_echo_n "(cached) " >&6
7250else
7251  case $EXPR in
7252  [\\/]* | ?:[\\/]*)
7253  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7254  ;;
7255  *)
7256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7257for as_dir in $PATH
7258do
7259  IFS=$as_save_IFS
7260  test -z "$as_dir" && as_dir=.
7261    for ac_exec_ext in '' $ac_executable_extensions; do
7262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7263    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7265    break 2
7266  fi
7267done
7268  done
7269IFS=$as_save_IFS
7270
7271  ;;
7272esac
7273fi
7274EXPR=$ac_cv_path_EXPR
7275if test -n "$EXPR"; then
7276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7277$as_echo "$EXPR" >&6; }
7278else
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7280$as_echo "no" >&6; }
7281fi
7282
7283
7284          if test "x$EXPR" = x; then
7285            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7286          fi
7287        else
7288          # Otherwise we believe it is a complete path. Use it as it is.
7289          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7290$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7291          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7292$as_echo_n "checking for EXPR... " >&6; }
7293          if test ! -x "$tool_specified"; then
7294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7295$as_echo "not found" >&6; }
7296            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7297          fi
7298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7299$as_echo "$tool_specified" >&6; }
7300        fi
7301      fi
7302    fi
7303
7304  fi
7305
7306
7307
7308  if test "x$EXPR" = x; then
7309    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7310  fi
7311
7312
7313
7314
7315
7316  # Publish this variable in the help.
7317
7318
7319  if [ -z "${FILE+x}" ]; then
7320    # The variable is not set by user, try to locate tool using the code snippet
7321    for ac_prog in file
7322do
7323  # Extract the first word of "$ac_prog", so it can be a program name with args.
7324set dummy $ac_prog; ac_word=$2
7325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7326$as_echo_n "checking for $ac_word... " >&6; }
7327if ${ac_cv_path_FILE+:} false; then :
7328  $as_echo_n "(cached) " >&6
7329else
7330  case $FILE in
7331  [\\/]* | ?:[\\/]*)
7332  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7333  ;;
7334  *)
7335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7336for as_dir in $PATH
7337do
7338  IFS=$as_save_IFS
7339  test -z "$as_dir" && as_dir=.
7340    for ac_exec_ext in '' $ac_executable_extensions; do
7341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7342    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7344    break 2
7345  fi
7346done
7347  done
7348IFS=$as_save_IFS
7349
7350  ;;
7351esac
7352fi
7353FILE=$ac_cv_path_FILE
7354if test -n "$FILE"; then
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7356$as_echo "$FILE" >&6; }
7357else
7358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7359$as_echo "no" >&6; }
7360fi
7361
7362
7363  test -n "$FILE" && break
7364done
7365
7366  else
7367    # The variable is set, but is it from the command line or the environment?
7368
7369    # Try to remove the string !FILE! from our list.
7370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7372      # If it failed, the variable was not from the command line. Ignore it,
7373      # but warn the user (except for BASH, which is always set by the calling BASH).
7374      if test "xFILE" != xBASH; then
7375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7376$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7377      fi
7378      # Try to locate tool using the code snippet
7379      for ac_prog in file
7380do
7381  # Extract the first word of "$ac_prog", so it can be a program name with args.
7382set dummy $ac_prog; ac_word=$2
7383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7384$as_echo_n "checking for $ac_word... " >&6; }
7385if ${ac_cv_path_FILE+:} false; then :
7386  $as_echo_n "(cached) " >&6
7387else
7388  case $FILE in
7389  [\\/]* | ?:[\\/]*)
7390  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7391  ;;
7392  *)
7393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7394for as_dir in $PATH
7395do
7396  IFS=$as_save_IFS
7397  test -z "$as_dir" && as_dir=.
7398    for ac_exec_ext in '' $ac_executable_extensions; do
7399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7400    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7402    break 2
7403  fi
7404done
7405  done
7406IFS=$as_save_IFS
7407
7408  ;;
7409esac
7410fi
7411FILE=$ac_cv_path_FILE
7412if test -n "$FILE"; then
7413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7414$as_echo "$FILE" >&6; }
7415else
7416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417$as_echo "no" >&6; }
7418fi
7419
7420
7421  test -n "$FILE" && break
7422done
7423
7424    else
7425      # If it succeeded, then it was overridden by the user. We will use it
7426      # for the tool.
7427
7428      # First remove it from the list of overridden variables, so we can test
7429      # for unknown variables in the end.
7430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7431
7432      # Check if we try to supply an empty value
7433      if test "x$FILE" = x; then
7434        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7435$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7436        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7437$as_echo_n "checking for FILE... " >&6; }
7438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7439$as_echo "disabled" >&6; }
7440      else
7441        # Check if the provided tool contains a complete path.
7442        tool_specified="$FILE"
7443        tool_basename="${tool_specified##*/}"
7444        if test "x$tool_basename" = "x$tool_specified"; then
7445          # A command without a complete path is provided, search $PATH.
7446          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7447$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7448          # Extract the first word of "$tool_basename", so it can be a program name with args.
7449set dummy $tool_basename; ac_word=$2
7450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7451$as_echo_n "checking for $ac_word... " >&6; }
7452if ${ac_cv_path_FILE+:} false; then :
7453  $as_echo_n "(cached) " >&6
7454else
7455  case $FILE in
7456  [\\/]* | ?:[\\/]*)
7457  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7458  ;;
7459  *)
7460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7461for as_dir in $PATH
7462do
7463  IFS=$as_save_IFS
7464  test -z "$as_dir" && as_dir=.
7465    for ac_exec_ext in '' $ac_executable_extensions; do
7466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7467    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7469    break 2
7470  fi
7471done
7472  done
7473IFS=$as_save_IFS
7474
7475  ;;
7476esac
7477fi
7478FILE=$ac_cv_path_FILE
7479if test -n "$FILE"; then
7480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7481$as_echo "$FILE" >&6; }
7482else
7483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7484$as_echo "no" >&6; }
7485fi
7486
7487
7488          if test "x$FILE" = x; then
7489            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7490          fi
7491        else
7492          # Otherwise we believe it is a complete path. Use it as it is.
7493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7494$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7495          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7496$as_echo_n "checking for FILE... " >&6; }
7497          if test ! -x "$tool_specified"; then
7498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7499$as_echo "not found" >&6; }
7500            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7501          fi
7502          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7503$as_echo "$tool_specified" >&6; }
7504        fi
7505      fi
7506    fi
7507
7508  fi
7509
7510
7511
7512  if test "x$FILE" = x; then
7513    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7514  fi
7515
7516
7517
7518
7519
7520  # Publish this variable in the help.
7521
7522
7523  if [ -z "${FIND+x}" ]; then
7524    # The variable is not set by user, try to locate tool using the code snippet
7525    for ac_prog in find
7526do
7527  # Extract the first word of "$ac_prog", so it can be a program name with args.
7528set dummy $ac_prog; ac_word=$2
7529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7530$as_echo_n "checking for $ac_word... " >&6; }
7531if ${ac_cv_path_FIND+:} false; then :
7532  $as_echo_n "(cached) " >&6
7533else
7534  case $FIND in
7535  [\\/]* | ?:[\\/]*)
7536  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7537  ;;
7538  *)
7539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7540for as_dir in $PATH
7541do
7542  IFS=$as_save_IFS
7543  test -z "$as_dir" && as_dir=.
7544    for ac_exec_ext in '' $ac_executable_extensions; do
7545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7546    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7548    break 2
7549  fi
7550done
7551  done
7552IFS=$as_save_IFS
7553
7554  ;;
7555esac
7556fi
7557FIND=$ac_cv_path_FIND
7558if test -n "$FIND"; then
7559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7560$as_echo "$FIND" >&6; }
7561else
7562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7563$as_echo "no" >&6; }
7564fi
7565
7566
7567  test -n "$FIND" && break
7568done
7569
7570  else
7571    # The variable is set, but is it from the command line or the environment?
7572
7573    # Try to remove the string !FIND! from our list.
7574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7576      # If it failed, the variable was not from the command line. Ignore it,
7577      # but warn the user (except for BASH, which is always set by the calling BASH).
7578      if test "xFIND" != xBASH; then
7579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7580$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7581      fi
7582      # Try to locate tool using the code snippet
7583      for ac_prog in find
7584do
7585  # Extract the first word of "$ac_prog", so it can be a program name with args.
7586set dummy $ac_prog; ac_word=$2
7587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7588$as_echo_n "checking for $ac_word... " >&6; }
7589if ${ac_cv_path_FIND+:} false; then :
7590  $as_echo_n "(cached) " >&6
7591else
7592  case $FIND in
7593  [\\/]* | ?:[\\/]*)
7594  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7595  ;;
7596  *)
7597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7598for as_dir in $PATH
7599do
7600  IFS=$as_save_IFS
7601  test -z "$as_dir" && as_dir=.
7602    for ac_exec_ext in '' $ac_executable_extensions; do
7603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7604    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7606    break 2
7607  fi
7608done
7609  done
7610IFS=$as_save_IFS
7611
7612  ;;
7613esac
7614fi
7615FIND=$ac_cv_path_FIND
7616if test -n "$FIND"; then
7617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7618$as_echo "$FIND" >&6; }
7619else
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7621$as_echo "no" >&6; }
7622fi
7623
7624
7625  test -n "$FIND" && break
7626done
7627
7628    else
7629      # If it succeeded, then it was overridden by the user. We will use it
7630      # for the tool.
7631
7632      # First remove it from the list of overridden variables, so we can test
7633      # for unknown variables in the end.
7634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7635
7636      # Check if we try to supply an empty value
7637      if test "x$FIND" = x; then
7638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7639$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7641$as_echo_n "checking for FIND... " >&6; }
7642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7643$as_echo "disabled" >&6; }
7644      else
7645        # Check if the provided tool contains a complete path.
7646        tool_specified="$FIND"
7647        tool_basename="${tool_specified##*/}"
7648        if test "x$tool_basename" = "x$tool_specified"; then
7649          # A command without a complete path is provided, search $PATH.
7650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7651$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7652          # Extract the first word of "$tool_basename", so it can be a program name with args.
7653set dummy $tool_basename; ac_word=$2
7654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7655$as_echo_n "checking for $ac_word... " >&6; }
7656if ${ac_cv_path_FIND+:} false; then :
7657  $as_echo_n "(cached) " >&6
7658else
7659  case $FIND in
7660  [\\/]* | ?:[\\/]*)
7661  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7662  ;;
7663  *)
7664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7665for as_dir in $PATH
7666do
7667  IFS=$as_save_IFS
7668  test -z "$as_dir" && as_dir=.
7669    for ac_exec_ext in '' $ac_executable_extensions; do
7670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7671    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7673    break 2
7674  fi
7675done
7676  done
7677IFS=$as_save_IFS
7678
7679  ;;
7680esac
7681fi
7682FIND=$ac_cv_path_FIND
7683if test -n "$FIND"; then
7684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7685$as_echo "$FIND" >&6; }
7686else
7687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7688$as_echo "no" >&6; }
7689fi
7690
7691
7692          if test "x$FIND" = x; then
7693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7694          fi
7695        else
7696          # Otherwise we believe it is a complete path. Use it as it is.
7697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7698$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7700$as_echo_n "checking for FIND... " >&6; }
7701          if test ! -x "$tool_specified"; then
7702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7703$as_echo "not found" >&6; }
7704            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7705          fi
7706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7707$as_echo "$tool_specified" >&6; }
7708        fi
7709      fi
7710    fi
7711
7712  fi
7713
7714
7715
7716  if test "x$FIND" = x; then
7717    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7718  fi
7719
7720
7721
7722
7723
7724  # Publish this variable in the help.
7725
7726
7727  if [ -z "${HEAD+x}" ]; then
7728    # The variable is not set by user, try to locate tool using the code snippet
7729    for ac_prog in head
7730do
7731  # Extract the first word of "$ac_prog", so it can be a program name with args.
7732set dummy $ac_prog; ac_word=$2
7733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7734$as_echo_n "checking for $ac_word... " >&6; }
7735if ${ac_cv_path_HEAD+:} false; then :
7736  $as_echo_n "(cached) " >&6
7737else
7738  case $HEAD in
7739  [\\/]* | ?:[\\/]*)
7740  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7741  ;;
7742  *)
7743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7744for as_dir in $PATH
7745do
7746  IFS=$as_save_IFS
7747  test -z "$as_dir" && as_dir=.
7748    for ac_exec_ext in '' $ac_executable_extensions; do
7749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7750    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7752    break 2
7753  fi
7754done
7755  done
7756IFS=$as_save_IFS
7757
7758  ;;
7759esac
7760fi
7761HEAD=$ac_cv_path_HEAD
7762if test -n "$HEAD"; then
7763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7764$as_echo "$HEAD" >&6; }
7765else
7766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7767$as_echo "no" >&6; }
7768fi
7769
7770
7771  test -n "$HEAD" && break
7772done
7773
7774  else
7775    # The variable is set, but is it from the command line or the environment?
7776
7777    # Try to remove the string !HEAD! from our list.
7778    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7779    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7780      # If it failed, the variable was not from the command line. Ignore it,
7781      # but warn the user (except for BASH, which is always set by the calling BASH).
7782      if test "xHEAD" != xBASH; then
7783        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7784$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7785      fi
7786      # Try to locate tool using the code snippet
7787      for ac_prog in head
7788do
7789  # Extract the first word of "$ac_prog", so it can be a program name with args.
7790set dummy $ac_prog; ac_word=$2
7791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7792$as_echo_n "checking for $ac_word... " >&6; }
7793if ${ac_cv_path_HEAD+:} false; then :
7794  $as_echo_n "(cached) " >&6
7795else
7796  case $HEAD in
7797  [\\/]* | ?:[\\/]*)
7798  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7799  ;;
7800  *)
7801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7802for as_dir in $PATH
7803do
7804  IFS=$as_save_IFS
7805  test -z "$as_dir" && as_dir=.
7806    for ac_exec_ext in '' $ac_executable_extensions; do
7807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7808    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7810    break 2
7811  fi
7812done
7813  done
7814IFS=$as_save_IFS
7815
7816  ;;
7817esac
7818fi
7819HEAD=$ac_cv_path_HEAD
7820if test -n "$HEAD"; then
7821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7822$as_echo "$HEAD" >&6; }
7823else
7824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7825$as_echo "no" >&6; }
7826fi
7827
7828
7829  test -n "$HEAD" && break
7830done
7831
7832    else
7833      # If it succeeded, then it was overridden by the user. We will use it
7834      # for the tool.
7835
7836      # First remove it from the list of overridden variables, so we can test
7837      # for unknown variables in the end.
7838      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7839
7840      # Check if we try to supply an empty value
7841      if test "x$HEAD" = x; then
7842        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7843$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7844        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7845$as_echo_n "checking for HEAD... " >&6; }
7846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7847$as_echo "disabled" >&6; }
7848      else
7849        # Check if the provided tool contains a complete path.
7850        tool_specified="$HEAD"
7851        tool_basename="${tool_specified##*/}"
7852        if test "x$tool_basename" = "x$tool_specified"; then
7853          # A command without a complete path is provided, search $PATH.
7854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7855$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7856          # Extract the first word of "$tool_basename", so it can be a program name with args.
7857set dummy $tool_basename; ac_word=$2
7858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7859$as_echo_n "checking for $ac_word... " >&6; }
7860if ${ac_cv_path_HEAD+:} false; then :
7861  $as_echo_n "(cached) " >&6
7862else
7863  case $HEAD in
7864  [\\/]* | ?:[\\/]*)
7865  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7866  ;;
7867  *)
7868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7869for as_dir in $PATH
7870do
7871  IFS=$as_save_IFS
7872  test -z "$as_dir" && as_dir=.
7873    for ac_exec_ext in '' $ac_executable_extensions; do
7874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7875    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7877    break 2
7878  fi
7879done
7880  done
7881IFS=$as_save_IFS
7882
7883  ;;
7884esac
7885fi
7886HEAD=$ac_cv_path_HEAD
7887if test -n "$HEAD"; then
7888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7889$as_echo "$HEAD" >&6; }
7890else
7891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7892$as_echo "no" >&6; }
7893fi
7894
7895
7896          if test "x$HEAD" = x; then
7897            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7898          fi
7899        else
7900          # Otherwise we believe it is a complete path. Use it as it is.
7901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7902$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7903          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7904$as_echo_n "checking for HEAD... " >&6; }
7905          if test ! -x "$tool_specified"; then
7906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7907$as_echo "not found" >&6; }
7908            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7909          fi
7910          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7911$as_echo "$tool_specified" >&6; }
7912        fi
7913      fi
7914    fi
7915
7916  fi
7917
7918
7919
7920  if test "x$HEAD" = x; then
7921    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7922  fi
7923
7924
7925
7926
7927
7928  # Publish this variable in the help.
7929
7930
7931  if [ -z "${LN+x}" ]; then
7932    # The variable is not set by user, try to locate tool using the code snippet
7933    for ac_prog in ln
7934do
7935  # Extract the first word of "$ac_prog", so it can be a program name with args.
7936set dummy $ac_prog; ac_word=$2
7937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7938$as_echo_n "checking for $ac_word... " >&6; }
7939if ${ac_cv_path_LN+:} false; then :
7940  $as_echo_n "(cached) " >&6
7941else
7942  case $LN in
7943  [\\/]* | ?:[\\/]*)
7944  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7945  ;;
7946  *)
7947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7948for as_dir in $PATH
7949do
7950  IFS=$as_save_IFS
7951  test -z "$as_dir" && as_dir=.
7952    for ac_exec_ext in '' $ac_executable_extensions; do
7953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7954    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7956    break 2
7957  fi
7958done
7959  done
7960IFS=$as_save_IFS
7961
7962  ;;
7963esac
7964fi
7965LN=$ac_cv_path_LN
7966if test -n "$LN"; then
7967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7968$as_echo "$LN" >&6; }
7969else
7970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7971$as_echo "no" >&6; }
7972fi
7973
7974
7975  test -n "$LN" && break
7976done
7977
7978  else
7979    # The variable is set, but is it from the command line or the environment?
7980
7981    # Try to remove the string !LN! from our list.
7982    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7983    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7984      # If it failed, the variable was not from the command line. Ignore it,
7985      # but warn the user (except for BASH, which is always set by the calling BASH).
7986      if test "xLN" != xBASH; then
7987        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7988$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7989      fi
7990      # Try to locate tool using the code snippet
7991      for ac_prog in ln
7992do
7993  # Extract the first word of "$ac_prog", so it can be a program name with args.
7994set dummy $ac_prog; ac_word=$2
7995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7996$as_echo_n "checking for $ac_word... " >&6; }
7997if ${ac_cv_path_LN+:} false; then :
7998  $as_echo_n "(cached) " >&6
7999else
8000  case $LN in
8001  [\\/]* | ?:[\\/]*)
8002  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8003  ;;
8004  *)
8005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8006for as_dir in $PATH
8007do
8008  IFS=$as_save_IFS
8009  test -z "$as_dir" && as_dir=.
8010    for ac_exec_ext in '' $ac_executable_extensions; do
8011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8012    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8014    break 2
8015  fi
8016done
8017  done
8018IFS=$as_save_IFS
8019
8020  ;;
8021esac
8022fi
8023LN=$ac_cv_path_LN
8024if test -n "$LN"; then
8025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8026$as_echo "$LN" >&6; }
8027else
8028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8029$as_echo "no" >&6; }
8030fi
8031
8032
8033  test -n "$LN" && break
8034done
8035
8036    else
8037      # If it succeeded, then it was overridden by the user. We will use it
8038      # for the tool.
8039
8040      # First remove it from the list of overridden variables, so we can test
8041      # for unknown variables in the end.
8042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8043
8044      # Check if we try to supply an empty value
8045      if test "x$LN" = x; then
8046        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8047$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8048        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8049$as_echo_n "checking for LN... " >&6; }
8050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8051$as_echo "disabled" >&6; }
8052      else
8053        # Check if the provided tool contains a complete path.
8054        tool_specified="$LN"
8055        tool_basename="${tool_specified##*/}"
8056        if test "x$tool_basename" = "x$tool_specified"; then
8057          # A command without a complete path is provided, search $PATH.
8058          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8059$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8060          # Extract the first word of "$tool_basename", so it can be a program name with args.
8061set dummy $tool_basename; ac_word=$2
8062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8063$as_echo_n "checking for $ac_word... " >&6; }
8064if ${ac_cv_path_LN+:} false; then :
8065  $as_echo_n "(cached) " >&6
8066else
8067  case $LN in
8068  [\\/]* | ?:[\\/]*)
8069  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8070  ;;
8071  *)
8072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8073for as_dir in $PATH
8074do
8075  IFS=$as_save_IFS
8076  test -z "$as_dir" && as_dir=.
8077    for ac_exec_ext in '' $ac_executable_extensions; do
8078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8079    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8081    break 2
8082  fi
8083done
8084  done
8085IFS=$as_save_IFS
8086
8087  ;;
8088esac
8089fi
8090LN=$ac_cv_path_LN
8091if test -n "$LN"; then
8092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8093$as_echo "$LN" >&6; }
8094else
8095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8096$as_echo "no" >&6; }
8097fi
8098
8099
8100          if test "x$LN" = x; then
8101            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8102          fi
8103        else
8104          # Otherwise we believe it is a complete path. Use it as it is.
8105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8106$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8107          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8108$as_echo_n "checking for LN... " >&6; }
8109          if test ! -x "$tool_specified"; then
8110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8111$as_echo "not found" >&6; }
8112            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8113          fi
8114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8115$as_echo "$tool_specified" >&6; }
8116        fi
8117      fi
8118    fi
8119
8120  fi
8121
8122
8123
8124  if test "x$LN" = x; then
8125    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8126  fi
8127
8128
8129
8130
8131
8132  # Publish this variable in the help.
8133
8134
8135  if [ -z "${LS+x}" ]; then
8136    # The variable is not set by user, try to locate tool using the code snippet
8137    for ac_prog in ls
8138do
8139  # Extract the first word of "$ac_prog", so it can be a program name with args.
8140set dummy $ac_prog; ac_word=$2
8141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8142$as_echo_n "checking for $ac_word... " >&6; }
8143if ${ac_cv_path_LS+:} false; then :
8144  $as_echo_n "(cached) " >&6
8145else
8146  case $LS in
8147  [\\/]* | ?:[\\/]*)
8148  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8149  ;;
8150  *)
8151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8152for as_dir in $PATH
8153do
8154  IFS=$as_save_IFS
8155  test -z "$as_dir" && as_dir=.
8156    for ac_exec_ext in '' $ac_executable_extensions; do
8157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8158    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8160    break 2
8161  fi
8162done
8163  done
8164IFS=$as_save_IFS
8165
8166  ;;
8167esac
8168fi
8169LS=$ac_cv_path_LS
8170if test -n "$LS"; then
8171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8172$as_echo "$LS" >&6; }
8173else
8174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8175$as_echo "no" >&6; }
8176fi
8177
8178
8179  test -n "$LS" && break
8180done
8181
8182  else
8183    # The variable is set, but is it from the command line or the environment?
8184
8185    # Try to remove the string !LS! from our list.
8186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8188      # If it failed, the variable was not from the command line. Ignore it,
8189      # but warn the user (except for BASH, which is always set by the calling BASH).
8190      if test "xLS" != xBASH; then
8191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8192$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8193      fi
8194      # Try to locate tool using the code snippet
8195      for ac_prog in ls
8196do
8197  # Extract the first word of "$ac_prog", so it can be a program name with args.
8198set dummy $ac_prog; ac_word=$2
8199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8200$as_echo_n "checking for $ac_word... " >&6; }
8201if ${ac_cv_path_LS+:} false; then :
8202  $as_echo_n "(cached) " >&6
8203else
8204  case $LS in
8205  [\\/]* | ?:[\\/]*)
8206  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8207  ;;
8208  *)
8209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8210for as_dir in $PATH
8211do
8212  IFS=$as_save_IFS
8213  test -z "$as_dir" && as_dir=.
8214    for ac_exec_ext in '' $ac_executable_extensions; do
8215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8216    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8218    break 2
8219  fi
8220done
8221  done
8222IFS=$as_save_IFS
8223
8224  ;;
8225esac
8226fi
8227LS=$ac_cv_path_LS
8228if test -n "$LS"; then
8229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8230$as_echo "$LS" >&6; }
8231else
8232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8233$as_echo "no" >&6; }
8234fi
8235
8236
8237  test -n "$LS" && break
8238done
8239
8240    else
8241      # If it succeeded, then it was overridden by the user. We will use it
8242      # for the tool.
8243
8244      # First remove it from the list of overridden variables, so we can test
8245      # for unknown variables in the end.
8246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8247
8248      # Check if we try to supply an empty value
8249      if test "x$LS" = x; then
8250        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8251$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8252        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8253$as_echo_n "checking for LS... " >&6; }
8254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8255$as_echo "disabled" >&6; }
8256      else
8257        # Check if the provided tool contains a complete path.
8258        tool_specified="$LS"
8259        tool_basename="${tool_specified##*/}"
8260        if test "x$tool_basename" = "x$tool_specified"; then
8261          # A command without a complete path is provided, search $PATH.
8262          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8263$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8264          # Extract the first word of "$tool_basename", so it can be a program name with args.
8265set dummy $tool_basename; ac_word=$2
8266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8267$as_echo_n "checking for $ac_word... " >&6; }
8268if ${ac_cv_path_LS+:} false; then :
8269  $as_echo_n "(cached) " >&6
8270else
8271  case $LS in
8272  [\\/]* | ?:[\\/]*)
8273  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8274  ;;
8275  *)
8276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8277for as_dir in $PATH
8278do
8279  IFS=$as_save_IFS
8280  test -z "$as_dir" && as_dir=.
8281    for ac_exec_ext in '' $ac_executable_extensions; do
8282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8283    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8285    break 2
8286  fi
8287done
8288  done
8289IFS=$as_save_IFS
8290
8291  ;;
8292esac
8293fi
8294LS=$ac_cv_path_LS
8295if test -n "$LS"; then
8296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8297$as_echo "$LS" >&6; }
8298else
8299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8300$as_echo "no" >&6; }
8301fi
8302
8303
8304          if test "x$LS" = x; then
8305            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8306          fi
8307        else
8308          # Otherwise we believe it is a complete path. Use it as it is.
8309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8310$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8311          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8312$as_echo_n "checking for LS... " >&6; }
8313          if test ! -x "$tool_specified"; then
8314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8315$as_echo "not found" >&6; }
8316            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8317          fi
8318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8319$as_echo "$tool_specified" >&6; }
8320        fi
8321      fi
8322    fi
8323
8324  fi
8325
8326
8327
8328  if test "x$LS" = x; then
8329    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8330  fi
8331
8332
8333
8334
8335
8336  # Publish this variable in the help.
8337
8338
8339  if [ -z "${MKDIR+x}" ]; then
8340    # The variable is not set by user, try to locate tool using the code snippet
8341    for ac_prog in mkdir
8342do
8343  # Extract the first word of "$ac_prog", so it can be a program name with args.
8344set dummy $ac_prog; ac_word=$2
8345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8346$as_echo_n "checking for $ac_word... " >&6; }
8347if ${ac_cv_path_MKDIR+:} false; then :
8348  $as_echo_n "(cached) " >&6
8349else
8350  case $MKDIR in
8351  [\\/]* | ?:[\\/]*)
8352  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8353  ;;
8354  *)
8355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8356for as_dir in $PATH
8357do
8358  IFS=$as_save_IFS
8359  test -z "$as_dir" && as_dir=.
8360    for ac_exec_ext in '' $ac_executable_extensions; do
8361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8362    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8364    break 2
8365  fi
8366done
8367  done
8368IFS=$as_save_IFS
8369
8370  ;;
8371esac
8372fi
8373MKDIR=$ac_cv_path_MKDIR
8374if test -n "$MKDIR"; then
8375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8376$as_echo "$MKDIR" >&6; }
8377else
8378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8379$as_echo "no" >&6; }
8380fi
8381
8382
8383  test -n "$MKDIR" && break
8384done
8385
8386  else
8387    # The variable is set, but is it from the command line or the environment?
8388
8389    # Try to remove the string !MKDIR! from our list.
8390    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8391    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8392      # If it failed, the variable was not from the command line. Ignore it,
8393      # but warn the user (except for BASH, which is always set by the calling BASH).
8394      if test "xMKDIR" != xBASH; then
8395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8396$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8397      fi
8398      # Try to locate tool using the code snippet
8399      for ac_prog in mkdir
8400do
8401  # Extract the first word of "$ac_prog", so it can be a program name with args.
8402set dummy $ac_prog; ac_word=$2
8403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8404$as_echo_n "checking for $ac_word... " >&6; }
8405if ${ac_cv_path_MKDIR+:} false; then :
8406  $as_echo_n "(cached) " >&6
8407else
8408  case $MKDIR in
8409  [\\/]* | ?:[\\/]*)
8410  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8411  ;;
8412  *)
8413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8414for as_dir in $PATH
8415do
8416  IFS=$as_save_IFS
8417  test -z "$as_dir" && as_dir=.
8418    for ac_exec_ext in '' $ac_executable_extensions; do
8419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8420    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8422    break 2
8423  fi
8424done
8425  done
8426IFS=$as_save_IFS
8427
8428  ;;
8429esac
8430fi
8431MKDIR=$ac_cv_path_MKDIR
8432if test -n "$MKDIR"; then
8433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8434$as_echo "$MKDIR" >&6; }
8435else
8436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8437$as_echo "no" >&6; }
8438fi
8439
8440
8441  test -n "$MKDIR" && break
8442done
8443
8444    else
8445      # If it succeeded, then it was overridden by the user. We will use it
8446      # for the tool.
8447
8448      # First remove it from the list of overridden variables, so we can test
8449      # for unknown variables in the end.
8450      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8451
8452      # Check if we try to supply an empty value
8453      if test "x$MKDIR" = x; then
8454        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8455$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8457$as_echo_n "checking for MKDIR... " >&6; }
8458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8459$as_echo "disabled" >&6; }
8460      else
8461        # Check if the provided tool contains a complete path.
8462        tool_specified="$MKDIR"
8463        tool_basename="${tool_specified##*/}"
8464        if test "x$tool_basename" = "x$tool_specified"; then
8465          # A command without a complete path is provided, search $PATH.
8466          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8467$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8468          # Extract the first word of "$tool_basename", so it can be a program name with args.
8469set dummy $tool_basename; ac_word=$2
8470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8471$as_echo_n "checking for $ac_word... " >&6; }
8472if ${ac_cv_path_MKDIR+:} false; then :
8473  $as_echo_n "(cached) " >&6
8474else
8475  case $MKDIR in
8476  [\\/]* | ?:[\\/]*)
8477  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8478  ;;
8479  *)
8480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8481for as_dir in $PATH
8482do
8483  IFS=$as_save_IFS
8484  test -z "$as_dir" && as_dir=.
8485    for ac_exec_ext in '' $ac_executable_extensions; do
8486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8487    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8489    break 2
8490  fi
8491done
8492  done
8493IFS=$as_save_IFS
8494
8495  ;;
8496esac
8497fi
8498MKDIR=$ac_cv_path_MKDIR
8499if test -n "$MKDIR"; then
8500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8501$as_echo "$MKDIR" >&6; }
8502else
8503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8504$as_echo "no" >&6; }
8505fi
8506
8507
8508          if test "x$MKDIR" = x; then
8509            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8510          fi
8511        else
8512          # Otherwise we believe it is a complete path. Use it as it is.
8513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8514$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8515          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8516$as_echo_n "checking for MKDIR... " >&6; }
8517          if test ! -x "$tool_specified"; then
8518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8519$as_echo "not found" >&6; }
8520            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8521          fi
8522          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8523$as_echo "$tool_specified" >&6; }
8524        fi
8525      fi
8526    fi
8527
8528  fi
8529
8530
8531
8532  if test "x$MKDIR" = x; then
8533    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8534  fi
8535
8536
8537
8538
8539
8540  # Publish this variable in the help.
8541
8542
8543  if [ -z "${MKTEMP+x}" ]; then
8544    # The variable is not set by user, try to locate tool using the code snippet
8545    for ac_prog in mktemp
8546do
8547  # Extract the first word of "$ac_prog", so it can be a program name with args.
8548set dummy $ac_prog; ac_word=$2
8549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8550$as_echo_n "checking for $ac_word... " >&6; }
8551if ${ac_cv_path_MKTEMP+:} false; then :
8552  $as_echo_n "(cached) " >&6
8553else
8554  case $MKTEMP in
8555  [\\/]* | ?:[\\/]*)
8556  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8557  ;;
8558  *)
8559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8560for as_dir in $PATH
8561do
8562  IFS=$as_save_IFS
8563  test -z "$as_dir" && as_dir=.
8564    for ac_exec_ext in '' $ac_executable_extensions; do
8565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8566    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8568    break 2
8569  fi
8570done
8571  done
8572IFS=$as_save_IFS
8573
8574  ;;
8575esac
8576fi
8577MKTEMP=$ac_cv_path_MKTEMP
8578if test -n "$MKTEMP"; then
8579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8580$as_echo "$MKTEMP" >&6; }
8581else
8582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8583$as_echo "no" >&6; }
8584fi
8585
8586
8587  test -n "$MKTEMP" && break
8588done
8589
8590  else
8591    # The variable is set, but is it from the command line or the environment?
8592
8593    # Try to remove the string !MKTEMP! from our list.
8594    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8595    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8596      # If it failed, the variable was not from the command line. Ignore it,
8597      # but warn the user (except for BASH, which is always set by the calling BASH).
8598      if test "xMKTEMP" != xBASH; then
8599        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8600$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8601      fi
8602      # Try to locate tool using the code snippet
8603      for ac_prog in mktemp
8604do
8605  # Extract the first word of "$ac_prog", so it can be a program name with args.
8606set dummy $ac_prog; ac_word=$2
8607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8608$as_echo_n "checking for $ac_word... " >&6; }
8609if ${ac_cv_path_MKTEMP+:} false; then :
8610  $as_echo_n "(cached) " >&6
8611else
8612  case $MKTEMP in
8613  [\\/]* | ?:[\\/]*)
8614  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8615  ;;
8616  *)
8617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8618for as_dir in $PATH
8619do
8620  IFS=$as_save_IFS
8621  test -z "$as_dir" && as_dir=.
8622    for ac_exec_ext in '' $ac_executable_extensions; do
8623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8624    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8626    break 2
8627  fi
8628done
8629  done
8630IFS=$as_save_IFS
8631
8632  ;;
8633esac
8634fi
8635MKTEMP=$ac_cv_path_MKTEMP
8636if test -n "$MKTEMP"; then
8637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8638$as_echo "$MKTEMP" >&6; }
8639else
8640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8641$as_echo "no" >&6; }
8642fi
8643
8644
8645  test -n "$MKTEMP" && break
8646done
8647
8648    else
8649      # If it succeeded, then it was overridden by the user. We will use it
8650      # for the tool.
8651
8652      # First remove it from the list of overridden variables, so we can test
8653      # for unknown variables in the end.
8654      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8655
8656      # Check if we try to supply an empty value
8657      if test "x$MKTEMP" = x; then
8658        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8659$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8661$as_echo_n "checking for MKTEMP... " >&6; }
8662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8663$as_echo "disabled" >&6; }
8664      else
8665        # Check if the provided tool contains a complete path.
8666        tool_specified="$MKTEMP"
8667        tool_basename="${tool_specified##*/}"
8668        if test "x$tool_basename" = "x$tool_specified"; then
8669          # A command without a complete path is provided, search $PATH.
8670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8671$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8672          # Extract the first word of "$tool_basename", so it can be a program name with args.
8673set dummy $tool_basename; ac_word=$2
8674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8675$as_echo_n "checking for $ac_word... " >&6; }
8676if ${ac_cv_path_MKTEMP+:} false; then :
8677  $as_echo_n "(cached) " >&6
8678else
8679  case $MKTEMP in
8680  [\\/]* | ?:[\\/]*)
8681  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8682  ;;
8683  *)
8684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8685for as_dir in $PATH
8686do
8687  IFS=$as_save_IFS
8688  test -z "$as_dir" && as_dir=.
8689    for ac_exec_ext in '' $ac_executable_extensions; do
8690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8691    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8693    break 2
8694  fi
8695done
8696  done
8697IFS=$as_save_IFS
8698
8699  ;;
8700esac
8701fi
8702MKTEMP=$ac_cv_path_MKTEMP
8703if test -n "$MKTEMP"; then
8704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8705$as_echo "$MKTEMP" >&6; }
8706else
8707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8708$as_echo "no" >&6; }
8709fi
8710
8711
8712          if test "x$MKTEMP" = x; then
8713            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8714          fi
8715        else
8716          # Otherwise we believe it is a complete path. Use it as it is.
8717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8718$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8719          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8720$as_echo_n "checking for MKTEMP... " >&6; }
8721          if test ! -x "$tool_specified"; then
8722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8723$as_echo "not found" >&6; }
8724            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8725          fi
8726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8727$as_echo "$tool_specified" >&6; }
8728        fi
8729      fi
8730    fi
8731
8732  fi
8733
8734
8735
8736  if test "x$MKTEMP" = x; then
8737    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8738  fi
8739
8740
8741
8742
8743
8744  # Publish this variable in the help.
8745
8746
8747  if [ -z "${MV+x}" ]; then
8748    # The variable is not set by user, try to locate tool using the code snippet
8749    for ac_prog in mv
8750do
8751  # Extract the first word of "$ac_prog", so it can be a program name with args.
8752set dummy $ac_prog; ac_word=$2
8753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8754$as_echo_n "checking for $ac_word... " >&6; }
8755if ${ac_cv_path_MV+:} false; then :
8756  $as_echo_n "(cached) " >&6
8757else
8758  case $MV in
8759  [\\/]* | ?:[\\/]*)
8760  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8761  ;;
8762  *)
8763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8764for as_dir in $PATH
8765do
8766  IFS=$as_save_IFS
8767  test -z "$as_dir" && as_dir=.
8768    for ac_exec_ext in '' $ac_executable_extensions; do
8769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8770    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8772    break 2
8773  fi
8774done
8775  done
8776IFS=$as_save_IFS
8777
8778  ;;
8779esac
8780fi
8781MV=$ac_cv_path_MV
8782if test -n "$MV"; then
8783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8784$as_echo "$MV" >&6; }
8785else
8786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8787$as_echo "no" >&6; }
8788fi
8789
8790
8791  test -n "$MV" && break
8792done
8793
8794  else
8795    # The variable is set, but is it from the command line or the environment?
8796
8797    # Try to remove the string !MV! from our list.
8798    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8799    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8800      # If it failed, the variable was not from the command line. Ignore it,
8801      # but warn the user (except for BASH, which is always set by the calling BASH).
8802      if test "xMV" != xBASH; then
8803        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8804$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8805      fi
8806      # Try to locate tool using the code snippet
8807      for ac_prog in mv
8808do
8809  # Extract the first word of "$ac_prog", so it can be a program name with args.
8810set dummy $ac_prog; ac_word=$2
8811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8812$as_echo_n "checking for $ac_word... " >&6; }
8813if ${ac_cv_path_MV+:} false; then :
8814  $as_echo_n "(cached) " >&6
8815else
8816  case $MV in
8817  [\\/]* | ?:[\\/]*)
8818  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8819  ;;
8820  *)
8821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8822for as_dir in $PATH
8823do
8824  IFS=$as_save_IFS
8825  test -z "$as_dir" && as_dir=.
8826    for ac_exec_ext in '' $ac_executable_extensions; do
8827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8828    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8830    break 2
8831  fi
8832done
8833  done
8834IFS=$as_save_IFS
8835
8836  ;;
8837esac
8838fi
8839MV=$ac_cv_path_MV
8840if test -n "$MV"; then
8841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8842$as_echo "$MV" >&6; }
8843else
8844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8845$as_echo "no" >&6; }
8846fi
8847
8848
8849  test -n "$MV" && break
8850done
8851
8852    else
8853      # If it succeeded, then it was overridden by the user. We will use it
8854      # for the tool.
8855
8856      # First remove it from the list of overridden variables, so we can test
8857      # for unknown variables in the end.
8858      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8859
8860      # Check if we try to supply an empty value
8861      if test "x$MV" = x; then
8862        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8863$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8864        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8865$as_echo_n "checking for MV... " >&6; }
8866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8867$as_echo "disabled" >&6; }
8868      else
8869        # Check if the provided tool contains a complete path.
8870        tool_specified="$MV"
8871        tool_basename="${tool_specified##*/}"
8872        if test "x$tool_basename" = "x$tool_specified"; then
8873          # A command without a complete path is provided, search $PATH.
8874          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8875$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8876          # Extract the first word of "$tool_basename", so it can be a program name with args.
8877set dummy $tool_basename; ac_word=$2
8878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8879$as_echo_n "checking for $ac_word... " >&6; }
8880if ${ac_cv_path_MV+:} false; then :
8881  $as_echo_n "(cached) " >&6
8882else
8883  case $MV in
8884  [\\/]* | ?:[\\/]*)
8885  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8886  ;;
8887  *)
8888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8889for as_dir in $PATH
8890do
8891  IFS=$as_save_IFS
8892  test -z "$as_dir" && as_dir=.
8893    for ac_exec_ext in '' $ac_executable_extensions; do
8894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8895    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8897    break 2
8898  fi
8899done
8900  done
8901IFS=$as_save_IFS
8902
8903  ;;
8904esac
8905fi
8906MV=$ac_cv_path_MV
8907if test -n "$MV"; then
8908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8909$as_echo "$MV" >&6; }
8910else
8911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8912$as_echo "no" >&6; }
8913fi
8914
8915
8916          if test "x$MV" = x; then
8917            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8918          fi
8919        else
8920          # Otherwise we believe it is a complete path. Use it as it is.
8921          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8922$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8923          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8924$as_echo_n "checking for MV... " >&6; }
8925          if test ! -x "$tool_specified"; then
8926            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8927$as_echo "not found" >&6; }
8928            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8929          fi
8930          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8931$as_echo "$tool_specified" >&6; }
8932        fi
8933      fi
8934    fi
8935
8936  fi
8937
8938
8939
8940  if test "x$MV" = x; then
8941    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8942  fi
8943
8944
8945
8946
8947
8948  # Publish this variable in the help.
8949
8950
8951  if [ -z "${NAWK+x}" ]; then
8952    # The variable is not set by user, try to locate tool using the code snippet
8953    for ac_prog in nawk gawk awk
8954do
8955  # Extract the first word of "$ac_prog", so it can be a program name with args.
8956set dummy $ac_prog; ac_word=$2
8957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8958$as_echo_n "checking for $ac_word... " >&6; }
8959if ${ac_cv_path_NAWK+:} false; then :
8960  $as_echo_n "(cached) " >&6
8961else
8962  case $NAWK in
8963  [\\/]* | ?:[\\/]*)
8964  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8965  ;;
8966  *)
8967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8968for as_dir in $PATH
8969do
8970  IFS=$as_save_IFS
8971  test -z "$as_dir" && as_dir=.
8972    for ac_exec_ext in '' $ac_executable_extensions; do
8973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8974    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8976    break 2
8977  fi
8978done
8979  done
8980IFS=$as_save_IFS
8981
8982  ;;
8983esac
8984fi
8985NAWK=$ac_cv_path_NAWK
8986if test -n "$NAWK"; then
8987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8988$as_echo "$NAWK" >&6; }
8989else
8990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8991$as_echo "no" >&6; }
8992fi
8993
8994
8995  test -n "$NAWK" && break
8996done
8997
8998  else
8999    # The variable is set, but is it from the command line or the environment?
9000
9001    # Try to remove the string !NAWK! from our list.
9002    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9003    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9004      # If it failed, the variable was not from the command line. Ignore it,
9005      # but warn the user (except for BASH, which is always set by the calling BASH).
9006      if test "xNAWK" != xBASH; then
9007        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9008$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9009      fi
9010      # Try to locate tool using the code snippet
9011      for ac_prog in nawk gawk awk
9012do
9013  # Extract the first word of "$ac_prog", so it can be a program name with args.
9014set dummy $ac_prog; ac_word=$2
9015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9016$as_echo_n "checking for $ac_word... " >&6; }
9017if ${ac_cv_path_NAWK+:} false; then :
9018  $as_echo_n "(cached) " >&6
9019else
9020  case $NAWK in
9021  [\\/]* | ?:[\\/]*)
9022  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9023  ;;
9024  *)
9025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9026for as_dir in $PATH
9027do
9028  IFS=$as_save_IFS
9029  test -z "$as_dir" && as_dir=.
9030    for ac_exec_ext in '' $ac_executable_extensions; do
9031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9032    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9034    break 2
9035  fi
9036done
9037  done
9038IFS=$as_save_IFS
9039
9040  ;;
9041esac
9042fi
9043NAWK=$ac_cv_path_NAWK
9044if test -n "$NAWK"; then
9045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9046$as_echo "$NAWK" >&6; }
9047else
9048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9049$as_echo "no" >&6; }
9050fi
9051
9052
9053  test -n "$NAWK" && break
9054done
9055
9056    else
9057      # If it succeeded, then it was overridden by the user. We will use it
9058      # for the tool.
9059
9060      # First remove it from the list of overridden variables, so we can test
9061      # for unknown variables in the end.
9062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9063
9064      # Check if we try to supply an empty value
9065      if test "x$NAWK" = x; then
9066        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9067$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9069$as_echo_n "checking for NAWK... " >&6; }
9070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9071$as_echo "disabled" >&6; }
9072      else
9073        # Check if the provided tool contains a complete path.
9074        tool_specified="$NAWK"
9075        tool_basename="${tool_specified##*/}"
9076        if test "x$tool_basename" = "x$tool_specified"; then
9077          # A command without a complete path is provided, search $PATH.
9078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9079$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9080          # Extract the first word of "$tool_basename", so it can be a program name with args.
9081set dummy $tool_basename; ac_word=$2
9082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9083$as_echo_n "checking for $ac_word... " >&6; }
9084if ${ac_cv_path_NAWK+:} false; then :
9085  $as_echo_n "(cached) " >&6
9086else
9087  case $NAWK in
9088  [\\/]* | ?:[\\/]*)
9089  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9090  ;;
9091  *)
9092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9093for as_dir in $PATH
9094do
9095  IFS=$as_save_IFS
9096  test -z "$as_dir" && as_dir=.
9097    for ac_exec_ext in '' $ac_executable_extensions; do
9098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9099    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9101    break 2
9102  fi
9103done
9104  done
9105IFS=$as_save_IFS
9106
9107  ;;
9108esac
9109fi
9110NAWK=$ac_cv_path_NAWK
9111if test -n "$NAWK"; then
9112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9113$as_echo "$NAWK" >&6; }
9114else
9115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116$as_echo "no" >&6; }
9117fi
9118
9119
9120          if test "x$NAWK" = x; then
9121            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9122          fi
9123        else
9124          # Otherwise we believe it is a complete path. Use it as it is.
9125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9126$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9127          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9128$as_echo_n "checking for NAWK... " >&6; }
9129          if test ! -x "$tool_specified"; then
9130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9131$as_echo "not found" >&6; }
9132            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9133          fi
9134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9135$as_echo "$tool_specified" >&6; }
9136        fi
9137      fi
9138    fi
9139
9140  fi
9141
9142
9143
9144  if test "x$NAWK" = x; then
9145    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9146  fi
9147
9148
9149
9150
9151
9152  # Publish this variable in the help.
9153
9154
9155  if [ -z "${PRINTF+x}" ]; then
9156    # The variable is not set by user, try to locate tool using the code snippet
9157    for ac_prog in printf
9158do
9159  # Extract the first word of "$ac_prog", so it can be a program name with args.
9160set dummy $ac_prog; ac_word=$2
9161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9162$as_echo_n "checking for $ac_word... " >&6; }
9163if ${ac_cv_path_PRINTF+:} false; then :
9164  $as_echo_n "(cached) " >&6
9165else
9166  case $PRINTF in
9167  [\\/]* | ?:[\\/]*)
9168  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9169  ;;
9170  *)
9171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9172for as_dir in $PATH
9173do
9174  IFS=$as_save_IFS
9175  test -z "$as_dir" && as_dir=.
9176    for ac_exec_ext in '' $ac_executable_extensions; do
9177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9178    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9180    break 2
9181  fi
9182done
9183  done
9184IFS=$as_save_IFS
9185
9186  ;;
9187esac
9188fi
9189PRINTF=$ac_cv_path_PRINTF
9190if test -n "$PRINTF"; then
9191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9192$as_echo "$PRINTF" >&6; }
9193else
9194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9195$as_echo "no" >&6; }
9196fi
9197
9198
9199  test -n "$PRINTF" && break
9200done
9201
9202  else
9203    # The variable is set, but is it from the command line or the environment?
9204
9205    # Try to remove the string !PRINTF! from our list.
9206    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9207    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9208      # If it failed, the variable was not from the command line. Ignore it,
9209      # but warn the user (except for BASH, which is always set by the calling BASH).
9210      if test "xPRINTF" != xBASH; then
9211        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9212$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9213      fi
9214      # Try to locate tool using the code snippet
9215      for ac_prog in printf
9216do
9217  # Extract the first word of "$ac_prog", so it can be a program name with args.
9218set dummy $ac_prog; ac_word=$2
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9220$as_echo_n "checking for $ac_word... " >&6; }
9221if ${ac_cv_path_PRINTF+:} false; then :
9222  $as_echo_n "(cached) " >&6
9223else
9224  case $PRINTF in
9225  [\\/]* | ?:[\\/]*)
9226  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9227  ;;
9228  *)
9229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9230for as_dir in $PATH
9231do
9232  IFS=$as_save_IFS
9233  test -z "$as_dir" && as_dir=.
9234    for ac_exec_ext in '' $ac_executable_extensions; do
9235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9236    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9238    break 2
9239  fi
9240done
9241  done
9242IFS=$as_save_IFS
9243
9244  ;;
9245esac
9246fi
9247PRINTF=$ac_cv_path_PRINTF
9248if test -n "$PRINTF"; then
9249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9250$as_echo "$PRINTF" >&6; }
9251else
9252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9253$as_echo "no" >&6; }
9254fi
9255
9256
9257  test -n "$PRINTF" && break
9258done
9259
9260    else
9261      # If it succeeded, then it was overridden by the user. We will use it
9262      # for the tool.
9263
9264      # First remove it from the list of overridden variables, so we can test
9265      # for unknown variables in the end.
9266      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9267
9268      # Check if we try to supply an empty value
9269      if test "x$PRINTF" = x; then
9270        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9271$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9272        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9273$as_echo_n "checking for PRINTF... " >&6; }
9274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9275$as_echo "disabled" >&6; }
9276      else
9277        # Check if the provided tool contains a complete path.
9278        tool_specified="$PRINTF"
9279        tool_basename="${tool_specified##*/}"
9280        if test "x$tool_basename" = "x$tool_specified"; then
9281          # A command without a complete path is provided, search $PATH.
9282          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9283$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9284          # Extract the first word of "$tool_basename", so it can be a program name with args.
9285set dummy $tool_basename; ac_word=$2
9286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9287$as_echo_n "checking for $ac_word... " >&6; }
9288if ${ac_cv_path_PRINTF+:} false; then :
9289  $as_echo_n "(cached) " >&6
9290else
9291  case $PRINTF in
9292  [\\/]* | ?:[\\/]*)
9293  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9294  ;;
9295  *)
9296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9297for as_dir in $PATH
9298do
9299  IFS=$as_save_IFS
9300  test -z "$as_dir" && as_dir=.
9301    for ac_exec_ext in '' $ac_executable_extensions; do
9302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9303    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9305    break 2
9306  fi
9307done
9308  done
9309IFS=$as_save_IFS
9310
9311  ;;
9312esac
9313fi
9314PRINTF=$ac_cv_path_PRINTF
9315if test -n "$PRINTF"; then
9316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9317$as_echo "$PRINTF" >&6; }
9318else
9319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9320$as_echo "no" >&6; }
9321fi
9322
9323
9324          if test "x$PRINTF" = x; then
9325            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9326          fi
9327        else
9328          # Otherwise we believe it is a complete path. Use it as it is.
9329          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9330$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9331          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9332$as_echo_n "checking for PRINTF... " >&6; }
9333          if test ! -x "$tool_specified"; then
9334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9335$as_echo "not found" >&6; }
9336            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9337          fi
9338          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9339$as_echo "$tool_specified" >&6; }
9340        fi
9341      fi
9342    fi
9343
9344  fi
9345
9346
9347
9348  if test "x$PRINTF" = x; then
9349    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9350  fi
9351
9352
9353
9354
9355
9356  # Publish this variable in the help.
9357
9358
9359  if [ -z "${RM+x}" ]; then
9360    # The variable is not set by user, try to locate tool using the code snippet
9361    for ac_prog in rm
9362do
9363  # Extract the first word of "$ac_prog", so it can be a program name with args.
9364set dummy $ac_prog; ac_word=$2
9365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9366$as_echo_n "checking for $ac_word... " >&6; }
9367if ${ac_cv_path_RM+:} false; then :
9368  $as_echo_n "(cached) " >&6
9369else
9370  case $RM in
9371  [\\/]* | ?:[\\/]*)
9372  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9373  ;;
9374  *)
9375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9376for as_dir in $PATH
9377do
9378  IFS=$as_save_IFS
9379  test -z "$as_dir" && as_dir=.
9380    for ac_exec_ext in '' $ac_executable_extensions; do
9381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9382    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9384    break 2
9385  fi
9386done
9387  done
9388IFS=$as_save_IFS
9389
9390  ;;
9391esac
9392fi
9393RM=$ac_cv_path_RM
9394if test -n "$RM"; then
9395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9396$as_echo "$RM" >&6; }
9397else
9398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9399$as_echo "no" >&6; }
9400fi
9401
9402
9403  test -n "$RM" && break
9404done
9405
9406  else
9407    # The variable is set, but is it from the command line or the environment?
9408
9409    # Try to remove the string !RM! from our list.
9410    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9411    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9412      # If it failed, the variable was not from the command line. Ignore it,
9413      # but warn the user (except for BASH, which is always set by the calling BASH).
9414      if test "xRM" != xBASH; then
9415        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9416$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9417      fi
9418      # Try to locate tool using the code snippet
9419      for ac_prog in rm
9420do
9421  # Extract the first word of "$ac_prog", so it can be a program name with args.
9422set dummy $ac_prog; ac_word=$2
9423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9424$as_echo_n "checking for $ac_word... " >&6; }
9425if ${ac_cv_path_RM+:} false; then :
9426  $as_echo_n "(cached) " >&6
9427else
9428  case $RM in
9429  [\\/]* | ?:[\\/]*)
9430  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9431  ;;
9432  *)
9433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9434for as_dir in $PATH
9435do
9436  IFS=$as_save_IFS
9437  test -z "$as_dir" && as_dir=.
9438    for ac_exec_ext in '' $ac_executable_extensions; do
9439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9440    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9442    break 2
9443  fi
9444done
9445  done
9446IFS=$as_save_IFS
9447
9448  ;;
9449esac
9450fi
9451RM=$ac_cv_path_RM
9452if test -n "$RM"; then
9453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9454$as_echo "$RM" >&6; }
9455else
9456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9457$as_echo "no" >&6; }
9458fi
9459
9460
9461  test -n "$RM" && break
9462done
9463
9464    else
9465      # If it succeeded, then it was overridden by the user. We will use it
9466      # for the tool.
9467
9468      # First remove it from the list of overridden variables, so we can test
9469      # for unknown variables in the end.
9470      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9471
9472      # Check if we try to supply an empty value
9473      if test "x$RM" = x; then
9474        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9475$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9477$as_echo_n "checking for RM... " >&6; }
9478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9479$as_echo "disabled" >&6; }
9480      else
9481        # Check if the provided tool contains a complete path.
9482        tool_specified="$RM"
9483        tool_basename="${tool_specified##*/}"
9484        if test "x$tool_basename" = "x$tool_specified"; then
9485          # A command without a complete path is provided, search $PATH.
9486          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9487$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9488          # Extract the first word of "$tool_basename", so it can be a program name with args.
9489set dummy $tool_basename; ac_word=$2
9490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9491$as_echo_n "checking for $ac_word... " >&6; }
9492if ${ac_cv_path_RM+:} false; then :
9493  $as_echo_n "(cached) " >&6
9494else
9495  case $RM in
9496  [\\/]* | ?:[\\/]*)
9497  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9498  ;;
9499  *)
9500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9501for as_dir in $PATH
9502do
9503  IFS=$as_save_IFS
9504  test -z "$as_dir" && as_dir=.
9505    for ac_exec_ext in '' $ac_executable_extensions; do
9506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9507    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9509    break 2
9510  fi
9511done
9512  done
9513IFS=$as_save_IFS
9514
9515  ;;
9516esac
9517fi
9518RM=$ac_cv_path_RM
9519if test -n "$RM"; then
9520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9521$as_echo "$RM" >&6; }
9522else
9523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9524$as_echo "no" >&6; }
9525fi
9526
9527
9528          if test "x$RM" = x; then
9529            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9530          fi
9531        else
9532          # Otherwise we believe it is a complete path. Use it as it is.
9533          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9534$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9535          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9536$as_echo_n "checking for RM... " >&6; }
9537          if test ! -x "$tool_specified"; then
9538            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9539$as_echo "not found" >&6; }
9540            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9541          fi
9542          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9543$as_echo "$tool_specified" >&6; }
9544        fi
9545      fi
9546    fi
9547
9548  fi
9549
9550
9551
9552  if test "x$RM" = x; then
9553    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9554  fi
9555
9556
9557
9558
9559
9560  # Publish this variable in the help.
9561
9562
9563  if [ -z "${RMDIR+x}" ]; then
9564    # The variable is not set by user, try to locate tool using the code snippet
9565    for ac_prog in rmdir
9566do
9567  # Extract the first word of "$ac_prog", so it can be a program name with args.
9568set dummy $ac_prog; ac_word=$2
9569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9570$as_echo_n "checking for $ac_word... " >&6; }
9571if ${ac_cv_path_RMDIR+:} false; then :
9572  $as_echo_n "(cached) " >&6
9573else
9574  case $RMDIR in
9575  [\\/]* | ?:[\\/]*)
9576  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9577  ;;
9578  *)
9579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9580for as_dir in $PATH
9581do
9582  IFS=$as_save_IFS
9583  test -z "$as_dir" && as_dir=.
9584    for ac_exec_ext in '' $ac_executable_extensions; do
9585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9586    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9588    break 2
9589  fi
9590done
9591  done
9592IFS=$as_save_IFS
9593
9594  ;;
9595esac
9596fi
9597RMDIR=$ac_cv_path_RMDIR
9598if test -n "$RMDIR"; then
9599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9600$as_echo "$RMDIR" >&6; }
9601else
9602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9603$as_echo "no" >&6; }
9604fi
9605
9606
9607  test -n "$RMDIR" && break
9608done
9609
9610  else
9611    # The variable is set, but is it from the command line or the environment?
9612
9613    # Try to remove the string !RMDIR! from our list.
9614    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9615    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9616      # If it failed, the variable was not from the command line. Ignore it,
9617      # but warn the user (except for BASH, which is always set by the calling BASH).
9618      if test "xRMDIR" != xBASH; then
9619        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9620$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9621      fi
9622      # Try to locate tool using the code snippet
9623      for ac_prog in rmdir
9624do
9625  # Extract the first word of "$ac_prog", so it can be a program name with args.
9626set dummy $ac_prog; ac_word=$2
9627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9628$as_echo_n "checking for $ac_word... " >&6; }
9629if ${ac_cv_path_RMDIR+:} false; then :
9630  $as_echo_n "(cached) " >&6
9631else
9632  case $RMDIR in
9633  [\\/]* | ?:[\\/]*)
9634  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9635  ;;
9636  *)
9637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9638for as_dir in $PATH
9639do
9640  IFS=$as_save_IFS
9641  test -z "$as_dir" && as_dir=.
9642    for ac_exec_ext in '' $ac_executable_extensions; do
9643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9644    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9646    break 2
9647  fi
9648done
9649  done
9650IFS=$as_save_IFS
9651
9652  ;;
9653esac
9654fi
9655RMDIR=$ac_cv_path_RMDIR
9656if test -n "$RMDIR"; then
9657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9658$as_echo "$RMDIR" >&6; }
9659else
9660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661$as_echo "no" >&6; }
9662fi
9663
9664
9665  test -n "$RMDIR" && break
9666done
9667
9668    else
9669      # If it succeeded, then it was overridden by the user. We will use it
9670      # for the tool.
9671
9672      # First remove it from the list of overridden variables, so we can test
9673      # for unknown variables in the end.
9674      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9675
9676      # Check if we try to supply an empty value
9677      if test "x$RMDIR" = x; then
9678        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9679$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9681$as_echo_n "checking for RMDIR... " >&6; }
9682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9683$as_echo "disabled" >&6; }
9684      else
9685        # Check if the provided tool contains a complete path.
9686        tool_specified="$RMDIR"
9687        tool_basename="${tool_specified##*/}"
9688        if test "x$tool_basename" = "x$tool_specified"; then
9689          # A command without a complete path is provided, search $PATH.
9690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9691$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9692          # Extract the first word of "$tool_basename", so it can be a program name with args.
9693set dummy $tool_basename; ac_word=$2
9694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9695$as_echo_n "checking for $ac_word... " >&6; }
9696if ${ac_cv_path_RMDIR+:} false; then :
9697  $as_echo_n "(cached) " >&6
9698else
9699  case $RMDIR in
9700  [\\/]* | ?:[\\/]*)
9701  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9702  ;;
9703  *)
9704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9705for as_dir in $PATH
9706do
9707  IFS=$as_save_IFS
9708  test -z "$as_dir" && as_dir=.
9709    for ac_exec_ext in '' $ac_executable_extensions; do
9710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9711    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9713    break 2
9714  fi
9715done
9716  done
9717IFS=$as_save_IFS
9718
9719  ;;
9720esac
9721fi
9722RMDIR=$ac_cv_path_RMDIR
9723if test -n "$RMDIR"; then
9724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9725$as_echo "$RMDIR" >&6; }
9726else
9727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9728$as_echo "no" >&6; }
9729fi
9730
9731
9732          if test "x$RMDIR" = x; then
9733            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9734          fi
9735        else
9736          # Otherwise we believe it is a complete path. Use it as it is.
9737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9738$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9739          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9740$as_echo_n "checking for RMDIR... " >&6; }
9741          if test ! -x "$tool_specified"; then
9742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9743$as_echo "not found" >&6; }
9744            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9745          fi
9746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9747$as_echo "$tool_specified" >&6; }
9748        fi
9749      fi
9750    fi
9751
9752  fi
9753
9754
9755
9756  if test "x$RMDIR" = x; then
9757    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9758  fi
9759
9760
9761
9762
9763
9764  # Publish this variable in the help.
9765
9766
9767  if [ -z "${SH+x}" ]; then
9768    # The variable is not set by user, try to locate tool using the code snippet
9769    for ac_prog in sh
9770do
9771  # Extract the first word of "$ac_prog", so it can be a program name with args.
9772set dummy $ac_prog; ac_word=$2
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9774$as_echo_n "checking for $ac_word... " >&6; }
9775if ${ac_cv_path_SH+:} false; then :
9776  $as_echo_n "(cached) " >&6
9777else
9778  case $SH in
9779  [\\/]* | ?:[\\/]*)
9780  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9781  ;;
9782  *)
9783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9784for as_dir in $PATH
9785do
9786  IFS=$as_save_IFS
9787  test -z "$as_dir" && as_dir=.
9788    for ac_exec_ext in '' $ac_executable_extensions; do
9789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9790    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9792    break 2
9793  fi
9794done
9795  done
9796IFS=$as_save_IFS
9797
9798  ;;
9799esac
9800fi
9801SH=$ac_cv_path_SH
9802if test -n "$SH"; then
9803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9804$as_echo "$SH" >&6; }
9805else
9806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9807$as_echo "no" >&6; }
9808fi
9809
9810
9811  test -n "$SH" && break
9812done
9813
9814  else
9815    # The variable is set, but is it from the command line or the environment?
9816
9817    # Try to remove the string !SH! from our list.
9818    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9819    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9820      # If it failed, the variable was not from the command line. Ignore it,
9821      # but warn the user (except for BASH, which is always set by the calling BASH).
9822      if test "xSH" != xBASH; then
9823        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9824$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9825      fi
9826      # Try to locate tool using the code snippet
9827      for ac_prog in sh
9828do
9829  # Extract the first word of "$ac_prog", so it can be a program name with args.
9830set dummy $ac_prog; ac_word=$2
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9832$as_echo_n "checking for $ac_word... " >&6; }
9833if ${ac_cv_path_SH+:} false; then :
9834  $as_echo_n "(cached) " >&6
9835else
9836  case $SH in
9837  [\\/]* | ?:[\\/]*)
9838  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9839  ;;
9840  *)
9841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9842for as_dir in $PATH
9843do
9844  IFS=$as_save_IFS
9845  test -z "$as_dir" && as_dir=.
9846    for ac_exec_ext in '' $ac_executable_extensions; do
9847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9848    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9850    break 2
9851  fi
9852done
9853  done
9854IFS=$as_save_IFS
9855
9856  ;;
9857esac
9858fi
9859SH=$ac_cv_path_SH
9860if test -n "$SH"; then
9861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9862$as_echo "$SH" >&6; }
9863else
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865$as_echo "no" >&6; }
9866fi
9867
9868
9869  test -n "$SH" && break
9870done
9871
9872    else
9873      # If it succeeded, then it was overridden by the user. We will use it
9874      # for the tool.
9875
9876      # First remove it from the list of overridden variables, so we can test
9877      # for unknown variables in the end.
9878      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9879
9880      # Check if we try to supply an empty value
9881      if test "x$SH" = x; then
9882        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9883$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9884        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9885$as_echo_n "checking for SH... " >&6; }
9886        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9887$as_echo "disabled" >&6; }
9888      else
9889        # Check if the provided tool contains a complete path.
9890        tool_specified="$SH"
9891        tool_basename="${tool_specified##*/}"
9892        if test "x$tool_basename" = "x$tool_specified"; then
9893          # A command without a complete path is provided, search $PATH.
9894          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9895$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9896          # Extract the first word of "$tool_basename", so it can be a program name with args.
9897set dummy $tool_basename; ac_word=$2
9898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9899$as_echo_n "checking for $ac_word... " >&6; }
9900if ${ac_cv_path_SH+:} false; then :
9901  $as_echo_n "(cached) " >&6
9902else
9903  case $SH in
9904  [\\/]* | ?:[\\/]*)
9905  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9906  ;;
9907  *)
9908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9909for as_dir in $PATH
9910do
9911  IFS=$as_save_IFS
9912  test -z "$as_dir" && as_dir=.
9913    for ac_exec_ext in '' $ac_executable_extensions; do
9914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9915    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9917    break 2
9918  fi
9919done
9920  done
9921IFS=$as_save_IFS
9922
9923  ;;
9924esac
9925fi
9926SH=$ac_cv_path_SH
9927if test -n "$SH"; then
9928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9929$as_echo "$SH" >&6; }
9930else
9931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9932$as_echo "no" >&6; }
9933fi
9934
9935
9936          if test "x$SH" = x; then
9937            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9938          fi
9939        else
9940          # Otherwise we believe it is a complete path. Use it as it is.
9941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9942$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9943          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9944$as_echo_n "checking for SH... " >&6; }
9945          if test ! -x "$tool_specified"; then
9946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9947$as_echo "not found" >&6; }
9948            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9949          fi
9950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9951$as_echo "$tool_specified" >&6; }
9952        fi
9953      fi
9954    fi
9955
9956  fi
9957
9958
9959
9960  if test "x$SH" = x; then
9961    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9962  fi
9963
9964
9965
9966
9967
9968  # Publish this variable in the help.
9969
9970
9971  if [ -z "${SORT+x}" ]; then
9972    # The variable is not set by user, try to locate tool using the code snippet
9973    for ac_prog in sort
9974do
9975  # Extract the first word of "$ac_prog", so it can be a program name with args.
9976set dummy $ac_prog; ac_word=$2
9977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9978$as_echo_n "checking for $ac_word... " >&6; }
9979if ${ac_cv_path_SORT+:} false; then :
9980  $as_echo_n "(cached) " >&6
9981else
9982  case $SORT in
9983  [\\/]* | ?:[\\/]*)
9984  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9985  ;;
9986  *)
9987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9988for as_dir in $PATH
9989do
9990  IFS=$as_save_IFS
9991  test -z "$as_dir" && as_dir=.
9992    for ac_exec_ext in '' $ac_executable_extensions; do
9993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9994    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9996    break 2
9997  fi
9998done
9999  done
10000IFS=$as_save_IFS
10001
10002  ;;
10003esac
10004fi
10005SORT=$ac_cv_path_SORT
10006if test -n "$SORT"; then
10007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10008$as_echo "$SORT" >&6; }
10009else
10010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10011$as_echo "no" >&6; }
10012fi
10013
10014
10015  test -n "$SORT" && break
10016done
10017
10018  else
10019    # The variable is set, but is it from the command line or the environment?
10020
10021    # Try to remove the string !SORT! from our list.
10022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10024      # If it failed, the variable was not from the command line. Ignore it,
10025      # but warn the user (except for BASH, which is always set by the calling BASH).
10026      if test "xSORT" != xBASH; then
10027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10028$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10029      fi
10030      # Try to locate tool using the code snippet
10031      for ac_prog in sort
10032do
10033  # Extract the first word of "$ac_prog", so it can be a program name with args.
10034set dummy $ac_prog; ac_word=$2
10035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10036$as_echo_n "checking for $ac_word... " >&6; }
10037if ${ac_cv_path_SORT+:} false; then :
10038  $as_echo_n "(cached) " >&6
10039else
10040  case $SORT in
10041  [\\/]* | ?:[\\/]*)
10042  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10043  ;;
10044  *)
10045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10046for as_dir in $PATH
10047do
10048  IFS=$as_save_IFS
10049  test -z "$as_dir" && as_dir=.
10050    for ac_exec_ext in '' $ac_executable_extensions; do
10051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10052    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10054    break 2
10055  fi
10056done
10057  done
10058IFS=$as_save_IFS
10059
10060  ;;
10061esac
10062fi
10063SORT=$ac_cv_path_SORT
10064if test -n "$SORT"; then
10065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10066$as_echo "$SORT" >&6; }
10067else
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10069$as_echo "no" >&6; }
10070fi
10071
10072
10073  test -n "$SORT" && break
10074done
10075
10076    else
10077      # If it succeeded, then it was overridden by the user. We will use it
10078      # for the tool.
10079
10080      # First remove it from the list of overridden variables, so we can test
10081      # for unknown variables in the end.
10082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10083
10084      # Check if we try to supply an empty value
10085      if test "x$SORT" = x; then
10086        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10087$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10089$as_echo_n "checking for SORT... " >&6; }
10090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10091$as_echo "disabled" >&6; }
10092      else
10093        # Check if the provided tool contains a complete path.
10094        tool_specified="$SORT"
10095        tool_basename="${tool_specified##*/}"
10096        if test "x$tool_basename" = "x$tool_specified"; then
10097          # A command without a complete path is provided, search $PATH.
10098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10099$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10100          # Extract the first word of "$tool_basename", so it can be a program name with args.
10101set dummy $tool_basename; ac_word=$2
10102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10103$as_echo_n "checking for $ac_word... " >&6; }
10104if ${ac_cv_path_SORT+:} false; then :
10105  $as_echo_n "(cached) " >&6
10106else
10107  case $SORT in
10108  [\\/]* | ?:[\\/]*)
10109  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10110  ;;
10111  *)
10112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10113for as_dir in $PATH
10114do
10115  IFS=$as_save_IFS
10116  test -z "$as_dir" && as_dir=.
10117    for ac_exec_ext in '' $ac_executable_extensions; do
10118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10119    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10121    break 2
10122  fi
10123done
10124  done
10125IFS=$as_save_IFS
10126
10127  ;;
10128esac
10129fi
10130SORT=$ac_cv_path_SORT
10131if test -n "$SORT"; then
10132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10133$as_echo "$SORT" >&6; }
10134else
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10136$as_echo "no" >&6; }
10137fi
10138
10139
10140          if test "x$SORT" = x; then
10141            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10142          fi
10143        else
10144          # Otherwise we believe it is a complete path. Use it as it is.
10145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10146$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10147          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10148$as_echo_n "checking for SORT... " >&6; }
10149          if test ! -x "$tool_specified"; then
10150            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10151$as_echo "not found" >&6; }
10152            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10153          fi
10154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10155$as_echo "$tool_specified" >&6; }
10156        fi
10157      fi
10158    fi
10159
10160  fi
10161
10162
10163
10164  if test "x$SORT" = x; then
10165    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10166  fi
10167
10168
10169
10170
10171
10172  # Publish this variable in the help.
10173
10174
10175  if [ -z "${TAIL+x}" ]; then
10176    # The variable is not set by user, try to locate tool using the code snippet
10177    for ac_prog in tail
10178do
10179  # Extract the first word of "$ac_prog", so it can be a program name with args.
10180set dummy $ac_prog; ac_word=$2
10181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10182$as_echo_n "checking for $ac_word... " >&6; }
10183if ${ac_cv_path_TAIL+:} false; then :
10184  $as_echo_n "(cached) " >&6
10185else
10186  case $TAIL in
10187  [\\/]* | ?:[\\/]*)
10188  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10189  ;;
10190  *)
10191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10192for as_dir in $PATH
10193do
10194  IFS=$as_save_IFS
10195  test -z "$as_dir" && as_dir=.
10196    for ac_exec_ext in '' $ac_executable_extensions; do
10197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10198    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10200    break 2
10201  fi
10202done
10203  done
10204IFS=$as_save_IFS
10205
10206  ;;
10207esac
10208fi
10209TAIL=$ac_cv_path_TAIL
10210if test -n "$TAIL"; then
10211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10212$as_echo "$TAIL" >&6; }
10213else
10214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
10216fi
10217
10218
10219  test -n "$TAIL" && break
10220done
10221
10222  else
10223    # The variable is set, but is it from the command line or the environment?
10224
10225    # Try to remove the string !TAIL! from our list.
10226    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10227    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10228      # If it failed, the variable was not from the command line. Ignore it,
10229      # but warn the user (except for BASH, which is always set by the calling BASH).
10230      if test "xTAIL" != xBASH; then
10231        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10232$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10233      fi
10234      # Try to locate tool using the code snippet
10235      for ac_prog in tail
10236do
10237  # Extract the first word of "$ac_prog", so it can be a program name with args.
10238set dummy $ac_prog; ac_word=$2
10239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10240$as_echo_n "checking for $ac_word... " >&6; }
10241if ${ac_cv_path_TAIL+:} false; then :
10242  $as_echo_n "(cached) " >&6
10243else
10244  case $TAIL in
10245  [\\/]* | ?:[\\/]*)
10246  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10247  ;;
10248  *)
10249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10250for as_dir in $PATH
10251do
10252  IFS=$as_save_IFS
10253  test -z "$as_dir" && as_dir=.
10254    for ac_exec_ext in '' $ac_executable_extensions; do
10255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10256    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10258    break 2
10259  fi
10260done
10261  done
10262IFS=$as_save_IFS
10263
10264  ;;
10265esac
10266fi
10267TAIL=$ac_cv_path_TAIL
10268if test -n "$TAIL"; then
10269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10270$as_echo "$TAIL" >&6; }
10271else
10272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10273$as_echo "no" >&6; }
10274fi
10275
10276
10277  test -n "$TAIL" && break
10278done
10279
10280    else
10281      # If it succeeded, then it was overridden by the user. We will use it
10282      # for the tool.
10283
10284      # First remove it from the list of overridden variables, so we can test
10285      # for unknown variables in the end.
10286      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10287
10288      # Check if we try to supply an empty value
10289      if test "x$TAIL" = x; then
10290        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10291$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10293$as_echo_n "checking for TAIL... " >&6; }
10294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10295$as_echo "disabled" >&6; }
10296      else
10297        # Check if the provided tool contains a complete path.
10298        tool_specified="$TAIL"
10299        tool_basename="${tool_specified##*/}"
10300        if test "x$tool_basename" = "x$tool_specified"; then
10301          # A command without a complete path is provided, search $PATH.
10302          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10303$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10304          # Extract the first word of "$tool_basename", so it can be a program name with args.
10305set dummy $tool_basename; ac_word=$2
10306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10307$as_echo_n "checking for $ac_word... " >&6; }
10308if ${ac_cv_path_TAIL+:} false; then :
10309  $as_echo_n "(cached) " >&6
10310else
10311  case $TAIL in
10312  [\\/]* | ?:[\\/]*)
10313  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10314  ;;
10315  *)
10316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10317for as_dir in $PATH
10318do
10319  IFS=$as_save_IFS
10320  test -z "$as_dir" && as_dir=.
10321    for ac_exec_ext in '' $ac_executable_extensions; do
10322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10323    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10325    break 2
10326  fi
10327done
10328  done
10329IFS=$as_save_IFS
10330
10331  ;;
10332esac
10333fi
10334TAIL=$ac_cv_path_TAIL
10335if test -n "$TAIL"; then
10336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10337$as_echo "$TAIL" >&6; }
10338else
10339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340$as_echo "no" >&6; }
10341fi
10342
10343
10344          if test "x$TAIL" = x; then
10345            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10346          fi
10347        else
10348          # Otherwise we believe it is a complete path. Use it as it is.
10349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10350$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10351          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10352$as_echo_n "checking for TAIL... " >&6; }
10353          if test ! -x "$tool_specified"; then
10354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10355$as_echo "not found" >&6; }
10356            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10357          fi
10358          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10359$as_echo "$tool_specified" >&6; }
10360        fi
10361      fi
10362    fi
10363
10364  fi
10365
10366
10367
10368  if test "x$TAIL" = x; then
10369    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10370  fi
10371
10372
10373
10374
10375
10376  # Publish this variable in the help.
10377
10378
10379  if [ -z "${TAR+x}" ]; then
10380    # The variable is not set by user, try to locate tool using the code snippet
10381    for ac_prog in tar
10382do
10383  # Extract the first word of "$ac_prog", so it can be a program name with args.
10384set dummy $ac_prog; ac_word=$2
10385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10386$as_echo_n "checking for $ac_word... " >&6; }
10387if ${ac_cv_path_TAR+:} false; then :
10388  $as_echo_n "(cached) " >&6
10389else
10390  case $TAR in
10391  [\\/]* | ?:[\\/]*)
10392  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10393  ;;
10394  *)
10395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10396for as_dir in $PATH
10397do
10398  IFS=$as_save_IFS
10399  test -z "$as_dir" && as_dir=.
10400    for ac_exec_ext in '' $ac_executable_extensions; do
10401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10402    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10404    break 2
10405  fi
10406done
10407  done
10408IFS=$as_save_IFS
10409
10410  ;;
10411esac
10412fi
10413TAR=$ac_cv_path_TAR
10414if test -n "$TAR"; then
10415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10416$as_echo "$TAR" >&6; }
10417else
10418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10419$as_echo "no" >&6; }
10420fi
10421
10422
10423  test -n "$TAR" && break
10424done
10425
10426  else
10427    # The variable is set, but is it from the command line or the environment?
10428
10429    # Try to remove the string !TAR! from our list.
10430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10432      # If it failed, the variable was not from the command line. Ignore it,
10433      # but warn the user (except for BASH, which is always set by the calling BASH).
10434      if test "xTAR" != xBASH; then
10435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10436$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10437      fi
10438      # Try to locate tool using the code snippet
10439      for ac_prog in tar
10440do
10441  # Extract the first word of "$ac_prog", so it can be a program name with args.
10442set dummy $ac_prog; ac_word=$2
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10444$as_echo_n "checking for $ac_word... " >&6; }
10445if ${ac_cv_path_TAR+:} false; then :
10446  $as_echo_n "(cached) " >&6
10447else
10448  case $TAR in
10449  [\\/]* | ?:[\\/]*)
10450  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10451  ;;
10452  *)
10453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10454for as_dir in $PATH
10455do
10456  IFS=$as_save_IFS
10457  test -z "$as_dir" && as_dir=.
10458    for ac_exec_ext in '' $ac_executable_extensions; do
10459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10460    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10462    break 2
10463  fi
10464done
10465  done
10466IFS=$as_save_IFS
10467
10468  ;;
10469esac
10470fi
10471TAR=$ac_cv_path_TAR
10472if test -n "$TAR"; then
10473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10474$as_echo "$TAR" >&6; }
10475else
10476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10477$as_echo "no" >&6; }
10478fi
10479
10480
10481  test -n "$TAR" && break
10482done
10483
10484    else
10485      # If it succeeded, then it was overridden by the user. We will use it
10486      # for the tool.
10487
10488      # First remove it from the list of overridden variables, so we can test
10489      # for unknown variables in the end.
10490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10491
10492      # Check if we try to supply an empty value
10493      if test "x$TAR" = x; then
10494        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10495$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10497$as_echo_n "checking for TAR... " >&6; }
10498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10499$as_echo "disabled" >&6; }
10500      else
10501        # Check if the provided tool contains a complete path.
10502        tool_specified="$TAR"
10503        tool_basename="${tool_specified##*/}"
10504        if test "x$tool_basename" = "x$tool_specified"; then
10505          # A command without a complete path is provided, search $PATH.
10506          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10507$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10508          # Extract the first word of "$tool_basename", so it can be a program name with args.
10509set dummy $tool_basename; ac_word=$2
10510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10511$as_echo_n "checking for $ac_word... " >&6; }
10512if ${ac_cv_path_TAR+:} false; then :
10513  $as_echo_n "(cached) " >&6
10514else
10515  case $TAR in
10516  [\\/]* | ?:[\\/]*)
10517  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10518  ;;
10519  *)
10520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10521for as_dir in $PATH
10522do
10523  IFS=$as_save_IFS
10524  test -z "$as_dir" && as_dir=.
10525    for ac_exec_ext in '' $ac_executable_extensions; do
10526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10527    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10529    break 2
10530  fi
10531done
10532  done
10533IFS=$as_save_IFS
10534
10535  ;;
10536esac
10537fi
10538TAR=$ac_cv_path_TAR
10539if test -n "$TAR"; then
10540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10541$as_echo "$TAR" >&6; }
10542else
10543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10544$as_echo "no" >&6; }
10545fi
10546
10547
10548          if test "x$TAR" = x; then
10549            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10550          fi
10551        else
10552          # Otherwise we believe it is a complete path. Use it as it is.
10553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10554$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10555          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10556$as_echo_n "checking for TAR... " >&6; }
10557          if test ! -x "$tool_specified"; then
10558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10559$as_echo "not found" >&6; }
10560            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10561          fi
10562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10563$as_echo "$tool_specified" >&6; }
10564        fi
10565      fi
10566    fi
10567
10568  fi
10569
10570
10571
10572  if test "x$TAR" = x; then
10573    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10574  fi
10575
10576
10577
10578
10579
10580  # Publish this variable in the help.
10581
10582
10583  if [ -z "${TEE+x}" ]; then
10584    # The variable is not set by user, try to locate tool using the code snippet
10585    for ac_prog in tee
10586do
10587  # Extract the first word of "$ac_prog", so it can be a program name with args.
10588set dummy $ac_prog; ac_word=$2
10589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10590$as_echo_n "checking for $ac_word... " >&6; }
10591if ${ac_cv_path_TEE+:} false; then :
10592  $as_echo_n "(cached) " >&6
10593else
10594  case $TEE in
10595  [\\/]* | ?:[\\/]*)
10596  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10597  ;;
10598  *)
10599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10600for as_dir in $PATH
10601do
10602  IFS=$as_save_IFS
10603  test -z "$as_dir" && as_dir=.
10604    for ac_exec_ext in '' $ac_executable_extensions; do
10605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10606    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10608    break 2
10609  fi
10610done
10611  done
10612IFS=$as_save_IFS
10613
10614  ;;
10615esac
10616fi
10617TEE=$ac_cv_path_TEE
10618if test -n "$TEE"; then
10619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10620$as_echo "$TEE" >&6; }
10621else
10622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10623$as_echo "no" >&6; }
10624fi
10625
10626
10627  test -n "$TEE" && break
10628done
10629
10630  else
10631    # The variable is set, but is it from the command line or the environment?
10632
10633    # Try to remove the string !TEE! from our list.
10634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10636      # If it failed, the variable was not from the command line. Ignore it,
10637      # but warn the user (except for BASH, which is always set by the calling BASH).
10638      if test "xTEE" != xBASH; then
10639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10640$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10641      fi
10642      # Try to locate tool using the code snippet
10643      for ac_prog in tee
10644do
10645  # Extract the first word of "$ac_prog", so it can be a program name with args.
10646set dummy $ac_prog; ac_word=$2
10647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10648$as_echo_n "checking for $ac_word... " >&6; }
10649if ${ac_cv_path_TEE+:} false; then :
10650  $as_echo_n "(cached) " >&6
10651else
10652  case $TEE in
10653  [\\/]* | ?:[\\/]*)
10654  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10655  ;;
10656  *)
10657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10658for as_dir in $PATH
10659do
10660  IFS=$as_save_IFS
10661  test -z "$as_dir" && as_dir=.
10662    for ac_exec_ext in '' $ac_executable_extensions; do
10663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10664    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10666    break 2
10667  fi
10668done
10669  done
10670IFS=$as_save_IFS
10671
10672  ;;
10673esac
10674fi
10675TEE=$ac_cv_path_TEE
10676if test -n "$TEE"; then
10677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10678$as_echo "$TEE" >&6; }
10679else
10680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10681$as_echo "no" >&6; }
10682fi
10683
10684
10685  test -n "$TEE" && break
10686done
10687
10688    else
10689      # If it succeeded, then it was overridden by the user. We will use it
10690      # for the tool.
10691
10692      # First remove it from the list of overridden variables, so we can test
10693      # for unknown variables in the end.
10694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10695
10696      # Check if we try to supply an empty value
10697      if test "x$TEE" = x; then
10698        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10699$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10701$as_echo_n "checking for TEE... " >&6; }
10702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10703$as_echo "disabled" >&6; }
10704      else
10705        # Check if the provided tool contains a complete path.
10706        tool_specified="$TEE"
10707        tool_basename="${tool_specified##*/}"
10708        if test "x$tool_basename" = "x$tool_specified"; then
10709          # A command without a complete path is provided, search $PATH.
10710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10711$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10712          # Extract the first word of "$tool_basename", so it can be a program name with args.
10713set dummy $tool_basename; ac_word=$2
10714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10715$as_echo_n "checking for $ac_word... " >&6; }
10716if ${ac_cv_path_TEE+:} false; then :
10717  $as_echo_n "(cached) " >&6
10718else
10719  case $TEE in
10720  [\\/]* | ?:[\\/]*)
10721  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10722  ;;
10723  *)
10724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10725for as_dir in $PATH
10726do
10727  IFS=$as_save_IFS
10728  test -z "$as_dir" && as_dir=.
10729    for ac_exec_ext in '' $ac_executable_extensions; do
10730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10731    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10733    break 2
10734  fi
10735done
10736  done
10737IFS=$as_save_IFS
10738
10739  ;;
10740esac
10741fi
10742TEE=$ac_cv_path_TEE
10743if test -n "$TEE"; then
10744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10745$as_echo "$TEE" >&6; }
10746else
10747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10748$as_echo "no" >&6; }
10749fi
10750
10751
10752          if test "x$TEE" = x; then
10753            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10754          fi
10755        else
10756          # Otherwise we believe it is a complete path. Use it as it is.
10757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10758$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10759          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10760$as_echo_n "checking for TEE... " >&6; }
10761          if test ! -x "$tool_specified"; then
10762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10763$as_echo "not found" >&6; }
10764            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10765          fi
10766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10767$as_echo "$tool_specified" >&6; }
10768        fi
10769      fi
10770    fi
10771
10772  fi
10773
10774
10775
10776  if test "x$TEE" = x; then
10777    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10778  fi
10779
10780
10781
10782
10783
10784  # Publish this variable in the help.
10785
10786
10787  if [ -z "${TOUCH+x}" ]; then
10788    # The variable is not set by user, try to locate tool using the code snippet
10789    for ac_prog in touch
10790do
10791  # Extract the first word of "$ac_prog", so it can be a program name with args.
10792set dummy $ac_prog; ac_word=$2
10793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10794$as_echo_n "checking for $ac_word... " >&6; }
10795if ${ac_cv_path_TOUCH+:} false; then :
10796  $as_echo_n "(cached) " >&6
10797else
10798  case $TOUCH in
10799  [\\/]* | ?:[\\/]*)
10800  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10801  ;;
10802  *)
10803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10804for as_dir in $PATH
10805do
10806  IFS=$as_save_IFS
10807  test -z "$as_dir" && as_dir=.
10808    for ac_exec_ext in '' $ac_executable_extensions; do
10809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10810    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10812    break 2
10813  fi
10814done
10815  done
10816IFS=$as_save_IFS
10817
10818  ;;
10819esac
10820fi
10821TOUCH=$ac_cv_path_TOUCH
10822if test -n "$TOUCH"; then
10823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10824$as_echo "$TOUCH" >&6; }
10825else
10826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10827$as_echo "no" >&6; }
10828fi
10829
10830
10831  test -n "$TOUCH" && break
10832done
10833
10834  else
10835    # The variable is set, but is it from the command line or the environment?
10836
10837    # Try to remove the string !TOUCH! from our list.
10838    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10839    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10840      # If it failed, the variable was not from the command line. Ignore it,
10841      # but warn the user (except for BASH, which is always set by the calling BASH).
10842      if test "xTOUCH" != xBASH; then
10843        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10844$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10845      fi
10846      # Try to locate tool using the code snippet
10847      for ac_prog in touch
10848do
10849  # Extract the first word of "$ac_prog", so it can be a program name with args.
10850set dummy $ac_prog; ac_word=$2
10851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10852$as_echo_n "checking for $ac_word... " >&6; }
10853if ${ac_cv_path_TOUCH+:} false; then :
10854  $as_echo_n "(cached) " >&6
10855else
10856  case $TOUCH in
10857  [\\/]* | ?:[\\/]*)
10858  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10859  ;;
10860  *)
10861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10862for as_dir in $PATH
10863do
10864  IFS=$as_save_IFS
10865  test -z "$as_dir" && as_dir=.
10866    for ac_exec_ext in '' $ac_executable_extensions; do
10867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10868    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10870    break 2
10871  fi
10872done
10873  done
10874IFS=$as_save_IFS
10875
10876  ;;
10877esac
10878fi
10879TOUCH=$ac_cv_path_TOUCH
10880if test -n "$TOUCH"; then
10881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10882$as_echo "$TOUCH" >&6; }
10883else
10884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10885$as_echo "no" >&6; }
10886fi
10887
10888
10889  test -n "$TOUCH" && break
10890done
10891
10892    else
10893      # If it succeeded, then it was overridden by the user. We will use it
10894      # for the tool.
10895
10896      # First remove it from the list of overridden variables, so we can test
10897      # for unknown variables in the end.
10898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10899
10900      # Check if we try to supply an empty value
10901      if test "x$TOUCH" = x; then
10902        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10903$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10905$as_echo_n "checking for TOUCH... " >&6; }
10906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10907$as_echo "disabled" >&6; }
10908      else
10909        # Check if the provided tool contains a complete path.
10910        tool_specified="$TOUCH"
10911        tool_basename="${tool_specified##*/}"
10912        if test "x$tool_basename" = "x$tool_specified"; then
10913          # A command without a complete path is provided, search $PATH.
10914          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10915$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10916          # Extract the first word of "$tool_basename", so it can be a program name with args.
10917set dummy $tool_basename; ac_word=$2
10918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10919$as_echo_n "checking for $ac_word... " >&6; }
10920if ${ac_cv_path_TOUCH+:} false; then :
10921  $as_echo_n "(cached) " >&6
10922else
10923  case $TOUCH in
10924  [\\/]* | ?:[\\/]*)
10925  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10926  ;;
10927  *)
10928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10929for as_dir in $PATH
10930do
10931  IFS=$as_save_IFS
10932  test -z "$as_dir" && as_dir=.
10933    for ac_exec_ext in '' $ac_executable_extensions; do
10934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10935    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10937    break 2
10938  fi
10939done
10940  done
10941IFS=$as_save_IFS
10942
10943  ;;
10944esac
10945fi
10946TOUCH=$ac_cv_path_TOUCH
10947if test -n "$TOUCH"; then
10948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10949$as_echo "$TOUCH" >&6; }
10950else
10951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10952$as_echo "no" >&6; }
10953fi
10954
10955
10956          if test "x$TOUCH" = x; then
10957            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10958          fi
10959        else
10960          # Otherwise we believe it is a complete path. Use it as it is.
10961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10962$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10963          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10964$as_echo_n "checking for TOUCH... " >&6; }
10965          if test ! -x "$tool_specified"; then
10966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10967$as_echo "not found" >&6; }
10968            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10969          fi
10970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10971$as_echo "$tool_specified" >&6; }
10972        fi
10973      fi
10974    fi
10975
10976  fi
10977
10978
10979
10980  if test "x$TOUCH" = x; then
10981    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10982  fi
10983
10984
10985
10986
10987
10988  # Publish this variable in the help.
10989
10990
10991  if [ -z "${TR+x}" ]; then
10992    # The variable is not set by user, try to locate tool using the code snippet
10993    for ac_prog in tr
10994do
10995  # Extract the first word of "$ac_prog", so it can be a program name with args.
10996set dummy $ac_prog; ac_word=$2
10997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10998$as_echo_n "checking for $ac_word... " >&6; }
10999if ${ac_cv_path_TR+:} false; then :
11000  $as_echo_n "(cached) " >&6
11001else
11002  case $TR in
11003  [\\/]* | ?:[\\/]*)
11004  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11005  ;;
11006  *)
11007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11008for as_dir in $PATH
11009do
11010  IFS=$as_save_IFS
11011  test -z "$as_dir" && as_dir=.
11012    for ac_exec_ext in '' $ac_executable_extensions; do
11013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11014    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11016    break 2
11017  fi
11018done
11019  done
11020IFS=$as_save_IFS
11021
11022  ;;
11023esac
11024fi
11025TR=$ac_cv_path_TR
11026if test -n "$TR"; then
11027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11028$as_echo "$TR" >&6; }
11029else
11030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11031$as_echo "no" >&6; }
11032fi
11033
11034
11035  test -n "$TR" && break
11036done
11037
11038  else
11039    # The variable is set, but is it from the command line or the environment?
11040
11041    # Try to remove the string !TR! from our list.
11042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11044      # If it failed, the variable was not from the command line. Ignore it,
11045      # but warn the user (except for BASH, which is always set by the calling BASH).
11046      if test "xTR" != xBASH; then
11047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11048$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11049      fi
11050      # Try to locate tool using the code snippet
11051      for ac_prog in tr
11052do
11053  # Extract the first word of "$ac_prog", so it can be a program name with args.
11054set dummy $ac_prog; ac_word=$2
11055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11056$as_echo_n "checking for $ac_word... " >&6; }
11057if ${ac_cv_path_TR+:} false; then :
11058  $as_echo_n "(cached) " >&6
11059else
11060  case $TR in
11061  [\\/]* | ?:[\\/]*)
11062  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11063  ;;
11064  *)
11065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11066for as_dir in $PATH
11067do
11068  IFS=$as_save_IFS
11069  test -z "$as_dir" && as_dir=.
11070    for ac_exec_ext in '' $ac_executable_extensions; do
11071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11072    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11074    break 2
11075  fi
11076done
11077  done
11078IFS=$as_save_IFS
11079
11080  ;;
11081esac
11082fi
11083TR=$ac_cv_path_TR
11084if test -n "$TR"; then
11085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11086$as_echo "$TR" >&6; }
11087else
11088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11089$as_echo "no" >&6; }
11090fi
11091
11092
11093  test -n "$TR" && break
11094done
11095
11096    else
11097      # If it succeeded, then it was overridden by the user. We will use it
11098      # for the tool.
11099
11100      # First remove it from the list of overridden variables, so we can test
11101      # for unknown variables in the end.
11102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11103
11104      # Check if we try to supply an empty value
11105      if test "x$TR" = x; then
11106        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11107$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11108        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11109$as_echo_n "checking for TR... " >&6; }
11110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11111$as_echo "disabled" >&6; }
11112      else
11113        # Check if the provided tool contains a complete path.
11114        tool_specified="$TR"
11115        tool_basename="${tool_specified##*/}"
11116        if test "x$tool_basename" = "x$tool_specified"; then
11117          # A command without a complete path is provided, search $PATH.
11118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11119$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11120          # Extract the first word of "$tool_basename", so it can be a program name with args.
11121set dummy $tool_basename; ac_word=$2
11122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11123$as_echo_n "checking for $ac_word... " >&6; }
11124if ${ac_cv_path_TR+:} false; then :
11125  $as_echo_n "(cached) " >&6
11126else
11127  case $TR in
11128  [\\/]* | ?:[\\/]*)
11129  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11130  ;;
11131  *)
11132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11133for as_dir in $PATH
11134do
11135  IFS=$as_save_IFS
11136  test -z "$as_dir" && as_dir=.
11137    for ac_exec_ext in '' $ac_executable_extensions; do
11138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11139    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11141    break 2
11142  fi
11143done
11144  done
11145IFS=$as_save_IFS
11146
11147  ;;
11148esac
11149fi
11150TR=$ac_cv_path_TR
11151if test -n "$TR"; then
11152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11153$as_echo "$TR" >&6; }
11154else
11155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11156$as_echo "no" >&6; }
11157fi
11158
11159
11160          if test "x$TR" = x; then
11161            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11162          fi
11163        else
11164          # Otherwise we believe it is a complete path. Use it as it is.
11165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11166$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11167          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11168$as_echo_n "checking for TR... " >&6; }
11169          if test ! -x "$tool_specified"; then
11170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11171$as_echo "not found" >&6; }
11172            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11173          fi
11174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11175$as_echo "$tool_specified" >&6; }
11176        fi
11177      fi
11178    fi
11179
11180  fi
11181
11182
11183
11184  if test "x$TR" = x; then
11185    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11186  fi
11187
11188
11189
11190
11191
11192  # Publish this variable in the help.
11193
11194
11195  if [ -z "${UNAME+x}" ]; then
11196    # The variable is not set by user, try to locate tool using the code snippet
11197    for ac_prog in uname
11198do
11199  # Extract the first word of "$ac_prog", so it can be a program name with args.
11200set dummy $ac_prog; ac_word=$2
11201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11202$as_echo_n "checking for $ac_word... " >&6; }
11203if ${ac_cv_path_UNAME+:} false; then :
11204  $as_echo_n "(cached) " >&6
11205else
11206  case $UNAME in
11207  [\\/]* | ?:[\\/]*)
11208  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11209  ;;
11210  *)
11211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11212for as_dir in $PATH
11213do
11214  IFS=$as_save_IFS
11215  test -z "$as_dir" && as_dir=.
11216    for ac_exec_ext in '' $ac_executable_extensions; do
11217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11218    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11220    break 2
11221  fi
11222done
11223  done
11224IFS=$as_save_IFS
11225
11226  ;;
11227esac
11228fi
11229UNAME=$ac_cv_path_UNAME
11230if test -n "$UNAME"; then
11231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11232$as_echo "$UNAME" >&6; }
11233else
11234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11235$as_echo "no" >&6; }
11236fi
11237
11238
11239  test -n "$UNAME" && break
11240done
11241
11242  else
11243    # The variable is set, but is it from the command line or the environment?
11244
11245    # Try to remove the string !UNAME! from our list.
11246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11248      # If it failed, the variable was not from the command line. Ignore it,
11249      # but warn the user (except for BASH, which is always set by the calling BASH).
11250      if test "xUNAME" != xBASH; then
11251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11252$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11253      fi
11254      # Try to locate tool using the code snippet
11255      for ac_prog in uname
11256do
11257  # Extract the first word of "$ac_prog", so it can be a program name with args.
11258set dummy $ac_prog; ac_word=$2
11259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11260$as_echo_n "checking for $ac_word... " >&6; }
11261if ${ac_cv_path_UNAME+:} false; then :
11262  $as_echo_n "(cached) " >&6
11263else
11264  case $UNAME in
11265  [\\/]* | ?:[\\/]*)
11266  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11267  ;;
11268  *)
11269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11270for as_dir in $PATH
11271do
11272  IFS=$as_save_IFS
11273  test -z "$as_dir" && as_dir=.
11274    for ac_exec_ext in '' $ac_executable_extensions; do
11275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11276    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11278    break 2
11279  fi
11280done
11281  done
11282IFS=$as_save_IFS
11283
11284  ;;
11285esac
11286fi
11287UNAME=$ac_cv_path_UNAME
11288if test -n "$UNAME"; then
11289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11290$as_echo "$UNAME" >&6; }
11291else
11292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293$as_echo "no" >&6; }
11294fi
11295
11296
11297  test -n "$UNAME" && break
11298done
11299
11300    else
11301      # If it succeeded, then it was overridden by the user. We will use it
11302      # for the tool.
11303
11304      # First remove it from the list of overridden variables, so we can test
11305      # for unknown variables in the end.
11306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11307
11308      # Check if we try to supply an empty value
11309      if test "x$UNAME" = x; then
11310        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11311$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11313$as_echo_n "checking for UNAME... " >&6; }
11314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11315$as_echo "disabled" >&6; }
11316      else
11317        # Check if the provided tool contains a complete path.
11318        tool_specified="$UNAME"
11319        tool_basename="${tool_specified##*/}"
11320        if test "x$tool_basename" = "x$tool_specified"; then
11321          # A command without a complete path is provided, search $PATH.
11322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11323$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11324          # Extract the first word of "$tool_basename", so it can be a program name with args.
11325set dummy $tool_basename; ac_word=$2
11326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11327$as_echo_n "checking for $ac_word... " >&6; }
11328if ${ac_cv_path_UNAME+:} false; then :
11329  $as_echo_n "(cached) " >&6
11330else
11331  case $UNAME in
11332  [\\/]* | ?:[\\/]*)
11333  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11334  ;;
11335  *)
11336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11337for as_dir in $PATH
11338do
11339  IFS=$as_save_IFS
11340  test -z "$as_dir" && as_dir=.
11341    for ac_exec_ext in '' $ac_executable_extensions; do
11342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11343    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11345    break 2
11346  fi
11347done
11348  done
11349IFS=$as_save_IFS
11350
11351  ;;
11352esac
11353fi
11354UNAME=$ac_cv_path_UNAME
11355if test -n "$UNAME"; then
11356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11357$as_echo "$UNAME" >&6; }
11358else
11359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11360$as_echo "no" >&6; }
11361fi
11362
11363
11364          if test "x$UNAME" = x; then
11365            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11366          fi
11367        else
11368          # Otherwise we believe it is a complete path. Use it as it is.
11369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11370$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11371          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11372$as_echo_n "checking for UNAME... " >&6; }
11373          if test ! -x "$tool_specified"; then
11374            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11375$as_echo "not found" >&6; }
11376            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11377          fi
11378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11379$as_echo "$tool_specified" >&6; }
11380        fi
11381      fi
11382    fi
11383
11384  fi
11385
11386
11387
11388  if test "x$UNAME" = x; then
11389    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11390  fi
11391
11392
11393
11394
11395
11396  # Publish this variable in the help.
11397
11398
11399  if [ -z "${UNIQ+x}" ]; then
11400    # The variable is not set by user, try to locate tool using the code snippet
11401    for ac_prog in uniq
11402do
11403  # Extract the first word of "$ac_prog", so it can be a program name with args.
11404set dummy $ac_prog; ac_word=$2
11405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11406$as_echo_n "checking for $ac_word... " >&6; }
11407if ${ac_cv_path_UNIQ+:} false; then :
11408  $as_echo_n "(cached) " >&6
11409else
11410  case $UNIQ in
11411  [\\/]* | ?:[\\/]*)
11412  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11413  ;;
11414  *)
11415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11416for as_dir in $PATH
11417do
11418  IFS=$as_save_IFS
11419  test -z "$as_dir" && as_dir=.
11420    for ac_exec_ext in '' $ac_executable_extensions; do
11421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11422    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11424    break 2
11425  fi
11426done
11427  done
11428IFS=$as_save_IFS
11429
11430  ;;
11431esac
11432fi
11433UNIQ=$ac_cv_path_UNIQ
11434if test -n "$UNIQ"; then
11435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11436$as_echo "$UNIQ" >&6; }
11437else
11438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11439$as_echo "no" >&6; }
11440fi
11441
11442
11443  test -n "$UNIQ" && break
11444done
11445
11446  else
11447    # The variable is set, but is it from the command line or the environment?
11448
11449    # Try to remove the string !UNIQ! from our list.
11450    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11451    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11452      # If it failed, the variable was not from the command line. Ignore it,
11453      # but warn the user (except for BASH, which is always set by the calling BASH).
11454      if test "xUNIQ" != xBASH; then
11455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11456$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11457      fi
11458      # Try to locate tool using the code snippet
11459      for ac_prog in uniq
11460do
11461  # Extract the first word of "$ac_prog", so it can be a program name with args.
11462set dummy $ac_prog; ac_word=$2
11463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11464$as_echo_n "checking for $ac_word... " >&6; }
11465if ${ac_cv_path_UNIQ+:} false; then :
11466  $as_echo_n "(cached) " >&6
11467else
11468  case $UNIQ in
11469  [\\/]* | ?:[\\/]*)
11470  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11471  ;;
11472  *)
11473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11474for as_dir in $PATH
11475do
11476  IFS=$as_save_IFS
11477  test -z "$as_dir" && as_dir=.
11478    for ac_exec_ext in '' $ac_executable_extensions; do
11479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11480    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11482    break 2
11483  fi
11484done
11485  done
11486IFS=$as_save_IFS
11487
11488  ;;
11489esac
11490fi
11491UNIQ=$ac_cv_path_UNIQ
11492if test -n "$UNIQ"; then
11493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11494$as_echo "$UNIQ" >&6; }
11495else
11496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11497$as_echo "no" >&6; }
11498fi
11499
11500
11501  test -n "$UNIQ" && break
11502done
11503
11504    else
11505      # If it succeeded, then it was overridden by the user. We will use it
11506      # for the tool.
11507
11508      # First remove it from the list of overridden variables, so we can test
11509      # for unknown variables in the end.
11510      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11511
11512      # Check if we try to supply an empty value
11513      if test "x$UNIQ" = x; then
11514        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11515$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11517$as_echo_n "checking for UNIQ... " >&6; }
11518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11519$as_echo "disabled" >&6; }
11520      else
11521        # Check if the provided tool contains a complete path.
11522        tool_specified="$UNIQ"
11523        tool_basename="${tool_specified##*/}"
11524        if test "x$tool_basename" = "x$tool_specified"; then
11525          # A command without a complete path is provided, search $PATH.
11526          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11527$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11528          # Extract the first word of "$tool_basename", so it can be a program name with args.
11529set dummy $tool_basename; ac_word=$2
11530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11531$as_echo_n "checking for $ac_word... " >&6; }
11532if ${ac_cv_path_UNIQ+:} false; then :
11533  $as_echo_n "(cached) " >&6
11534else
11535  case $UNIQ in
11536  [\\/]* | ?:[\\/]*)
11537  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11538  ;;
11539  *)
11540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11541for as_dir in $PATH
11542do
11543  IFS=$as_save_IFS
11544  test -z "$as_dir" && as_dir=.
11545    for ac_exec_ext in '' $ac_executable_extensions; do
11546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11547    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11549    break 2
11550  fi
11551done
11552  done
11553IFS=$as_save_IFS
11554
11555  ;;
11556esac
11557fi
11558UNIQ=$ac_cv_path_UNIQ
11559if test -n "$UNIQ"; then
11560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11561$as_echo "$UNIQ" >&6; }
11562else
11563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11564$as_echo "no" >&6; }
11565fi
11566
11567
11568          if test "x$UNIQ" = x; then
11569            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11570          fi
11571        else
11572          # Otherwise we believe it is a complete path. Use it as it is.
11573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11574$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11575          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11576$as_echo_n "checking for UNIQ... " >&6; }
11577          if test ! -x "$tool_specified"; then
11578            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11579$as_echo "not found" >&6; }
11580            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11581          fi
11582          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11583$as_echo "$tool_specified" >&6; }
11584        fi
11585      fi
11586    fi
11587
11588  fi
11589
11590
11591
11592  if test "x$UNIQ" = x; then
11593    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11594  fi
11595
11596
11597
11598
11599
11600  # Publish this variable in the help.
11601
11602
11603  if [ -z "${WC+x}" ]; then
11604    # The variable is not set by user, try to locate tool using the code snippet
11605    for ac_prog in wc
11606do
11607  # Extract the first word of "$ac_prog", so it can be a program name with args.
11608set dummy $ac_prog; ac_word=$2
11609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11610$as_echo_n "checking for $ac_word... " >&6; }
11611if ${ac_cv_path_WC+:} false; then :
11612  $as_echo_n "(cached) " >&6
11613else
11614  case $WC in
11615  [\\/]* | ?:[\\/]*)
11616  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11617  ;;
11618  *)
11619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11620for as_dir in $PATH
11621do
11622  IFS=$as_save_IFS
11623  test -z "$as_dir" && as_dir=.
11624    for ac_exec_ext in '' $ac_executable_extensions; do
11625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11626    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11628    break 2
11629  fi
11630done
11631  done
11632IFS=$as_save_IFS
11633
11634  ;;
11635esac
11636fi
11637WC=$ac_cv_path_WC
11638if test -n "$WC"; then
11639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11640$as_echo "$WC" >&6; }
11641else
11642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11643$as_echo "no" >&6; }
11644fi
11645
11646
11647  test -n "$WC" && break
11648done
11649
11650  else
11651    # The variable is set, but is it from the command line or the environment?
11652
11653    # Try to remove the string !WC! from our list.
11654    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11655    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11656      # If it failed, the variable was not from the command line. Ignore it,
11657      # but warn the user (except for BASH, which is always set by the calling BASH).
11658      if test "xWC" != xBASH; then
11659        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11660$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11661      fi
11662      # Try to locate tool using the code snippet
11663      for ac_prog in wc
11664do
11665  # Extract the first word of "$ac_prog", so it can be a program name with args.
11666set dummy $ac_prog; ac_word=$2
11667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11668$as_echo_n "checking for $ac_word... " >&6; }
11669if ${ac_cv_path_WC+:} false; then :
11670  $as_echo_n "(cached) " >&6
11671else
11672  case $WC in
11673  [\\/]* | ?:[\\/]*)
11674  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11675  ;;
11676  *)
11677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11678for as_dir in $PATH
11679do
11680  IFS=$as_save_IFS
11681  test -z "$as_dir" && as_dir=.
11682    for ac_exec_ext in '' $ac_executable_extensions; do
11683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11684    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11686    break 2
11687  fi
11688done
11689  done
11690IFS=$as_save_IFS
11691
11692  ;;
11693esac
11694fi
11695WC=$ac_cv_path_WC
11696if test -n "$WC"; then
11697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11698$as_echo "$WC" >&6; }
11699else
11700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11701$as_echo "no" >&6; }
11702fi
11703
11704
11705  test -n "$WC" && break
11706done
11707
11708    else
11709      # If it succeeded, then it was overridden by the user. We will use it
11710      # for the tool.
11711
11712      # First remove it from the list of overridden variables, so we can test
11713      # for unknown variables in the end.
11714      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11715
11716      # Check if we try to supply an empty value
11717      if test "x$WC" = x; then
11718        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11719$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11720        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11721$as_echo_n "checking for WC... " >&6; }
11722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11723$as_echo "disabled" >&6; }
11724      else
11725        # Check if the provided tool contains a complete path.
11726        tool_specified="$WC"
11727        tool_basename="${tool_specified##*/}"
11728        if test "x$tool_basename" = "x$tool_specified"; then
11729          # A command without a complete path is provided, search $PATH.
11730          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11731$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11732          # Extract the first word of "$tool_basename", so it can be a program name with args.
11733set dummy $tool_basename; ac_word=$2
11734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11735$as_echo_n "checking for $ac_word... " >&6; }
11736if ${ac_cv_path_WC+:} false; then :
11737  $as_echo_n "(cached) " >&6
11738else
11739  case $WC in
11740  [\\/]* | ?:[\\/]*)
11741  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11742  ;;
11743  *)
11744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11745for as_dir in $PATH
11746do
11747  IFS=$as_save_IFS
11748  test -z "$as_dir" && as_dir=.
11749    for ac_exec_ext in '' $ac_executable_extensions; do
11750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11751    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11753    break 2
11754  fi
11755done
11756  done
11757IFS=$as_save_IFS
11758
11759  ;;
11760esac
11761fi
11762WC=$ac_cv_path_WC
11763if test -n "$WC"; then
11764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11765$as_echo "$WC" >&6; }
11766else
11767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11768$as_echo "no" >&6; }
11769fi
11770
11771
11772          if test "x$WC" = x; then
11773            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11774          fi
11775        else
11776          # Otherwise we believe it is a complete path. Use it as it is.
11777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11778$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11779          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11780$as_echo_n "checking for WC... " >&6; }
11781          if test ! -x "$tool_specified"; then
11782            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11783$as_echo "not found" >&6; }
11784            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11785          fi
11786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11787$as_echo "$tool_specified" >&6; }
11788        fi
11789      fi
11790    fi
11791
11792  fi
11793
11794
11795
11796  if test "x$WC" = x; then
11797    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11798  fi
11799
11800
11801
11802
11803
11804  # Publish this variable in the help.
11805
11806
11807  if [ -z "${WHICH+x}" ]; then
11808    # The variable is not set by user, try to locate tool using the code snippet
11809    for ac_prog in which
11810do
11811  # Extract the first word of "$ac_prog", so it can be a program name with args.
11812set dummy $ac_prog; ac_word=$2
11813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11814$as_echo_n "checking for $ac_word... " >&6; }
11815if ${ac_cv_path_WHICH+:} false; then :
11816  $as_echo_n "(cached) " >&6
11817else
11818  case $WHICH in
11819  [\\/]* | ?:[\\/]*)
11820  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11821  ;;
11822  *)
11823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11824for as_dir in $PATH
11825do
11826  IFS=$as_save_IFS
11827  test -z "$as_dir" && as_dir=.
11828    for ac_exec_ext in '' $ac_executable_extensions; do
11829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11830    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11832    break 2
11833  fi
11834done
11835  done
11836IFS=$as_save_IFS
11837
11838  ;;
11839esac
11840fi
11841WHICH=$ac_cv_path_WHICH
11842if test -n "$WHICH"; then
11843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11844$as_echo "$WHICH" >&6; }
11845else
11846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11847$as_echo "no" >&6; }
11848fi
11849
11850
11851  test -n "$WHICH" && break
11852done
11853
11854  else
11855    # The variable is set, but is it from the command line or the environment?
11856
11857    # Try to remove the string !WHICH! from our list.
11858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11860      # If it failed, the variable was not from the command line. Ignore it,
11861      # but warn the user (except for BASH, which is always set by the calling BASH).
11862      if test "xWHICH" != xBASH; then
11863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11864$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11865      fi
11866      # Try to locate tool using the code snippet
11867      for ac_prog in which
11868do
11869  # Extract the first word of "$ac_prog", so it can be a program name with args.
11870set dummy $ac_prog; ac_word=$2
11871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11872$as_echo_n "checking for $ac_word... " >&6; }
11873if ${ac_cv_path_WHICH+:} false; then :
11874  $as_echo_n "(cached) " >&6
11875else
11876  case $WHICH in
11877  [\\/]* | ?:[\\/]*)
11878  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11879  ;;
11880  *)
11881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11882for as_dir in $PATH
11883do
11884  IFS=$as_save_IFS
11885  test -z "$as_dir" && as_dir=.
11886    for ac_exec_ext in '' $ac_executable_extensions; do
11887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11888    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11890    break 2
11891  fi
11892done
11893  done
11894IFS=$as_save_IFS
11895
11896  ;;
11897esac
11898fi
11899WHICH=$ac_cv_path_WHICH
11900if test -n "$WHICH"; then
11901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11902$as_echo "$WHICH" >&6; }
11903else
11904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11905$as_echo "no" >&6; }
11906fi
11907
11908
11909  test -n "$WHICH" && break
11910done
11911
11912    else
11913      # If it succeeded, then it was overridden by the user. We will use it
11914      # for the tool.
11915
11916      # First remove it from the list of overridden variables, so we can test
11917      # for unknown variables in the end.
11918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11919
11920      # Check if we try to supply an empty value
11921      if test "x$WHICH" = x; then
11922        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11923$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11925$as_echo_n "checking for WHICH... " >&6; }
11926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11927$as_echo "disabled" >&6; }
11928      else
11929        # Check if the provided tool contains a complete path.
11930        tool_specified="$WHICH"
11931        tool_basename="${tool_specified##*/}"
11932        if test "x$tool_basename" = "x$tool_specified"; then
11933          # A command without a complete path is provided, search $PATH.
11934          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11935$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11936          # Extract the first word of "$tool_basename", so it can be a program name with args.
11937set dummy $tool_basename; ac_word=$2
11938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11939$as_echo_n "checking for $ac_word... " >&6; }
11940if ${ac_cv_path_WHICH+:} false; then :
11941  $as_echo_n "(cached) " >&6
11942else
11943  case $WHICH in
11944  [\\/]* | ?:[\\/]*)
11945  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11946  ;;
11947  *)
11948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11949for as_dir in $PATH
11950do
11951  IFS=$as_save_IFS
11952  test -z "$as_dir" && as_dir=.
11953    for ac_exec_ext in '' $ac_executable_extensions; do
11954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11955    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11957    break 2
11958  fi
11959done
11960  done
11961IFS=$as_save_IFS
11962
11963  ;;
11964esac
11965fi
11966WHICH=$ac_cv_path_WHICH
11967if test -n "$WHICH"; then
11968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11969$as_echo "$WHICH" >&6; }
11970else
11971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11972$as_echo "no" >&6; }
11973fi
11974
11975
11976          if test "x$WHICH" = x; then
11977            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11978          fi
11979        else
11980          # Otherwise we believe it is a complete path. Use it as it is.
11981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11982$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11983          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11984$as_echo_n "checking for WHICH... " >&6; }
11985          if test ! -x "$tool_specified"; then
11986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11987$as_echo "not found" >&6; }
11988            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11989          fi
11990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11991$as_echo "$tool_specified" >&6; }
11992        fi
11993      fi
11994    fi
11995
11996  fi
11997
11998
11999
12000  if test "x$WHICH" = x; then
12001    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12002  fi
12003
12004
12005
12006
12007
12008  # Publish this variable in the help.
12009
12010
12011  if [ -z "${XARGS+x}" ]; then
12012    # The variable is not set by user, try to locate tool using the code snippet
12013    for ac_prog in xargs
12014do
12015  # Extract the first word of "$ac_prog", so it can be a program name with args.
12016set dummy $ac_prog; ac_word=$2
12017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12018$as_echo_n "checking for $ac_word... " >&6; }
12019if ${ac_cv_path_XARGS+:} false; then :
12020  $as_echo_n "(cached) " >&6
12021else
12022  case $XARGS in
12023  [\\/]* | ?:[\\/]*)
12024  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12025  ;;
12026  *)
12027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12028for as_dir in $PATH
12029do
12030  IFS=$as_save_IFS
12031  test -z "$as_dir" && as_dir=.
12032    for ac_exec_ext in '' $ac_executable_extensions; do
12033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12034    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12036    break 2
12037  fi
12038done
12039  done
12040IFS=$as_save_IFS
12041
12042  ;;
12043esac
12044fi
12045XARGS=$ac_cv_path_XARGS
12046if test -n "$XARGS"; then
12047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12048$as_echo "$XARGS" >&6; }
12049else
12050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12051$as_echo "no" >&6; }
12052fi
12053
12054
12055  test -n "$XARGS" && break
12056done
12057
12058  else
12059    # The variable is set, but is it from the command line or the environment?
12060
12061    # Try to remove the string !XARGS! from our list.
12062    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12063    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12064      # If it failed, the variable was not from the command line. Ignore it,
12065      # but warn the user (except for BASH, which is always set by the calling BASH).
12066      if test "xXARGS" != xBASH; then
12067        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12068$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12069      fi
12070      # Try to locate tool using the code snippet
12071      for ac_prog in xargs
12072do
12073  # Extract the first word of "$ac_prog", so it can be a program name with args.
12074set dummy $ac_prog; ac_word=$2
12075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12076$as_echo_n "checking for $ac_word... " >&6; }
12077if ${ac_cv_path_XARGS+:} false; then :
12078  $as_echo_n "(cached) " >&6
12079else
12080  case $XARGS in
12081  [\\/]* | ?:[\\/]*)
12082  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12083  ;;
12084  *)
12085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12086for as_dir in $PATH
12087do
12088  IFS=$as_save_IFS
12089  test -z "$as_dir" && as_dir=.
12090    for ac_exec_ext in '' $ac_executable_extensions; do
12091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12092    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12094    break 2
12095  fi
12096done
12097  done
12098IFS=$as_save_IFS
12099
12100  ;;
12101esac
12102fi
12103XARGS=$ac_cv_path_XARGS
12104if test -n "$XARGS"; then
12105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12106$as_echo "$XARGS" >&6; }
12107else
12108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12109$as_echo "no" >&6; }
12110fi
12111
12112
12113  test -n "$XARGS" && break
12114done
12115
12116    else
12117      # If it succeeded, then it was overridden by the user. We will use it
12118      # for the tool.
12119
12120      # First remove it from the list of overridden variables, so we can test
12121      # for unknown variables in the end.
12122      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12123
12124      # Check if we try to supply an empty value
12125      if test "x$XARGS" = x; then
12126        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12127$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12128        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12129$as_echo_n "checking for XARGS... " >&6; }
12130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12131$as_echo "disabled" >&6; }
12132      else
12133        # Check if the provided tool contains a complete path.
12134        tool_specified="$XARGS"
12135        tool_basename="${tool_specified##*/}"
12136        if test "x$tool_basename" = "x$tool_specified"; then
12137          # A command without a complete path is provided, search $PATH.
12138          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12139$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12140          # Extract the first word of "$tool_basename", so it can be a program name with args.
12141set dummy $tool_basename; ac_word=$2
12142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12143$as_echo_n "checking for $ac_word... " >&6; }
12144if ${ac_cv_path_XARGS+:} false; then :
12145  $as_echo_n "(cached) " >&6
12146else
12147  case $XARGS in
12148  [\\/]* | ?:[\\/]*)
12149  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12150  ;;
12151  *)
12152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12153for as_dir in $PATH
12154do
12155  IFS=$as_save_IFS
12156  test -z "$as_dir" && as_dir=.
12157    for ac_exec_ext in '' $ac_executable_extensions; do
12158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12159    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12161    break 2
12162  fi
12163done
12164  done
12165IFS=$as_save_IFS
12166
12167  ;;
12168esac
12169fi
12170XARGS=$ac_cv_path_XARGS
12171if test -n "$XARGS"; then
12172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12173$as_echo "$XARGS" >&6; }
12174else
12175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12176$as_echo "no" >&6; }
12177fi
12178
12179
12180          if test "x$XARGS" = x; then
12181            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12182          fi
12183        else
12184          # Otherwise we believe it is a complete path. Use it as it is.
12185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12186$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12187          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12188$as_echo_n "checking for XARGS... " >&6; }
12189          if test ! -x "$tool_specified"; then
12190            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12191$as_echo "not found" >&6; }
12192            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12193          fi
12194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12195$as_echo "$tool_specified" >&6; }
12196        fi
12197      fi
12198    fi
12199
12200  fi
12201
12202
12203
12204  if test "x$XARGS" = x; then
12205    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12206  fi
12207
12208
12209
12210  # Then required tools that require some special treatment.
12211
12212
12213  # Publish this variable in the help.
12214
12215
12216  if [ -z "${AWK+x}" ]; then
12217    # The variable is not set by user, try to locate tool using the code snippet
12218    for ac_prog in gawk mawk nawk awk
12219do
12220  # Extract the first word of "$ac_prog", so it can be a program name with args.
12221set dummy $ac_prog; ac_word=$2
12222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12223$as_echo_n "checking for $ac_word... " >&6; }
12224if ${ac_cv_prog_AWK+:} false; then :
12225  $as_echo_n "(cached) " >&6
12226else
12227  if test -n "$AWK"; then
12228  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12229else
12230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12231for as_dir in $PATH
12232do
12233  IFS=$as_save_IFS
12234  test -z "$as_dir" && as_dir=.
12235    for ac_exec_ext in '' $ac_executable_extensions; do
12236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12237    ac_cv_prog_AWK="$ac_prog"
12238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12239    break 2
12240  fi
12241done
12242  done
12243IFS=$as_save_IFS
12244
12245fi
12246fi
12247AWK=$ac_cv_prog_AWK
12248if test -n "$AWK"; then
12249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12250$as_echo "$AWK" >&6; }
12251else
12252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12253$as_echo "no" >&6; }
12254fi
12255
12256
12257  test -n "$AWK" && break
12258done
12259
12260  else
12261    # The variable is set, but is it from the command line or the environment?
12262
12263    # Try to remove the string !AWK! from our list.
12264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12266      # If it failed, the variable was not from the command line. Ignore it,
12267      # but warn the user (except for BASH, which is always set by the calling BASH).
12268      if test "xAWK" != xBASH; then
12269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12270$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12271      fi
12272      # Try to locate tool using the code snippet
12273      for ac_prog in gawk mawk nawk awk
12274do
12275  # Extract the first word of "$ac_prog", so it can be a program name with args.
12276set dummy $ac_prog; ac_word=$2
12277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12278$as_echo_n "checking for $ac_word... " >&6; }
12279if ${ac_cv_prog_AWK+:} false; then :
12280  $as_echo_n "(cached) " >&6
12281else
12282  if test -n "$AWK"; then
12283  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12284else
12285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12286for as_dir in $PATH
12287do
12288  IFS=$as_save_IFS
12289  test -z "$as_dir" && as_dir=.
12290    for ac_exec_ext in '' $ac_executable_extensions; do
12291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12292    ac_cv_prog_AWK="$ac_prog"
12293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12294    break 2
12295  fi
12296done
12297  done
12298IFS=$as_save_IFS
12299
12300fi
12301fi
12302AWK=$ac_cv_prog_AWK
12303if test -n "$AWK"; then
12304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12305$as_echo "$AWK" >&6; }
12306else
12307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12308$as_echo "no" >&6; }
12309fi
12310
12311
12312  test -n "$AWK" && break
12313done
12314
12315    else
12316      # If it succeeded, then it was overridden by the user. We will use it
12317      # for the tool.
12318
12319      # First remove it from the list of overridden variables, so we can test
12320      # for unknown variables in the end.
12321      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12322
12323      # Check if we try to supply an empty value
12324      if test "x$AWK" = x; then
12325        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12326$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12327        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12328$as_echo_n "checking for AWK... " >&6; }
12329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12330$as_echo "disabled" >&6; }
12331      else
12332        # Check if the provided tool contains a complete path.
12333        tool_specified="$AWK"
12334        tool_basename="${tool_specified##*/}"
12335        if test "x$tool_basename" = "x$tool_specified"; then
12336          # A command without a complete path is provided, search $PATH.
12337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12338$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12339          # Extract the first word of "$tool_basename", so it can be a program name with args.
12340set dummy $tool_basename; ac_word=$2
12341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12342$as_echo_n "checking for $ac_word... " >&6; }
12343if ${ac_cv_path_AWK+:} false; then :
12344  $as_echo_n "(cached) " >&6
12345else
12346  case $AWK in
12347  [\\/]* | ?:[\\/]*)
12348  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12349  ;;
12350  *)
12351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12352for as_dir in $PATH
12353do
12354  IFS=$as_save_IFS
12355  test -z "$as_dir" && as_dir=.
12356    for ac_exec_ext in '' $ac_executable_extensions; do
12357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12358    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12360    break 2
12361  fi
12362done
12363  done
12364IFS=$as_save_IFS
12365
12366  ;;
12367esac
12368fi
12369AWK=$ac_cv_path_AWK
12370if test -n "$AWK"; then
12371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12372$as_echo "$AWK" >&6; }
12373else
12374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12375$as_echo "no" >&6; }
12376fi
12377
12378
12379          if test "x$AWK" = x; then
12380            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12381          fi
12382        else
12383          # Otherwise we believe it is a complete path. Use it as it is.
12384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12385$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12386          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12387$as_echo_n "checking for AWK... " >&6; }
12388          if test ! -x "$tool_specified"; then
12389            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12390$as_echo "not found" >&6; }
12391            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12392          fi
12393          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12394$as_echo "$tool_specified" >&6; }
12395        fi
12396      fi
12397    fi
12398
12399  fi
12400
12401
12402  if test "x$AWK" = x; then
12403    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12404  fi
12405
12406
12407
12408
12409  # Publish this variable in the help.
12410
12411
12412  if [ -z "${GREP+x}" ]; then
12413    # The variable is not set by user, try to locate tool using the code snippet
12414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12415$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12416if ${ac_cv_path_GREP+:} false; then :
12417  $as_echo_n "(cached) " >&6
12418else
12419  if test -z "$GREP"; then
12420  ac_path_GREP_found=false
12421  # Loop through the user's path and test for each of PROGNAME-LIST
12422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12423for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12424do
12425  IFS=$as_save_IFS
12426  test -z "$as_dir" && as_dir=.
12427    for ac_prog in grep ggrep; do
12428    for ac_exec_ext in '' $ac_executable_extensions; do
12429      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12430      as_fn_executable_p "$ac_path_GREP" || continue
12431# Check for GNU ac_path_GREP and select it if it is found.
12432  # Check for GNU $ac_path_GREP
12433case `"$ac_path_GREP" --version 2>&1` in
12434*GNU*)
12435  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12436*)
12437  ac_count=0
12438  $as_echo_n 0123456789 >"conftest.in"
12439  while :
12440  do
12441    cat "conftest.in" "conftest.in" >"conftest.tmp"
12442    mv "conftest.tmp" "conftest.in"
12443    cp "conftest.in" "conftest.nl"
12444    $as_echo 'GREP' >> "conftest.nl"
12445    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12446    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12447    as_fn_arith $ac_count + 1 && ac_count=$as_val
12448    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12449      # Best one so far, save it but keep looking for a better one
12450      ac_cv_path_GREP="$ac_path_GREP"
12451      ac_path_GREP_max=$ac_count
12452    fi
12453    # 10*(2^10) chars as input seems more than enough
12454    test $ac_count -gt 10 && break
12455  done
12456  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12457esac
12458
12459      $ac_path_GREP_found && break 3
12460    done
12461  done
12462  done
12463IFS=$as_save_IFS
12464  if test -z "$ac_cv_path_GREP"; then
12465    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12466  fi
12467else
12468  ac_cv_path_GREP=$GREP
12469fi
12470
12471fi
12472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12473$as_echo "$ac_cv_path_GREP" >&6; }
12474 GREP="$ac_cv_path_GREP"
12475
12476
12477  else
12478    # The variable is set, but is it from the command line or the environment?
12479
12480    # Try to remove the string !GREP! from our list.
12481    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12482    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12483      # If it failed, the variable was not from the command line. Ignore it,
12484      # but warn the user (except for BASH, which is always set by the calling BASH).
12485      if test "xGREP" != xBASH; then
12486        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12487$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12488      fi
12489      # Try to locate tool using the code snippet
12490      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12491$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12492if ${ac_cv_path_GREP+:} false; then :
12493  $as_echo_n "(cached) " >&6
12494else
12495  if test -z "$GREP"; then
12496  ac_path_GREP_found=false
12497  # Loop through the user's path and test for each of PROGNAME-LIST
12498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12499for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12500do
12501  IFS=$as_save_IFS
12502  test -z "$as_dir" && as_dir=.
12503    for ac_prog in grep ggrep; do
12504    for ac_exec_ext in '' $ac_executable_extensions; do
12505      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12506      as_fn_executable_p "$ac_path_GREP" || continue
12507# Check for GNU ac_path_GREP and select it if it is found.
12508  # Check for GNU $ac_path_GREP
12509case `"$ac_path_GREP" --version 2>&1` in
12510*GNU*)
12511  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12512*)
12513  ac_count=0
12514  $as_echo_n 0123456789 >"conftest.in"
12515  while :
12516  do
12517    cat "conftest.in" "conftest.in" >"conftest.tmp"
12518    mv "conftest.tmp" "conftest.in"
12519    cp "conftest.in" "conftest.nl"
12520    $as_echo 'GREP' >> "conftest.nl"
12521    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12522    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12523    as_fn_arith $ac_count + 1 && ac_count=$as_val
12524    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12525      # Best one so far, save it but keep looking for a better one
12526      ac_cv_path_GREP="$ac_path_GREP"
12527      ac_path_GREP_max=$ac_count
12528    fi
12529    # 10*(2^10) chars as input seems more than enough
12530    test $ac_count -gt 10 && break
12531  done
12532  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12533esac
12534
12535      $ac_path_GREP_found && break 3
12536    done
12537  done
12538  done
12539IFS=$as_save_IFS
12540  if test -z "$ac_cv_path_GREP"; then
12541    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12542  fi
12543else
12544  ac_cv_path_GREP=$GREP
12545fi
12546
12547fi
12548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12549$as_echo "$ac_cv_path_GREP" >&6; }
12550 GREP="$ac_cv_path_GREP"
12551
12552
12553    else
12554      # If it succeeded, then it was overridden by the user. We will use it
12555      # for the tool.
12556
12557      # First remove it from the list of overridden variables, so we can test
12558      # for unknown variables in the end.
12559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12560
12561      # Check if we try to supply an empty value
12562      if test "x$GREP" = x; then
12563        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12564$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12566$as_echo_n "checking for GREP... " >&6; }
12567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12568$as_echo "disabled" >&6; }
12569      else
12570        # Check if the provided tool contains a complete path.
12571        tool_specified="$GREP"
12572        tool_basename="${tool_specified##*/}"
12573        if test "x$tool_basename" = "x$tool_specified"; then
12574          # A command without a complete path is provided, search $PATH.
12575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12576$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12577          # Extract the first word of "$tool_basename", so it can be a program name with args.
12578set dummy $tool_basename; ac_word=$2
12579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12580$as_echo_n "checking for $ac_word... " >&6; }
12581if ${ac_cv_path_GREP+:} false; then :
12582  $as_echo_n "(cached) " >&6
12583else
12584  case $GREP in
12585  [\\/]* | ?:[\\/]*)
12586  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12587  ;;
12588  *)
12589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12590for as_dir in $PATH
12591do
12592  IFS=$as_save_IFS
12593  test -z "$as_dir" && as_dir=.
12594    for ac_exec_ext in '' $ac_executable_extensions; do
12595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12596    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12598    break 2
12599  fi
12600done
12601  done
12602IFS=$as_save_IFS
12603
12604  ;;
12605esac
12606fi
12607GREP=$ac_cv_path_GREP
12608if test -n "$GREP"; then
12609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12610$as_echo "$GREP" >&6; }
12611else
12612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12613$as_echo "no" >&6; }
12614fi
12615
12616
12617          if test "x$GREP" = x; then
12618            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12619          fi
12620        else
12621          # Otherwise we believe it is a complete path. Use it as it is.
12622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12623$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12624          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12625$as_echo_n "checking for GREP... " >&6; }
12626          if test ! -x "$tool_specified"; then
12627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12628$as_echo "not found" >&6; }
12629            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12630          fi
12631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12632$as_echo "$tool_specified" >&6; }
12633        fi
12634      fi
12635    fi
12636
12637  fi
12638
12639
12640  if test "x$GREP" = x; then
12641    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12642  fi
12643
12644
12645
12646
12647  # Publish this variable in the help.
12648
12649
12650  if [ -z "${EGREP+x}" ]; then
12651    # The variable is not set by user, try to locate tool using the code snippet
12652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12653$as_echo_n "checking for egrep... " >&6; }
12654if ${ac_cv_path_EGREP+:} false; then :
12655  $as_echo_n "(cached) " >&6
12656else
12657  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12658   then ac_cv_path_EGREP="$GREP -E"
12659   else
12660     if test -z "$EGREP"; then
12661  ac_path_EGREP_found=false
12662  # Loop through the user's path and test for each of PROGNAME-LIST
12663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12664for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12665do
12666  IFS=$as_save_IFS
12667  test -z "$as_dir" && as_dir=.
12668    for ac_prog in egrep; do
12669    for ac_exec_ext in '' $ac_executable_extensions; do
12670      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12671      as_fn_executable_p "$ac_path_EGREP" || continue
12672# Check for GNU ac_path_EGREP and select it if it is found.
12673  # Check for GNU $ac_path_EGREP
12674case `"$ac_path_EGREP" --version 2>&1` in
12675*GNU*)
12676  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12677*)
12678  ac_count=0
12679  $as_echo_n 0123456789 >"conftest.in"
12680  while :
12681  do
12682    cat "conftest.in" "conftest.in" >"conftest.tmp"
12683    mv "conftest.tmp" "conftest.in"
12684    cp "conftest.in" "conftest.nl"
12685    $as_echo 'EGREP' >> "conftest.nl"
12686    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12687    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12688    as_fn_arith $ac_count + 1 && ac_count=$as_val
12689    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12690      # Best one so far, save it but keep looking for a better one
12691      ac_cv_path_EGREP="$ac_path_EGREP"
12692      ac_path_EGREP_max=$ac_count
12693    fi
12694    # 10*(2^10) chars as input seems more than enough
12695    test $ac_count -gt 10 && break
12696  done
12697  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12698esac
12699
12700      $ac_path_EGREP_found && break 3
12701    done
12702  done
12703  done
12704IFS=$as_save_IFS
12705  if test -z "$ac_cv_path_EGREP"; then
12706    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12707  fi
12708else
12709  ac_cv_path_EGREP=$EGREP
12710fi
12711
12712   fi
12713fi
12714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12715$as_echo "$ac_cv_path_EGREP" >&6; }
12716 EGREP="$ac_cv_path_EGREP"
12717
12718
12719  else
12720    # The variable is set, but is it from the command line or the environment?
12721
12722    # Try to remove the string !EGREP! from our list.
12723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12725      # If it failed, the variable was not from the command line. Ignore it,
12726      # but warn the user (except for BASH, which is always set by the calling BASH).
12727      if test "xEGREP" != xBASH; then
12728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12729$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12730      fi
12731      # Try to locate tool using the code snippet
12732      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12733$as_echo_n "checking for egrep... " >&6; }
12734if ${ac_cv_path_EGREP+:} false; then :
12735  $as_echo_n "(cached) " >&6
12736else
12737  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12738   then ac_cv_path_EGREP="$GREP -E"
12739   else
12740     if test -z "$EGREP"; then
12741  ac_path_EGREP_found=false
12742  # Loop through the user's path and test for each of PROGNAME-LIST
12743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12744for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12745do
12746  IFS=$as_save_IFS
12747  test -z "$as_dir" && as_dir=.
12748    for ac_prog in egrep; do
12749    for ac_exec_ext in '' $ac_executable_extensions; do
12750      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12751      as_fn_executable_p "$ac_path_EGREP" || continue
12752# Check for GNU ac_path_EGREP and select it if it is found.
12753  # Check for GNU $ac_path_EGREP
12754case `"$ac_path_EGREP" --version 2>&1` in
12755*GNU*)
12756  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12757*)
12758  ac_count=0
12759  $as_echo_n 0123456789 >"conftest.in"
12760  while :
12761  do
12762    cat "conftest.in" "conftest.in" >"conftest.tmp"
12763    mv "conftest.tmp" "conftest.in"
12764    cp "conftest.in" "conftest.nl"
12765    $as_echo 'EGREP' >> "conftest.nl"
12766    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12767    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12768    as_fn_arith $ac_count + 1 && ac_count=$as_val
12769    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12770      # Best one so far, save it but keep looking for a better one
12771      ac_cv_path_EGREP="$ac_path_EGREP"
12772      ac_path_EGREP_max=$ac_count
12773    fi
12774    # 10*(2^10) chars as input seems more than enough
12775    test $ac_count -gt 10 && break
12776  done
12777  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12778esac
12779
12780      $ac_path_EGREP_found && break 3
12781    done
12782  done
12783  done
12784IFS=$as_save_IFS
12785  if test -z "$ac_cv_path_EGREP"; then
12786    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12787  fi
12788else
12789  ac_cv_path_EGREP=$EGREP
12790fi
12791
12792   fi
12793fi
12794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12795$as_echo "$ac_cv_path_EGREP" >&6; }
12796 EGREP="$ac_cv_path_EGREP"
12797
12798
12799    else
12800      # If it succeeded, then it was overridden by the user. We will use it
12801      # for the tool.
12802
12803      # First remove it from the list of overridden variables, so we can test
12804      # for unknown variables in the end.
12805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12806
12807      # Check if we try to supply an empty value
12808      if test "x$EGREP" = x; then
12809        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12810$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12811        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12812$as_echo_n "checking for EGREP... " >&6; }
12813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12814$as_echo "disabled" >&6; }
12815      else
12816        # Check if the provided tool contains a complete path.
12817        tool_specified="$EGREP"
12818        tool_basename="${tool_specified##*/}"
12819        if test "x$tool_basename" = "x$tool_specified"; then
12820          # A command without a complete path is provided, search $PATH.
12821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12822$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12823          # Extract the first word of "$tool_basename", so it can be a program name with args.
12824set dummy $tool_basename; ac_word=$2
12825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12826$as_echo_n "checking for $ac_word... " >&6; }
12827if ${ac_cv_path_EGREP+:} false; then :
12828  $as_echo_n "(cached) " >&6
12829else
12830  case $EGREP in
12831  [\\/]* | ?:[\\/]*)
12832  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12833  ;;
12834  *)
12835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12836for as_dir in $PATH
12837do
12838  IFS=$as_save_IFS
12839  test -z "$as_dir" && as_dir=.
12840    for ac_exec_ext in '' $ac_executable_extensions; do
12841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12842    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12844    break 2
12845  fi
12846done
12847  done
12848IFS=$as_save_IFS
12849
12850  ;;
12851esac
12852fi
12853EGREP=$ac_cv_path_EGREP
12854if test -n "$EGREP"; then
12855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12856$as_echo "$EGREP" >&6; }
12857else
12858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12859$as_echo "no" >&6; }
12860fi
12861
12862
12863          if test "x$EGREP" = x; then
12864            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12865          fi
12866        else
12867          # Otherwise we believe it is a complete path. Use it as it is.
12868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12869$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12870          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12871$as_echo_n "checking for EGREP... " >&6; }
12872          if test ! -x "$tool_specified"; then
12873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12874$as_echo "not found" >&6; }
12875            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12876          fi
12877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12878$as_echo "$tool_specified" >&6; }
12879        fi
12880      fi
12881    fi
12882
12883  fi
12884
12885
12886  if test "x$EGREP" = x; then
12887    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12888  fi
12889
12890
12891
12892
12893  # Publish this variable in the help.
12894
12895
12896  if [ -z "${FGREP+x}" ]; then
12897    # The variable is not set by user, try to locate tool using the code snippet
12898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12899$as_echo_n "checking for fgrep... " >&6; }
12900if ${ac_cv_path_FGREP+:} false; then :
12901  $as_echo_n "(cached) " >&6
12902else
12903  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12904   then ac_cv_path_FGREP="$GREP -F"
12905   else
12906     if test -z "$FGREP"; then
12907  ac_path_FGREP_found=false
12908  # Loop through the user's path and test for each of PROGNAME-LIST
12909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12910for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12911do
12912  IFS=$as_save_IFS
12913  test -z "$as_dir" && as_dir=.
12914    for ac_prog in fgrep; do
12915    for ac_exec_ext in '' $ac_executable_extensions; do
12916      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12917      as_fn_executable_p "$ac_path_FGREP" || continue
12918# Check for GNU ac_path_FGREP and select it if it is found.
12919  # Check for GNU $ac_path_FGREP
12920case `"$ac_path_FGREP" --version 2>&1` in
12921*GNU*)
12922  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12923*)
12924  ac_count=0
12925  $as_echo_n 0123456789 >"conftest.in"
12926  while :
12927  do
12928    cat "conftest.in" "conftest.in" >"conftest.tmp"
12929    mv "conftest.tmp" "conftest.in"
12930    cp "conftest.in" "conftest.nl"
12931    $as_echo 'FGREP' >> "conftest.nl"
12932    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12933    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12934    as_fn_arith $ac_count + 1 && ac_count=$as_val
12935    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12936      # Best one so far, save it but keep looking for a better one
12937      ac_cv_path_FGREP="$ac_path_FGREP"
12938      ac_path_FGREP_max=$ac_count
12939    fi
12940    # 10*(2^10) chars as input seems more than enough
12941    test $ac_count -gt 10 && break
12942  done
12943  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12944esac
12945
12946      $ac_path_FGREP_found && break 3
12947    done
12948  done
12949  done
12950IFS=$as_save_IFS
12951  if test -z "$ac_cv_path_FGREP"; then
12952    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12953  fi
12954else
12955  ac_cv_path_FGREP=$FGREP
12956fi
12957
12958   fi
12959fi
12960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12961$as_echo "$ac_cv_path_FGREP" >&6; }
12962 FGREP="$ac_cv_path_FGREP"
12963
12964
12965  else
12966    # The variable is set, but is it from the command line or the environment?
12967
12968    # Try to remove the string !FGREP! from our list.
12969    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12970    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12971      # If it failed, the variable was not from the command line. Ignore it,
12972      # but warn the user (except for BASH, which is always set by the calling BASH).
12973      if test "xFGREP" != xBASH; then
12974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12975$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12976      fi
12977      # Try to locate tool using the code snippet
12978      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12979$as_echo_n "checking for fgrep... " >&6; }
12980if ${ac_cv_path_FGREP+:} false; then :
12981  $as_echo_n "(cached) " >&6
12982else
12983  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12984   then ac_cv_path_FGREP="$GREP -F"
12985   else
12986     if test -z "$FGREP"; then
12987  ac_path_FGREP_found=false
12988  # Loop through the user's path and test for each of PROGNAME-LIST
12989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12990for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12991do
12992  IFS=$as_save_IFS
12993  test -z "$as_dir" && as_dir=.
12994    for ac_prog in fgrep; do
12995    for ac_exec_ext in '' $ac_executable_extensions; do
12996      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12997      as_fn_executable_p "$ac_path_FGREP" || continue
12998# Check for GNU ac_path_FGREP and select it if it is found.
12999  # Check for GNU $ac_path_FGREP
13000case `"$ac_path_FGREP" --version 2>&1` in
13001*GNU*)
13002  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13003*)
13004  ac_count=0
13005  $as_echo_n 0123456789 >"conftest.in"
13006  while :
13007  do
13008    cat "conftest.in" "conftest.in" >"conftest.tmp"
13009    mv "conftest.tmp" "conftest.in"
13010    cp "conftest.in" "conftest.nl"
13011    $as_echo 'FGREP' >> "conftest.nl"
13012    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13013    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13014    as_fn_arith $ac_count + 1 && ac_count=$as_val
13015    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13016      # Best one so far, save it but keep looking for a better one
13017      ac_cv_path_FGREP="$ac_path_FGREP"
13018      ac_path_FGREP_max=$ac_count
13019    fi
13020    # 10*(2^10) chars as input seems more than enough
13021    test $ac_count -gt 10 && break
13022  done
13023  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13024esac
13025
13026      $ac_path_FGREP_found && break 3
13027    done
13028  done
13029  done
13030IFS=$as_save_IFS
13031  if test -z "$ac_cv_path_FGREP"; then
13032    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13033  fi
13034else
13035  ac_cv_path_FGREP=$FGREP
13036fi
13037
13038   fi
13039fi
13040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13041$as_echo "$ac_cv_path_FGREP" >&6; }
13042 FGREP="$ac_cv_path_FGREP"
13043
13044
13045    else
13046      # If it succeeded, then it was overridden by the user. We will use it
13047      # for the tool.
13048
13049      # First remove it from the list of overridden variables, so we can test
13050      # for unknown variables in the end.
13051      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13052
13053      # Check if we try to supply an empty value
13054      if test "x$FGREP" = x; then
13055        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13056$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13057        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13058$as_echo_n "checking for FGREP... " >&6; }
13059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13060$as_echo "disabled" >&6; }
13061      else
13062        # Check if the provided tool contains a complete path.
13063        tool_specified="$FGREP"
13064        tool_basename="${tool_specified##*/}"
13065        if test "x$tool_basename" = "x$tool_specified"; then
13066          # A command without a complete path is provided, search $PATH.
13067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13068$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13069          # Extract the first word of "$tool_basename", so it can be a program name with args.
13070set dummy $tool_basename; ac_word=$2
13071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13072$as_echo_n "checking for $ac_word... " >&6; }
13073if ${ac_cv_path_FGREP+:} false; then :
13074  $as_echo_n "(cached) " >&6
13075else
13076  case $FGREP in
13077  [\\/]* | ?:[\\/]*)
13078  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13079  ;;
13080  *)
13081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13082for as_dir in $PATH
13083do
13084  IFS=$as_save_IFS
13085  test -z "$as_dir" && as_dir=.
13086    for ac_exec_ext in '' $ac_executable_extensions; do
13087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13088    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13090    break 2
13091  fi
13092done
13093  done
13094IFS=$as_save_IFS
13095
13096  ;;
13097esac
13098fi
13099FGREP=$ac_cv_path_FGREP
13100if test -n "$FGREP"; then
13101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13102$as_echo "$FGREP" >&6; }
13103else
13104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13105$as_echo "no" >&6; }
13106fi
13107
13108
13109          if test "x$FGREP" = x; then
13110            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13111          fi
13112        else
13113          # Otherwise we believe it is a complete path. Use it as it is.
13114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13115$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13116          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13117$as_echo_n "checking for FGREP... " >&6; }
13118          if test ! -x "$tool_specified"; then
13119            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13120$as_echo "not found" >&6; }
13121            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13122          fi
13123          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13124$as_echo "$tool_specified" >&6; }
13125        fi
13126      fi
13127    fi
13128
13129  fi
13130
13131
13132  if test "x$FGREP" = x; then
13133    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13134  fi
13135
13136
13137
13138
13139  # Publish this variable in the help.
13140
13141
13142  if [ -z "${SED+x}" ]; then
13143    # The variable is not set by user, try to locate tool using the code snippet
13144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13145$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13146if ${ac_cv_path_SED+:} false; then :
13147  $as_echo_n "(cached) " >&6
13148else
13149            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13150     for ac_i in 1 2 3 4 5 6 7; do
13151       ac_script="$ac_script$as_nl$ac_script"
13152     done
13153     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13154     { ac_script=; unset ac_script;}
13155     if test -z "$SED"; then
13156  ac_path_SED_found=false
13157  # Loop through the user's path and test for each of PROGNAME-LIST
13158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13159for as_dir in $PATH
13160do
13161  IFS=$as_save_IFS
13162  test -z "$as_dir" && as_dir=.
13163    for ac_prog in sed gsed; do
13164    for ac_exec_ext in '' $ac_executable_extensions; do
13165      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13166      as_fn_executable_p "$ac_path_SED" || continue
13167# Check for GNU ac_path_SED and select it if it is found.
13168  # Check for GNU $ac_path_SED
13169case `"$ac_path_SED" --version 2>&1` in
13170*GNU*)
13171  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13172*)
13173  ac_count=0
13174  $as_echo_n 0123456789 >"conftest.in"
13175  while :
13176  do
13177    cat "conftest.in" "conftest.in" >"conftest.tmp"
13178    mv "conftest.tmp" "conftest.in"
13179    cp "conftest.in" "conftest.nl"
13180    $as_echo '' >> "conftest.nl"
13181    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13182    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13183    as_fn_arith $ac_count + 1 && ac_count=$as_val
13184    if test $ac_count -gt ${ac_path_SED_max-0}; then
13185      # Best one so far, save it but keep looking for a better one
13186      ac_cv_path_SED="$ac_path_SED"
13187      ac_path_SED_max=$ac_count
13188    fi
13189    # 10*(2^10) chars as input seems more than enough
13190    test $ac_count -gt 10 && break
13191  done
13192  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13193esac
13194
13195      $ac_path_SED_found && break 3
13196    done
13197  done
13198  done
13199IFS=$as_save_IFS
13200  if test -z "$ac_cv_path_SED"; then
13201    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13202  fi
13203else
13204  ac_cv_path_SED=$SED
13205fi
13206
13207fi
13208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13209$as_echo "$ac_cv_path_SED" >&6; }
13210 SED="$ac_cv_path_SED"
13211  rm -f conftest.sed
13212
13213  else
13214    # The variable is set, but is it from the command line or the environment?
13215
13216    # Try to remove the string !SED! from our list.
13217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13219      # If it failed, the variable was not from the command line. Ignore it,
13220      # but warn the user (except for BASH, which is always set by the calling BASH).
13221      if test "xSED" != xBASH; then
13222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13223$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13224      fi
13225      # Try to locate tool using the code snippet
13226      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13227$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13228if ${ac_cv_path_SED+:} false; then :
13229  $as_echo_n "(cached) " >&6
13230else
13231            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13232     for ac_i in 1 2 3 4 5 6 7; do
13233       ac_script="$ac_script$as_nl$ac_script"
13234     done
13235     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13236     { ac_script=; unset ac_script;}
13237     if test -z "$SED"; then
13238  ac_path_SED_found=false
13239  # Loop through the user's path and test for each of PROGNAME-LIST
13240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13241for as_dir in $PATH
13242do
13243  IFS=$as_save_IFS
13244  test -z "$as_dir" && as_dir=.
13245    for ac_prog in sed gsed; do
13246    for ac_exec_ext in '' $ac_executable_extensions; do
13247      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13248      as_fn_executable_p "$ac_path_SED" || continue
13249# Check for GNU ac_path_SED and select it if it is found.
13250  # Check for GNU $ac_path_SED
13251case `"$ac_path_SED" --version 2>&1` in
13252*GNU*)
13253  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13254*)
13255  ac_count=0
13256  $as_echo_n 0123456789 >"conftest.in"
13257  while :
13258  do
13259    cat "conftest.in" "conftest.in" >"conftest.tmp"
13260    mv "conftest.tmp" "conftest.in"
13261    cp "conftest.in" "conftest.nl"
13262    $as_echo '' >> "conftest.nl"
13263    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13264    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13265    as_fn_arith $ac_count + 1 && ac_count=$as_val
13266    if test $ac_count -gt ${ac_path_SED_max-0}; then
13267      # Best one so far, save it but keep looking for a better one
13268      ac_cv_path_SED="$ac_path_SED"
13269      ac_path_SED_max=$ac_count
13270    fi
13271    # 10*(2^10) chars as input seems more than enough
13272    test $ac_count -gt 10 && break
13273  done
13274  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13275esac
13276
13277      $ac_path_SED_found && break 3
13278    done
13279  done
13280  done
13281IFS=$as_save_IFS
13282  if test -z "$ac_cv_path_SED"; then
13283    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13284  fi
13285else
13286  ac_cv_path_SED=$SED
13287fi
13288
13289fi
13290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13291$as_echo "$ac_cv_path_SED" >&6; }
13292 SED="$ac_cv_path_SED"
13293  rm -f conftest.sed
13294
13295    else
13296      # If it succeeded, then it was overridden by the user. We will use it
13297      # for the tool.
13298
13299      # First remove it from the list of overridden variables, so we can test
13300      # for unknown variables in the end.
13301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13302
13303      # Check if we try to supply an empty value
13304      if test "x$SED" = x; then
13305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13306$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13308$as_echo_n "checking for SED... " >&6; }
13309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13310$as_echo "disabled" >&6; }
13311      else
13312        # Check if the provided tool contains a complete path.
13313        tool_specified="$SED"
13314        tool_basename="${tool_specified##*/}"
13315        if test "x$tool_basename" = "x$tool_specified"; then
13316          # A command without a complete path is provided, search $PATH.
13317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13318$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13319          # Extract the first word of "$tool_basename", so it can be a program name with args.
13320set dummy $tool_basename; ac_word=$2
13321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13322$as_echo_n "checking for $ac_word... " >&6; }
13323if ${ac_cv_path_SED+:} false; then :
13324  $as_echo_n "(cached) " >&6
13325else
13326  case $SED in
13327  [\\/]* | ?:[\\/]*)
13328  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13329  ;;
13330  *)
13331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13332for as_dir in $PATH
13333do
13334  IFS=$as_save_IFS
13335  test -z "$as_dir" && as_dir=.
13336    for ac_exec_ext in '' $ac_executable_extensions; do
13337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13338    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13340    break 2
13341  fi
13342done
13343  done
13344IFS=$as_save_IFS
13345
13346  ;;
13347esac
13348fi
13349SED=$ac_cv_path_SED
13350if test -n "$SED"; then
13351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13352$as_echo "$SED" >&6; }
13353else
13354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13355$as_echo "no" >&6; }
13356fi
13357
13358
13359          if test "x$SED" = x; then
13360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13361          fi
13362        else
13363          # Otherwise we believe it is a complete path. Use it as it is.
13364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13365$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13367$as_echo_n "checking for SED... " >&6; }
13368          if test ! -x "$tool_specified"; then
13369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13370$as_echo "not found" >&6; }
13371            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13372          fi
13373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13374$as_echo "$tool_specified" >&6; }
13375        fi
13376      fi
13377    fi
13378
13379  fi
13380
13381
13382  if test "x$SED" = x; then
13383    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13384  fi
13385
13386
13387
13388  # Always force rm.
13389  RM="$RM -f"
13390
13391  # pwd behaves differently on various platforms and some don't support the -L flag.
13392  # Always use the bash builtin pwd to get uniform behavior.
13393  THEPWDCMD=pwd
13394
13395  # These are not required on all platforms
13396
13397
13398  # Publish this variable in the help.
13399
13400
13401  if [ -z "${CYGPATH+x}" ]; then
13402    # The variable is not set by user, try to locate tool using the code snippet
13403    for ac_prog in cygpath
13404do
13405  # Extract the first word of "$ac_prog", so it can be a program name with args.
13406set dummy $ac_prog; ac_word=$2
13407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13408$as_echo_n "checking for $ac_word... " >&6; }
13409if ${ac_cv_path_CYGPATH+:} false; then :
13410  $as_echo_n "(cached) " >&6
13411else
13412  case $CYGPATH in
13413  [\\/]* | ?:[\\/]*)
13414  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13415  ;;
13416  *)
13417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13418for as_dir in $PATH
13419do
13420  IFS=$as_save_IFS
13421  test -z "$as_dir" && as_dir=.
13422    for ac_exec_ext in '' $ac_executable_extensions; do
13423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13424    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13426    break 2
13427  fi
13428done
13429  done
13430IFS=$as_save_IFS
13431
13432  ;;
13433esac
13434fi
13435CYGPATH=$ac_cv_path_CYGPATH
13436if test -n "$CYGPATH"; then
13437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13438$as_echo "$CYGPATH" >&6; }
13439else
13440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13441$as_echo "no" >&6; }
13442fi
13443
13444
13445  test -n "$CYGPATH" && break
13446done
13447
13448  else
13449    # The variable is set, but is it from the command line or the environment?
13450
13451    # Try to remove the string !CYGPATH! from our list.
13452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13454      # If it failed, the variable was not from the command line. Ignore it,
13455      # but warn the user (except for BASH, which is always set by the calling BASH).
13456      if test "xCYGPATH" != xBASH; then
13457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13458$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13459      fi
13460      # Try to locate tool using the code snippet
13461      for ac_prog in cygpath
13462do
13463  # Extract the first word of "$ac_prog", so it can be a program name with args.
13464set dummy $ac_prog; ac_word=$2
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13466$as_echo_n "checking for $ac_word... " >&6; }
13467if ${ac_cv_path_CYGPATH+:} false; then :
13468  $as_echo_n "(cached) " >&6
13469else
13470  case $CYGPATH in
13471  [\\/]* | ?:[\\/]*)
13472  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13473  ;;
13474  *)
13475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13476for as_dir in $PATH
13477do
13478  IFS=$as_save_IFS
13479  test -z "$as_dir" && as_dir=.
13480    for ac_exec_ext in '' $ac_executable_extensions; do
13481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13482    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13484    break 2
13485  fi
13486done
13487  done
13488IFS=$as_save_IFS
13489
13490  ;;
13491esac
13492fi
13493CYGPATH=$ac_cv_path_CYGPATH
13494if test -n "$CYGPATH"; then
13495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13496$as_echo "$CYGPATH" >&6; }
13497else
13498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13499$as_echo "no" >&6; }
13500fi
13501
13502
13503  test -n "$CYGPATH" && break
13504done
13505
13506    else
13507      # If it succeeded, then it was overridden by the user. We will use it
13508      # for the tool.
13509
13510      # First remove it from the list of overridden variables, so we can test
13511      # for unknown variables in the end.
13512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13513
13514      # Check if we try to supply an empty value
13515      if test "x$CYGPATH" = x; then
13516        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13517$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13519$as_echo_n "checking for CYGPATH... " >&6; }
13520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13521$as_echo "disabled" >&6; }
13522      else
13523        # Check if the provided tool contains a complete path.
13524        tool_specified="$CYGPATH"
13525        tool_basename="${tool_specified##*/}"
13526        if test "x$tool_basename" = "x$tool_specified"; then
13527          # A command without a complete path is provided, search $PATH.
13528          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13529$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13530          # Extract the first word of "$tool_basename", so it can be a program name with args.
13531set dummy $tool_basename; ac_word=$2
13532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13533$as_echo_n "checking for $ac_word... " >&6; }
13534if ${ac_cv_path_CYGPATH+:} false; then :
13535  $as_echo_n "(cached) " >&6
13536else
13537  case $CYGPATH in
13538  [\\/]* | ?:[\\/]*)
13539  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13540  ;;
13541  *)
13542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13543for as_dir in $PATH
13544do
13545  IFS=$as_save_IFS
13546  test -z "$as_dir" && as_dir=.
13547    for ac_exec_ext in '' $ac_executable_extensions; do
13548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13549    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13551    break 2
13552  fi
13553done
13554  done
13555IFS=$as_save_IFS
13556
13557  ;;
13558esac
13559fi
13560CYGPATH=$ac_cv_path_CYGPATH
13561if test -n "$CYGPATH"; then
13562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13563$as_echo "$CYGPATH" >&6; }
13564else
13565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13566$as_echo "no" >&6; }
13567fi
13568
13569
13570          if test "x$CYGPATH" = x; then
13571            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13572          fi
13573        else
13574          # Otherwise we believe it is a complete path. Use it as it is.
13575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13576$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13577          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13578$as_echo_n "checking for CYGPATH... " >&6; }
13579          if test ! -x "$tool_specified"; then
13580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13581$as_echo "not found" >&6; }
13582            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13583          fi
13584          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13585$as_echo "$tool_specified" >&6; }
13586        fi
13587      fi
13588    fi
13589
13590  fi
13591
13592
13593
13594
13595  # Publish this variable in the help.
13596
13597
13598  if [ -z "${READLINK+x}" ]; then
13599    # The variable is not set by user, try to locate tool using the code snippet
13600    for ac_prog in greadlink readlink
13601do
13602  # Extract the first word of "$ac_prog", so it can be a program name with args.
13603set dummy $ac_prog; ac_word=$2
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13605$as_echo_n "checking for $ac_word... " >&6; }
13606if ${ac_cv_path_READLINK+:} false; then :
13607  $as_echo_n "(cached) " >&6
13608else
13609  case $READLINK in
13610  [\\/]* | ?:[\\/]*)
13611  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13612  ;;
13613  *)
13614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13615for as_dir in $PATH
13616do
13617  IFS=$as_save_IFS
13618  test -z "$as_dir" && as_dir=.
13619    for ac_exec_ext in '' $ac_executable_extensions; do
13620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13621    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13623    break 2
13624  fi
13625done
13626  done
13627IFS=$as_save_IFS
13628
13629  ;;
13630esac
13631fi
13632READLINK=$ac_cv_path_READLINK
13633if test -n "$READLINK"; then
13634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13635$as_echo "$READLINK" >&6; }
13636else
13637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13638$as_echo "no" >&6; }
13639fi
13640
13641
13642  test -n "$READLINK" && break
13643done
13644
13645  else
13646    # The variable is set, but is it from the command line or the environment?
13647
13648    # Try to remove the string !READLINK! from our list.
13649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13651      # If it failed, the variable was not from the command line. Ignore it,
13652      # but warn the user (except for BASH, which is always set by the calling BASH).
13653      if test "xREADLINK" != xBASH; then
13654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13655$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13656      fi
13657      # Try to locate tool using the code snippet
13658      for ac_prog in greadlink readlink
13659do
13660  # Extract the first word of "$ac_prog", so it can be a program name with args.
13661set dummy $ac_prog; ac_word=$2
13662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13663$as_echo_n "checking for $ac_word... " >&6; }
13664if ${ac_cv_path_READLINK+:} false; then :
13665  $as_echo_n "(cached) " >&6
13666else
13667  case $READLINK in
13668  [\\/]* | ?:[\\/]*)
13669  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13670  ;;
13671  *)
13672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13673for as_dir in $PATH
13674do
13675  IFS=$as_save_IFS
13676  test -z "$as_dir" && as_dir=.
13677    for ac_exec_ext in '' $ac_executable_extensions; do
13678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13679    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13681    break 2
13682  fi
13683done
13684  done
13685IFS=$as_save_IFS
13686
13687  ;;
13688esac
13689fi
13690READLINK=$ac_cv_path_READLINK
13691if test -n "$READLINK"; then
13692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13693$as_echo "$READLINK" >&6; }
13694else
13695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13696$as_echo "no" >&6; }
13697fi
13698
13699
13700  test -n "$READLINK" && break
13701done
13702
13703    else
13704      # If it succeeded, then it was overridden by the user. We will use it
13705      # for the tool.
13706
13707      # First remove it from the list of overridden variables, so we can test
13708      # for unknown variables in the end.
13709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13710
13711      # Check if we try to supply an empty value
13712      if test "x$READLINK" = x; then
13713        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13714$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13716$as_echo_n "checking for READLINK... " >&6; }
13717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13718$as_echo "disabled" >&6; }
13719      else
13720        # Check if the provided tool contains a complete path.
13721        tool_specified="$READLINK"
13722        tool_basename="${tool_specified##*/}"
13723        if test "x$tool_basename" = "x$tool_specified"; then
13724          # A command without a complete path is provided, search $PATH.
13725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13726$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13727          # Extract the first word of "$tool_basename", so it can be a program name with args.
13728set dummy $tool_basename; ac_word=$2
13729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13730$as_echo_n "checking for $ac_word... " >&6; }
13731if ${ac_cv_path_READLINK+:} false; then :
13732  $as_echo_n "(cached) " >&6
13733else
13734  case $READLINK in
13735  [\\/]* | ?:[\\/]*)
13736  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13737  ;;
13738  *)
13739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13740for as_dir in $PATH
13741do
13742  IFS=$as_save_IFS
13743  test -z "$as_dir" && as_dir=.
13744    for ac_exec_ext in '' $ac_executable_extensions; do
13745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13746    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13748    break 2
13749  fi
13750done
13751  done
13752IFS=$as_save_IFS
13753
13754  ;;
13755esac
13756fi
13757READLINK=$ac_cv_path_READLINK
13758if test -n "$READLINK"; then
13759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13760$as_echo "$READLINK" >&6; }
13761else
13762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13763$as_echo "no" >&6; }
13764fi
13765
13766
13767          if test "x$READLINK" = x; then
13768            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13769          fi
13770        else
13771          # Otherwise we believe it is a complete path. Use it as it is.
13772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13773$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13774          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13775$as_echo_n "checking for READLINK... " >&6; }
13776          if test ! -x "$tool_specified"; then
13777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13778$as_echo "not found" >&6; }
13779            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13780          fi
13781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13782$as_echo "$tool_specified" >&6; }
13783        fi
13784      fi
13785    fi
13786
13787  fi
13788
13789
13790
13791
13792  # Publish this variable in the help.
13793
13794
13795  if [ -z "${DF+x}" ]; then
13796    # The variable is not set by user, try to locate tool using the code snippet
13797    for ac_prog in df
13798do
13799  # Extract the first word of "$ac_prog", so it can be a program name with args.
13800set dummy $ac_prog; ac_word=$2
13801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13802$as_echo_n "checking for $ac_word... " >&6; }
13803if ${ac_cv_path_DF+:} false; then :
13804  $as_echo_n "(cached) " >&6
13805else
13806  case $DF in
13807  [\\/]* | ?:[\\/]*)
13808  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13809  ;;
13810  *)
13811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13812for as_dir in $PATH
13813do
13814  IFS=$as_save_IFS
13815  test -z "$as_dir" && as_dir=.
13816    for ac_exec_ext in '' $ac_executable_extensions; do
13817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13818    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13820    break 2
13821  fi
13822done
13823  done
13824IFS=$as_save_IFS
13825
13826  ;;
13827esac
13828fi
13829DF=$ac_cv_path_DF
13830if test -n "$DF"; then
13831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13832$as_echo "$DF" >&6; }
13833else
13834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13835$as_echo "no" >&6; }
13836fi
13837
13838
13839  test -n "$DF" && break
13840done
13841
13842  else
13843    # The variable is set, but is it from the command line or the environment?
13844
13845    # Try to remove the string !DF! from our list.
13846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13848      # If it failed, the variable was not from the command line. Ignore it,
13849      # but warn the user (except for BASH, which is always set by the calling BASH).
13850      if test "xDF" != xBASH; then
13851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13852$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13853      fi
13854      # Try to locate tool using the code snippet
13855      for ac_prog in df
13856do
13857  # Extract the first word of "$ac_prog", so it can be a program name with args.
13858set dummy $ac_prog; ac_word=$2
13859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13860$as_echo_n "checking for $ac_word... " >&6; }
13861if ${ac_cv_path_DF+:} false; then :
13862  $as_echo_n "(cached) " >&6
13863else
13864  case $DF in
13865  [\\/]* | ?:[\\/]*)
13866  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13867  ;;
13868  *)
13869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13870for as_dir in $PATH
13871do
13872  IFS=$as_save_IFS
13873  test -z "$as_dir" && as_dir=.
13874    for ac_exec_ext in '' $ac_executable_extensions; do
13875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13876    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13878    break 2
13879  fi
13880done
13881  done
13882IFS=$as_save_IFS
13883
13884  ;;
13885esac
13886fi
13887DF=$ac_cv_path_DF
13888if test -n "$DF"; then
13889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13890$as_echo "$DF" >&6; }
13891else
13892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13893$as_echo "no" >&6; }
13894fi
13895
13896
13897  test -n "$DF" && break
13898done
13899
13900    else
13901      # If it succeeded, then it was overridden by the user. We will use it
13902      # for the tool.
13903
13904      # First remove it from the list of overridden variables, so we can test
13905      # for unknown variables in the end.
13906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13907
13908      # Check if we try to supply an empty value
13909      if test "x$DF" = x; then
13910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13911$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13913$as_echo_n "checking for DF... " >&6; }
13914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13915$as_echo "disabled" >&6; }
13916      else
13917        # Check if the provided tool contains a complete path.
13918        tool_specified="$DF"
13919        tool_basename="${tool_specified##*/}"
13920        if test "x$tool_basename" = "x$tool_specified"; then
13921          # A command without a complete path is provided, search $PATH.
13922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13923$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13924          # Extract the first word of "$tool_basename", so it can be a program name with args.
13925set dummy $tool_basename; ac_word=$2
13926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13927$as_echo_n "checking for $ac_word... " >&6; }
13928if ${ac_cv_path_DF+:} false; then :
13929  $as_echo_n "(cached) " >&6
13930else
13931  case $DF in
13932  [\\/]* | ?:[\\/]*)
13933  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13934  ;;
13935  *)
13936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13937for as_dir in $PATH
13938do
13939  IFS=$as_save_IFS
13940  test -z "$as_dir" && as_dir=.
13941    for ac_exec_ext in '' $ac_executable_extensions; do
13942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13943    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13945    break 2
13946  fi
13947done
13948  done
13949IFS=$as_save_IFS
13950
13951  ;;
13952esac
13953fi
13954DF=$ac_cv_path_DF
13955if test -n "$DF"; then
13956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13957$as_echo "$DF" >&6; }
13958else
13959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13960$as_echo "no" >&6; }
13961fi
13962
13963
13964          if test "x$DF" = x; then
13965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13966          fi
13967        else
13968          # Otherwise we believe it is a complete path. Use it as it is.
13969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13970$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13972$as_echo_n "checking for DF... " >&6; }
13973          if test ! -x "$tool_specified"; then
13974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13975$as_echo "not found" >&6; }
13976            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13977          fi
13978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13979$as_echo "$tool_specified" >&6; }
13980        fi
13981      fi
13982    fi
13983
13984  fi
13985
13986
13987
13988
13989  # Publish this variable in the help.
13990
13991
13992  if [ -z "${CPIO+x}" ]; then
13993    # The variable is not set by user, try to locate tool using the code snippet
13994    for ac_prog in cpio bsdcpio
13995do
13996  # Extract the first word of "$ac_prog", so it can be a program name with args.
13997set dummy $ac_prog; ac_word=$2
13998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13999$as_echo_n "checking for $ac_word... " >&6; }
14000if ${ac_cv_path_CPIO+:} false; then :
14001  $as_echo_n "(cached) " >&6
14002else
14003  case $CPIO in
14004  [\\/]* | ?:[\\/]*)
14005  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14006  ;;
14007  *)
14008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14009for as_dir in $PATH
14010do
14011  IFS=$as_save_IFS
14012  test -z "$as_dir" && as_dir=.
14013    for ac_exec_ext in '' $ac_executable_extensions; do
14014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14015    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14017    break 2
14018  fi
14019done
14020  done
14021IFS=$as_save_IFS
14022
14023  ;;
14024esac
14025fi
14026CPIO=$ac_cv_path_CPIO
14027if test -n "$CPIO"; then
14028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14029$as_echo "$CPIO" >&6; }
14030else
14031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14032$as_echo "no" >&6; }
14033fi
14034
14035
14036  test -n "$CPIO" && break
14037done
14038
14039  else
14040    # The variable is set, but is it from the command line or the environment?
14041
14042    # Try to remove the string !CPIO! from our list.
14043    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14044    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14045      # If it failed, the variable was not from the command line. Ignore it,
14046      # but warn the user (except for BASH, which is always set by the calling BASH).
14047      if test "xCPIO" != xBASH; then
14048        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14049$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14050      fi
14051      # Try to locate tool using the code snippet
14052      for ac_prog in cpio bsdcpio
14053do
14054  # Extract the first word of "$ac_prog", so it can be a program name with args.
14055set dummy $ac_prog; ac_word=$2
14056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14057$as_echo_n "checking for $ac_word... " >&6; }
14058if ${ac_cv_path_CPIO+:} false; then :
14059  $as_echo_n "(cached) " >&6
14060else
14061  case $CPIO in
14062  [\\/]* | ?:[\\/]*)
14063  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14064  ;;
14065  *)
14066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14067for as_dir in $PATH
14068do
14069  IFS=$as_save_IFS
14070  test -z "$as_dir" && as_dir=.
14071    for ac_exec_ext in '' $ac_executable_extensions; do
14072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14073    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14075    break 2
14076  fi
14077done
14078  done
14079IFS=$as_save_IFS
14080
14081  ;;
14082esac
14083fi
14084CPIO=$ac_cv_path_CPIO
14085if test -n "$CPIO"; then
14086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14087$as_echo "$CPIO" >&6; }
14088else
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14090$as_echo "no" >&6; }
14091fi
14092
14093
14094  test -n "$CPIO" && break
14095done
14096
14097    else
14098      # If it succeeded, then it was overridden by the user. We will use it
14099      # for the tool.
14100
14101      # First remove it from the list of overridden variables, so we can test
14102      # for unknown variables in the end.
14103      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14104
14105      # Check if we try to supply an empty value
14106      if test "x$CPIO" = x; then
14107        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14108$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14109        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14110$as_echo_n "checking for CPIO... " >&6; }
14111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14112$as_echo "disabled" >&6; }
14113      else
14114        # Check if the provided tool contains a complete path.
14115        tool_specified="$CPIO"
14116        tool_basename="${tool_specified##*/}"
14117        if test "x$tool_basename" = "x$tool_specified"; then
14118          # A command without a complete path is provided, search $PATH.
14119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14120$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14121          # Extract the first word of "$tool_basename", so it can be a program name with args.
14122set dummy $tool_basename; ac_word=$2
14123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14124$as_echo_n "checking for $ac_word... " >&6; }
14125if ${ac_cv_path_CPIO+:} false; then :
14126  $as_echo_n "(cached) " >&6
14127else
14128  case $CPIO in
14129  [\\/]* | ?:[\\/]*)
14130  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14131  ;;
14132  *)
14133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14134for as_dir in $PATH
14135do
14136  IFS=$as_save_IFS
14137  test -z "$as_dir" && as_dir=.
14138    for ac_exec_ext in '' $ac_executable_extensions; do
14139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14140    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14142    break 2
14143  fi
14144done
14145  done
14146IFS=$as_save_IFS
14147
14148  ;;
14149esac
14150fi
14151CPIO=$ac_cv_path_CPIO
14152if test -n "$CPIO"; then
14153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14154$as_echo "$CPIO" >&6; }
14155else
14156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14157$as_echo "no" >&6; }
14158fi
14159
14160
14161          if test "x$CPIO" = x; then
14162            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14163          fi
14164        else
14165          # Otherwise we believe it is a complete path. Use it as it is.
14166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14167$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14168          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14169$as_echo_n "checking for CPIO... " >&6; }
14170          if test ! -x "$tool_specified"; then
14171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14172$as_echo "not found" >&6; }
14173            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14174          fi
14175          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14176$as_echo "$tool_specified" >&6; }
14177        fi
14178      fi
14179    fi
14180
14181  fi
14182
14183
14184
14185
14186  # Publish this variable in the help.
14187
14188
14189  if [ -z "${NICE+x}" ]; then
14190    # The variable is not set by user, try to locate tool using the code snippet
14191    for ac_prog in nice
14192do
14193  # Extract the first word of "$ac_prog", so it can be a program name with args.
14194set dummy $ac_prog; ac_word=$2
14195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14196$as_echo_n "checking for $ac_word... " >&6; }
14197if ${ac_cv_path_NICE+:} false; then :
14198  $as_echo_n "(cached) " >&6
14199else
14200  case $NICE in
14201  [\\/]* | ?:[\\/]*)
14202  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14203  ;;
14204  *)
14205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14206for as_dir in $PATH
14207do
14208  IFS=$as_save_IFS
14209  test -z "$as_dir" && as_dir=.
14210    for ac_exec_ext in '' $ac_executable_extensions; do
14211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14212    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14214    break 2
14215  fi
14216done
14217  done
14218IFS=$as_save_IFS
14219
14220  ;;
14221esac
14222fi
14223NICE=$ac_cv_path_NICE
14224if test -n "$NICE"; then
14225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14226$as_echo "$NICE" >&6; }
14227else
14228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14229$as_echo "no" >&6; }
14230fi
14231
14232
14233  test -n "$NICE" && break
14234done
14235
14236  else
14237    # The variable is set, but is it from the command line or the environment?
14238
14239    # Try to remove the string !NICE! from our list.
14240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14242      # If it failed, the variable was not from the command line. Ignore it,
14243      # but warn the user (except for BASH, which is always set by the calling BASH).
14244      if test "xNICE" != xBASH; then
14245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14246$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14247      fi
14248      # Try to locate tool using the code snippet
14249      for ac_prog in nice
14250do
14251  # Extract the first word of "$ac_prog", so it can be a program name with args.
14252set dummy $ac_prog; ac_word=$2
14253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14254$as_echo_n "checking for $ac_word... " >&6; }
14255if ${ac_cv_path_NICE+:} false; then :
14256  $as_echo_n "(cached) " >&6
14257else
14258  case $NICE in
14259  [\\/]* | ?:[\\/]*)
14260  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14261  ;;
14262  *)
14263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14264for as_dir in $PATH
14265do
14266  IFS=$as_save_IFS
14267  test -z "$as_dir" && as_dir=.
14268    for ac_exec_ext in '' $ac_executable_extensions; do
14269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14270    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14272    break 2
14273  fi
14274done
14275  done
14276IFS=$as_save_IFS
14277
14278  ;;
14279esac
14280fi
14281NICE=$ac_cv_path_NICE
14282if test -n "$NICE"; then
14283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14284$as_echo "$NICE" >&6; }
14285else
14286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14287$as_echo "no" >&6; }
14288fi
14289
14290
14291  test -n "$NICE" && break
14292done
14293
14294    else
14295      # If it succeeded, then it was overridden by the user. We will use it
14296      # for the tool.
14297
14298      # First remove it from the list of overridden variables, so we can test
14299      # for unknown variables in the end.
14300      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14301
14302      # Check if we try to supply an empty value
14303      if test "x$NICE" = x; then
14304        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14305$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14307$as_echo_n "checking for NICE... " >&6; }
14308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14309$as_echo "disabled" >&6; }
14310      else
14311        # Check if the provided tool contains a complete path.
14312        tool_specified="$NICE"
14313        tool_basename="${tool_specified##*/}"
14314        if test "x$tool_basename" = "x$tool_specified"; then
14315          # A command without a complete path is provided, search $PATH.
14316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14317$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14318          # Extract the first word of "$tool_basename", so it can be a program name with args.
14319set dummy $tool_basename; ac_word=$2
14320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14321$as_echo_n "checking for $ac_word... " >&6; }
14322if ${ac_cv_path_NICE+:} false; then :
14323  $as_echo_n "(cached) " >&6
14324else
14325  case $NICE in
14326  [\\/]* | ?:[\\/]*)
14327  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14328  ;;
14329  *)
14330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14331for as_dir in $PATH
14332do
14333  IFS=$as_save_IFS
14334  test -z "$as_dir" && as_dir=.
14335    for ac_exec_ext in '' $ac_executable_extensions; do
14336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14337    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14339    break 2
14340  fi
14341done
14342  done
14343IFS=$as_save_IFS
14344
14345  ;;
14346esac
14347fi
14348NICE=$ac_cv_path_NICE
14349if test -n "$NICE"; then
14350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14351$as_echo "$NICE" >&6; }
14352else
14353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14354$as_echo "no" >&6; }
14355fi
14356
14357
14358          if test "x$NICE" = x; then
14359            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14360          fi
14361        else
14362          # Otherwise we believe it is a complete path. Use it as it is.
14363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14364$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14365          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14366$as_echo_n "checking for NICE... " >&6; }
14367          if test ! -x "$tool_specified"; then
14368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14369$as_echo "not found" >&6; }
14370            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14371          fi
14372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14373$as_echo "$tool_specified" >&6; }
14374        fi
14375      fi
14376    fi
14377
14378  fi
14379
14380
14381
14382
14383# Now we can determine OpenJDK build and target platforms. This is required to
14384# have early on.
14385# Make sure we can run config.sub.
14386$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14387  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14388
14389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14390$as_echo_n "checking build system type... " >&6; }
14391if ${ac_cv_build+:} false; then :
14392  $as_echo_n "(cached) " >&6
14393else
14394  ac_build_alias=$build_alias
14395test "x$ac_build_alias" = x &&
14396  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14397test "x$ac_build_alias" = x &&
14398  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14399ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14400  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14401
14402fi
14403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14404$as_echo "$ac_cv_build" >&6; }
14405case $ac_cv_build in
14406*-*-*) ;;
14407*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14408esac
14409build=$ac_cv_build
14410ac_save_IFS=$IFS; IFS='-'
14411set x $ac_cv_build
14412shift
14413build_cpu=$1
14414build_vendor=$2
14415shift; shift
14416# Remember, the first character of IFS is used to create $*,
14417# except with old shells:
14418build_os=$*
14419IFS=$ac_save_IFS
14420case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14421
14422
14423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14424$as_echo_n "checking host system type... " >&6; }
14425if ${ac_cv_host+:} false; then :
14426  $as_echo_n "(cached) " >&6
14427else
14428  if test "x$host_alias" = x; then
14429  ac_cv_host=$ac_cv_build
14430else
14431  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14432    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14433fi
14434
14435fi
14436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14437$as_echo "$ac_cv_host" >&6; }
14438case $ac_cv_host in
14439*-*-*) ;;
14440*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14441esac
14442host=$ac_cv_host
14443ac_save_IFS=$IFS; IFS='-'
14444set x $ac_cv_host
14445shift
14446host_cpu=$1
14447host_vendor=$2
14448shift; shift
14449# Remember, the first character of IFS is used to create $*,
14450# except with old shells:
14451host_os=$*
14452IFS=$ac_save_IFS
14453case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14454
14455
14456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14457$as_echo_n "checking target system type... " >&6; }
14458if ${ac_cv_target+:} false; then :
14459  $as_echo_n "(cached) " >&6
14460else
14461  if test "x$target_alias" = x; then
14462  ac_cv_target=$ac_cv_host
14463else
14464  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14465    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14466fi
14467
14468fi
14469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14470$as_echo "$ac_cv_target" >&6; }
14471case $ac_cv_target in
14472*-*-*) ;;
14473*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14474esac
14475target=$ac_cv_target
14476ac_save_IFS=$IFS; IFS='-'
14477set x $ac_cv_target
14478shift
14479target_cpu=$1
14480target_vendor=$2
14481shift; shift
14482# Remember, the first character of IFS is used to create $*,
14483# except with old shells:
14484target_os=$*
14485IFS=$ac_save_IFS
14486case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14487
14488
14489# The aliases save the names the user supplied, while $host etc.
14490# will get canonicalized.
14491test -n "$target_alias" &&
14492  test "$program_prefix$program_suffix$program_transform_name" = \
14493    NONENONEs,x,x, &&
14494  program_prefix=${target_alias}-
14495
14496  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14497  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14498  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14499  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14500  # to use the configure naming style.
14501
14502
14503
14504
14505
14506  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14507  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14508  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14509  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14510  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14511  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14512
14513
14514
14515  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14516
14517  case "$build_os" in
14518    *linux*)
14519      VAR_OS=linux
14520      VAR_OS_TYPE=unix
14521      ;;
14522    *solaris*)
14523      VAR_OS=solaris
14524      VAR_OS_TYPE=unix
14525      ;;
14526    *darwin*)
14527      VAR_OS=macosx
14528      VAR_OS_TYPE=unix
14529      ;;
14530    *bsd*)
14531      VAR_OS=bsd
14532      VAR_OS_TYPE=unix
14533      ;;
14534    *cygwin*)
14535      VAR_OS=windows
14536      VAR_OS_ENV=windows.cygwin
14537      ;;
14538    *mingw*)
14539      VAR_OS=windows
14540      VAR_OS_ENV=windows.msys
14541      ;;
14542    *aix*)
14543      VAR_OS=aix
14544      VAR_OS_TYPE=unix
14545      ;;
14546    *)
14547      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14548      ;;
14549  esac
14550
14551
14552  # First argument is the cpu name from the trip/quad
14553  case "$build_cpu" in
14554    x86_64)
14555      VAR_CPU=x86_64
14556      VAR_CPU_ARCH=x86
14557      VAR_CPU_BITS=64
14558      VAR_CPU_ENDIAN=little
14559      ;;
14560    i?86)
14561      VAR_CPU=x86
14562      VAR_CPU_ARCH=x86
14563      VAR_CPU_BITS=32
14564      VAR_CPU_ENDIAN=little
14565      ;;
14566    arm*)
14567      VAR_CPU=arm
14568      VAR_CPU_ARCH=arm
14569      VAR_CPU_BITS=32
14570      VAR_CPU_ENDIAN=little
14571      ;;
14572    aarch64)
14573      VAR_CPU=aarch64
14574      VAR_CPU_ARCH=aarch64
14575      VAR_CPU_BITS=64
14576      VAR_CPU_ENDIAN=little
14577      ;;
14578    powerpc)
14579      VAR_CPU=ppc
14580      VAR_CPU_ARCH=ppc
14581      VAR_CPU_BITS=32
14582      VAR_CPU_ENDIAN=big
14583      ;;
14584    powerpc64)
14585      VAR_CPU=ppc64
14586      VAR_CPU_ARCH=ppc
14587      VAR_CPU_BITS=64
14588      VAR_CPU_ENDIAN=big
14589      ;;
14590    powerpc64le)
14591      VAR_CPU=ppc64
14592      VAR_CPU_ARCH=ppc
14593      VAR_CPU_BITS=64
14594      VAR_CPU_ENDIAN=little
14595      ;;
14596    s390)
14597      VAR_CPU=s390
14598      VAR_CPU_ARCH=s390
14599      VAR_CPU_BITS=32
14600      VAR_CPU_ENDIAN=big
14601      ;;
14602    s390x)
14603      VAR_CPU=s390x
14604      VAR_CPU_ARCH=s390
14605      VAR_CPU_BITS=64
14606      VAR_CPU_ENDIAN=big
14607      ;;
14608    sparc)
14609      VAR_CPU=sparc
14610      VAR_CPU_ARCH=sparc
14611      VAR_CPU_BITS=32
14612      VAR_CPU_ENDIAN=big
14613      ;;
14614    sparcv9|sparc64)
14615      VAR_CPU=sparcv9
14616      VAR_CPU_ARCH=sparc
14617      VAR_CPU_BITS=64
14618      VAR_CPU_ENDIAN=big
14619      ;;
14620    *)
14621      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14622      ;;
14623  esac
14624
14625  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14626  OPENJDK_BUILD_OS="$VAR_OS"
14627  if test "x$VAR_OS_TYPE" != x; then
14628    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14629  else
14630    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14631  fi
14632  if test "x$VAR_OS_ENV" != x; then
14633    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14634  else
14635    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14636  fi
14637  OPENJDK_BUILD_CPU="$VAR_CPU"
14638  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14639  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14640  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14641
14642
14643
14644
14645
14646
14647
14648
14649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14650$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14652$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14653
14654  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14655
14656  case "$host_os" in
14657    *linux*)
14658      VAR_OS=linux
14659      VAR_OS_TYPE=unix
14660      ;;
14661    *solaris*)
14662      VAR_OS=solaris
14663      VAR_OS_TYPE=unix
14664      ;;
14665    *darwin*)
14666      VAR_OS=macosx
14667      VAR_OS_TYPE=unix
14668      ;;
14669    *bsd*)
14670      VAR_OS=bsd
14671      VAR_OS_TYPE=unix
14672      ;;
14673    *cygwin*)
14674      VAR_OS=windows
14675      VAR_OS_ENV=windows.cygwin
14676      ;;
14677    *mingw*)
14678      VAR_OS=windows
14679      VAR_OS_ENV=windows.msys
14680      ;;
14681    *aix*)
14682      VAR_OS=aix
14683      VAR_OS_TYPE=unix
14684      ;;
14685    *)
14686      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14687      ;;
14688  esac
14689
14690
14691  # First argument is the cpu name from the trip/quad
14692  case "$host_cpu" in
14693    x86_64)
14694      VAR_CPU=x86_64
14695      VAR_CPU_ARCH=x86
14696      VAR_CPU_BITS=64
14697      VAR_CPU_ENDIAN=little
14698      ;;
14699    i?86)
14700      VAR_CPU=x86
14701      VAR_CPU_ARCH=x86
14702      VAR_CPU_BITS=32
14703      VAR_CPU_ENDIAN=little
14704      ;;
14705    arm*)
14706      VAR_CPU=arm
14707      VAR_CPU_ARCH=arm
14708      VAR_CPU_BITS=32
14709      VAR_CPU_ENDIAN=little
14710      ;;
14711    aarch64)
14712      VAR_CPU=aarch64
14713      VAR_CPU_ARCH=aarch64
14714      VAR_CPU_BITS=64
14715      VAR_CPU_ENDIAN=little
14716      ;;
14717    powerpc)
14718      VAR_CPU=ppc
14719      VAR_CPU_ARCH=ppc
14720      VAR_CPU_BITS=32
14721      VAR_CPU_ENDIAN=big
14722      ;;
14723    powerpc64)
14724      VAR_CPU=ppc64
14725      VAR_CPU_ARCH=ppc
14726      VAR_CPU_BITS=64
14727      VAR_CPU_ENDIAN=big
14728      ;;
14729    powerpc64le)
14730      VAR_CPU=ppc64
14731      VAR_CPU_ARCH=ppc
14732      VAR_CPU_BITS=64
14733      VAR_CPU_ENDIAN=little
14734      ;;
14735    s390)
14736      VAR_CPU=s390
14737      VAR_CPU_ARCH=s390
14738      VAR_CPU_BITS=32
14739      VAR_CPU_ENDIAN=big
14740      ;;
14741    s390x)
14742      VAR_CPU=s390x
14743      VAR_CPU_ARCH=s390
14744      VAR_CPU_BITS=64
14745      VAR_CPU_ENDIAN=big
14746      ;;
14747    sparc)
14748      VAR_CPU=sparc
14749      VAR_CPU_ARCH=sparc
14750      VAR_CPU_BITS=32
14751      VAR_CPU_ENDIAN=big
14752      ;;
14753    sparcv9|sparc64)
14754      VAR_CPU=sparcv9
14755      VAR_CPU_ARCH=sparc
14756      VAR_CPU_BITS=64
14757      VAR_CPU_ENDIAN=big
14758      ;;
14759    *)
14760      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14761      ;;
14762  esac
14763
14764  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14765  OPENJDK_TARGET_OS="$VAR_OS"
14766  if test "x$VAR_OS_TYPE" != x; then
14767    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14768  else
14769    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14770  fi
14771  if test "x$VAR_OS_ENV" != x; then
14772    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14773  else
14774    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14775  fi
14776  OPENJDK_TARGET_CPU="$VAR_CPU"
14777  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14778  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14779  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14780
14781
14782
14783
14784
14785
14786
14787
14788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14789$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14791$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14792
14793
14794
14795# Check whether --with-target-bits was given.
14796if test "${with_target_bits+set}" = set; then :
14797  withval=$with_target_bits;
14798fi
14799
14800
14801  # We have three types of compiles:
14802  # native  == normal compilation, target system == build system
14803  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14804  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14805  #
14806  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14807    # We're doing a proper cross-compilation
14808    COMPILE_TYPE="cross"
14809  else
14810    COMPILE_TYPE="native"
14811  fi
14812
14813  if test "x$with_target_bits" != x; then
14814    if test "x$COMPILE_TYPE" = "xcross"; then
14815      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14816    fi
14817
14818    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14819      # A reduced build is requested
14820      COMPILE_TYPE="reduced"
14821      OPENJDK_TARGET_CPU_BITS=32
14822      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14823        OPENJDK_TARGET_CPU=x86
14824      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14825        OPENJDK_TARGET_CPU=sparc
14826      else
14827        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14828      fi
14829    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14830      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
14831    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14832      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14833$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14834    else
14835      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14836    fi
14837  fi
14838
14839
14840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14841$as_echo_n "checking compilation type... " >&6; }
14842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14843$as_echo "$COMPILE_TYPE" >&6; }
14844
14845
14846  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14847    REQUIRED_OS_NAME=SunOS
14848    REQUIRED_OS_VERSION=5.10
14849  fi
14850  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14851    REQUIRED_OS_NAME=Linux
14852    REQUIRED_OS_VERSION=2.6
14853  fi
14854  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14855    REQUIRED_OS_NAME=Windows
14856    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14857      REQUIRED_OS_VERSION=5.2
14858    else
14859      REQUIRED_OS_VERSION=5.1
14860    fi
14861  fi
14862  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14863    REQUIRED_OS_NAME=Darwin
14864    REQUIRED_OS_VERSION=11.2
14865  fi
14866
14867
14868
14869
14870
14871  # Also store the legacy naming of the cpu.
14872  # Ie i586 and amd64 instead of x86 and x86_64
14873  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14874  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14875    OPENJDK_TARGET_CPU_LEGACY="i586"
14876  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14877    # On all platforms except MacOSX replace x86_64 with amd64.
14878    OPENJDK_TARGET_CPU_LEGACY="amd64"
14879  fi
14880
14881
14882  # And the second legacy naming of the cpu.
14883  # Ie i386 and amd64 instead of x86 and x86_64.
14884  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14885  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14886    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14887  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14888    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14889  fi
14890
14891
14892  # This is the name of the cpu (but using i386 and amd64 instead of
14893  # x86 and x86_64, respectively), preceeded by a /, to be used when
14894  # locating libraries. On macosx, it's empty, though.
14895  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14896  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14897    OPENJDK_TARGET_CPU_LIBDIR=""
14898  fi
14899
14900
14901  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14902  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14903  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14904  OPENJDK_TARGET_CPU_ISADIR=""
14905  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14906    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14907      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14908    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14909      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14910    fi
14911  fi
14912
14913
14914  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14915  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14916  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14917    # On linux only, we replace x86 with i386.
14918    OPENJDK_TARGET_CPU_OSARCH="i386"
14919  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14920    # On all platforms except macosx, we replace x86_64 with amd64.
14921    OPENJDK_TARGET_CPU_OSARCH="amd64"
14922  fi
14923
14924
14925  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14926  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14927    OPENJDK_TARGET_CPU_JLI="i386"
14928  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14929    # On all platforms except macosx, we replace x86_64 with amd64.
14930    OPENJDK_TARGET_CPU_JLI="amd64"
14931  fi
14932  # Now setup the -D flags for building libjli.
14933  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14934  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14935    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14936      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14937    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14938      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14939    fi
14940  fi
14941
14942
14943  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14944      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14945  else
14946      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14947  fi
14948
14949
14950  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14951    A_LP64="LP64:="
14952    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14953    # unpack200.exe
14954    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14955      ADD_LP64="-D_LP64=1"
14956    fi
14957  fi
14958  LP64=$A_LP64
14959
14960
14961  if test "x$COMPILE_TYPE" = "xcross"; then
14962    # FIXME: ... or should this include reduced builds..?
14963    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14964  else
14965    DEFINE_CROSS_COMPILE_ARCH=""
14966  fi
14967
14968
14969  # ZERO_ARCHDEF is used to enable architecture-specific code
14970  case "${OPENJDK_TARGET_CPU}" in
14971    ppc)     ZERO_ARCHDEF=PPC32 ;;
14972    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14973    s390*)   ZERO_ARCHDEF=S390  ;;
14974    sparc*)  ZERO_ARCHDEF=SPARC ;;
14975    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14976    x86)     ZERO_ARCHDEF=IA32  ;;
14977    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14978  esac
14979
14980
14981
14982
14983# Continue setting up basic stuff. Most remaining code require fundamental tools.
14984
14985  # Save the current directory this script was started from
14986  CURDIR="$PWD"
14987
14988  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
14989  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
14990  # was not available at that time.
14991  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
14992  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
14993    ORIGINAL_PATH="$REWRITTEN_PATH"
14994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
14995$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
14996  fi
14997
14998  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14999    PATH_SEP=";"
15000
15001  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15002  if test $SRC_ROOT_LENGTH -gt 100; then
15003    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15004  fi
15005
15006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15008$as_echo_n "checking cygwin release... " >&6; }
15009    CYGWIN_VERSION=`$UNAME -r`
15010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15011$as_echo "$CYGWIN_VERSION" >&6; }
15012    WINDOWS_ENV_VENDOR='cygwin'
15013    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15014
15015    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15016    if test "x$CYGWIN_VERSION_OLD" != x; then
15017      { $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
15018$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;}
15019      as_fn_error $? "Cannot continue" "$LINENO" 5
15020    fi
15021    if test "x$CYGPATH" = x; then
15022      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15023    fi
15024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15025$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15026    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15027    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15028    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15029    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15031$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15032    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15033    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15034    if test "x$test_cygdrive_prefix" = x; then
15035      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15036    fi
15037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15039$as_echo_n "checking msys release... " >&6; }
15040    MSYS_VERSION=`$UNAME -r`
15041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15042$as_echo "$MSYS_VERSION" >&6; }
15043
15044    WINDOWS_ENV_VENDOR='msys'
15045    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15046
15047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15048$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15049    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15050    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15051
15052  windows_path="$MSYS_ROOT_PATH"
15053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15054    unix_path=`$CYGPATH -u "$windows_path"`
15055    MSYS_ROOT_PATH="$unix_path"
15056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15058    MSYS_ROOT_PATH="$unix_path"
15059  fi
15060
15061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15062$as_echo "$MSYS_ROOT_PATH" >&6; }
15063    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15064  else
15065    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15066  fi
15067
15068  # Test if windows or unix (cygwin/msys) find is first in path.
15069  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15070$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15071  FIND_BINARY_OUTPUT=`find --version 2>&1`
15072  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15074$as_echo "unix style" >&6; }
15075  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15077$as_echo "Windows" >&6; }
15078    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15079$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15080    { $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
15081$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15082    as_fn_error $? "Cannot continue" "$LINENO" 5
15083  else
15084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15085$as_echo "unknown" >&6; }
15086    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15087$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15088  fi
15089
15090  else
15091    PATH_SEP=":"
15092  fi
15093
15094
15095  # We get the top-level directory from the supporting wrappers.
15096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15097$as_echo_n "checking for top-level directory... " >&6; }
15098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15099$as_echo "$TOPDIR" >&6; }
15100
15101
15102  # Save the original version of TOPDIR for string comparisons
15103  ORIGINAL_TOPDIR="$TOPDIR"
15104
15105
15106  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15107
15108  # Only process if variable expands to non-empty
15109
15110  if test "x$CURDIR" != x; then
15111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15112
15113  # Input might be given as Windows format, start by converting to
15114  # unix format.
15115  path="$CURDIR"
15116  new_path=`$CYGPATH -u "$path"`
15117
15118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15121  # "foo.exe" is OK but "foo" is an error.
15122  #
15123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15124  # It is also a way to make sure we got the proper file name for the real test later on.
15125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15126  if test "x$test_shortpath" = x; then
15127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15128$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15129    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15130  fi
15131
15132  # Call helper function which possibly converts this using DOS-style short mode.
15133  # If so, the updated path is stored in $new_path.
15134
15135  input_path="$new_path"
15136  # Check if we need to convert this using DOS-style short mode. If the path
15137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15138  # take no chances and rewrite it.
15139  # Note: m4 eats our [], so we need to use [ and ] instead.
15140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15141  if test "x$has_forbidden_chars" != x; then
15142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15146      # Going to short mode and back again did indeed matter. Since short mode is
15147      # case insensitive, let's make it lowercase to improve readability.
15148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15149      # Now convert it back to Unix-style (cygpath)
15150      input_path=`$CYGPATH -u "$shortmode_path"`
15151      new_path="$input_path"
15152    fi
15153  fi
15154
15155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15156  if test "x$test_cygdrive_prefix" = x; then
15157    # As a simple fix, exclude /usr/bin since it's not a real path.
15158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15160      # a path prefixed by /cygdrive for fixpath to work.
15161      new_path="$CYGWIN_ROOT_PATH$input_path"
15162    fi
15163  fi
15164
15165
15166  if test "x$path" != "x$new_path"; then
15167    CURDIR="$new_path"
15168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15169$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15170  fi
15171
15172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15173
15174  path="$CURDIR"
15175  has_colon=`$ECHO $path | $GREP ^.:`
15176  new_path="$path"
15177  if test "x$has_colon" = x; then
15178    # Not in mixed or Windows style, start by that.
15179    new_path=`cmd //c echo $path`
15180  fi
15181
15182
15183  input_path="$new_path"
15184  # Check if we need to convert this using DOS-style short mode. If the path
15185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15186  # take no chances and rewrite it.
15187  # Note: m4 eats our [], so we need to use [ and ] instead.
15188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15189  if test "x$has_forbidden_chars" != x; then
15190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15192  fi
15193
15194
15195  windows_path="$new_path"
15196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15197    unix_path=`$CYGPATH -u "$windows_path"`
15198    new_path="$unix_path"
15199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15201    new_path="$unix_path"
15202  fi
15203
15204  if test "x$path" != "x$new_path"; then
15205    CURDIR="$new_path"
15206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15207$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15208  fi
15209
15210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15212
15213    else
15214      # We're on a unix platform. Hooray! :)
15215      path="$CURDIR"
15216      has_space=`$ECHO "$path" | $GREP " "`
15217      if test "x$has_space" != x; then
15218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15219$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15220        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15221      fi
15222
15223      # Use eval to expand a potential ~
15224      eval path="$path"
15225      if test ! -f "$path" && test ! -d "$path"; then
15226        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15227      fi
15228
15229      CURDIR="`cd "$path"; $THEPWDCMD -L`"
15230    fi
15231  fi
15232
15233
15234  # Only process if variable expands to non-empty
15235
15236  if test "x$TOPDIR" != x; then
15237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15238
15239  # Input might be given as Windows format, start by converting to
15240  # unix format.
15241  path="$TOPDIR"
15242  new_path=`$CYGPATH -u "$path"`
15243
15244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15247  # "foo.exe" is OK but "foo" is an error.
15248  #
15249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15250  # It is also a way to make sure we got the proper file name for the real test later on.
15251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15252  if test "x$test_shortpath" = x; then
15253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15254$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15255    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15256  fi
15257
15258  # Call helper function which possibly converts this using DOS-style short mode.
15259  # If so, the updated path is stored in $new_path.
15260
15261  input_path="$new_path"
15262  # Check if we need to convert this using DOS-style short mode. If the path
15263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15264  # take no chances and rewrite it.
15265  # Note: m4 eats our [], so we need to use [ and ] instead.
15266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15267  if test "x$has_forbidden_chars" != x; then
15268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15272      # Going to short mode and back again did indeed matter. Since short mode is
15273      # case insensitive, let's make it lowercase to improve readability.
15274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15275      # Now convert it back to Unix-style (cygpath)
15276      input_path=`$CYGPATH -u "$shortmode_path"`
15277      new_path="$input_path"
15278    fi
15279  fi
15280
15281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15282  if test "x$test_cygdrive_prefix" = x; then
15283    # As a simple fix, exclude /usr/bin since it's not a real path.
15284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15286      # a path prefixed by /cygdrive for fixpath to work.
15287      new_path="$CYGWIN_ROOT_PATH$input_path"
15288    fi
15289  fi
15290
15291
15292  if test "x$path" != "x$new_path"; then
15293    TOPDIR="$new_path"
15294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15295$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15296  fi
15297
15298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15299
15300  path="$TOPDIR"
15301  has_colon=`$ECHO $path | $GREP ^.:`
15302  new_path="$path"
15303  if test "x$has_colon" = x; then
15304    # Not in mixed or Windows style, start by that.
15305    new_path=`cmd //c echo $path`
15306  fi
15307
15308
15309  input_path="$new_path"
15310  # Check if we need to convert this using DOS-style short mode. If the path
15311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15312  # take no chances and rewrite it.
15313  # Note: m4 eats our [], so we need to use [ and ] instead.
15314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15315  if test "x$has_forbidden_chars" != x; then
15316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15318  fi
15319
15320
15321  windows_path="$new_path"
15322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15323    unix_path=`$CYGPATH -u "$windows_path"`
15324    new_path="$unix_path"
15325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15327    new_path="$unix_path"
15328  fi
15329
15330  if test "x$path" != "x$new_path"; then
15331    TOPDIR="$new_path"
15332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15333$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15334  fi
15335
15336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15338
15339    else
15340      # We're on a unix platform. Hooray! :)
15341      path="$TOPDIR"
15342      has_space=`$ECHO "$path" | $GREP " "`
15343      if test "x$has_space" != x; then
15344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15345$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15346        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15347      fi
15348
15349      # Use eval to expand a potential ~
15350      eval path="$path"
15351      if test ! -f "$path" && test ! -d "$path"; then
15352        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15353      fi
15354
15355      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15356    fi
15357  fi
15358
15359  # SRC_ROOT is a traditional alias for TOPDIR.
15360  SRC_ROOT=$TOPDIR
15361
15362  # Calculate a canonical version of TOPDIR for string comparisons
15363  CANONICAL_TOPDIR=$TOPDIR
15364
15365  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15366    # Follow a chain of symbolic links. Use readlink
15367    # where it exists, else fall back to horribly
15368    # complicated shell code.
15369    if test "x$READLINK_TESTED" != yes; then
15370      # On MacOSX there is a readlink tool with a different
15371      # purpose than the GNU readlink tool. Check the found readlink.
15372      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15373      if test "x$ISGNU" = x; then
15374        # A readlink that we do not know how to use.
15375        # Are there other non-GNU readlinks out there?
15376        READLINK_TESTED=yes
15377        READLINK=
15378      fi
15379    fi
15380
15381    if test "x$READLINK" != x; then
15382      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15383    else
15384      # Save the current directory for restoring afterwards
15385      STARTDIR=$PWD
15386      COUNTER=0
15387      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15388      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15389      cd $sym_link_dir
15390      # Use -P flag to resolve symlinks in directories.
15391      cd `$THEPWDCMD -P`
15392      sym_link_dir=`$THEPWDCMD -P`
15393      # Resolve file symlinks
15394      while test $COUNTER -lt 20; do
15395        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15396        if test "x$ISLINK" == x; then
15397          # This is not a symbolic link! We are done!
15398          break
15399        fi
15400        # Again resolve directory symlinks since the target of the just found
15401        # link could be in a different directory
15402        cd `$DIRNAME $ISLINK`
15403        sym_link_dir=`$THEPWDCMD -P`
15404        sym_link_file=`$BASENAME $ISLINK`
15405        let COUNTER=COUNTER+1
15406      done
15407      cd $STARTDIR
15408      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15409    fi
15410  fi
15411
15412
15413
15414  # Locate the directory of this script.
15415  AUTOCONF_DIR=$TOPDIR/common/autoconf
15416
15417
15418# Check if it's a pure open build or if custom sources are to be used.
15419
15420  # Check whether --enable-openjdk-only was given.
15421if test "${enable_openjdk_only+set}" = set; then :
15422  enableval=$enable_openjdk_only;
15423else
15424  enable_openjdk_only="no"
15425fi
15426
15427
15428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15429$as_echo_n "checking for presence of closed sources... " >&6; }
15430  if test -d "$SRC_ROOT/jdk/src/closed"; then
15431    CLOSED_SOURCE_PRESENT=yes
15432  else
15433    CLOSED_SOURCE_PRESENT=no
15434  fi
15435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15436$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15437
15438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15439$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15440  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15442$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15443
15444  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15445    OPENJDK=true
15446    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15447      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15448$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15449    fi
15450  else
15451    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15452      OPENJDK=true
15453    else
15454      OPENJDK=false
15455    fi
15456  fi
15457
15458  if test "x$OPENJDK" = "xtrue"; then
15459    SET_OPENJDK="OPENJDK=true"
15460  fi
15461
15462
15463
15464  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15465  # the IncludeCustomExtension macro.
15466
15467
15468# Check whether --with-custom-make-dir was given.
15469if test "${with_custom_make_dir+set}" = set; then :
15470  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
15471$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15472fi
15473
15474
15475
15476
15477# These are needed to be able to create a configuration name (and thus the output directory)
15478
15479  ###############################################################################
15480  #
15481  # Check which variant of the JDK that we want to build.
15482  # Currently we have:
15483  #    normal:   standard edition
15484  # but the custom make system may add other variants
15485  #
15486  # Effectively the JDK variant gives a name to a specific set of
15487  # modules to compile into the JDK. In the future, these modules
15488  # might even be Jigsaw modules.
15489  #
15490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15491$as_echo_n "checking which variant of the JDK to build... " >&6; }
15492
15493# Check whether --with-jdk-variant was given.
15494if test "${with_jdk_variant+set}" = set; then :
15495  withval=$with_jdk_variant;
15496fi
15497
15498
15499  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15500    JDK_VARIANT="normal"
15501  else
15502    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15503  fi
15504
15505
15506
15507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15508$as_echo "$JDK_VARIANT" >&6; }
15509
15510
15511###############################################################################
15512#
15513# Check which interpreter of the JVM we want to build.
15514# Currently we have:
15515#    template: Template interpreter (the default)
15516#    cpp     : C++ interpreter
15517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15518$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15519
15520# Check whether --with-jvm-interpreter was given.
15521if test "${with_jvm_interpreter+set}" = set; then :
15522  withval=$with_jvm_interpreter;
15523fi
15524
15525
15526if test "x$with_jvm_interpreter" = x; then
15527     with_jvm_interpreter="template"
15528fi
15529
15530JVM_INTERPRETER="$with_jvm_interpreter"
15531
15532if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15533   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15534fi
15535
15536
15537
15538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15539$as_echo "$with_jvm_interpreter" >&6; }
15540
15541
15542
15543  ###############################################################################
15544  #
15545  # Check which variants of the JVM that we want to build.
15546  # Currently we have:
15547  #    server: normal interpreter and a tiered C1/C2 compiler
15548  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15549  #    minimal1: reduced form of client with optional VM services and features stripped out
15550  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15551  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15552  #    zero: no machine code interpreter, no compiler
15553  #    zeroshark: zero interpreter and shark/llvm compiler backend
15554#    core: interpreter only, no compiler (only works on some platforms)
15555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15556$as_echo_n "checking which variants of the JVM to build... " >&6; }
15557
15558# Check whether --with-jvm-variants was given.
15559if test "${with_jvm_variants+set}" = set; then :
15560  withval=$with_jvm_variants;
15561fi
15562
15563
15564  if test "x$with_jvm_variants" = x; then
15565    with_jvm_variants="server"
15566  fi
15567
15568  JVM_VARIANTS=",$with_jvm_variants,"
15569  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15570
15571  if test "x$TEST_VARIANTS" != "x,"; then
15572     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15573  fi
15574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15575$as_echo "$with_jvm_variants" >&6; }
15576
15577  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15578  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15579  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15580  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15581  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15582  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15583  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15584
15585  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15586    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15587      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15588    fi
15589  fi
15590  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15591    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15592      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15593    fi
15594  fi
15595  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15596    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15597      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15598    fi
15599  fi
15600
15601  # Replace the commas with AND for use in the build directory name.
15602  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15603  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
15604  if test "x$COUNT_VARIANTS" != "x,1"; then
15605    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15606  else
15607    BUILDING_MULTIPLE_JVM_VARIANTS=no
15608  fi
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619  INCLUDE_SA=true
15620  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15621    INCLUDE_SA=false
15622  fi
15623  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15624    INCLUDE_SA=false
15625  fi
15626  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15627    INCLUDE_SA=false
15628  fi
15629  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15630    INCLUDE_SA=false
15631  fi
15632
15633
15634  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15635    MACOSX_UNIVERSAL="true"
15636  fi
15637
15638
15639
15640
15641  ###############################################################################
15642  #
15643  # Set the debug level
15644  #    release: no debug information, all optimizations, no asserts.
15645  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15646  #    fastdebug: debug information (-g), all optimizations, all asserts
15647  #    slowdebug: debug information (-g), no optimizations, all asserts
15648  #
15649  DEBUG_LEVEL="release"
15650  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15651$as_echo_n "checking which debug level to use... " >&6; }
15652  # Check whether --enable-debug was given.
15653if test "${enable_debug+set}" = set; then :
15654  enableval=$enable_debug;
15655        ENABLE_DEBUG="${enableval}"
15656        DEBUG_LEVEL="fastdebug"
15657
15658else
15659  ENABLE_DEBUG="no"
15660fi
15661
15662
15663
15664# Check whether --with-debug-level was given.
15665if test "${with_debug_level+set}" = set; then :
15666  withval=$with_debug_level;
15667        DEBUG_LEVEL="${withval}"
15668        if test "x$ENABLE_DEBUG" = xyes; then
15669          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15670        fi
15671
15672fi
15673
15674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15675$as_echo "$DEBUG_LEVEL" >&6; }
15676
15677  if test "x$DEBUG_LEVEL" != xrelease && \
15678      test "x$DEBUG_LEVEL" != xoptimized && \
15679      test "x$DEBUG_LEVEL" != xfastdebug && \
15680      test "x$DEBUG_LEVEL" != xslowdebug; then
15681    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15682  fi
15683
15684
15685  ###############################################################################
15686  #
15687  # Setup legacy vars/targets and new vars to deal with different debug levels.
15688  #
15689
15690  case $DEBUG_LEVEL in
15691    release )
15692      VARIANT="OPT"
15693      FASTDEBUG="false"
15694      DEBUG_CLASSFILES="false"
15695      BUILD_VARIANT_RELEASE=""
15696      HOTSPOT_DEBUG_LEVEL="product"
15697      HOTSPOT_EXPORT="product"
15698      ;;
15699    fastdebug )
15700      VARIANT="DBG"
15701      FASTDEBUG="true"
15702      DEBUG_CLASSFILES="true"
15703      BUILD_VARIANT_RELEASE="-fastdebug"
15704      HOTSPOT_DEBUG_LEVEL="fastdebug"
15705      HOTSPOT_EXPORT="fastdebug"
15706      ;;
15707    slowdebug )
15708      VARIANT="DBG"
15709      FASTDEBUG="false"
15710      DEBUG_CLASSFILES="true"
15711      BUILD_VARIANT_RELEASE="-debug"
15712      HOTSPOT_DEBUG_LEVEL="debug"
15713      HOTSPOT_EXPORT="debug"
15714      ;;
15715    optimized )
15716      VARIANT="OPT"
15717      FASTDEBUG="false"
15718      DEBUG_CLASSFILES="false"
15719      BUILD_VARIANT_RELEASE="-optimized"
15720      HOTSPOT_DEBUG_LEVEL="optimized"
15721      HOTSPOT_EXPORT="optimized"
15722      ;;
15723  esac
15724
15725  # The debug level 'optimized' is a little special because it is currently only
15726  # applicable to the HotSpot build where it means to build a completely
15727  # optimized version of the VM without any debugging code (like for the
15728  # 'release' debug level which is called 'product' in the HotSpot build) but
15729  # with the exception that it can contain additional code which is otherwise
15730  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15731  # test new and/or experimental features which are not intended for customer
15732  # shipment. Because these new features need to be tested and benchmarked in
15733  # real world scenarios, we want to build the containing JDK at the 'release'
15734  # debug level.
15735  if test "x$DEBUG_LEVEL" = xoptimized; then
15736    DEBUG_LEVEL="release"
15737  fi
15738
15739  #####
15740  # Generate the legacy makefile targets for hotspot.
15741  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15742  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15743  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15744  # But until then ...
15745  HOTSPOT_TARGET=""
15746
15747  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15748    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15749  fi
15750
15751  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15752    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15753  fi
15754
15755  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15756    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15757  fi
15758
15759  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15760    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15761  fi
15762
15763  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15764    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15765  fi
15766
15767  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15768    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15769  fi
15770
15771  if test "x$JVM_VARIANT_CORE" = xtrue; then
15772    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15773  fi
15774
15775  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15776
15777  # On Macosx universal binaries are produced, but they only contain
15778  # 64 bit intel. This invalidates control of which jvms are built
15779  # from configure, but only server is valid anyway. Fix this
15780  # when hotspot makefiles are rewritten.
15781  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15782    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15783  fi
15784
15785  #####
15786
15787
15788
15789
15790
15791
15792
15793
15794# With basic setup done, call the custom early hook.
15795
15796
15797# Check if we have devkits, extra paths or sysroot set.
15798
15799
15800# Check whether --with-devkit was given.
15801if test "${with_devkit+set}" = set; then :
15802  withval=$with_devkit;
15803
15804  # Only process if variable expands to non-empty
15805
15806  if test "x$with_devkit" != x; then
15807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15808
15809  # Input might be given as Windows format, start by converting to
15810  # unix format.
15811  path="$with_devkit"
15812  new_path=`$CYGPATH -u "$path"`
15813
15814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15817  # "foo.exe" is OK but "foo" is an error.
15818  #
15819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15820  # It is also a way to make sure we got the proper file name for the real test later on.
15821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15822  if test "x$test_shortpath" = x; then
15823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15824$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15825    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15826  fi
15827
15828  # Call helper function which possibly converts this using DOS-style short mode.
15829  # If so, the updated path is stored in $new_path.
15830
15831  input_path="$new_path"
15832  # Check if we need to convert this using DOS-style short mode. If the path
15833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15834  # take no chances and rewrite it.
15835  # Note: m4 eats our [], so we need to use [ and ] instead.
15836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15837  if test "x$has_forbidden_chars" != x; then
15838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15842      # Going to short mode and back again did indeed matter. Since short mode is
15843      # case insensitive, let's make it lowercase to improve readability.
15844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15845      # Now convert it back to Unix-style (cygpath)
15846      input_path=`$CYGPATH -u "$shortmode_path"`
15847      new_path="$input_path"
15848    fi
15849  fi
15850
15851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15852  if test "x$test_cygdrive_prefix" = x; then
15853    # As a simple fix, exclude /usr/bin since it's not a real path.
15854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15856      # a path prefixed by /cygdrive for fixpath to work.
15857      new_path="$CYGWIN_ROOT_PATH$input_path"
15858    fi
15859  fi
15860
15861
15862  if test "x$path" != "x$new_path"; then
15863    with_devkit="$new_path"
15864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15865$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15866  fi
15867
15868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15869
15870  path="$with_devkit"
15871  has_colon=`$ECHO $path | $GREP ^.:`
15872  new_path="$path"
15873  if test "x$has_colon" = x; then
15874    # Not in mixed or Windows style, start by that.
15875    new_path=`cmd //c echo $path`
15876  fi
15877
15878
15879  input_path="$new_path"
15880  # Check if we need to convert this using DOS-style short mode. If the path
15881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15882  # take no chances and rewrite it.
15883  # Note: m4 eats our [], so we need to use [ and ] instead.
15884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15885  if test "x$has_forbidden_chars" != x; then
15886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15888  fi
15889
15890
15891  windows_path="$new_path"
15892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15893    unix_path=`$CYGPATH -u "$windows_path"`
15894    new_path="$unix_path"
15895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15897    new_path="$unix_path"
15898  fi
15899
15900  if test "x$path" != "x$new_path"; then
15901    with_devkit="$new_path"
15902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15903$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15904  fi
15905
15906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15908
15909    else
15910      # We're on a unix platform. Hooray! :)
15911      path="$with_devkit"
15912      has_space=`$ECHO "$path" | $GREP " "`
15913      if test "x$has_space" != x; then
15914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15915$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15916        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15917      fi
15918
15919      # Use eval to expand a potential ~
15920      eval path="$path"
15921      if test ! -f "$path" && test ! -d "$path"; then
15922        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15923      fi
15924
15925      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15926    fi
15927  fi
15928
15929        DEVKIT_ROOT="$with_devkit"
15930        # Check for a meta data info file in the root of the devkit
15931        if test -f "$DEVKIT_ROOT/devkit.info"; then
15932          . $DEVKIT_ROOT/devkit.info
15933          # This potentially sets the following:
15934          # A descriptive name of the devkit
15935
15936  if test "x$DEVKIT_NAME" = x; then
15937    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15938  fi
15939
15940          # Corresponds to --with-extra-path
15941
15942  if test "x$DEVKIT_EXTRA_PATH" = x; then
15943    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15944  fi
15945
15946          # Corresponds to --with-toolchain-path
15947
15948  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15949    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15950  fi
15951
15952          # Corresponds to --with-sysroot
15953
15954  if test "x$DEVKIT_SYSROOT" = x; then
15955    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15956  fi
15957
15958
15959          # Identifies the Visual Studio version in the devkit
15960
15961  if test "x$DEVKIT_VS_VERSION" = x; then
15962    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15963  fi
15964
15965          # The Visual Studio include environment variable
15966
15967  if test "x$DEVKIT_VS_INCLUDE" = x; then
15968    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15969  fi
15970
15971          # The Visual Studio lib environment variable
15972
15973  if test "x$DEVKIT_VS_LIB" = x; then
15974    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15975  fi
15976
15977          # Corresponds to --with-msvcr-dll
15978
15979  if test "x$DEVKIT_MSVCR_DLL" = x; then
15980    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15981  fi
15982
15983          # Corresponds to --with-msvcp-dll
15984
15985  if test "x$DEVKIT_MSVCP_DLL" = x; then
15986    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15987  fi
15988
15989        fi
15990
15991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15992$as_echo_n "checking for devkit... " >&6; }
15993        if test "x$DEVKIT_NAME" != x; then
15994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15995$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15996        else
15997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15998$as_echo "$DEVKIT_ROOT" >&6; }
15999        fi
16000
16001
16002  if test "x$DEVKIT_EXTRA_PATH" != x; then
16003    if test "x$EXTRA_PATH" = x; then
16004      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16005    else
16006      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16007    fi
16008  fi
16009
16010
16011        # Fallback default of just /bin if DEVKIT_PATH is not defined
16012        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16013          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16014        fi
16015
16016  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16017    if test "x$TOOLCHAIN_PATH" = x; then
16018      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16019    else
16020      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16021    fi
16022  fi
16023
16024
16025        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16026        # places for backwards compatiblity.
16027        if test "x$DEVKIT_SYSROOT" != x; then
16028          SYSROOT="$DEVKIT_SYSROOT"
16029        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16030          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16031        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16032          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16033        fi
16034
16035
16036fi
16037
16038
16039  # You can force the sysroot if the sysroot encoded into the compiler tools
16040  # is not correct.
16041
16042# Check whether --with-sys-root was given.
16043if test "${with_sys_root+set}" = set; then :
16044  withval=$with_sys_root; SYSROOT=$with_sys_root
16045
16046fi
16047
16048
16049
16050# Check whether --with-sysroot was given.
16051if test "${with_sysroot+set}" = set; then :
16052  withval=$with_sysroot; SYSROOT=$with_sysroot
16053
16054fi
16055
16056
16057
16058# Check whether --with-tools-dir was given.
16059if test "${with_tools_dir+set}" = set; then :
16060  withval=$with_tools_dir;
16061  if test "x$with_tools_dir" != x; then
16062    if test "x$TOOLCHAIN_PATH" = x; then
16063      TOOLCHAIN_PATH="$with_tools_dir"
16064    else
16065      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16066    fi
16067  fi
16068
16069
16070fi
16071
16072
16073
16074# Check whether --with-toolchain-path was given.
16075if test "${with_toolchain_path+set}" = set; then :
16076  withval=$with_toolchain_path;
16077  if test "x$with_toolchain_path" != x; then
16078    if test "x$TOOLCHAIN_PATH" = x; then
16079      TOOLCHAIN_PATH="$with_toolchain_path"
16080    else
16081      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16082    fi
16083  fi
16084
16085
16086fi
16087
16088
16089
16090# Check whether --with-extra-path was given.
16091if test "${with_extra_path+set}" = set; then :
16092  withval=$with_extra_path;
16093  if test "x$with_extra_path" != x; then
16094    if test "x$EXTRA_PATH" = x; then
16095      EXTRA_PATH="$with_extra_path"
16096    else
16097      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16098    fi
16099  fi
16100
16101
16102fi
16103
16104
16105  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16106    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16107    # If not, detect if Xcode is installed by running xcodebuild -version
16108    # if no Xcode installed, xcodebuild exits with 1
16109    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16110    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16111      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16112      # fall back on the stub binary in /usr/bin/xcodebuild
16113      # Extract the first word of "xcodebuild", so it can be a program name with args.
16114set dummy xcodebuild; ac_word=$2
16115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16116$as_echo_n "checking for $ac_word... " >&6; }
16117if ${ac_cv_path_XCODEBUILD+:} false; then :
16118  $as_echo_n "(cached) " >&6
16119else
16120  case $XCODEBUILD in
16121  [\\/]* | ?:[\\/]*)
16122  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16123  ;;
16124  *)
16125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16126for as_dir in $TOOLCHAIN_PATH
16127do
16128  IFS=$as_save_IFS
16129  test -z "$as_dir" && as_dir=.
16130    for ac_exec_ext in '' $ac_executable_extensions; do
16131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16132    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16134    break 2
16135  fi
16136done
16137  done
16138IFS=$as_save_IFS
16139
16140  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16141  ;;
16142esac
16143fi
16144XCODEBUILD=$ac_cv_path_XCODEBUILD
16145if test -n "$XCODEBUILD"; then
16146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16147$as_echo "$XCODEBUILD" >&6; }
16148else
16149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16150$as_echo "no" >&6; }
16151fi
16152
16153
16154    else
16155      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16156      # when only the command line tools are installed there are no SDKs, so headers
16157      # are copied into the system frameworks
16158      XCODEBUILD=
16159
16160    fi
16161
16162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16163$as_echo_n "checking for sdk name... " >&6; }
16164
16165# Check whether --with-sdk-name was given.
16166if test "${with_sdk_name+set}" = set; then :
16167  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16168
16169fi
16170
16171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16172$as_echo "$SDKNAME" >&6; }
16173
16174    # if toolchain path is specified then don't rely on system headers, they may not compile
16175    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16176    test -z "$TOOLCHAIN_PATH" && \
16177      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16178
16179    if test -z "$SYSROOT"; then
16180      if test -n "$XCODEBUILD"; then
16181        # if we don't have system headers, use default SDK name (last resort)
16182        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16183          SDKNAME=${SDKNAME:-macosx}
16184        fi
16185
16186        if test -n "$SDKNAME"; then
16187          # Call xcodebuild to determine SYSROOT
16188          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16189        fi
16190      else
16191        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16192          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
16193        fi
16194      fi
16195    else
16196      # warn user if --with-sdk-name was also set
16197      if test -n "$with_sdk_name"; then
16198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16199$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16200      fi
16201    fi
16202
16203    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16204      # If no system framework headers, then SYSROOT must be set, or we won't build
16205      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
16206    fi
16207
16208    # Perform a basic sanity test
16209    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16210      if test -z "$SYSROOT"; then
16211        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
16212      else
16213        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16214      fi
16215    fi
16216
16217    # set SDKROOT too, Xcode tools will pick it up
16218    SDKROOT=$SYSROOT
16219
16220  fi
16221
16222  # Prepend the extra path to the global path
16223
16224  if test "x$EXTRA_PATH" != x; then
16225    if test "x$PATH" = x; then
16226      PATH="$EXTRA_PATH"
16227    else
16228      PATH="$EXTRA_PATH:$PATH"
16229    fi
16230  fi
16231
16232
16233  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16234    # Add extra search paths on solaris for utilities like ar and as etc...
16235    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16236  fi
16237
16238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16239$as_echo_n "checking for sysroot... " >&6; }
16240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16241$as_echo "$SYSROOT" >&6; }
16242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16243$as_echo_n "checking for toolchain path... " >&6; }
16244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16245$as_echo "$TOOLCHAIN_PATH" >&6; }
16246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16247$as_echo_n "checking for extra path... " >&6; }
16248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16249$as_echo "$EXTRA_PATH" >&6; }
16250
16251
16252# To properly create a configuration name, we need to have the OpenJDK target
16253# and options (variants and debug level) parsed.
16254
16255
16256
16257# Check whether --with-conf-name was given.
16258if test "${with_conf_name+set}" = set; then :
16259  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16260fi
16261
16262
16263  # Test from where we are running configure, in or outside of src root.
16264  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16265$as_echo_n "checking where to store configuration... " >&6; }
16266  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16267      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16268      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16269    # We are running configure from the src root.
16270    # Create a default ./build/target-variant-debuglevel output root.
16271    if test "x${CONF_NAME}" = x; then
16272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16273$as_echo "in default location" >&6; }
16274      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16275    else
16276      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16277$as_echo "in build directory with custom name" >&6; }
16278    fi
16279    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16280    $MKDIR -p "$OUTPUT_ROOT"
16281    if test ! -d "$OUTPUT_ROOT"; then
16282      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16283    fi
16284  else
16285    # We are running configure from outside of the src dir.
16286    # Then use the current directory as output dir!
16287    # If configuration is situated in normal build directory, just use the build
16288    # directory name as configuration name, otherwise use the complete path.
16289    if test "x${CONF_NAME}" = x; then
16290      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16291    fi
16292    OUTPUT_ROOT="$CURDIR"
16293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16294$as_echo "in current directory" >&6; }
16295
16296    # WARNING: This might be a bad thing to do. You need to be sure you want to
16297    # have a configuration in this directory. Do some sanity checks!
16298
16299    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16300      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16301      # other files
16302      files_present=`$LS $OUTPUT_ROOT`
16303      # Configure has already touched config.log and confdefs.h in the current dir when this check
16304      # is performed.
16305      filtered_files=`$ECHO "$files_present" \
16306          | $SED -e 's/config.log//g' \
16307              -e 's/configure.log//g' \
16308              -e 's/confdefs.h//g' \
16309              -e 's/ //g' \
16310          | $TR -d '\n'`
16311      if test "x$filtered_files" != x; then
16312        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16313$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16314        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16315$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16316        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16317$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16318        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16319$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16320        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16321$as_echo "$as_me: seriously mess up just about everything." >&6;}
16322        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16323$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16324        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16325$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16326        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16327      fi
16328    fi
16329  fi
16330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16331$as_echo_n "checking what configuration name to use... " >&6; }
16332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16333$as_echo "$CONF_NAME" >&6; }
16334
16335
16336  # Only process if variable expands to non-empty
16337
16338  if test "x$OUTPUT_ROOT" != x; then
16339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16340
16341  # Input might be given as Windows format, start by converting to
16342  # unix format.
16343  path="$OUTPUT_ROOT"
16344  new_path=`$CYGPATH -u "$path"`
16345
16346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16349  # "foo.exe" is OK but "foo" is an error.
16350  #
16351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16352  # It is also a way to make sure we got the proper file name for the real test later on.
16353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16354  if test "x$test_shortpath" = x; then
16355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16356$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16357    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16358  fi
16359
16360  # Call helper function which possibly converts this using DOS-style short mode.
16361  # If so, the updated path is stored in $new_path.
16362
16363  input_path="$new_path"
16364  # Check if we need to convert this using DOS-style short mode. If the path
16365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16366  # take no chances and rewrite it.
16367  # Note: m4 eats our [], so we need to use [ and ] instead.
16368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16369  if test "x$has_forbidden_chars" != x; then
16370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16374      # Going to short mode and back again did indeed matter. Since short mode is
16375      # case insensitive, let's make it lowercase to improve readability.
16376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16377      # Now convert it back to Unix-style (cygpath)
16378      input_path=`$CYGPATH -u "$shortmode_path"`
16379      new_path="$input_path"
16380    fi
16381  fi
16382
16383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16384  if test "x$test_cygdrive_prefix" = x; then
16385    # As a simple fix, exclude /usr/bin since it's not a real path.
16386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16388      # a path prefixed by /cygdrive for fixpath to work.
16389      new_path="$CYGWIN_ROOT_PATH$input_path"
16390    fi
16391  fi
16392
16393
16394  if test "x$path" != "x$new_path"; then
16395    OUTPUT_ROOT="$new_path"
16396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16397$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16398  fi
16399
16400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16401
16402  path="$OUTPUT_ROOT"
16403  has_colon=`$ECHO $path | $GREP ^.:`
16404  new_path="$path"
16405  if test "x$has_colon" = x; then
16406    # Not in mixed or Windows style, start by that.
16407    new_path=`cmd //c echo $path`
16408  fi
16409
16410
16411  input_path="$new_path"
16412  # Check if we need to convert this using DOS-style short mode. If the path
16413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16414  # take no chances and rewrite it.
16415  # Note: m4 eats our [], so we need to use [ and ] instead.
16416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16417  if test "x$has_forbidden_chars" != x; then
16418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16420  fi
16421
16422
16423  windows_path="$new_path"
16424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16425    unix_path=`$CYGPATH -u "$windows_path"`
16426    new_path="$unix_path"
16427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16429    new_path="$unix_path"
16430  fi
16431
16432  if test "x$path" != "x$new_path"; then
16433    OUTPUT_ROOT="$new_path"
16434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16435$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16436  fi
16437
16438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16440
16441    else
16442      # We're on a unix platform. Hooray! :)
16443      path="$OUTPUT_ROOT"
16444      has_space=`$ECHO "$path" | $GREP " "`
16445      if test "x$has_space" != x; then
16446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16447$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16449      fi
16450
16451      # Use eval to expand a potential ~
16452      eval path="$path"
16453      if test ! -f "$path" && test ! -d "$path"; then
16454        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16455      fi
16456
16457      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16458    fi
16459  fi
16460
16461
16462  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16463  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16464
16465  SPEC=$OUTPUT_ROOT/spec.gmk
16466
16467  CONF_NAME=$CONF_NAME
16468
16469  OUTPUT_ROOT=$OUTPUT_ROOT
16470
16471
16472
16473  # The spec.gmk file contains all variables for the make system.
16474  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16475
16476  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16477  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16478
16479  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16480  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16481
16482  # The compare.sh is used to compare the build output to other builds.
16483  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16484
16485  # The generated Makefile knows where the spec.gmk is and where the source is.
16486  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16487  # which will look for generated configurations
16488  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16489
16490
16491
16492# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16493
16494  for ac_prog in apt-get yum port pkgutil pkgadd
16495do
16496  # Extract the first word of "$ac_prog", so it can be a program name with args.
16497set dummy $ac_prog; ac_word=$2
16498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16499$as_echo_n "checking for $ac_word... " >&6; }
16500if ${ac_cv_prog_PKGHANDLER+:} false; then :
16501  $as_echo_n "(cached) " >&6
16502else
16503  if test -n "$PKGHANDLER"; then
16504  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16505else
16506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16507for as_dir in $PATH
16508do
16509  IFS=$as_save_IFS
16510  test -z "$as_dir" && as_dir=.
16511    for ac_exec_ext in '' $ac_executable_extensions; do
16512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16513    ac_cv_prog_PKGHANDLER="$ac_prog"
16514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16515    break 2
16516  fi
16517done
16518  done
16519IFS=$as_save_IFS
16520
16521fi
16522fi
16523PKGHANDLER=$ac_cv_prog_PKGHANDLER
16524if test -n "$PKGHANDLER"; then
16525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16526$as_echo "$PKGHANDLER" >&6; }
16527else
16528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16529$as_echo "no" >&6; }
16530fi
16531
16532
16533  test -n "$PKGHANDLER" && break
16534done
16535
16536
16537
16538# Setup tools that requires more complex handling, or that is not needed by the configure script.
16539
16540
16541
16542  # Publish this variable in the help.
16543
16544
16545  if [ -z "${MAKE+x}" ]; then
16546    # The variable is not set by user, try to locate tool using the code snippet
16547
16548    # Try our hardest to locate a correct version of GNU make
16549    for ac_prog in gmake
16550do
16551  # Extract the first word of "$ac_prog", so it can be a program name with args.
16552set dummy $ac_prog; ac_word=$2
16553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16554$as_echo_n "checking for $ac_word... " >&6; }
16555if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16556  $as_echo_n "(cached) " >&6
16557else
16558  case $CHECK_GMAKE in
16559  [\\/]* | ?:[\\/]*)
16560  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16561  ;;
16562  *)
16563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16564for as_dir in $PATH
16565do
16566  IFS=$as_save_IFS
16567  test -z "$as_dir" && as_dir=.
16568    for ac_exec_ext in '' $ac_executable_extensions; do
16569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16570    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16572    break 2
16573  fi
16574done
16575  done
16576IFS=$as_save_IFS
16577
16578  ;;
16579esac
16580fi
16581CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16582if test -n "$CHECK_GMAKE"; then
16583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16584$as_echo "$CHECK_GMAKE" >&6; }
16585else
16586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16587$as_echo "no" >&6; }
16588fi
16589
16590
16591  test -n "$CHECK_GMAKE" && break
16592done
16593
16594
16595  MAKE_CANDIDATE=""$CHECK_GMAKE""
16596  DESCRIPTION="gmake in PATH"
16597
16598  # On Cygwin, we require a newer version of make than on other platforms
16599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16600    MAKE_VERSION_EXPR="-e 4\."
16601    MAKE_REQUIRED_VERSION="4.0"
16602   else
16603    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16604    MAKE_REQUIRED_VERSION="3.81"
16605  fi
16606
16607  if test "x$MAKE_CANDIDATE" != x; then
16608    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16609$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16610    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16611    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16612    if test "x$IS_GNU_MAKE" = x; then
16613      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16614$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16615    else
16616      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16617      if test "x$IS_MODERN_MAKE" = x; then
16618        { $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
16619$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;}
16620      else
16621        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16622          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16623            MAKE_EXPECTED_ENV='cygwin'
16624          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16625            MAKE_EXPECTED_ENV='msys'
16626          else
16627            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16628          fi
16629          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16630          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16631        else
16632          # Not relevant for non-Windows
16633          IS_MAKE_CORRECT_ENV=true
16634        fi
16635        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16636          { $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
16637$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;}
16638        else
16639          FOUND_MAKE=$MAKE_CANDIDATE
16640
16641  # Only process if variable expands to non-empty
16642
16643  if test "x$FOUND_MAKE" != x; then
16644    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16645
16646  # First separate the path from the arguments. This will split at the first
16647  # space.
16648  complete="$FOUND_MAKE"
16649  path="${complete%% *}"
16650  tmp="$complete EOL"
16651  arguments="${tmp#* }"
16652
16653  # Input might be given as Windows format, start by converting to
16654  # unix format.
16655  new_path=`$CYGPATH -u "$path"`
16656
16657  # Now try to locate executable using which
16658  new_path=`$WHICH "$new_path" 2> /dev/null`
16659  # bat and cmd files are not always considered executable in cygwin causing which
16660  # to not find them
16661  if test "x$new_path" = x \
16662      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16663      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16664    new_path=`$CYGPATH -u "$path"`
16665  fi
16666  if test "x$new_path" = x; then
16667    # Oops. Which didn't find the executable.
16668    # The splitting of arguments from the executable at a space might have been incorrect,
16669    # since paths with space are more likely in Windows. Give it another try with the whole
16670    # argument.
16671    path="$complete"
16672    arguments="EOL"
16673    new_path=`$CYGPATH -u "$path"`
16674    new_path=`$WHICH "$new_path" 2> /dev/null`
16675    # bat and cmd files are not always considered executable in cygwin causing which
16676    # to not find them
16677    if test "x$new_path" = x \
16678        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16679        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16680      new_path=`$CYGPATH -u "$path"`
16681    fi
16682    if test "x$new_path" = x; then
16683      # It's still not found. Now this is an unrecoverable error.
16684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16685$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16686      has_space=`$ECHO "$complete" | $GREP " "`
16687      if test "x$has_space" != x; then
16688        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16689$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16690      fi
16691      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16692    fi
16693  fi
16694
16695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16698  # "foo.exe" is OK but "foo" is an error.
16699  #
16700  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16701  # It is also a way to make sure we got the proper file name for the real test later on.
16702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16703  if test "x$test_shortpath" = x; then
16704    # Short path failed, file does not exist as specified.
16705    # Try adding .exe or .cmd
16706    if test -f "${new_path}.exe"; then
16707      input_to_shortpath="${new_path}.exe"
16708    elif test -f "${new_path}.cmd"; then
16709      input_to_shortpath="${new_path}.cmd"
16710    else
16711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16712$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16713      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16714$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16715      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16716    fi
16717  else
16718    input_to_shortpath="$new_path"
16719  fi
16720
16721  # Call helper function which possibly converts this using DOS-style short mode.
16722  # If so, the updated path is stored in $new_path.
16723  new_path="$input_to_shortpath"
16724
16725  input_path="$input_to_shortpath"
16726  # Check if we need to convert this using DOS-style short mode. If the path
16727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16728  # take no chances and rewrite it.
16729  # Note: m4 eats our [], so we need to use [ and ] instead.
16730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16731  if test "x$has_forbidden_chars" != x; then
16732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16736      # Going to short mode and back again did indeed matter. Since short mode is
16737      # case insensitive, let's make it lowercase to improve readability.
16738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16739      # Now convert it back to Unix-style (cygpath)
16740      input_path=`$CYGPATH -u "$shortmode_path"`
16741      new_path="$input_path"
16742    fi
16743  fi
16744
16745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16746  if test "x$test_cygdrive_prefix" = x; then
16747    # As a simple fix, exclude /usr/bin since it's not a real path.
16748    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16750      # a path prefixed by /cygdrive for fixpath to work.
16751      new_path="$CYGWIN_ROOT_PATH$input_path"
16752    fi
16753  fi
16754
16755  # remove trailing .exe if any
16756  new_path="${new_path/%.exe/}"
16757
16758    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16759
16760  # First separate the path from the arguments. This will split at the first
16761  # space.
16762  complete="$FOUND_MAKE"
16763  path="${complete%% *}"
16764  tmp="$complete EOL"
16765  arguments="${tmp#* }"
16766
16767  # Input might be given as Windows format, start by converting to
16768  # unix format.
16769  new_path="$path"
16770
16771  windows_path="$new_path"
16772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16773    unix_path=`$CYGPATH -u "$windows_path"`
16774    new_path="$unix_path"
16775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16777    new_path="$unix_path"
16778  fi
16779
16780
16781  # Now try to locate executable using which
16782  new_path=`$WHICH "$new_path" 2> /dev/null`
16783
16784  if test "x$new_path" = x; then
16785    # Oops. Which didn't find the executable.
16786    # The splitting of arguments from the executable at a space might have been incorrect,
16787    # since paths with space are more likely in Windows. Give it another try with the whole
16788    # argument.
16789    path="$complete"
16790    arguments="EOL"
16791    new_path="$path"
16792
16793  windows_path="$new_path"
16794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16795    unix_path=`$CYGPATH -u "$windows_path"`
16796    new_path="$unix_path"
16797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16799    new_path="$unix_path"
16800  fi
16801
16802
16803    new_path=`$WHICH "$new_path" 2> /dev/null`
16804    # bat and cmd files are not always considered executable in MSYS causing which
16805    # to not find them
16806    if test "x$new_path" = x \
16807        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16808        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16809      new_path="$path"
16810
16811  windows_path="$new_path"
16812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16813    unix_path=`$CYGPATH -u "$windows_path"`
16814    new_path="$unix_path"
16815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16817    new_path="$unix_path"
16818  fi
16819
16820    fi
16821
16822    if test "x$new_path" = x; then
16823      # It's still not found. Now this is an unrecoverable error.
16824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16825$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16826      has_space=`$ECHO "$complete" | $GREP " "`
16827      if test "x$has_space" != x; then
16828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16830      fi
16831      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16832    fi
16833  fi
16834
16835  # Now new_path has a complete unix path to the binary
16836  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16837    # Keep paths in /bin as-is, but remove trailing .exe if any
16838    new_path="${new_path/%.exe/}"
16839    # Do not save /bin paths to all_fixpath_prefixes!
16840  else
16841    # Not in mixed or Windows style, start by that.
16842    new_path=`cmd //c echo $new_path`
16843
16844  input_path="$new_path"
16845  # Check if we need to convert this using DOS-style short mode. If the path
16846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16847  # take no chances and rewrite it.
16848  # Note: m4 eats our [], so we need to use [ and ] instead.
16849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16850  if test "x$has_forbidden_chars" != x; then
16851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16853  fi
16854
16855    # Output is in $new_path
16856
16857  windows_path="$new_path"
16858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16859    unix_path=`$CYGPATH -u "$windows_path"`
16860    new_path="$unix_path"
16861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16863    new_path="$unix_path"
16864  fi
16865
16866    # remove trailing .exe if any
16867    new_path="${new_path/%.exe/}"
16868
16869    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16870    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16871  fi
16872
16873    else
16874      # We're on a unix platform. Hooray! :)
16875      # First separate the path from the arguments. This will split at the first
16876      # space.
16877      complete="$FOUND_MAKE"
16878      path="${complete%% *}"
16879      tmp="$complete EOL"
16880      arguments="${tmp#* }"
16881
16882      # Cannot rely on the command "which" here since it doesn't always work.
16883      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16884      if test -z "$is_absolute_path"; then
16885        # Path to executable is not absolute. Find it.
16886        IFS_save="$IFS"
16887        IFS=:
16888        for p in $PATH; do
16889          if test -f "$p/$path" && test -x "$p/$path"; then
16890            new_path="$p/$path"
16891            break
16892          fi
16893        done
16894        IFS="$IFS_save"
16895      else
16896        # This is an absolute path, we can use it without further modifications.
16897        new_path="$path"
16898      fi
16899
16900      if test "x$new_path" = x; then
16901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16902$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16903        has_space=`$ECHO "$complete" | $GREP " "`
16904        if test "x$has_space" != x; then
16905          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16906$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16907        fi
16908        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16909      fi
16910    fi
16911
16912    # Now join together the path and the arguments once again
16913    if test "x$arguments" != xEOL; then
16914      new_complete="$new_path ${arguments% *}"
16915    else
16916      new_complete="$new_path"
16917    fi
16918
16919    if test "x$complete" != "x$new_complete"; then
16920      FOUND_MAKE="$new_complete"
16921      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16922$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16923    fi
16924  fi
16925
16926        fi
16927      fi
16928    fi
16929  fi
16930
16931
16932    if test "x$FOUND_MAKE" = x; then
16933      for ac_prog in make
16934do
16935  # Extract the first word of "$ac_prog", so it can be a program name with args.
16936set dummy $ac_prog; ac_word=$2
16937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16938$as_echo_n "checking for $ac_word... " >&6; }
16939if ${ac_cv_path_CHECK_MAKE+:} false; then :
16940  $as_echo_n "(cached) " >&6
16941else
16942  case $CHECK_MAKE in
16943  [\\/]* | ?:[\\/]*)
16944  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16945  ;;
16946  *)
16947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16948for as_dir in $PATH
16949do
16950  IFS=$as_save_IFS
16951  test -z "$as_dir" && as_dir=.
16952    for ac_exec_ext in '' $ac_executable_extensions; do
16953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16954    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16956    break 2
16957  fi
16958done
16959  done
16960IFS=$as_save_IFS
16961
16962  ;;
16963esac
16964fi
16965CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16966if test -n "$CHECK_MAKE"; then
16967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16968$as_echo "$CHECK_MAKE" >&6; }
16969else
16970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16971$as_echo "no" >&6; }
16972fi
16973
16974
16975  test -n "$CHECK_MAKE" && break
16976done
16977
16978
16979  MAKE_CANDIDATE=""$CHECK_MAKE""
16980  DESCRIPTION="make in PATH"
16981
16982  # On Cygwin, we require a newer version of make than on other platforms
16983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16984    MAKE_VERSION_EXPR="-e 4\."
16985    MAKE_REQUIRED_VERSION="4.0"
16986   else
16987    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16988    MAKE_REQUIRED_VERSION="3.81"
16989  fi
16990
16991  if test "x$MAKE_CANDIDATE" != x; then
16992    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16993$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16994    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16995    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16996    if test "x$IS_GNU_MAKE" = x; then
16997      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16998$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16999    else
17000      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17001      if test "x$IS_MODERN_MAKE" = x; then
17002        { $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
17003$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;}
17004      else
17005        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17006          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17007            MAKE_EXPECTED_ENV='cygwin'
17008          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17009            MAKE_EXPECTED_ENV='msys'
17010          else
17011            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17012          fi
17013          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17014          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17015        else
17016          # Not relevant for non-Windows
17017          IS_MAKE_CORRECT_ENV=true
17018        fi
17019        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17020          { $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
17021$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;}
17022        else
17023          FOUND_MAKE=$MAKE_CANDIDATE
17024
17025  # Only process if variable expands to non-empty
17026
17027  if test "x$FOUND_MAKE" != x; then
17028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17029
17030  # First separate the path from the arguments. This will split at the first
17031  # space.
17032  complete="$FOUND_MAKE"
17033  path="${complete%% *}"
17034  tmp="$complete EOL"
17035  arguments="${tmp#* }"
17036
17037  # Input might be given as Windows format, start by converting to
17038  # unix format.
17039  new_path=`$CYGPATH -u "$path"`
17040
17041  # Now try to locate executable using which
17042  new_path=`$WHICH "$new_path" 2> /dev/null`
17043  # bat and cmd files are not always considered executable in cygwin causing which
17044  # to not find them
17045  if test "x$new_path" = x \
17046      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17047      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17048    new_path=`$CYGPATH -u "$path"`
17049  fi
17050  if test "x$new_path" = x; then
17051    # Oops. Which didn't find the executable.
17052    # The splitting of arguments from the executable at a space might have been incorrect,
17053    # since paths with space are more likely in Windows. Give it another try with the whole
17054    # argument.
17055    path="$complete"
17056    arguments="EOL"
17057    new_path=`$CYGPATH -u "$path"`
17058    new_path=`$WHICH "$new_path" 2> /dev/null`
17059    # bat and cmd files are not always considered executable in cygwin causing which
17060    # to not find them
17061    if test "x$new_path" = x \
17062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17064      new_path=`$CYGPATH -u "$path"`
17065    fi
17066    if test "x$new_path" = x; then
17067      # It's still not found. Now this is an unrecoverable error.
17068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17069$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17070      has_space=`$ECHO "$complete" | $GREP " "`
17071      if test "x$has_space" != x; then
17072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17074      fi
17075      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17076    fi
17077  fi
17078
17079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17082  # "foo.exe" is OK but "foo" is an error.
17083  #
17084  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17085  # It is also a way to make sure we got the proper file name for the real test later on.
17086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17087  if test "x$test_shortpath" = x; then
17088    # Short path failed, file does not exist as specified.
17089    # Try adding .exe or .cmd
17090    if test -f "${new_path}.exe"; then
17091      input_to_shortpath="${new_path}.exe"
17092    elif test -f "${new_path}.cmd"; then
17093      input_to_shortpath="${new_path}.cmd"
17094    else
17095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17096$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17097      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17098$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17099      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17100    fi
17101  else
17102    input_to_shortpath="$new_path"
17103  fi
17104
17105  # Call helper function which possibly converts this using DOS-style short mode.
17106  # If so, the updated path is stored in $new_path.
17107  new_path="$input_to_shortpath"
17108
17109  input_path="$input_to_shortpath"
17110  # Check if we need to convert this using DOS-style short mode. If the path
17111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17112  # take no chances and rewrite it.
17113  # Note: m4 eats our [], so we need to use [ and ] instead.
17114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17115  if test "x$has_forbidden_chars" != x; then
17116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17120      # Going to short mode and back again did indeed matter. Since short mode is
17121      # case insensitive, let's make it lowercase to improve readability.
17122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17123      # Now convert it back to Unix-style (cygpath)
17124      input_path=`$CYGPATH -u "$shortmode_path"`
17125      new_path="$input_path"
17126    fi
17127  fi
17128
17129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17130  if test "x$test_cygdrive_prefix" = x; then
17131    # As a simple fix, exclude /usr/bin since it's not a real path.
17132    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17134      # a path prefixed by /cygdrive for fixpath to work.
17135      new_path="$CYGWIN_ROOT_PATH$input_path"
17136    fi
17137  fi
17138
17139  # remove trailing .exe if any
17140  new_path="${new_path/%.exe/}"
17141
17142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17143
17144  # First separate the path from the arguments. This will split at the first
17145  # space.
17146  complete="$FOUND_MAKE"
17147  path="${complete%% *}"
17148  tmp="$complete EOL"
17149  arguments="${tmp#* }"
17150
17151  # Input might be given as Windows format, start by converting to
17152  # unix format.
17153  new_path="$path"
17154
17155  windows_path="$new_path"
17156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17157    unix_path=`$CYGPATH -u "$windows_path"`
17158    new_path="$unix_path"
17159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17161    new_path="$unix_path"
17162  fi
17163
17164
17165  # Now try to locate executable using which
17166  new_path=`$WHICH "$new_path" 2> /dev/null`
17167
17168  if test "x$new_path" = x; then
17169    # Oops. Which didn't find the executable.
17170    # The splitting of arguments from the executable at a space might have been incorrect,
17171    # since paths with space are more likely in Windows. Give it another try with the whole
17172    # argument.
17173    path="$complete"
17174    arguments="EOL"
17175    new_path="$path"
17176
17177  windows_path="$new_path"
17178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17179    unix_path=`$CYGPATH -u "$windows_path"`
17180    new_path="$unix_path"
17181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17183    new_path="$unix_path"
17184  fi
17185
17186
17187    new_path=`$WHICH "$new_path" 2> /dev/null`
17188    # bat and cmd files are not always considered executable in MSYS causing which
17189    # to not find them
17190    if test "x$new_path" = x \
17191        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17192        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17193      new_path="$path"
17194
17195  windows_path="$new_path"
17196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17197    unix_path=`$CYGPATH -u "$windows_path"`
17198    new_path="$unix_path"
17199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17201    new_path="$unix_path"
17202  fi
17203
17204    fi
17205
17206    if test "x$new_path" = x; then
17207      # It's still not found. Now this is an unrecoverable error.
17208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17209$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17210      has_space=`$ECHO "$complete" | $GREP " "`
17211      if test "x$has_space" != x; then
17212        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17213$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17214      fi
17215      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17216    fi
17217  fi
17218
17219  # Now new_path has a complete unix path to the binary
17220  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17221    # Keep paths in /bin as-is, but remove trailing .exe if any
17222    new_path="${new_path/%.exe/}"
17223    # Do not save /bin paths to all_fixpath_prefixes!
17224  else
17225    # Not in mixed or Windows style, start by that.
17226    new_path=`cmd //c echo $new_path`
17227
17228  input_path="$new_path"
17229  # Check if we need to convert this using DOS-style short mode. If the path
17230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17231  # take no chances and rewrite it.
17232  # Note: m4 eats our [], so we need to use [ and ] instead.
17233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17234  if test "x$has_forbidden_chars" != x; then
17235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17237  fi
17238
17239    # Output is in $new_path
17240
17241  windows_path="$new_path"
17242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17243    unix_path=`$CYGPATH -u "$windows_path"`
17244    new_path="$unix_path"
17245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17247    new_path="$unix_path"
17248  fi
17249
17250    # remove trailing .exe if any
17251    new_path="${new_path/%.exe/}"
17252
17253    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17254    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17255  fi
17256
17257    else
17258      # We're on a unix platform. Hooray! :)
17259      # First separate the path from the arguments. This will split at the first
17260      # space.
17261      complete="$FOUND_MAKE"
17262      path="${complete%% *}"
17263      tmp="$complete EOL"
17264      arguments="${tmp#* }"
17265
17266      # Cannot rely on the command "which" here since it doesn't always work.
17267      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17268      if test -z "$is_absolute_path"; then
17269        # Path to executable is not absolute. Find it.
17270        IFS_save="$IFS"
17271        IFS=:
17272        for p in $PATH; do
17273          if test -f "$p/$path" && test -x "$p/$path"; then
17274            new_path="$p/$path"
17275            break
17276          fi
17277        done
17278        IFS="$IFS_save"
17279      else
17280        # This is an absolute path, we can use it without further modifications.
17281        new_path="$path"
17282      fi
17283
17284      if test "x$new_path" = x; then
17285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17286$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17287        has_space=`$ECHO "$complete" | $GREP " "`
17288        if test "x$has_space" != x; then
17289          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17290$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17291        fi
17292        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17293      fi
17294    fi
17295
17296    # Now join together the path and the arguments once again
17297    if test "x$arguments" != xEOL; then
17298      new_complete="$new_path ${arguments% *}"
17299    else
17300      new_complete="$new_path"
17301    fi
17302
17303    if test "x$complete" != "x$new_complete"; then
17304      FOUND_MAKE="$new_complete"
17305      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17306$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17307    fi
17308  fi
17309
17310        fi
17311      fi
17312    fi
17313  fi
17314
17315    fi
17316
17317    if test "x$FOUND_MAKE" = x; then
17318      if test "x$TOOLCHAIN_PATH" != x; then
17319        # We have a toolchain path, check that as well before giving up.
17320        OLD_PATH=$PATH
17321        PATH=$TOOLCHAIN_PATH:$PATH
17322        for ac_prog in gmake
17323do
17324  # Extract the first word of "$ac_prog", so it can be a program name with args.
17325set dummy $ac_prog; ac_word=$2
17326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17327$as_echo_n "checking for $ac_word... " >&6; }
17328if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17329  $as_echo_n "(cached) " >&6
17330else
17331  case $CHECK_TOOLSDIR_GMAKE in
17332  [\\/]* | ?:[\\/]*)
17333  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17334  ;;
17335  *)
17336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17337for as_dir in $PATH
17338do
17339  IFS=$as_save_IFS
17340  test -z "$as_dir" && as_dir=.
17341    for ac_exec_ext in '' $ac_executable_extensions; do
17342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17343    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17345    break 2
17346  fi
17347done
17348  done
17349IFS=$as_save_IFS
17350
17351  ;;
17352esac
17353fi
17354CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17355if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17357$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17358else
17359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17360$as_echo "no" >&6; }
17361fi
17362
17363
17364  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17365done
17366
17367
17368  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17369  DESCRIPTION="gmake in tools-dir"
17370
17371  # On Cygwin, we require a newer version of make than on other platforms
17372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17373    MAKE_VERSION_EXPR="-e 4\."
17374    MAKE_REQUIRED_VERSION="4.0"
17375   else
17376    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17377    MAKE_REQUIRED_VERSION="3.81"
17378  fi
17379
17380  if test "x$MAKE_CANDIDATE" != x; then
17381    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17382$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17383    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17384    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17385    if test "x$IS_GNU_MAKE" = x; then
17386      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17387$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17388    else
17389      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17390      if test "x$IS_MODERN_MAKE" = x; then
17391        { $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
17392$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;}
17393      else
17394        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17395          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17396            MAKE_EXPECTED_ENV='cygwin'
17397          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17398            MAKE_EXPECTED_ENV='msys'
17399          else
17400            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17401          fi
17402          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17403          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17404        else
17405          # Not relevant for non-Windows
17406          IS_MAKE_CORRECT_ENV=true
17407        fi
17408        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17409          { $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
17410$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;}
17411        else
17412          FOUND_MAKE=$MAKE_CANDIDATE
17413
17414  # Only process if variable expands to non-empty
17415
17416  if test "x$FOUND_MAKE" != x; then
17417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17418
17419  # First separate the path from the arguments. This will split at the first
17420  # space.
17421  complete="$FOUND_MAKE"
17422  path="${complete%% *}"
17423  tmp="$complete EOL"
17424  arguments="${tmp#* }"
17425
17426  # Input might be given as Windows format, start by converting to
17427  # unix format.
17428  new_path=`$CYGPATH -u "$path"`
17429
17430  # Now try to locate executable using which
17431  new_path=`$WHICH "$new_path" 2> /dev/null`
17432  # bat and cmd files are not always considered executable in cygwin causing which
17433  # to not find them
17434  if test "x$new_path" = x \
17435      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17436      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17437    new_path=`$CYGPATH -u "$path"`
17438  fi
17439  if test "x$new_path" = x; then
17440    # Oops. Which didn't find the executable.
17441    # The splitting of arguments from the executable at a space might have been incorrect,
17442    # since paths with space are more likely in Windows. Give it another try with the whole
17443    # argument.
17444    path="$complete"
17445    arguments="EOL"
17446    new_path=`$CYGPATH -u "$path"`
17447    new_path=`$WHICH "$new_path" 2> /dev/null`
17448    # bat and cmd files are not always considered executable in cygwin causing which
17449    # to not find them
17450    if test "x$new_path" = x \
17451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17453      new_path=`$CYGPATH -u "$path"`
17454    fi
17455    if test "x$new_path" = x; then
17456      # It's still not found. Now this is an unrecoverable error.
17457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17458$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17459      has_space=`$ECHO "$complete" | $GREP " "`
17460      if test "x$has_space" != x; then
17461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17463      fi
17464      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17465    fi
17466  fi
17467
17468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17471  # "foo.exe" is OK but "foo" is an error.
17472  #
17473  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17474  # It is also a way to make sure we got the proper file name for the real test later on.
17475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17476  if test "x$test_shortpath" = x; then
17477    # Short path failed, file does not exist as specified.
17478    # Try adding .exe or .cmd
17479    if test -f "${new_path}.exe"; then
17480      input_to_shortpath="${new_path}.exe"
17481    elif test -f "${new_path}.cmd"; then
17482      input_to_shortpath="${new_path}.cmd"
17483    else
17484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17485$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17486      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17487$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17488      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17489    fi
17490  else
17491    input_to_shortpath="$new_path"
17492  fi
17493
17494  # Call helper function which possibly converts this using DOS-style short mode.
17495  # If so, the updated path is stored in $new_path.
17496  new_path="$input_to_shortpath"
17497
17498  input_path="$input_to_shortpath"
17499  # Check if we need to convert this using DOS-style short mode. If the path
17500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17501  # take no chances and rewrite it.
17502  # Note: m4 eats our [], so we need to use [ and ] instead.
17503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17504  if test "x$has_forbidden_chars" != x; then
17505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17509      # Going to short mode and back again did indeed matter. Since short mode is
17510      # case insensitive, let's make it lowercase to improve readability.
17511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17512      # Now convert it back to Unix-style (cygpath)
17513      input_path=`$CYGPATH -u "$shortmode_path"`
17514      new_path="$input_path"
17515    fi
17516  fi
17517
17518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17519  if test "x$test_cygdrive_prefix" = x; then
17520    # As a simple fix, exclude /usr/bin since it's not a real path.
17521    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17523      # a path prefixed by /cygdrive for fixpath to work.
17524      new_path="$CYGWIN_ROOT_PATH$input_path"
17525    fi
17526  fi
17527
17528  # remove trailing .exe if any
17529  new_path="${new_path/%.exe/}"
17530
17531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17532
17533  # First separate the path from the arguments. This will split at the first
17534  # space.
17535  complete="$FOUND_MAKE"
17536  path="${complete%% *}"
17537  tmp="$complete EOL"
17538  arguments="${tmp#* }"
17539
17540  # Input might be given as Windows format, start by converting to
17541  # unix format.
17542  new_path="$path"
17543
17544  windows_path="$new_path"
17545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17546    unix_path=`$CYGPATH -u "$windows_path"`
17547    new_path="$unix_path"
17548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17550    new_path="$unix_path"
17551  fi
17552
17553
17554  # Now try to locate executable using which
17555  new_path=`$WHICH "$new_path" 2> /dev/null`
17556
17557  if test "x$new_path" = x; then
17558    # Oops. Which didn't find the executable.
17559    # The splitting of arguments from the executable at a space might have been incorrect,
17560    # since paths with space are more likely in Windows. Give it another try with the whole
17561    # argument.
17562    path="$complete"
17563    arguments="EOL"
17564    new_path="$path"
17565
17566  windows_path="$new_path"
17567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17568    unix_path=`$CYGPATH -u "$windows_path"`
17569    new_path="$unix_path"
17570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17572    new_path="$unix_path"
17573  fi
17574
17575
17576    new_path=`$WHICH "$new_path" 2> /dev/null`
17577    # bat and cmd files are not always considered executable in MSYS causing which
17578    # to not find them
17579    if test "x$new_path" = x \
17580        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17581        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17582      new_path="$path"
17583
17584  windows_path="$new_path"
17585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17586    unix_path=`$CYGPATH -u "$windows_path"`
17587    new_path="$unix_path"
17588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17590    new_path="$unix_path"
17591  fi
17592
17593    fi
17594
17595    if test "x$new_path" = x; then
17596      # It's still not found. Now this is an unrecoverable error.
17597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17598$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17599      has_space=`$ECHO "$complete" | $GREP " "`
17600      if test "x$has_space" != x; then
17601        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17602$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17603      fi
17604      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17605    fi
17606  fi
17607
17608  # Now new_path has a complete unix path to the binary
17609  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17610    # Keep paths in /bin as-is, but remove trailing .exe if any
17611    new_path="${new_path/%.exe/}"
17612    # Do not save /bin paths to all_fixpath_prefixes!
17613  else
17614    # Not in mixed or Windows style, start by that.
17615    new_path=`cmd //c echo $new_path`
17616
17617  input_path="$new_path"
17618  # Check if we need to convert this using DOS-style short mode. If the path
17619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17620  # take no chances and rewrite it.
17621  # Note: m4 eats our [], so we need to use [ and ] instead.
17622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17623  if test "x$has_forbidden_chars" != x; then
17624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17626  fi
17627
17628    # Output is in $new_path
17629
17630  windows_path="$new_path"
17631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17632    unix_path=`$CYGPATH -u "$windows_path"`
17633    new_path="$unix_path"
17634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17636    new_path="$unix_path"
17637  fi
17638
17639    # remove trailing .exe if any
17640    new_path="${new_path/%.exe/}"
17641
17642    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17643    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17644  fi
17645
17646    else
17647      # We're on a unix platform. Hooray! :)
17648      # First separate the path from the arguments. This will split at the first
17649      # space.
17650      complete="$FOUND_MAKE"
17651      path="${complete%% *}"
17652      tmp="$complete EOL"
17653      arguments="${tmp#* }"
17654
17655      # Cannot rely on the command "which" here since it doesn't always work.
17656      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17657      if test -z "$is_absolute_path"; then
17658        # Path to executable is not absolute. Find it.
17659        IFS_save="$IFS"
17660        IFS=:
17661        for p in $PATH; do
17662          if test -f "$p/$path" && test -x "$p/$path"; then
17663            new_path="$p/$path"
17664            break
17665          fi
17666        done
17667        IFS="$IFS_save"
17668      else
17669        # This is an absolute path, we can use it without further modifications.
17670        new_path="$path"
17671      fi
17672
17673      if test "x$new_path" = x; then
17674        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17675$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17676        has_space=`$ECHO "$complete" | $GREP " "`
17677        if test "x$has_space" != x; then
17678          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17679$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17680        fi
17681        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17682      fi
17683    fi
17684
17685    # Now join together the path and the arguments once again
17686    if test "x$arguments" != xEOL; then
17687      new_complete="$new_path ${arguments% *}"
17688    else
17689      new_complete="$new_path"
17690    fi
17691
17692    if test "x$complete" != "x$new_complete"; then
17693      FOUND_MAKE="$new_complete"
17694      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17695$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17696    fi
17697  fi
17698
17699        fi
17700      fi
17701    fi
17702  fi
17703
17704        if test "x$FOUND_MAKE" = x; then
17705          for ac_prog in make
17706do
17707  # Extract the first word of "$ac_prog", so it can be a program name with args.
17708set dummy $ac_prog; ac_word=$2
17709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17710$as_echo_n "checking for $ac_word... " >&6; }
17711if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17712  $as_echo_n "(cached) " >&6
17713else
17714  case $CHECK_TOOLSDIR_MAKE in
17715  [\\/]* | ?:[\\/]*)
17716  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17717  ;;
17718  *)
17719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17720for as_dir in $PATH
17721do
17722  IFS=$as_save_IFS
17723  test -z "$as_dir" && as_dir=.
17724    for ac_exec_ext in '' $ac_executable_extensions; do
17725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17726    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17728    break 2
17729  fi
17730done
17731  done
17732IFS=$as_save_IFS
17733
17734  ;;
17735esac
17736fi
17737CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17738if test -n "$CHECK_TOOLSDIR_MAKE"; then
17739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17740$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17741else
17742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17743$as_echo "no" >&6; }
17744fi
17745
17746
17747  test -n "$CHECK_TOOLSDIR_MAKE" && break
17748done
17749
17750
17751  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17752  DESCRIPTION="make in tools-dir"
17753
17754  # On Cygwin, we require a newer version of make than on other platforms
17755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17756    MAKE_VERSION_EXPR="-e 4\."
17757    MAKE_REQUIRED_VERSION="4.0"
17758   else
17759    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17760    MAKE_REQUIRED_VERSION="3.81"
17761  fi
17762
17763  if test "x$MAKE_CANDIDATE" != x; then
17764    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17765$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17766    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17767    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17768    if test "x$IS_GNU_MAKE" = x; then
17769      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17770$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17771    else
17772      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17773      if test "x$IS_MODERN_MAKE" = x; then
17774        { $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
17775$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;}
17776      else
17777        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17778          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17779            MAKE_EXPECTED_ENV='cygwin'
17780          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17781            MAKE_EXPECTED_ENV='msys'
17782          else
17783            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17784          fi
17785          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17786          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17787        else
17788          # Not relevant for non-Windows
17789          IS_MAKE_CORRECT_ENV=true
17790        fi
17791        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17792          { $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
17793$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;}
17794        else
17795          FOUND_MAKE=$MAKE_CANDIDATE
17796
17797  # Only process if variable expands to non-empty
17798
17799  if test "x$FOUND_MAKE" != x; then
17800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17801
17802  # First separate the path from the arguments. This will split at the first
17803  # space.
17804  complete="$FOUND_MAKE"
17805  path="${complete%% *}"
17806  tmp="$complete EOL"
17807  arguments="${tmp#* }"
17808
17809  # Input might be given as Windows format, start by converting to
17810  # unix format.
17811  new_path=`$CYGPATH -u "$path"`
17812
17813  # Now try to locate executable using which
17814  new_path=`$WHICH "$new_path" 2> /dev/null`
17815  # bat and cmd files are not always considered executable in cygwin causing which
17816  # to not find them
17817  if test "x$new_path" = x \
17818      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17819      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17820    new_path=`$CYGPATH -u "$path"`
17821  fi
17822  if test "x$new_path" = x; then
17823    # Oops. Which didn't find the executable.
17824    # The splitting of arguments from the executable at a space might have been incorrect,
17825    # since paths with space are more likely in Windows. Give it another try with the whole
17826    # argument.
17827    path="$complete"
17828    arguments="EOL"
17829    new_path=`$CYGPATH -u "$path"`
17830    new_path=`$WHICH "$new_path" 2> /dev/null`
17831    # bat and cmd files are not always considered executable in cygwin causing which
17832    # to not find them
17833    if test "x$new_path" = x \
17834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17836      new_path=`$CYGPATH -u "$path"`
17837    fi
17838    if test "x$new_path" = x; then
17839      # It's still not found. Now this is an unrecoverable error.
17840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17841$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17842      has_space=`$ECHO "$complete" | $GREP " "`
17843      if test "x$has_space" != x; then
17844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17846      fi
17847      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17848    fi
17849  fi
17850
17851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17854  # "foo.exe" is OK but "foo" is an error.
17855  #
17856  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17857  # It is also a way to make sure we got the proper file name for the real test later on.
17858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17859  if test "x$test_shortpath" = x; then
17860    # Short path failed, file does not exist as specified.
17861    # Try adding .exe or .cmd
17862    if test -f "${new_path}.exe"; then
17863      input_to_shortpath="${new_path}.exe"
17864    elif test -f "${new_path}.cmd"; then
17865      input_to_shortpath="${new_path}.cmd"
17866    else
17867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17868$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17871      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17872    fi
17873  else
17874    input_to_shortpath="$new_path"
17875  fi
17876
17877  # Call helper function which possibly converts this using DOS-style short mode.
17878  # If so, the updated path is stored in $new_path.
17879  new_path="$input_to_shortpath"
17880
17881  input_path="$input_to_shortpath"
17882  # Check if we need to convert this using DOS-style short mode. If the path
17883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17884  # take no chances and rewrite it.
17885  # Note: m4 eats our [], so we need to use [ and ] instead.
17886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17887  if test "x$has_forbidden_chars" != x; then
17888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17892      # Going to short mode and back again did indeed matter. Since short mode is
17893      # case insensitive, let's make it lowercase to improve readability.
17894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17895      # Now convert it back to Unix-style (cygpath)
17896      input_path=`$CYGPATH -u "$shortmode_path"`
17897      new_path="$input_path"
17898    fi
17899  fi
17900
17901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17902  if test "x$test_cygdrive_prefix" = x; then
17903    # As a simple fix, exclude /usr/bin since it's not a real path.
17904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17906      # a path prefixed by /cygdrive for fixpath to work.
17907      new_path="$CYGWIN_ROOT_PATH$input_path"
17908    fi
17909  fi
17910
17911  # remove trailing .exe if any
17912  new_path="${new_path/%.exe/}"
17913
17914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17915
17916  # First separate the path from the arguments. This will split at the first
17917  # space.
17918  complete="$FOUND_MAKE"
17919  path="${complete%% *}"
17920  tmp="$complete EOL"
17921  arguments="${tmp#* }"
17922
17923  # Input might be given as Windows format, start by converting to
17924  # unix format.
17925  new_path="$path"
17926
17927  windows_path="$new_path"
17928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17929    unix_path=`$CYGPATH -u "$windows_path"`
17930    new_path="$unix_path"
17931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17933    new_path="$unix_path"
17934  fi
17935
17936
17937  # Now try to locate executable using which
17938  new_path=`$WHICH "$new_path" 2> /dev/null`
17939
17940  if test "x$new_path" = x; then
17941    # Oops. Which didn't find the executable.
17942    # The splitting of arguments from the executable at a space might have been incorrect,
17943    # since paths with space are more likely in Windows. Give it another try with the whole
17944    # argument.
17945    path="$complete"
17946    arguments="EOL"
17947    new_path="$path"
17948
17949  windows_path="$new_path"
17950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17951    unix_path=`$CYGPATH -u "$windows_path"`
17952    new_path="$unix_path"
17953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17955    new_path="$unix_path"
17956  fi
17957
17958
17959    new_path=`$WHICH "$new_path" 2> /dev/null`
17960    # bat and cmd files are not always considered executable in MSYS causing which
17961    # to not find them
17962    if test "x$new_path" = x \
17963        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17964        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17965      new_path="$path"
17966
17967  windows_path="$new_path"
17968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17969    unix_path=`$CYGPATH -u "$windows_path"`
17970    new_path="$unix_path"
17971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17973    new_path="$unix_path"
17974  fi
17975
17976    fi
17977
17978    if test "x$new_path" = x; then
17979      # It's still not found. Now this is an unrecoverable error.
17980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17981$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17982      has_space=`$ECHO "$complete" | $GREP " "`
17983      if test "x$has_space" != x; then
17984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17986      fi
17987      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17988    fi
17989  fi
17990
17991  # Now new_path has a complete unix path to the binary
17992  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17993    # Keep paths in /bin as-is, but remove trailing .exe if any
17994    new_path="${new_path/%.exe/}"
17995    # Do not save /bin paths to all_fixpath_prefixes!
17996  else
17997    # Not in mixed or Windows style, start by that.
17998    new_path=`cmd //c echo $new_path`
17999
18000  input_path="$new_path"
18001  # Check if we need to convert this using DOS-style short mode. If the path
18002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18003  # take no chances and rewrite it.
18004  # Note: m4 eats our [], so we need to use [ and ] instead.
18005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18006  if test "x$has_forbidden_chars" != x; then
18007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18009  fi
18010
18011    # Output is in $new_path
18012
18013  windows_path="$new_path"
18014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18015    unix_path=`$CYGPATH -u "$windows_path"`
18016    new_path="$unix_path"
18017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18019    new_path="$unix_path"
18020  fi
18021
18022    # remove trailing .exe if any
18023    new_path="${new_path/%.exe/}"
18024
18025    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18026    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18027  fi
18028
18029    else
18030      # We're on a unix platform. Hooray! :)
18031      # First separate the path from the arguments. This will split at the first
18032      # space.
18033      complete="$FOUND_MAKE"
18034      path="${complete%% *}"
18035      tmp="$complete EOL"
18036      arguments="${tmp#* }"
18037
18038      # Cannot rely on the command "which" here since it doesn't always work.
18039      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18040      if test -z "$is_absolute_path"; then
18041        # Path to executable is not absolute. Find it.
18042        IFS_save="$IFS"
18043        IFS=:
18044        for p in $PATH; do
18045          if test -f "$p/$path" && test -x "$p/$path"; then
18046            new_path="$p/$path"
18047            break
18048          fi
18049        done
18050        IFS="$IFS_save"
18051      else
18052        # This is an absolute path, we can use it without further modifications.
18053        new_path="$path"
18054      fi
18055
18056      if test "x$new_path" = x; then
18057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18058$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18059        has_space=`$ECHO "$complete" | $GREP " "`
18060        if test "x$has_space" != x; then
18061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18063        fi
18064        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18065      fi
18066    fi
18067
18068    # Now join together the path and the arguments once again
18069    if test "x$arguments" != xEOL; then
18070      new_complete="$new_path ${arguments% *}"
18071    else
18072      new_complete="$new_path"
18073    fi
18074
18075    if test "x$complete" != "x$new_complete"; then
18076      FOUND_MAKE="$new_complete"
18077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18078$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18079    fi
18080  fi
18081
18082        fi
18083      fi
18084    fi
18085  fi
18086
18087        fi
18088        PATH=$OLD_PATH
18089      fi
18090    fi
18091
18092    if test "x$FOUND_MAKE" = x; then
18093      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
18094    fi
18095
18096  else
18097    # The variable is set, but is it from the command line or the environment?
18098
18099    # Try to remove the string !MAKE! from our list.
18100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18102      # If it failed, the variable was not from the command line. Ignore it,
18103      # but warn the user (except for BASH, which is always set by the calling BASH).
18104      if test "xMAKE" != xBASH; then
18105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18106$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18107      fi
18108      # Try to locate tool using the code snippet
18109
18110    # Try our hardest to locate a correct version of GNU make
18111    for ac_prog in gmake
18112do
18113  # Extract the first word of "$ac_prog", so it can be a program name with args.
18114set dummy $ac_prog; ac_word=$2
18115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18116$as_echo_n "checking for $ac_word... " >&6; }
18117if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18118  $as_echo_n "(cached) " >&6
18119else
18120  case $CHECK_GMAKE in
18121  [\\/]* | ?:[\\/]*)
18122  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18123  ;;
18124  *)
18125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18126for as_dir in $PATH
18127do
18128  IFS=$as_save_IFS
18129  test -z "$as_dir" && as_dir=.
18130    for ac_exec_ext in '' $ac_executable_extensions; do
18131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18132    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18134    break 2
18135  fi
18136done
18137  done
18138IFS=$as_save_IFS
18139
18140  ;;
18141esac
18142fi
18143CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18144if test -n "$CHECK_GMAKE"; then
18145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18146$as_echo "$CHECK_GMAKE" >&6; }
18147else
18148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18149$as_echo "no" >&6; }
18150fi
18151
18152
18153  test -n "$CHECK_GMAKE" && break
18154done
18155
18156
18157  MAKE_CANDIDATE=""$CHECK_GMAKE""
18158  DESCRIPTION="gmake in PATH"
18159
18160  # On Cygwin, we require a newer version of make than on other platforms
18161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18162    MAKE_VERSION_EXPR="-e 4\."
18163    MAKE_REQUIRED_VERSION="4.0"
18164   else
18165    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18166    MAKE_REQUIRED_VERSION="3.81"
18167  fi
18168
18169  if test "x$MAKE_CANDIDATE" != x; then
18170    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18171$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18172    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18173    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18174    if test "x$IS_GNU_MAKE" = x; then
18175      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18176$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18177    else
18178      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18179      if test "x$IS_MODERN_MAKE" = x; then
18180        { $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
18181$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;}
18182      else
18183        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18184          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18185            MAKE_EXPECTED_ENV='cygwin'
18186          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18187            MAKE_EXPECTED_ENV='msys'
18188          else
18189            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18190          fi
18191          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18192          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18193        else
18194          # Not relevant for non-Windows
18195          IS_MAKE_CORRECT_ENV=true
18196        fi
18197        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18198          { $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
18199$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;}
18200        else
18201          FOUND_MAKE=$MAKE_CANDIDATE
18202
18203  # Only process if variable expands to non-empty
18204
18205  if test "x$FOUND_MAKE" != x; then
18206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18207
18208  # First separate the path from the arguments. This will split at the first
18209  # space.
18210  complete="$FOUND_MAKE"
18211  path="${complete%% *}"
18212  tmp="$complete EOL"
18213  arguments="${tmp#* }"
18214
18215  # Input might be given as Windows format, start by converting to
18216  # unix format.
18217  new_path=`$CYGPATH -u "$path"`
18218
18219  # Now try to locate executable using which
18220  new_path=`$WHICH "$new_path" 2> /dev/null`
18221  # bat and cmd files are not always considered executable in cygwin causing which
18222  # to not find them
18223  if test "x$new_path" = x \
18224      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18225      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18226    new_path=`$CYGPATH -u "$path"`
18227  fi
18228  if test "x$new_path" = x; then
18229    # Oops. Which didn't find the executable.
18230    # The splitting of arguments from the executable at a space might have been incorrect,
18231    # since paths with space are more likely in Windows. Give it another try with the whole
18232    # argument.
18233    path="$complete"
18234    arguments="EOL"
18235    new_path=`$CYGPATH -u "$path"`
18236    new_path=`$WHICH "$new_path" 2> /dev/null`
18237    # bat and cmd files are not always considered executable in cygwin causing which
18238    # to not find them
18239    if test "x$new_path" = x \
18240        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18241        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18242      new_path=`$CYGPATH -u "$path"`
18243    fi
18244    if test "x$new_path" = x; then
18245      # It's still not found. Now this is an unrecoverable error.
18246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18247$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18248      has_space=`$ECHO "$complete" | $GREP " "`
18249      if test "x$has_space" != x; then
18250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18252      fi
18253      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18254    fi
18255  fi
18256
18257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18260  # "foo.exe" is OK but "foo" is an error.
18261  #
18262  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18263  # It is also a way to make sure we got the proper file name for the real test later on.
18264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18265  if test "x$test_shortpath" = x; then
18266    # Short path failed, file does not exist as specified.
18267    # Try adding .exe or .cmd
18268    if test -f "${new_path}.exe"; then
18269      input_to_shortpath="${new_path}.exe"
18270    elif test -f "${new_path}.cmd"; then
18271      input_to_shortpath="${new_path}.cmd"
18272    else
18273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18275      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18276$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18277      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18278    fi
18279  else
18280    input_to_shortpath="$new_path"
18281  fi
18282
18283  # Call helper function which possibly converts this using DOS-style short mode.
18284  # If so, the updated path is stored in $new_path.
18285  new_path="$input_to_shortpath"
18286
18287  input_path="$input_to_shortpath"
18288  # Check if we need to convert this using DOS-style short mode. If the path
18289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18290  # take no chances and rewrite it.
18291  # Note: m4 eats our [], so we need to use [ and ] instead.
18292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18293  if test "x$has_forbidden_chars" != x; then
18294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18298      # Going to short mode and back again did indeed matter. Since short mode is
18299      # case insensitive, let's make it lowercase to improve readability.
18300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18301      # Now convert it back to Unix-style (cygpath)
18302      input_path=`$CYGPATH -u "$shortmode_path"`
18303      new_path="$input_path"
18304    fi
18305  fi
18306
18307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18308  if test "x$test_cygdrive_prefix" = x; then
18309    # As a simple fix, exclude /usr/bin since it's not a real path.
18310    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18312      # a path prefixed by /cygdrive for fixpath to work.
18313      new_path="$CYGWIN_ROOT_PATH$input_path"
18314    fi
18315  fi
18316
18317  # remove trailing .exe if any
18318  new_path="${new_path/%.exe/}"
18319
18320    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18321
18322  # First separate the path from the arguments. This will split at the first
18323  # space.
18324  complete="$FOUND_MAKE"
18325  path="${complete%% *}"
18326  tmp="$complete EOL"
18327  arguments="${tmp#* }"
18328
18329  # Input might be given as Windows format, start by converting to
18330  # unix format.
18331  new_path="$path"
18332
18333  windows_path="$new_path"
18334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18335    unix_path=`$CYGPATH -u "$windows_path"`
18336    new_path="$unix_path"
18337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18339    new_path="$unix_path"
18340  fi
18341
18342
18343  # Now try to locate executable using which
18344  new_path=`$WHICH "$new_path" 2> /dev/null`
18345
18346  if test "x$new_path" = x; then
18347    # Oops. Which didn't find the executable.
18348    # The splitting of arguments from the executable at a space might have been incorrect,
18349    # since paths with space are more likely in Windows. Give it another try with the whole
18350    # argument.
18351    path="$complete"
18352    arguments="EOL"
18353    new_path="$path"
18354
18355  windows_path="$new_path"
18356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18357    unix_path=`$CYGPATH -u "$windows_path"`
18358    new_path="$unix_path"
18359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18361    new_path="$unix_path"
18362  fi
18363
18364
18365    new_path=`$WHICH "$new_path" 2> /dev/null`
18366    # bat and cmd files are not always considered executable in MSYS causing which
18367    # to not find them
18368    if test "x$new_path" = x \
18369        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18370        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18371      new_path="$path"
18372
18373  windows_path="$new_path"
18374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18375    unix_path=`$CYGPATH -u "$windows_path"`
18376    new_path="$unix_path"
18377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18379    new_path="$unix_path"
18380  fi
18381
18382    fi
18383
18384    if test "x$new_path" = x; then
18385      # It's still not found. Now this is an unrecoverable error.
18386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18387$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18388      has_space=`$ECHO "$complete" | $GREP " "`
18389      if test "x$has_space" != x; then
18390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18392      fi
18393      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18394    fi
18395  fi
18396
18397  # Now new_path has a complete unix path to the binary
18398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18399    # Keep paths in /bin as-is, but remove trailing .exe if any
18400    new_path="${new_path/%.exe/}"
18401    # Do not save /bin paths to all_fixpath_prefixes!
18402  else
18403    # Not in mixed or Windows style, start by that.
18404    new_path=`cmd //c echo $new_path`
18405
18406  input_path="$new_path"
18407  # Check if we need to convert this using DOS-style short mode. If the path
18408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18409  # take no chances and rewrite it.
18410  # Note: m4 eats our [], so we need to use [ and ] instead.
18411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18412  if test "x$has_forbidden_chars" != x; then
18413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18415  fi
18416
18417    # Output is in $new_path
18418
18419  windows_path="$new_path"
18420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18421    unix_path=`$CYGPATH -u "$windows_path"`
18422    new_path="$unix_path"
18423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18425    new_path="$unix_path"
18426  fi
18427
18428    # remove trailing .exe if any
18429    new_path="${new_path/%.exe/}"
18430
18431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18433  fi
18434
18435    else
18436      # We're on a unix platform. Hooray! :)
18437      # First separate the path from the arguments. This will split at the first
18438      # space.
18439      complete="$FOUND_MAKE"
18440      path="${complete%% *}"
18441      tmp="$complete EOL"
18442      arguments="${tmp#* }"
18443
18444      # Cannot rely on the command "which" here since it doesn't always work.
18445      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18446      if test -z "$is_absolute_path"; then
18447        # Path to executable is not absolute. Find it.
18448        IFS_save="$IFS"
18449        IFS=:
18450        for p in $PATH; do
18451          if test -f "$p/$path" && test -x "$p/$path"; then
18452            new_path="$p/$path"
18453            break
18454          fi
18455        done
18456        IFS="$IFS_save"
18457      else
18458        # This is an absolute path, we can use it without further modifications.
18459        new_path="$path"
18460      fi
18461
18462      if test "x$new_path" = x; then
18463        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18464$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18465        has_space=`$ECHO "$complete" | $GREP " "`
18466        if test "x$has_space" != x; then
18467          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18468$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18469        fi
18470        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18471      fi
18472    fi
18473
18474    # Now join together the path and the arguments once again
18475    if test "x$arguments" != xEOL; then
18476      new_complete="$new_path ${arguments% *}"
18477    else
18478      new_complete="$new_path"
18479    fi
18480
18481    if test "x$complete" != "x$new_complete"; then
18482      FOUND_MAKE="$new_complete"
18483      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18484$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18485    fi
18486  fi
18487
18488        fi
18489      fi
18490    fi
18491  fi
18492
18493
18494    if test "x$FOUND_MAKE" = x; then
18495      for ac_prog in make
18496do
18497  # Extract the first word of "$ac_prog", so it can be a program name with args.
18498set dummy $ac_prog; ac_word=$2
18499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18500$as_echo_n "checking for $ac_word... " >&6; }
18501if ${ac_cv_path_CHECK_MAKE+:} false; then :
18502  $as_echo_n "(cached) " >&6
18503else
18504  case $CHECK_MAKE in
18505  [\\/]* | ?:[\\/]*)
18506  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18507  ;;
18508  *)
18509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18510for as_dir in $PATH
18511do
18512  IFS=$as_save_IFS
18513  test -z "$as_dir" && as_dir=.
18514    for ac_exec_ext in '' $ac_executable_extensions; do
18515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18516    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18518    break 2
18519  fi
18520done
18521  done
18522IFS=$as_save_IFS
18523
18524  ;;
18525esac
18526fi
18527CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18528if test -n "$CHECK_MAKE"; then
18529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18530$as_echo "$CHECK_MAKE" >&6; }
18531else
18532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18533$as_echo "no" >&6; }
18534fi
18535
18536
18537  test -n "$CHECK_MAKE" && break
18538done
18539
18540
18541  MAKE_CANDIDATE=""$CHECK_MAKE""
18542  DESCRIPTION="make in PATH"
18543
18544  # On Cygwin, we require a newer version of make than on other platforms
18545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18546    MAKE_VERSION_EXPR="-e 4\."
18547    MAKE_REQUIRED_VERSION="4.0"
18548   else
18549    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18550    MAKE_REQUIRED_VERSION="3.81"
18551  fi
18552
18553  if test "x$MAKE_CANDIDATE" != x; then
18554    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18555$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18556    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18557    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18558    if test "x$IS_GNU_MAKE" = x; then
18559      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18560$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18561    else
18562      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18563      if test "x$IS_MODERN_MAKE" = x; then
18564        { $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
18565$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;}
18566      else
18567        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18568          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18569            MAKE_EXPECTED_ENV='cygwin'
18570          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18571            MAKE_EXPECTED_ENV='msys'
18572          else
18573            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18574          fi
18575          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18576          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18577        else
18578          # Not relevant for non-Windows
18579          IS_MAKE_CORRECT_ENV=true
18580        fi
18581        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18582          { $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
18583$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;}
18584        else
18585          FOUND_MAKE=$MAKE_CANDIDATE
18586
18587  # Only process if variable expands to non-empty
18588
18589  if test "x$FOUND_MAKE" != x; then
18590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18591
18592  # First separate the path from the arguments. This will split at the first
18593  # space.
18594  complete="$FOUND_MAKE"
18595  path="${complete%% *}"
18596  tmp="$complete EOL"
18597  arguments="${tmp#* }"
18598
18599  # Input might be given as Windows format, start by converting to
18600  # unix format.
18601  new_path=`$CYGPATH -u "$path"`
18602
18603  # Now try to locate executable using which
18604  new_path=`$WHICH "$new_path" 2> /dev/null`
18605  # bat and cmd files are not always considered executable in cygwin causing which
18606  # to not find them
18607  if test "x$new_path" = x \
18608      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18609      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18610    new_path=`$CYGPATH -u "$path"`
18611  fi
18612  if test "x$new_path" = x; then
18613    # Oops. Which didn't find the executable.
18614    # The splitting of arguments from the executable at a space might have been incorrect,
18615    # since paths with space are more likely in Windows. Give it another try with the whole
18616    # argument.
18617    path="$complete"
18618    arguments="EOL"
18619    new_path=`$CYGPATH -u "$path"`
18620    new_path=`$WHICH "$new_path" 2> /dev/null`
18621    # bat and cmd files are not always considered executable in cygwin causing which
18622    # to not find them
18623    if test "x$new_path" = x \
18624        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18625        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18626      new_path=`$CYGPATH -u "$path"`
18627    fi
18628    if test "x$new_path" = x; then
18629      # It's still not found. Now this is an unrecoverable error.
18630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18631$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18632      has_space=`$ECHO "$complete" | $GREP " "`
18633      if test "x$has_space" != x; then
18634        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18635$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18636      fi
18637      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18638    fi
18639  fi
18640
18641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18644  # "foo.exe" is OK but "foo" is an error.
18645  #
18646  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18647  # It is also a way to make sure we got the proper file name for the real test later on.
18648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18649  if test "x$test_shortpath" = x; then
18650    # Short path failed, file does not exist as specified.
18651    # Try adding .exe or .cmd
18652    if test -f "${new_path}.exe"; then
18653      input_to_shortpath="${new_path}.exe"
18654    elif test -f "${new_path}.cmd"; then
18655      input_to_shortpath="${new_path}.cmd"
18656    else
18657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18658$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18659      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18660$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18661      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18662    fi
18663  else
18664    input_to_shortpath="$new_path"
18665  fi
18666
18667  # Call helper function which possibly converts this using DOS-style short mode.
18668  # If so, the updated path is stored in $new_path.
18669  new_path="$input_to_shortpath"
18670
18671  input_path="$input_to_shortpath"
18672  # Check if we need to convert this using DOS-style short mode. If the path
18673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18674  # take no chances and rewrite it.
18675  # Note: m4 eats our [], so we need to use [ and ] instead.
18676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18677  if test "x$has_forbidden_chars" != x; then
18678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18682      # Going to short mode and back again did indeed matter. Since short mode is
18683      # case insensitive, let's make it lowercase to improve readability.
18684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18685      # Now convert it back to Unix-style (cygpath)
18686      input_path=`$CYGPATH -u "$shortmode_path"`
18687      new_path="$input_path"
18688    fi
18689  fi
18690
18691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18692  if test "x$test_cygdrive_prefix" = x; then
18693    # As a simple fix, exclude /usr/bin since it's not a real path.
18694    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18696      # a path prefixed by /cygdrive for fixpath to work.
18697      new_path="$CYGWIN_ROOT_PATH$input_path"
18698    fi
18699  fi
18700
18701  # remove trailing .exe if any
18702  new_path="${new_path/%.exe/}"
18703
18704    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18705
18706  # First separate the path from the arguments. This will split at the first
18707  # space.
18708  complete="$FOUND_MAKE"
18709  path="${complete%% *}"
18710  tmp="$complete EOL"
18711  arguments="${tmp#* }"
18712
18713  # Input might be given as Windows format, start by converting to
18714  # unix format.
18715  new_path="$path"
18716
18717  windows_path="$new_path"
18718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18719    unix_path=`$CYGPATH -u "$windows_path"`
18720    new_path="$unix_path"
18721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18723    new_path="$unix_path"
18724  fi
18725
18726
18727  # Now try to locate executable using which
18728  new_path=`$WHICH "$new_path" 2> /dev/null`
18729
18730  if test "x$new_path" = x; then
18731    # Oops. Which didn't find the executable.
18732    # The splitting of arguments from the executable at a space might have been incorrect,
18733    # since paths with space are more likely in Windows. Give it another try with the whole
18734    # argument.
18735    path="$complete"
18736    arguments="EOL"
18737    new_path="$path"
18738
18739  windows_path="$new_path"
18740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18741    unix_path=`$CYGPATH -u "$windows_path"`
18742    new_path="$unix_path"
18743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18745    new_path="$unix_path"
18746  fi
18747
18748
18749    new_path=`$WHICH "$new_path" 2> /dev/null`
18750    # bat and cmd files are not always considered executable in MSYS causing which
18751    # to not find them
18752    if test "x$new_path" = x \
18753        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18754        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18755      new_path="$path"
18756
18757  windows_path="$new_path"
18758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18759    unix_path=`$CYGPATH -u "$windows_path"`
18760    new_path="$unix_path"
18761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18763    new_path="$unix_path"
18764  fi
18765
18766    fi
18767
18768    if test "x$new_path" = x; then
18769      # It's still not found. Now this is an unrecoverable error.
18770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18771$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18772      has_space=`$ECHO "$complete" | $GREP " "`
18773      if test "x$has_space" != x; then
18774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18776      fi
18777      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18778    fi
18779  fi
18780
18781  # Now new_path has a complete unix path to the binary
18782  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18783    # Keep paths in /bin as-is, but remove trailing .exe if any
18784    new_path="${new_path/%.exe/}"
18785    # Do not save /bin paths to all_fixpath_prefixes!
18786  else
18787    # Not in mixed or Windows style, start by that.
18788    new_path=`cmd //c echo $new_path`
18789
18790  input_path="$new_path"
18791  # Check if we need to convert this using DOS-style short mode. If the path
18792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18793  # take no chances and rewrite it.
18794  # Note: m4 eats our [], so we need to use [ and ] instead.
18795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18796  if test "x$has_forbidden_chars" != x; then
18797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18799  fi
18800
18801    # Output is in $new_path
18802
18803  windows_path="$new_path"
18804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18805    unix_path=`$CYGPATH -u "$windows_path"`
18806    new_path="$unix_path"
18807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18809    new_path="$unix_path"
18810  fi
18811
18812    # remove trailing .exe if any
18813    new_path="${new_path/%.exe/}"
18814
18815    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18816    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18817  fi
18818
18819    else
18820      # We're on a unix platform. Hooray! :)
18821      # First separate the path from the arguments. This will split at the first
18822      # space.
18823      complete="$FOUND_MAKE"
18824      path="${complete%% *}"
18825      tmp="$complete EOL"
18826      arguments="${tmp#* }"
18827
18828      # Cannot rely on the command "which" here since it doesn't always work.
18829      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18830      if test -z "$is_absolute_path"; then
18831        # Path to executable is not absolute. Find it.
18832        IFS_save="$IFS"
18833        IFS=:
18834        for p in $PATH; do
18835          if test -f "$p/$path" && test -x "$p/$path"; then
18836            new_path="$p/$path"
18837            break
18838          fi
18839        done
18840        IFS="$IFS_save"
18841      else
18842        # This is an absolute path, we can use it without further modifications.
18843        new_path="$path"
18844      fi
18845
18846      if test "x$new_path" = x; then
18847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18848$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18849        has_space=`$ECHO "$complete" | $GREP " "`
18850        if test "x$has_space" != x; then
18851          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18852$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18853        fi
18854        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18855      fi
18856    fi
18857
18858    # Now join together the path and the arguments once again
18859    if test "x$arguments" != xEOL; then
18860      new_complete="$new_path ${arguments% *}"
18861    else
18862      new_complete="$new_path"
18863    fi
18864
18865    if test "x$complete" != "x$new_complete"; then
18866      FOUND_MAKE="$new_complete"
18867      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18868$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18869    fi
18870  fi
18871
18872        fi
18873      fi
18874    fi
18875  fi
18876
18877    fi
18878
18879    if test "x$FOUND_MAKE" = x; then
18880      if test "x$TOOLCHAIN_PATH" != x; then
18881        # We have a toolchain path, check that as well before giving up.
18882        OLD_PATH=$PATH
18883        PATH=$TOOLCHAIN_PATH:$PATH
18884        for ac_prog in gmake
18885do
18886  # Extract the first word of "$ac_prog", so it can be a program name with args.
18887set dummy $ac_prog; ac_word=$2
18888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18889$as_echo_n "checking for $ac_word... " >&6; }
18890if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18891  $as_echo_n "(cached) " >&6
18892else
18893  case $CHECK_TOOLSDIR_GMAKE in
18894  [\\/]* | ?:[\\/]*)
18895  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18896  ;;
18897  *)
18898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18899for as_dir in $PATH
18900do
18901  IFS=$as_save_IFS
18902  test -z "$as_dir" && as_dir=.
18903    for ac_exec_ext in '' $ac_executable_extensions; do
18904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18905    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18907    break 2
18908  fi
18909done
18910  done
18911IFS=$as_save_IFS
18912
18913  ;;
18914esac
18915fi
18916CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18917if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18919$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18920else
18921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18922$as_echo "no" >&6; }
18923fi
18924
18925
18926  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18927done
18928
18929
18930  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18931  DESCRIPTION="gmake in tools-dir"
18932
18933  # On Cygwin, we require a newer version of make than on other platforms
18934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18935    MAKE_VERSION_EXPR="-e 4\."
18936    MAKE_REQUIRED_VERSION="4.0"
18937   else
18938    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18939    MAKE_REQUIRED_VERSION="3.81"
18940  fi
18941
18942  if test "x$MAKE_CANDIDATE" != x; then
18943    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18944$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18945    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18946    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18947    if test "x$IS_GNU_MAKE" = x; then
18948      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18949$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18950    else
18951      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18952      if test "x$IS_MODERN_MAKE" = x; then
18953        { $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
18954$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;}
18955      else
18956        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18957          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18958            MAKE_EXPECTED_ENV='cygwin'
18959          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18960            MAKE_EXPECTED_ENV='msys'
18961          else
18962            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18963          fi
18964          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18965          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18966        else
18967          # Not relevant for non-Windows
18968          IS_MAKE_CORRECT_ENV=true
18969        fi
18970        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18971          { $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
18972$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;}
18973        else
18974          FOUND_MAKE=$MAKE_CANDIDATE
18975
18976  # Only process if variable expands to non-empty
18977
18978  if test "x$FOUND_MAKE" != x; then
18979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18980
18981  # First separate the path from the arguments. This will split at the first
18982  # space.
18983  complete="$FOUND_MAKE"
18984  path="${complete%% *}"
18985  tmp="$complete EOL"
18986  arguments="${tmp#* }"
18987
18988  # Input might be given as Windows format, start by converting to
18989  # unix format.
18990  new_path=`$CYGPATH -u "$path"`
18991
18992  # Now try to locate executable using which
18993  new_path=`$WHICH "$new_path" 2> /dev/null`
18994  # bat and cmd files are not always considered executable in cygwin causing which
18995  # to not find them
18996  if test "x$new_path" = x \
18997      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18998      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18999    new_path=`$CYGPATH -u "$path"`
19000  fi
19001  if test "x$new_path" = x; then
19002    # Oops. Which didn't find the executable.
19003    # The splitting of arguments from the executable at a space might have been incorrect,
19004    # since paths with space are more likely in Windows. Give it another try with the whole
19005    # argument.
19006    path="$complete"
19007    arguments="EOL"
19008    new_path=`$CYGPATH -u "$path"`
19009    new_path=`$WHICH "$new_path" 2> /dev/null`
19010    # bat and cmd files are not always considered executable in cygwin causing which
19011    # to not find them
19012    if test "x$new_path" = x \
19013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19015      new_path=`$CYGPATH -u "$path"`
19016    fi
19017    if test "x$new_path" = x; then
19018      # It's still not found. Now this is an unrecoverable error.
19019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19020$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19021      has_space=`$ECHO "$complete" | $GREP " "`
19022      if test "x$has_space" != x; then
19023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19025      fi
19026      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19027    fi
19028  fi
19029
19030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19033  # "foo.exe" is OK but "foo" is an error.
19034  #
19035  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19036  # It is also a way to make sure we got the proper file name for the real test later on.
19037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19038  if test "x$test_shortpath" = x; then
19039    # Short path failed, file does not exist as specified.
19040    # Try adding .exe or .cmd
19041    if test -f "${new_path}.exe"; then
19042      input_to_shortpath="${new_path}.exe"
19043    elif test -f "${new_path}.cmd"; then
19044      input_to_shortpath="${new_path}.cmd"
19045    else
19046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19047$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19048      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19049$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19050      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19051    fi
19052  else
19053    input_to_shortpath="$new_path"
19054  fi
19055
19056  # Call helper function which possibly converts this using DOS-style short mode.
19057  # If so, the updated path is stored in $new_path.
19058  new_path="$input_to_shortpath"
19059
19060  input_path="$input_to_shortpath"
19061  # Check if we need to convert this using DOS-style short mode. If the path
19062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19063  # take no chances and rewrite it.
19064  # Note: m4 eats our [], so we need to use [ and ] instead.
19065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19066  if test "x$has_forbidden_chars" != x; then
19067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19071      # Going to short mode and back again did indeed matter. Since short mode is
19072      # case insensitive, let's make it lowercase to improve readability.
19073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19074      # Now convert it back to Unix-style (cygpath)
19075      input_path=`$CYGPATH -u "$shortmode_path"`
19076      new_path="$input_path"
19077    fi
19078  fi
19079
19080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19081  if test "x$test_cygdrive_prefix" = x; then
19082    # As a simple fix, exclude /usr/bin since it's not a real path.
19083    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19085      # a path prefixed by /cygdrive for fixpath to work.
19086      new_path="$CYGWIN_ROOT_PATH$input_path"
19087    fi
19088  fi
19089
19090  # remove trailing .exe if any
19091  new_path="${new_path/%.exe/}"
19092
19093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19094
19095  # First separate the path from the arguments. This will split at the first
19096  # space.
19097  complete="$FOUND_MAKE"
19098  path="${complete%% *}"
19099  tmp="$complete EOL"
19100  arguments="${tmp#* }"
19101
19102  # Input might be given as Windows format, start by converting to
19103  # unix format.
19104  new_path="$path"
19105
19106  windows_path="$new_path"
19107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19108    unix_path=`$CYGPATH -u "$windows_path"`
19109    new_path="$unix_path"
19110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19112    new_path="$unix_path"
19113  fi
19114
19115
19116  # Now try to locate executable using which
19117  new_path=`$WHICH "$new_path" 2> /dev/null`
19118
19119  if test "x$new_path" = x; then
19120    # Oops. Which didn't find the executable.
19121    # The splitting of arguments from the executable at a space might have been incorrect,
19122    # since paths with space are more likely in Windows. Give it another try with the whole
19123    # argument.
19124    path="$complete"
19125    arguments="EOL"
19126    new_path="$path"
19127
19128  windows_path="$new_path"
19129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19130    unix_path=`$CYGPATH -u "$windows_path"`
19131    new_path="$unix_path"
19132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19134    new_path="$unix_path"
19135  fi
19136
19137
19138    new_path=`$WHICH "$new_path" 2> /dev/null`
19139    # bat and cmd files are not always considered executable in MSYS causing which
19140    # to not find them
19141    if test "x$new_path" = x \
19142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19144      new_path="$path"
19145
19146  windows_path="$new_path"
19147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19148    unix_path=`$CYGPATH -u "$windows_path"`
19149    new_path="$unix_path"
19150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19152    new_path="$unix_path"
19153  fi
19154
19155    fi
19156
19157    if test "x$new_path" = x; then
19158      # It's still not found. Now this is an unrecoverable error.
19159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19160$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19161      has_space=`$ECHO "$complete" | $GREP " "`
19162      if test "x$has_space" != x; then
19163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19165      fi
19166      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19167    fi
19168  fi
19169
19170  # Now new_path has a complete unix path to the binary
19171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19172    # Keep paths in /bin as-is, but remove trailing .exe if any
19173    new_path="${new_path/%.exe/}"
19174    # Do not save /bin paths to all_fixpath_prefixes!
19175  else
19176    # Not in mixed or Windows style, start by that.
19177    new_path=`cmd //c echo $new_path`
19178
19179  input_path="$new_path"
19180  # Check if we need to convert this using DOS-style short mode. If the path
19181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19182  # take no chances and rewrite it.
19183  # Note: m4 eats our [], so we need to use [ and ] instead.
19184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19185  if test "x$has_forbidden_chars" != x; then
19186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19188  fi
19189
19190    # Output is in $new_path
19191
19192  windows_path="$new_path"
19193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19194    unix_path=`$CYGPATH -u "$windows_path"`
19195    new_path="$unix_path"
19196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19198    new_path="$unix_path"
19199  fi
19200
19201    # remove trailing .exe if any
19202    new_path="${new_path/%.exe/}"
19203
19204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19206  fi
19207
19208    else
19209      # We're on a unix platform. Hooray! :)
19210      # First separate the path from the arguments. This will split at the first
19211      # space.
19212      complete="$FOUND_MAKE"
19213      path="${complete%% *}"
19214      tmp="$complete EOL"
19215      arguments="${tmp#* }"
19216
19217      # Cannot rely on the command "which" here since it doesn't always work.
19218      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19219      if test -z "$is_absolute_path"; then
19220        # Path to executable is not absolute. Find it.
19221        IFS_save="$IFS"
19222        IFS=:
19223        for p in $PATH; do
19224          if test -f "$p/$path" && test -x "$p/$path"; then
19225            new_path="$p/$path"
19226            break
19227          fi
19228        done
19229        IFS="$IFS_save"
19230      else
19231        # This is an absolute path, we can use it without further modifications.
19232        new_path="$path"
19233      fi
19234
19235      if test "x$new_path" = x; then
19236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19237$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19238        has_space=`$ECHO "$complete" | $GREP " "`
19239        if test "x$has_space" != x; then
19240          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19241$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19242        fi
19243        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19244      fi
19245    fi
19246
19247    # Now join together the path and the arguments once again
19248    if test "x$arguments" != xEOL; then
19249      new_complete="$new_path ${arguments% *}"
19250    else
19251      new_complete="$new_path"
19252    fi
19253
19254    if test "x$complete" != "x$new_complete"; then
19255      FOUND_MAKE="$new_complete"
19256      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19257$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19258    fi
19259  fi
19260
19261        fi
19262      fi
19263    fi
19264  fi
19265
19266        if test "x$FOUND_MAKE" = x; then
19267          for ac_prog in make
19268do
19269  # Extract the first word of "$ac_prog", so it can be a program name with args.
19270set dummy $ac_prog; ac_word=$2
19271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19272$as_echo_n "checking for $ac_word... " >&6; }
19273if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19274  $as_echo_n "(cached) " >&6
19275else
19276  case $CHECK_TOOLSDIR_MAKE in
19277  [\\/]* | ?:[\\/]*)
19278  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19279  ;;
19280  *)
19281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19282for as_dir in $PATH
19283do
19284  IFS=$as_save_IFS
19285  test -z "$as_dir" && as_dir=.
19286    for ac_exec_ext in '' $ac_executable_extensions; do
19287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19288    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19290    break 2
19291  fi
19292done
19293  done
19294IFS=$as_save_IFS
19295
19296  ;;
19297esac
19298fi
19299CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19300if test -n "$CHECK_TOOLSDIR_MAKE"; then
19301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19302$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19303else
19304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19305$as_echo "no" >&6; }
19306fi
19307
19308
19309  test -n "$CHECK_TOOLSDIR_MAKE" && break
19310done
19311
19312
19313  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19314  DESCRIPTION="make in tools-dir"
19315
19316  # On Cygwin, we require a newer version of make than on other platforms
19317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19318    MAKE_VERSION_EXPR="-e 4\."
19319    MAKE_REQUIRED_VERSION="4.0"
19320   else
19321    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19322    MAKE_REQUIRED_VERSION="3.81"
19323  fi
19324
19325  if test "x$MAKE_CANDIDATE" != x; then
19326    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19327$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19328    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19329    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19330    if test "x$IS_GNU_MAKE" = x; then
19331      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19332$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19333    else
19334      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19335      if test "x$IS_MODERN_MAKE" = x; then
19336        { $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
19337$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;}
19338      else
19339        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19340          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19341            MAKE_EXPECTED_ENV='cygwin'
19342          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19343            MAKE_EXPECTED_ENV='msys'
19344          else
19345            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19346          fi
19347          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19348          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19349        else
19350          # Not relevant for non-Windows
19351          IS_MAKE_CORRECT_ENV=true
19352        fi
19353        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19354          { $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
19355$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;}
19356        else
19357          FOUND_MAKE=$MAKE_CANDIDATE
19358
19359  # Only process if variable expands to non-empty
19360
19361  if test "x$FOUND_MAKE" != x; then
19362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19363
19364  # First separate the path from the arguments. This will split at the first
19365  # space.
19366  complete="$FOUND_MAKE"
19367  path="${complete%% *}"
19368  tmp="$complete EOL"
19369  arguments="${tmp#* }"
19370
19371  # Input might be given as Windows format, start by converting to
19372  # unix format.
19373  new_path=`$CYGPATH -u "$path"`
19374
19375  # Now try to locate executable using which
19376  new_path=`$WHICH "$new_path" 2> /dev/null`
19377  # bat and cmd files are not always considered executable in cygwin causing which
19378  # to not find them
19379  if test "x$new_path" = x \
19380      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19381      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19382    new_path=`$CYGPATH -u "$path"`
19383  fi
19384  if test "x$new_path" = x; then
19385    # Oops. Which didn't find the executable.
19386    # The splitting of arguments from the executable at a space might have been incorrect,
19387    # since paths with space are more likely in Windows. Give it another try with the whole
19388    # argument.
19389    path="$complete"
19390    arguments="EOL"
19391    new_path=`$CYGPATH -u "$path"`
19392    new_path=`$WHICH "$new_path" 2> /dev/null`
19393    # bat and cmd files are not always considered executable in cygwin causing which
19394    # to not find them
19395    if test "x$new_path" = x \
19396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19398      new_path=`$CYGPATH -u "$path"`
19399    fi
19400    if test "x$new_path" = x; then
19401      # It's still not found. Now this is an unrecoverable error.
19402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19403$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19404      has_space=`$ECHO "$complete" | $GREP " "`
19405      if test "x$has_space" != x; then
19406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19408      fi
19409      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19410    fi
19411  fi
19412
19413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19416  # "foo.exe" is OK but "foo" is an error.
19417  #
19418  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19419  # It is also a way to make sure we got the proper file name for the real test later on.
19420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19421  if test "x$test_shortpath" = x; then
19422    # Short path failed, file does not exist as specified.
19423    # Try adding .exe or .cmd
19424    if test -f "${new_path}.exe"; then
19425      input_to_shortpath="${new_path}.exe"
19426    elif test -f "${new_path}.cmd"; then
19427      input_to_shortpath="${new_path}.cmd"
19428    else
19429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19430$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19431      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19432$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19433      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19434    fi
19435  else
19436    input_to_shortpath="$new_path"
19437  fi
19438
19439  # Call helper function which possibly converts this using DOS-style short mode.
19440  # If so, the updated path is stored in $new_path.
19441  new_path="$input_to_shortpath"
19442
19443  input_path="$input_to_shortpath"
19444  # Check if we need to convert this using DOS-style short mode. If the path
19445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19446  # take no chances and rewrite it.
19447  # Note: m4 eats our [], so we need to use [ and ] instead.
19448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19449  if test "x$has_forbidden_chars" != x; then
19450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19454      # Going to short mode and back again did indeed matter. Since short mode is
19455      # case insensitive, let's make it lowercase to improve readability.
19456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19457      # Now convert it back to Unix-style (cygpath)
19458      input_path=`$CYGPATH -u "$shortmode_path"`
19459      new_path="$input_path"
19460    fi
19461  fi
19462
19463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19464  if test "x$test_cygdrive_prefix" = x; then
19465    # As a simple fix, exclude /usr/bin since it's not a real path.
19466    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19468      # a path prefixed by /cygdrive for fixpath to work.
19469      new_path="$CYGWIN_ROOT_PATH$input_path"
19470    fi
19471  fi
19472
19473  # remove trailing .exe if any
19474  new_path="${new_path/%.exe/}"
19475
19476    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19477
19478  # First separate the path from the arguments. This will split at the first
19479  # space.
19480  complete="$FOUND_MAKE"
19481  path="${complete%% *}"
19482  tmp="$complete EOL"
19483  arguments="${tmp#* }"
19484
19485  # Input might be given as Windows format, start by converting to
19486  # unix format.
19487  new_path="$path"
19488
19489  windows_path="$new_path"
19490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19491    unix_path=`$CYGPATH -u "$windows_path"`
19492    new_path="$unix_path"
19493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19495    new_path="$unix_path"
19496  fi
19497
19498
19499  # Now try to locate executable using which
19500  new_path=`$WHICH "$new_path" 2> /dev/null`
19501
19502  if test "x$new_path" = x; then
19503    # Oops. Which didn't find the executable.
19504    # The splitting of arguments from the executable at a space might have been incorrect,
19505    # since paths with space are more likely in Windows. Give it another try with the whole
19506    # argument.
19507    path="$complete"
19508    arguments="EOL"
19509    new_path="$path"
19510
19511  windows_path="$new_path"
19512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19513    unix_path=`$CYGPATH -u "$windows_path"`
19514    new_path="$unix_path"
19515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19517    new_path="$unix_path"
19518  fi
19519
19520
19521    new_path=`$WHICH "$new_path" 2> /dev/null`
19522    # bat and cmd files are not always considered executable in MSYS causing which
19523    # to not find them
19524    if test "x$new_path" = x \
19525        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19526        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19527      new_path="$path"
19528
19529  windows_path="$new_path"
19530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19531    unix_path=`$CYGPATH -u "$windows_path"`
19532    new_path="$unix_path"
19533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19535    new_path="$unix_path"
19536  fi
19537
19538    fi
19539
19540    if test "x$new_path" = x; then
19541      # It's still not found. Now this is an unrecoverable error.
19542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19543$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19544      has_space=`$ECHO "$complete" | $GREP " "`
19545      if test "x$has_space" != x; then
19546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19548      fi
19549      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19550    fi
19551  fi
19552
19553  # Now new_path has a complete unix path to the binary
19554  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19555    # Keep paths in /bin as-is, but remove trailing .exe if any
19556    new_path="${new_path/%.exe/}"
19557    # Do not save /bin paths to all_fixpath_prefixes!
19558  else
19559    # Not in mixed or Windows style, start by that.
19560    new_path=`cmd //c echo $new_path`
19561
19562  input_path="$new_path"
19563  # Check if we need to convert this using DOS-style short mode. If the path
19564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19565  # take no chances and rewrite it.
19566  # Note: m4 eats our [], so we need to use [ and ] instead.
19567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19568  if test "x$has_forbidden_chars" != x; then
19569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19571  fi
19572
19573    # Output is in $new_path
19574
19575  windows_path="$new_path"
19576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19577    unix_path=`$CYGPATH -u "$windows_path"`
19578    new_path="$unix_path"
19579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19581    new_path="$unix_path"
19582  fi
19583
19584    # remove trailing .exe if any
19585    new_path="${new_path/%.exe/}"
19586
19587    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19588    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19589  fi
19590
19591    else
19592      # We're on a unix platform. Hooray! :)
19593      # First separate the path from the arguments. This will split at the first
19594      # space.
19595      complete="$FOUND_MAKE"
19596      path="${complete%% *}"
19597      tmp="$complete EOL"
19598      arguments="${tmp#* }"
19599
19600      # Cannot rely on the command "which" here since it doesn't always work.
19601      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19602      if test -z "$is_absolute_path"; then
19603        # Path to executable is not absolute. Find it.
19604        IFS_save="$IFS"
19605        IFS=:
19606        for p in $PATH; do
19607          if test -f "$p/$path" && test -x "$p/$path"; then
19608            new_path="$p/$path"
19609            break
19610          fi
19611        done
19612        IFS="$IFS_save"
19613      else
19614        # This is an absolute path, we can use it without further modifications.
19615        new_path="$path"
19616      fi
19617
19618      if test "x$new_path" = x; then
19619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19620$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19621        has_space=`$ECHO "$complete" | $GREP " "`
19622        if test "x$has_space" != x; then
19623          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19624$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19625        fi
19626        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19627      fi
19628    fi
19629
19630    # Now join together the path and the arguments once again
19631    if test "x$arguments" != xEOL; then
19632      new_complete="$new_path ${arguments% *}"
19633    else
19634      new_complete="$new_path"
19635    fi
19636
19637    if test "x$complete" != "x$new_complete"; then
19638      FOUND_MAKE="$new_complete"
19639      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19640$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19641    fi
19642  fi
19643
19644        fi
19645      fi
19646    fi
19647  fi
19648
19649        fi
19650        PATH=$OLD_PATH
19651      fi
19652    fi
19653
19654    if test "x$FOUND_MAKE" = x; then
19655      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
19656    fi
19657
19658    else
19659      # If it succeeded, then it was overridden by the user. We will use it
19660      # for the tool.
19661
19662      # First remove it from the list of overridden variables, so we can test
19663      # for unknown variables in the end.
19664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19665
19666      # Check if we try to supply an empty value
19667      if test "x$MAKE" = x; then
19668        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19669$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19671$as_echo_n "checking for MAKE... " >&6; }
19672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19673$as_echo "disabled" >&6; }
19674      else
19675        # Check if the provided tool contains a complete path.
19676        tool_specified="$MAKE"
19677        tool_basename="${tool_specified##*/}"
19678        if test "x$tool_basename" = "x$tool_specified"; then
19679          # A command without a complete path is provided, search $PATH.
19680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19681$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19682          # Extract the first word of "$tool_basename", so it can be a program name with args.
19683set dummy $tool_basename; ac_word=$2
19684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19685$as_echo_n "checking for $ac_word... " >&6; }
19686if ${ac_cv_path_MAKE+:} false; then :
19687  $as_echo_n "(cached) " >&6
19688else
19689  case $MAKE in
19690  [\\/]* | ?:[\\/]*)
19691  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19692  ;;
19693  *)
19694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19695for as_dir in $PATH
19696do
19697  IFS=$as_save_IFS
19698  test -z "$as_dir" && as_dir=.
19699    for ac_exec_ext in '' $ac_executable_extensions; do
19700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19701    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19703    break 2
19704  fi
19705done
19706  done
19707IFS=$as_save_IFS
19708
19709  ;;
19710esac
19711fi
19712MAKE=$ac_cv_path_MAKE
19713if test -n "$MAKE"; then
19714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19715$as_echo "$MAKE" >&6; }
19716else
19717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19718$as_echo "no" >&6; }
19719fi
19720
19721
19722          if test "x$MAKE" = x; then
19723            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19724          fi
19725        else
19726          # Otherwise we believe it is a complete path. Use it as it is.
19727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19728$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19729          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19730$as_echo_n "checking for MAKE... " >&6; }
19731          if test ! -x "$tool_specified"; then
19732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19733$as_echo "not found" >&6; }
19734            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19735          fi
19736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19737$as_echo "$tool_specified" >&6; }
19738        fi
19739      fi
19740    fi
19741
19742    # If MAKE was set by user, verify the version
19743
19744  MAKE_CANDIDATE=""$MAKE""
19745  DESCRIPTION="user supplied MAKE=$MAKE"
19746
19747  # On Cygwin, we require a newer version of make than on other platforms
19748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19749    MAKE_VERSION_EXPR="-e 4\."
19750    MAKE_REQUIRED_VERSION="4.0"
19751   else
19752    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19753    MAKE_REQUIRED_VERSION="3.81"
19754  fi
19755
19756  if test "x$MAKE_CANDIDATE" != x; then
19757    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19758$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19759    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19760    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19761    if test "x$IS_GNU_MAKE" = x; then
19762      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19763$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19764    else
19765      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19766      if test "x$IS_MODERN_MAKE" = x; then
19767        { $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
19768$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;}
19769      else
19770        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19771          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19772            MAKE_EXPECTED_ENV='cygwin'
19773          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19774            MAKE_EXPECTED_ENV='msys'
19775          else
19776            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19777          fi
19778          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19779          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19780        else
19781          # Not relevant for non-Windows
19782          IS_MAKE_CORRECT_ENV=true
19783        fi
19784        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19785          { $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
19786$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;}
19787        else
19788          FOUND_MAKE=$MAKE_CANDIDATE
19789
19790  # Only process if variable expands to non-empty
19791
19792  if test "x$FOUND_MAKE" != x; then
19793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19794
19795  # First separate the path from the arguments. This will split at the first
19796  # space.
19797  complete="$FOUND_MAKE"
19798  path="${complete%% *}"
19799  tmp="$complete EOL"
19800  arguments="${tmp#* }"
19801
19802  # Input might be given as Windows format, start by converting to
19803  # unix format.
19804  new_path=`$CYGPATH -u "$path"`
19805
19806  # Now try to locate executable using which
19807  new_path=`$WHICH "$new_path" 2> /dev/null`
19808  # bat and cmd files are not always considered executable in cygwin causing which
19809  # to not find them
19810  if test "x$new_path" = x \
19811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19813    new_path=`$CYGPATH -u "$path"`
19814  fi
19815  if test "x$new_path" = x; then
19816    # Oops. Which didn't find the executable.
19817    # The splitting of arguments from the executable at a space might have been incorrect,
19818    # since paths with space are more likely in Windows. Give it another try with the whole
19819    # argument.
19820    path="$complete"
19821    arguments="EOL"
19822    new_path=`$CYGPATH -u "$path"`
19823    new_path=`$WHICH "$new_path" 2> /dev/null`
19824    # bat and cmd files are not always considered executable in cygwin causing which
19825    # to not find them
19826    if test "x$new_path" = x \
19827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19829      new_path=`$CYGPATH -u "$path"`
19830    fi
19831    if test "x$new_path" = x; then
19832      # It's still not found. Now this is an unrecoverable error.
19833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19834$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19835      has_space=`$ECHO "$complete" | $GREP " "`
19836      if test "x$has_space" != x; then
19837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19839      fi
19840      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19841    fi
19842  fi
19843
19844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19847  # "foo.exe" is OK but "foo" is an error.
19848  #
19849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19850  # It is also a way to make sure we got the proper file name for the real test later on.
19851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19852  if test "x$test_shortpath" = x; then
19853    # Short path failed, file does not exist as specified.
19854    # Try adding .exe or .cmd
19855    if test -f "${new_path}.exe"; then
19856      input_to_shortpath="${new_path}.exe"
19857    elif test -f "${new_path}.cmd"; then
19858      input_to_shortpath="${new_path}.cmd"
19859    else
19860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19861$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19864      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19865    fi
19866  else
19867    input_to_shortpath="$new_path"
19868  fi
19869
19870  # Call helper function which possibly converts this using DOS-style short mode.
19871  # If so, the updated path is stored in $new_path.
19872  new_path="$input_to_shortpath"
19873
19874  input_path="$input_to_shortpath"
19875  # Check if we need to convert this using DOS-style short mode. If the path
19876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19877  # take no chances and rewrite it.
19878  # Note: m4 eats our [], so we need to use [ and ] instead.
19879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19880  if test "x$has_forbidden_chars" != x; then
19881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19885      # Going to short mode and back again did indeed matter. Since short mode is
19886      # case insensitive, let's make it lowercase to improve readability.
19887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19888      # Now convert it back to Unix-style (cygpath)
19889      input_path=`$CYGPATH -u "$shortmode_path"`
19890      new_path="$input_path"
19891    fi
19892  fi
19893
19894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19895  if test "x$test_cygdrive_prefix" = x; then
19896    # As a simple fix, exclude /usr/bin since it's not a real path.
19897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19899      # a path prefixed by /cygdrive for fixpath to work.
19900      new_path="$CYGWIN_ROOT_PATH$input_path"
19901    fi
19902  fi
19903
19904  # remove trailing .exe if any
19905  new_path="${new_path/%.exe/}"
19906
19907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19908
19909  # First separate the path from the arguments. This will split at the first
19910  # space.
19911  complete="$FOUND_MAKE"
19912  path="${complete%% *}"
19913  tmp="$complete EOL"
19914  arguments="${tmp#* }"
19915
19916  # Input might be given as Windows format, start by converting to
19917  # unix format.
19918  new_path="$path"
19919
19920  windows_path="$new_path"
19921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19922    unix_path=`$CYGPATH -u "$windows_path"`
19923    new_path="$unix_path"
19924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19926    new_path="$unix_path"
19927  fi
19928
19929
19930  # Now try to locate executable using which
19931  new_path=`$WHICH "$new_path" 2> /dev/null`
19932
19933  if test "x$new_path" = x; then
19934    # Oops. Which didn't find the executable.
19935    # The splitting of arguments from the executable at a space might have been incorrect,
19936    # since paths with space are more likely in Windows. Give it another try with the whole
19937    # argument.
19938    path="$complete"
19939    arguments="EOL"
19940    new_path="$path"
19941
19942  windows_path="$new_path"
19943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19944    unix_path=`$CYGPATH -u "$windows_path"`
19945    new_path="$unix_path"
19946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19948    new_path="$unix_path"
19949  fi
19950
19951
19952    new_path=`$WHICH "$new_path" 2> /dev/null`
19953    # bat and cmd files are not always considered executable in MSYS causing which
19954    # to not find them
19955    if test "x$new_path" = x \
19956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19958      new_path="$path"
19959
19960  windows_path="$new_path"
19961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19962    unix_path=`$CYGPATH -u "$windows_path"`
19963    new_path="$unix_path"
19964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19966    new_path="$unix_path"
19967  fi
19968
19969    fi
19970
19971    if test "x$new_path" = x; then
19972      # It's still not found. Now this is an unrecoverable error.
19973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19974$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19975      has_space=`$ECHO "$complete" | $GREP " "`
19976      if test "x$has_space" != x; then
19977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19979      fi
19980      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19981    fi
19982  fi
19983
19984  # Now new_path has a complete unix path to the binary
19985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19986    # Keep paths in /bin as-is, but remove trailing .exe if any
19987    new_path="${new_path/%.exe/}"
19988    # Do not save /bin paths to all_fixpath_prefixes!
19989  else
19990    # Not in mixed or Windows style, start by that.
19991    new_path=`cmd //c echo $new_path`
19992
19993  input_path="$new_path"
19994  # Check if we need to convert this using DOS-style short mode. If the path
19995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19996  # take no chances and rewrite it.
19997  # Note: m4 eats our [], so we need to use [ and ] instead.
19998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19999  if test "x$has_forbidden_chars" != x; then
20000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20002  fi
20003
20004    # Output is in $new_path
20005
20006  windows_path="$new_path"
20007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20008    unix_path=`$CYGPATH -u "$windows_path"`
20009    new_path="$unix_path"
20010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20012    new_path="$unix_path"
20013  fi
20014
20015    # remove trailing .exe if any
20016    new_path="${new_path/%.exe/}"
20017
20018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20020  fi
20021
20022    else
20023      # We're on a unix platform. Hooray! :)
20024      # First separate the path from the arguments. This will split at the first
20025      # space.
20026      complete="$FOUND_MAKE"
20027      path="${complete%% *}"
20028      tmp="$complete EOL"
20029      arguments="${tmp#* }"
20030
20031      # Cannot rely on the command "which" here since it doesn't always work.
20032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20033      if test -z "$is_absolute_path"; then
20034        # Path to executable is not absolute. Find it.
20035        IFS_save="$IFS"
20036        IFS=:
20037        for p in $PATH; do
20038          if test -f "$p/$path" && test -x "$p/$path"; then
20039            new_path="$p/$path"
20040            break
20041          fi
20042        done
20043        IFS="$IFS_save"
20044      else
20045        # This is an absolute path, we can use it without further modifications.
20046        new_path="$path"
20047      fi
20048
20049      if test "x$new_path" = x; then
20050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20052        has_space=`$ECHO "$complete" | $GREP " "`
20053        if test "x$has_space" != x; then
20054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20056        fi
20057        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20058      fi
20059    fi
20060
20061    # Now join together the path and the arguments once again
20062    if test "x$arguments" != xEOL; then
20063      new_complete="$new_path ${arguments% *}"
20064    else
20065      new_complete="$new_path"
20066    fi
20067
20068    if test "x$complete" != "x$new_complete"; then
20069      FOUND_MAKE="$new_complete"
20070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20071$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20072    fi
20073  fi
20074
20075        fi
20076      fi
20077    fi
20078  fi
20079
20080    if test "x$FOUND_MAKE" = x; then
20081      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20082    fi
20083
20084  fi
20085
20086
20087  MAKE=$FOUND_MAKE
20088
20089  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20090$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20091
20092
20093  # Check if make supports the output sync option and if so, setup using it.
20094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20095$as_echo_n "checking if make --output-sync is supported... " >&6; }
20096  if $MAKE --version -O > /dev/null 2>&1; then
20097    OUTPUT_SYNC_SUPPORTED=true
20098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20099$as_echo "yes" >&6; }
20100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20101$as_echo_n "checking for output-sync value... " >&6; }
20102
20103# Check whether --with-output-sync was given.
20104if test "${with_output_sync+set}" = set; then :
20105  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20106fi
20107
20108    if test "x$OUTPUT_SYNC" = "x"; then
20109      OUTPUT_SYNC=none
20110    fi
20111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20112$as_echo "$OUTPUT_SYNC" >&6; }
20113    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20114      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20115    fi
20116  else
20117    OUTPUT_SYNC_SUPPORTED=false
20118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20119$as_echo "no" >&6; }
20120  fi
20121
20122
20123
20124
20125
20126
20127  # Test if find supports -delete
20128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20129$as_echo_n "checking if find supports -delete... " >&6; }
20130  FIND_DELETE="-delete"
20131
20132  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20133
20134  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20135
20136  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20137  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20138    # No, it does not.
20139    rm $DELETEDIR/TestIfFindSupportsDelete
20140    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20141      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20142      FIND_DELETE="-print | xargs rm"
20143    else
20144      FIND_DELETE="-exec rm \{\} \+"
20145    fi
20146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20147$as_echo "no" >&6; }
20148  else
20149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20150$as_echo "yes" >&6; }
20151  fi
20152  rmdir $DELETEDIR
20153
20154
20155
20156  # These tools might not be installed by default,
20157  # need hint on how to install them.
20158
20159
20160
20161  # Publish this variable in the help.
20162
20163
20164  if [ -z "${UNZIP+x}" ]; then
20165    # The variable is not set by user, try to locate tool using the code snippet
20166    for ac_prog in unzip
20167do
20168  # Extract the first word of "$ac_prog", so it can be a program name with args.
20169set dummy $ac_prog; ac_word=$2
20170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20171$as_echo_n "checking for $ac_word... " >&6; }
20172if ${ac_cv_path_UNZIP+:} false; then :
20173  $as_echo_n "(cached) " >&6
20174else
20175  case $UNZIP in
20176  [\\/]* | ?:[\\/]*)
20177  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20178  ;;
20179  *)
20180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20181for as_dir in $PATH
20182do
20183  IFS=$as_save_IFS
20184  test -z "$as_dir" && as_dir=.
20185    for ac_exec_ext in '' $ac_executable_extensions; do
20186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20187    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20189    break 2
20190  fi
20191done
20192  done
20193IFS=$as_save_IFS
20194
20195  ;;
20196esac
20197fi
20198UNZIP=$ac_cv_path_UNZIP
20199if test -n "$UNZIP"; then
20200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20201$as_echo "$UNZIP" >&6; }
20202else
20203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20204$as_echo "no" >&6; }
20205fi
20206
20207
20208  test -n "$UNZIP" && break
20209done
20210
20211  else
20212    # The variable is set, but is it from the command line or the environment?
20213
20214    # Try to remove the string !UNZIP! from our list.
20215    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20216    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20217      # If it failed, the variable was not from the command line. Ignore it,
20218      # but warn the user (except for BASH, which is always set by the calling BASH).
20219      if test "xUNZIP" != xBASH; then
20220        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20221$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20222      fi
20223      # Try to locate tool using the code snippet
20224      for ac_prog in unzip
20225do
20226  # Extract the first word of "$ac_prog", so it can be a program name with args.
20227set dummy $ac_prog; ac_word=$2
20228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20229$as_echo_n "checking for $ac_word... " >&6; }
20230if ${ac_cv_path_UNZIP+:} false; then :
20231  $as_echo_n "(cached) " >&6
20232else
20233  case $UNZIP in
20234  [\\/]* | ?:[\\/]*)
20235  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20236  ;;
20237  *)
20238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20239for as_dir in $PATH
20240do
20241  IFS=$as_save_IFS
20242  test -z "$as_dir" && as_dir=.
20243    for ac_exec_ext in '' $ac_executable_extensions; do
20244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20245    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20247    break 2
20248  fi
20249done
20250  done
20251IFS=$as_save_IFS
20252
20253  ;;
20254esac
20255fi
20256UNZIP=$ac_cv_path_UNZIP
20257if test -n "$UNZIP"; then
20258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20259$as_echo "$UNZIP" >&6; }
20260else
20261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20262$as_echo "no" >&6; }
20263fi
20264
20265
20266  test -n "$UNZIP" && break
20267done
20268
20269    else
20270      # If it succeeded, then it was overridden by the user. We will use it
20271      # for the tool.
20272
20273      # First remove it from the list of overridden variables, so we can test
20274      # for unknown variables in the end.
20275      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20276
20277      # Check if we try to supply an empty value
20278      if test "x$UNZIP" = x; then
20279        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20280$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20281        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20282$as_echo_n "checking for UNZIP... " >&6; }
20283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20284$as_echo "disabled" >&6; }
20285      else
20286        # Check if the provided tool contains a complete path.
20287        tool_specified="$UNZIP"
20288        tool_basename="${tool_specified##*/}"
20289        if test "x$tool_basename" = "x$tool_specified"; then
20290          # A command without a complete path is provided, search $PATH.
20291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20292$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20293          # Extract the first word of "$tool_basename", so it can be a program name with args.
20294set dummy $tool_basename; ac_word=$2
20295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20296$as_echo_n "checking for $ac_word... " >&6; }
20297if ${ac_cv_path_UNZIP+:} false; then :
20298  $as_echo_n "(cached) " >&6
20299else
20300  case $UNZIP in
20301  [\\/]* | ?:[\\/]*)
20302  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20303  ;;
20304  *)
20305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20306for as_dir in $PATH
20307do
20308  IFS=$as_save_IFS
20309  test -z "$as_dir" && as_dir=.
20310    for ac_exec_ext in '' $ac_executable_extensions; do
20311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20312    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20314    break 2
20315  fi
20316done
20317  done
20318IFS=$as_save_IFS
20319
20320  ;;
20321esac
20322fi
20323UNZIP=$ac_cv_path_UNZIP
20324if test -n "$UNZIP"; then
20325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20326$as_echo "$UNZIP" >&6; }
20327else
20328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20329$as_echo "no" >&6; }
20330fi
20331
20332
20333          if test "x$UNZIP" = x; then
20334            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20335          fi
20336        else
20337          # Otherwise we believe it is a complete path. Use it as it is.
20338          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20339$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20340          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20341$as_echo_n "checking for UNZIP... " >&6; }
20342          if test ! -x "$tool_specified"; then
20343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20344$as_echo "not found" >&6; }
20345            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20346          fi
20347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20348$as_echo "$tool_specified" >&6; }
20349        fi
20350      fi
20351    fi
20352
20353  fi
20354
20355
20356
20357  if test "x$UNZIP" = x; then
20358    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20359  fi
20360
20361
20362
20363
20364
20365  # Publish this variable in the help.
20366
20367
20368  if [ -z "${ZIP+x}" ]; then
20369    # The variable is not set by user, try to locate tool using the code snippet
20370    for ac_prog in zip
20371do
20372  # Extract the first word of "$ac_prog", so it can be a program name with args.
20373set dummy $ac_prog; ac_word=$2
20374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20375$as_echo_n "checking for $ac_word... " >&6; }
20376if ${ac_cv_path_ZIP+:} false; then :
20377  $as_echo_n "(cached) " >&6
20378else
20379  case $ZIP in
20380  [\\/]* | ?:[\\/]*)
20381  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20382  ;;
20383  *)
20384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20385for as_dir in $PATH
20386do
20387  IFS=$as_save_IFS
20388  test -z "$as_dir" && as_dir=.
20389    for ac_exec_ext in '' $ac_executable_extensions; do
20390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20391    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20393    break 2
20394  fi
20395done
20396  done
20397IFS=$as_save_IFS
20398
20399  ;;
20400esac
20401fi
20402ZIP=$ac_cv_path_ZIP
20403if test -n "$ZIP"; then
20404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20405$as_echo "$ZIP" >&6; }
20406else
20407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20408$as_echo "no" >&6; }
20409fi
20410
20411
20412  test -n "$ZIP" && break
20413done
20414
20415  else
20416    # The variable is set, but is it from the command line or the environment?
20417
20418    # Try to remove the string !ZIP! from our list.
20419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20421      # If it failed, the variable was not from the command line. Ignore it,
20422      # but warn the user (except for BASH, which is always set by the calling BASH).
20423      if test "xZIP" != xBASH; then
20424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20425$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20426      fi
20427      # Try to locate tool using the code snippet
20428      for ac_prog in zip
20429do
20430  # Extract the first word of "$ac_prog", so it can be a program name with args.
20431set dummy $ac_prog; ac_word=$2
20432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20433$as_echo_n "checking for $ac_word... " >&6; }
20434if ${ac_cv_path_ZIP+:} false; then :
20435  $as_echo_n "(cached) " >&6
20436else
20437  case $ZIP in
20438  [\\/]* | ?:[\\/]*)
20439  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20440  ;;
20441  *)
20442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20443for as_dir in $PATH
20444do
20445  IFS=$as_save_IFS
20446  test -z "$as_dir" && as_dir=.
20447    for ac_exec_ext in '' $ac_executable_extensions; do
20448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20449    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20451    break 2
20452  fi
20453done
20454  done
20455IFS=$as_save_IFS
20456
20457  ;;
20458esac
20459fi
20460ZIP=$ac_cv_path_ZIP
20461if test -n "$ZIP"; then
20462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20463$as_echo "$ZIP" >&6; }
20464else
20465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20466$as_echo "no" >&6; }
20467fi
20468
20469
20470  test -n "$ZIP" && break
20471done
20472
20473    else
20474      # If it succeeded, then it was overridden by the user. We will use it
20475      # for the tool.
20476
20477      # First remove it from the list of overridden variables, so we can test
20478      # for unknown variables in the end.
20479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20480
20481      # Check if we try to supply an empty value
20482      if test "x$ZIP" = x; then
20483        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20484$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20486$as_echo_n "checking for ZIP... " >&6; }
20487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20488$as_echo "disabled" >&6; }
20489      else
20490        # Check if the provided tool contains a complete path.
20491        tool_specified="$ZIP"
20492        tool_basename="${tool_specified##*/}"
20493        if test "x$tool_basename" = "x$tool_specified"; then
20494          # A command without a complete path is provided, search $PATH.
20495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20496$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20497          # Extract the first word of "$tool_basename", so it can be a program name with args.
20498set dummy $tool_basename; ac_word=$2
20499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20500$as_echo_n "checking for $ac_word... " >&6; }
20501if ${ac_cv_path_ZIP+:} false; then :
20502  $as_echo_n "(cached) " >&6
20503else
20504  case $ZIP in
20505  [\\/]* | ?:[\\/]*)
20506  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20507  ;;
20508  *)
20509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20510for as_dir in $PATH
20511do
20512  IFS=$as_save_IFS
20513  test -z "$as_dir" && as_dir=.
20514    for ac_exec_ext in '' $ac_executable_extensions; do
20515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20516    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20518    break 2
20519  fi
20520done
20521  done
20522IFS=$as_save_IFS
20523
20524  ;;
20525esac
20526fi
20527ZIP=$ac_cv_path_ZIP
20528if test -n "$ZIP"; then
20529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20530$as_echo "$ZIP" >&6; }
20531else
20532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20533$as_echo "no" >&6; }
20534fi
20535
20536
20537          if test "x$ZIP" = x; then
20538            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20539          fi
20540        else
20541          # Otherwise we believe it is a complete path. Use it as it is.
20542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20543$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20544          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20545$as_echo_n "checking for ZIP... " >&6; }
20546          if test ! -x "$tool_specified"; then
20547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20548$as_echo "not found" >&6; }
20549            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20550          fi
20551          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20552$as_echo "$tool_specified" >&6; }
20553        fi
20554      fi
20555    fi
20556
20557  fi
20558
20559
20560
20561  if test "x$ZIP" = x; then
20562    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20563  fi
20564
20565
20566
20567  # Non-required basic tools
20568
20569
20570
20571  # Publish this variable in the help.
20572
20573
20574  if [ -z "${LDD+x}" ]; then
20575    # The variable is not set by user, try to locate tool using the code snippet
20576    for ac_prog in ldd
20577do
20578  # Extract the first word of "$ac_prog", so it can be a program name with args.
20579set dummy $ac_prog; ac_word=$2
20580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20581$as_echo_n "checking for $ac_word... " >&6; }
20582if ${ac_cv_path_LDD+:} false; then :
20583  $as_echo_n "(cached) " >&6
20584else
20585  case $LDD in
20586  [\\/]* | ?:[\\/]*)
20587  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20588  ;;
20589  *)
20590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20591for as_dir in $PATH
20592do
20593  IFS=$as_save_IFS
20594  test -z "$as_dir" && as_dir=.
20595    for ac_exec_ext in '' $ac_executable_extensions; do
20596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20597    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20599    break 2
20600  fi
20601done
20602  done
20603IFS=$as_save_IFS
20604
20605  ;;
20606esac
20607fi
20608LDD=$ac_cv_path_LDD
20609if test -n "$LDD"; then
20610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20611$as_echo "$LDD" >&6; }
20612else
20613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20614$as_echo "no" >&6; }
20615fi
20616
20617
20618  test -n "$LDD" && break
20619done
20620
20621  else
20622    # The variable is set, but is it from the command line or the environment?
20623
20624    # Try to remove the string !LDD! from our list.
20625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20627      # If it failed, the variable was not from the command line. Ignore it,
20628      # but warn the user (except for BASH, which is always set by the calling BASH).
20629      if test "xLDD" != xBASH; then
20630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20631$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20632      fi
20633      # Try to locate tool using the code snippet
20634      for ac_prog in ldd
20635do
20636  # Extract the first word of "$ac_prog", so it can be a program name with args.
20637set dummy $ac_prog; ac_word=$2
20638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20639$as_echo_n "checking for $ac_word... " >&6; }
20640if ${ac_cv_path_LDD+:} false; then :
20641  $as_echo_n "(cached) " >&6
20642else
20643  case $LDD in
20644  [\\/]* | ?:[\\/]*)
20645  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20646  ;;
20647  *)
20648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20649for as_dir in $PATH
20650do
20651  IFS=$as_save_IFS
20652  test -z "$as_dir" && as_dir=.
20653    for ac_exec_ext in '' $ac_executable_extensions; do
20654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20655    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20657    break 2
20658  fi
20659done
20660  done
20661IFS=$as_save_IFS
20662
20663  ;;
20664esac
20665fi
20666LDD=$ac_cv_path_LDD
20667if test -n "$LDD"; then
20668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20669$as_echo "$LDD" >&6; }
20670else
20671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20672$as_echo "no" >&6; }
20673fi
20674
20675
20676  test -n "$LDD" && break
20677done
20678
20679    else
20680      # If it succeeded, then it was overridden by the user. We will use it
20681      # for the tool.
20682
20683      # First remove it from the list of overridden variables, so we can test
20684      # for unknown variables in the end.
20685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20686
20687      # Check if we try to supply an empty value
20688      if test "x$LDD" = x; then
20689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20690$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20692$as_echo_n "checking for LDD... " >&6; }
20693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20694$as_echo "disabled" >&6; }
20695      else
20696        # Check if the provided tool contains a complete path.
20697        tool_specified="$LDD"
20698        tool_basename="${tool_specified##*/}"
20699        if test "x$tool_basename" = "x$tool_specified"; then
20700          # A command without a complete path is provided, search $PATH.
20701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20702$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20703          # Extract the first word of "$tool_basename", so it can be a program name with args.
20704set dummy $tool_basename; ac_word=$2
20705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20706$as_echo_n "checking for $ac_word... " >&6; }
20707if ${ac_cv_path_LDD+:} false; then :
20708  $as_echo_n "(cached) " >&6
20709else
20710  case $LDD in
20711  [\\/]* | ?:[\\/]*)
20712  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20713  ;;
20714  *)
20715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20716for as_dir in $PATH
20717do
20718  IFS=$as_save_IFS
20719  test -z "$as_dir" && as_dir=.
20720    for ac_exec_ext in '' $ac_executable_extensions; do
20721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20722    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20724    break 2
20725  fi
20726done
20727  done
20728IFS=$as_save_IFS
20729
20730  ;;
20731esac
20732fi
20733LDD=$ac_cv_path_LDD
20734if test -n "$LDD"; then
20735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20736$as_echo "$LDD" >&6; }
20737else
20738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20739$as_echo "no" >&6; }
20740fi
20741
20742
20743          if test "x$LDD" = x; then
20744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20745          fi
20746        else
20747          # Otherwise we believe it is a complete path. Use it as it is.
20748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20749$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20751$as_echo_n "checking for LDD... " >&6; }
20752          if test ! -x "$tool_specified"; then
20753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20754$as_echo "not found" >&6; }
20755            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20756          fi
20757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20758$as_echo "$tool_specified" >&6; }
20759        fi
20760      fi
20761    fi
20762
20763  fi
20764
20765
20766  if test "x$LDD" = "x"; then
20767    # List shared lib dependencies is used for
20768    # debug output and checking for forbidden dependencies.
20769    # We can build without it.
20770    LDD="true"
20771  fi
20772
20773
20774  # Publish this variable in the help.
20775
20776
20777  if [ -z "${OTOOL+x}" ]; then
20778    # The variable is not set by user, try to locate tool using the code snippet
20779    for ac_prog in otool
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_OTOOL+:} false; then :
20786  $as_echo_n "(cached) " >&6
20787else
20788  case $OTOOL in
20789  [\\/]* | ?:[\\/]*)
20790  ac_cv_path_OTOOL="$OTOOL" # 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_OTOOL="$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
20811OTOOL=$ac_cv_path_OTOOL
20812if test -n "$OTOOL"; then
20813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20814$as_echo "$OTOOL" >&6; }
20815else
20816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20817$as_echo "no" >&6; }
20818fi
20819
20820
20821  test -n "$OTOOL" && 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 !OTOOL! from our list.
20828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
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 "xOTOOL" != xBASH; then
20833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20834$as_echo "$as_me: WARNING: Ignoring value of OTOOL 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 otool
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_OTOOL+:} false; then :
20844  $as_echo_n "(cached) " >&6
20845else
20846  case $OTOOL in
20847  [\\/]* | ?:[\\/]*)
20848  ac_cv_path_OTOOL="$OTOOL" # 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_OTOOL="$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
20869OTOOL=$ac_cv_path_OTOOL
20870if test -n "$OTOOL"; then
20871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20872$as_echo "$OTOOL" >&6; }
20873else
20874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20875$as_echo "no" >&6; }
20876fi
20877
20878
20879  test -n "$OTOOL" && 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$OTOOL" = x; then
20892        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20893$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20895$as_echo_n "checking for OTOOL... " >&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="$OTOOL"
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 OTOOL=$tool_basename" >&5
20905$as_echo "$as_me: Will search for user supplied tool OTOOL=$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_OTOOL+:} false; then :
20911  $as_echo_n "(cached) " >&6
20912else
20913  case $OTOOL in
20914  [\\/]* | ?:[\\/]*)
20915  ac_cv_path_OTOOL="$OTOOL" # 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_OTOOL="$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
20936OTOOL=$ac_cv_path_OTOOL
20937if test -n "$OTOOL"; then
20938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20939$as_echo "$OTOOL" >&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$OTOOL" = 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 OTOOL=$tool_specified" >&5
20952$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
20953          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20954$as_echo_n "checking for OTOOL... " >&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 OTOOL=$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$OTOOL" = "x"; then
20970    OTOOL="true"
20971  fi
20972
20973
20974  # Publish this variable in the help.
20975
20976
20977  if [ -z "${READELF+x}" ]; then
20978    # The variable is not set by user, try to locate tool using the code snippet
20979    for ac_prog in greadelf readelf
20980do
20981  # Extract the first word of "$ac_prog", so it can be a program name with args.
20982set dummy $ac_prog; ac_word=$2
20983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20984$as_echo_n "checking for $ac_word... " >&6; }
20985if ${ac_cv_path_READELF+:} false; then :
20986  $as_echo_n "(cached) " >&6
20987else
20988  case $READELF in
20989  [\\/]* | ?:[\\/]*)
20990  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
20991  ;;
20992  *)
20993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20994for as_dir in $PATH
20995do
20996  IFS=$as_save_IFS
20997  test -z "$as_dir" && as_dir=.
20998    for ac_exec_ext in '' $ac_executable_extensions; do
20999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21000    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21002    break 2
21003  fi
21004done
21005  done
21006IFS=$as_save_IFS
21007
21008  ;;
21009esac
21010fi
21011READELF=$ac_cv_path_READELF
21012if test -n "$READELF"; then
21013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21014$as_echo "$READELF" >&6; }
21015else
21016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21017$as_echo "no" >&6; }
21018fi
21019
21020
21021  test -n "$READELF" && break
21022done
21023
21024  else
21025    # The variable is set, but is it from the command line or the environment?
21026
21027    # Try to remove the string !READELF! from our list.
21028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21030      # If it failed, the variable was not from the command line. Ignore it,
21031      # but warn the user (except for BASH, which is always set by the calling BASH).
21032      if test "xREADELF" != xBASH; then
21033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21034$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21035      fi
21036      # Try to locate tool using the code snippet
21037      for ac_prog in greadelf readelf
21038do
21039  # Extract the first word of "$ac_prog", so it can be a program name with args.
21040set dummy $ac_prog; ac_word=$2
21041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21042$as_echo_n "checking for $ac_word... " >&6; }
21043if ${ac_cv_path_READELF+:} false; then :
21044  $as_echo_n "(cached) " >&6
21045else
21046  case $READELF in
21047  [\\/]* | ?:[\\/]*)
21048  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21049  ;;
21050  *)
21051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21052for as_dir in $PATH
21053do
21054  IFS=$as_save_IFS
21055  test -z "$as_dir" && as_dir=.
21056    for ac_exec_ext in '' $ac_executable_extensions; do
21057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21058    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21060    break 2
21061  fi
21062done
21063  done
21064IFS=$as_save_IFS
21065
21066  ;;
21067esac
21068fi
21069READELF=$ac_cv_path_READELF
21070if test -n "$READELF"; then
21071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21072$as_echo "$READELF" >&6; }
21073else
21074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21075$as_echo "no" >&6; }
21076fi
21077
21078
21079  test -n "$READELF" && break
21080done
21081
21082    else
21083      # If it succeeded, then it was overridden by the user. We will use it
21084      # for the tool.
21085
21086      # First remove it from the list of overridden variables, so we can test
21087      # for unknown variables in the end.
21088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21089
21090      # Check if we try to supply an empty value
21091      if test "x$READELF" = x; then
21092        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21093$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21095$as_echo_n "checking for READELF... " >&6; }
21096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21097$as_echo "disabled" >&6; }
21098      else
21099        # Check if the provided tool contains a complete path.
21100        tool_specified="$READELF"
21101        tool_basename="${tool_specified##*/}"
21102        if test "x$tool_basename" = "x$tool_specified"; then
21103          # A command without a complete path is provided, search $PATH.
21104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21105$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21106          # Extract the first word of "$tool_basename", so it can be a program name with args.
21107set dummy $tool_basename; ac_word=$2
21108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21109$as_echo_n "checking for $ac_word... " >&6; }
21110if ${ac_cv_path_READELF+:} false; then :
21111  $as_echo_n "(cached) " >&6
21112else
21113  case $READELF in
21114  [\\/]* | ?:[\\/]*)
21115  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21116  ;;
21117  *)
21118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21119for as_dir in $PATH
21120do
21121  IFS=$as_save_IFS
21122  test -z "$as_dir" && as_dir=.
21123    for ac_exec_ext in '' $ac_executable_extensions; do
21124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21125    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21127    break 2
21128  fi
21129done
21130  done
21131IFS=$as_save_IFS
21132
21133  ;;
21134esac
21135fi
21136READELF=$ac_cv_path_READELF
21137if test -n "$READELF"; then
21138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21139$as_echo "$READELF" >&6; }
21140else
21141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21142$as_echo "no" >&6; }
21143fi
21144
21145
21146          if test "x$READELF" = x; then
21147            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21148          fi
21149        else
21150          # Otherwise we believe it is a complete path. Use it as it is.
21151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21152$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21153          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21154$as_echo_n "checking for READELF... " >&6; }
21155          if test ! -x "$tool_specified"; then
21156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21157$as_echo "not found" >&6; }
21158            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21159          fi
21160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21161$as_echo "$tool_specified" >&6; }
21162        fi
21163      fi
21164    fi
21165
21166  fi
21167
21168
21169
21170
21171  # Publish this variable in the help.
21172
21173
21174  if [ -z "${HG+x}" ]; then
21175    # The variable is not set by user, try to locate tool using the code snippet
21176    for ac_prog in hg
21177do
21178  # Extract the first word of "$ac_prog", so it can be a program name with args.
21179set dummy $ac_prog; ac_word=$2
21180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21181$as_echo_n "checking for $ac_word... " >&6; }
21182if ${ac_cv_path_HG+:} false; then :
21183  $as_echo_n "(cached) " >&6
21184else
21185  case $HG in
21186  [\\/]* | ?:[\\/]*)
21187  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21188  ;;
21189  *)
21190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21191for as_dir in $PATH
21192do
21193  IFS=$as_save_IFS
21194  test -z "$as_dir" && as_dir=.
21195    for ac_exec_ext in '' $ac_executable_extensions; do
21196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21197    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21199    break 2
21200  fi
21201done
21202  done
21203IFS=$as_save_IFS
21204
21205  ;;
21206esac
21207fi
21208HG=$ac_cv_path_HG
21209if test -n "$HG"; then
21210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21211$as_echo "$HG" >&6; }
21212else
21213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21214$as_echo "no" >&6; }
21215fi
21216
21217
21218  test -n "$HG" && break
21219done
21220
21221  else
21222    # The variable is set, but is it from the command line or the environment?
21223
21224    # Try to remove the string !HG! from our list.
21225    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21226    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21227      # If it failed, the variable was not from the command line. Ignore it,
21228      # but warn the user (except for BASH, which is always set by the calling BASH).
21229      if test "xHG" != xBASH; then
21230        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21231$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21232      fi
21233      # Try to locate tool using the code snippet
21234      for ac_prog in hg
21235do
21236  # Extract the first word of "$ac_prog", so it can be a program name with args.
21237set dummy $ac_prog; ac_word=$2
21238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21239$as_echo_n "checking for $ac_word... " >&6; }
21240if ${ac_cv_path_HG+:} false; then :
21241  $as_echo_n "(cached) " >&6
21242else
21243  case $HG in
21244  [\\/]* | ?:[\\/]*)
21245  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21246  ;;
21247  *)
21248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21249for as_dir in $PATH
21250do
21251  IFS=$as_save_IFS
21252  test -z "$as_dir" && as_dir=.
21253    for ac_exec_ext in '' $ac_executable_extensions; do
21254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21255    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21257    break 2
21258  fi
21259done
21260  done
21261IFS=$as_save_IFS
21262
21263  ;;
21264esac
21265fi
21266HG=$ac_cv_path_HG
21267if test -n "$HG"; then
21268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21269$as_echo "$HG" >&6; }
21270else
21271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21272$as_echo "no" >&6; }
21273fi
21274
21275
21276  test -n "$HG" && break
21277done
21278
21279    else
21280      # If it succeeded, then it was overridden by the user. We will use it
21281      # for the tool.
21282
21283      # First remove it from the list of overridden variables, so we can test
21284      # for unknown variables in the end.
21285      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21286
21287      # Check if we try to supply an empty value
21288      if test "x$HG" = x; then
21289        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21290$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21291        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21292$as_echo_n "checking for HG... " >&6; }
21293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21294$as_echo "disabled" >&6; }
21295      else
21296        # Check if the provided tool contains a complete path.
21297        tool_specified="$HG"
21298        tool_basename="${tool_specified##*/}"
21299        if test "x$tool_basename" = "x$tool_specified"; then
21300          # A command without a complete path is provided, search $PATH.
21301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21302$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21303          # Extract the first word of "$tool_basename", so it can be a program name with args.
21304set dummy $tool_basename; ac_word=$2
21305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21306$as_echo_n "checking for $ac_word... " >&6; }
21307if ${ac_cv_path_HG+:} false; then :
21308  $as_echo_n "(cached) " >&6
21309else
21310  case $HG in
21311  [\\/]* | ?:[\\/]*)
21312  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21313  ;;
21314  *)
21315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21316for as_dir in $PATH
21317do
21318  IFS=$as_save_IFS
21319  test -z "$as_dir" && as_dir=.
21320    for ac_exec_ext in '' $ac_executable_extensions; do
21321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21322    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21324    break 2
21325  fi
21326done
21327  done
21328IFS=$as_save_IFS
21329
21330  ;;
21331esac
21332fi
21333HG=$ac_cv_path_HG
21334if test -n "$HG"; then
21335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21336$as_echo "$HG" >&6; }
21337else
21338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21339$as_echo "no" >&6; }
21340fi
21341
21342
21343          if test "x$HG" = x; then
21344            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21345          fi
21346        else
21347          # Otherwise we believe it is a complete path. Use it as it is.
21348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21349$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21350          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21351$as_echo_n "checking for HG... " >&6; }
21352          if test ! -x "$tool_specified"; then
21353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21354$as_echo "not found" >&6; }
21355            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21356          fi
21357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21358$as_echo "$tool_specified" >&6; }
21359        fi
21360      fi
21361    fi
21362
21363  fi
21364
21365
21366
21367
21368  # Publish this variable in the help.
21369
21370
21371  if [ -z "${STAT+x}" ]; then
21372    # The variable is not set by user, try to locate tool using the code snippet
21373    for ac_prog in stat
21374do
21375  # Extract the first word of "$ac_prog", so it can be a program name with args.
21376set dummy $ac_prog; ac_word=$2
21377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21378$as_echo_n "checking for $ac_word... " >&6; }
21379if ${ac_cv_path_STAT+:} false; then :
21380  $as_echo_n "(cached) " >&6
21381else
21382  case $STAT in
21383  [\\/]* | ?:[\\/]*)
21384  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21385  ;;
21386  *)
21387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21388for as_dir in $PATH
21389do
21390  IFS=$as_save_IFS
21391  test -z "$as_dir" && as_dir=.
21392    for ac_exec_ext in '' $ac_executable_extensions; do
21393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21394    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21396    break 2
21397  fi
21398done
21399  done
21400IFS=$as_save_IFS
21401
21402  ;;
21403esac
21404fi
21405STAT=$ac_cv_path_STAT
21406if test -n "$STAT"; then
21407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21408$as_echo "$STAT" >&6; }
21409else
21410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21411$as_echo "no" >&6; }
21412fi
21413
21414
21415  test -n "$STAT" && break
21416done
21417
21418  else
21419    # The variable is set, but is it from the command line or the environment?
21420
21421    # Try to remove the string !STAT! from our list.
21422    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21423    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21424      # If it failed, the variable was not from the command line. Ignore it,
21425      # but warn the user (except for BASH, which is always set by the calling BASH).
21426      if test "xSTAT" != xBASH; then
21427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21428$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21429      fi
21430      # Try to locate tool using the code snippet
21431      for ac_prog in stat
21432do
21433  # Extract the first word of "$ac_prog", so it can be a program name with args.
21434set dummy $ac_prog; ac_word=$2
21435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21436$as_echo_n "checking for $ac_word... " >&6; }
21437if ${ac_cv_path_STAT+:} false; then :
21438  $as_echo_n "(cached) " >&6
21439else
21440  case $STAT in
21441  [\\/]* | ?:[\\/]*)
21442  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21443  ;;
21444  *)
21445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21446for as_dir in $PATH
21447do
21448  IFS=$as_save_IFS
21449  test -z "$as_dir" && as_dir=.
21450    for ac_exec_ext in '' $ac_executable_extensions; do
21451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21452    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21454    break 2
21455  fi
21456done
21457  done
21458IFS=$as_save_IFS
21459
21460  ;;
21461esac
21462fi
21463STAT=$ac_cv_path_STAT
21464if test -n "$STAT"; then
21465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21466$as_echo "$STAT" >&6; }
21467else
21468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21469$as_echo "no" >&6; }
21470fi
21471
21472
21473  test -n "$STAT" && break
21474done
21475
21476    else
21477      # If it succeeded, then it was overridden by the user. We will use it
21478      # for the tool.
21479
21480      # First remove it from the list of overridden variables, so we can test
21481      # for unknown variables in the end.
21482      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21483
21484      # Check if we try to supply an empty value
21485      if test "x$STAT" = x; then
21486        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21487$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21489$as_echo_n "checking for STAT... " >&6; }
21490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21491$as_echo "disabled" >&6; }
21492      else
21493        # Check if the provided tool contains a complete path.
21494        tool_specified="$STAT"
21495        tool_basename="${tool_specified##*/}"
21496        if test "x$tool_basename" = "x$tool_specified"; then
21497          # A command without a complete path is provided, search $PATH.
21498          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21499$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21500          # Extract the first word of "$tool_basename", so it can be a program name with args.
21501set dummy $tool_basename; ac_word=$2
21502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21503$as_echo_n "checking for $ac_word... " >&6; }
21504if ${ac_cv_path_STAT+:} false; then :
21505  $as_echo_n "(cached) " >&6
21506else
21507  case $STAT in
21508  [\\/]* | ?:[\\/]*)
21509  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21510  ;;
21511  *)
21512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21513for as_dir in $PATH
21514do
21515  IFS=$as_save_IFS
21516  test -z "$as_dir" && as_dir=.
21517    for ac_exec_ext in '' $ac_executable_extensions; do
21518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21519    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21521    break 2
21522  fi
21523done
21524  done
21525IFS=$as_save_IFS
21526
21527  ;;
21528esac
21529fi
21530STAT=$ac_cv_path_STAT
21531if test -n "$STAT"; then
21532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21533$as_echo "$STAT" >&6; }
21534else
21535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21536$as_echo "no" >&6; }
21537fi
21538
21539
21540          if test "x$STAT" = x; then
21541            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21542          fi
21543        else
21544          # Otherwise we believe it is a complete path. Use it as it is.
21545          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21546$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21547          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21548$as_echo_n "checking for STAT... " >&6; }
21549          if test ! -x "$tool_specified"; then
21550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21551$as_echo "not found" >&6; }
21552            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21553          fi
21554          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21555$as_echo "$tool_specified" >&6; }
21556        fi
21557      fi
21558    fi
21559
21560  fi
21561
21562
21563
21564
21565  # Publish this variable in the help.
21566
21567
21568  if [ -z "${TIME+x}" ]; then
21569    # The variable is not set by user, try to locate tool using the code snippet
21570    for ac_prog in time
21571do
21572  # Extract the first word of "$ac_prog", so it can be a program name with args.
21573set dummy $ac_prog; ac_word=$2
21574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21575$as_echo_n "checking for $ac_word... " >&6; }
21576if ${ac_cv_path_TIME+:} false; then :
21577  $as_echo_n "(cached) " >&6
21578else
21579  case $TIME in
21580  [\\/]* | ?:[\\/]*)
21581  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21582  ;;
21583  *)
21584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21585for as_dir in $PATH
21586do
21587  IFS=$as_save_IFS
21588  test -z "$as_dir" && as_dir=.
21589    for ac_exec_ext in '' $ac_executable_extensions; do
21590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21591    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21593    break 2
21594  fi
21595done
21596  done
21597IFS=$as_save_IFS
21598
21599  ;;
21600esac
21601fi
21602TIME=$ac_cv_path_TIME
21603if test -n "$TIME"; then
21604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21605$as_echo "$TIME" >&6; }
21606else
21607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21608$as_echo "no" >&6; }
21609fi
21610
21611
21612  test -n "$TIME" && break
21613done
21614
21615  else
21616    # The variable is set, but is it from the command line or the environment?
21617
21618    # Try to remove the string !TIME! from our list.
21619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21621      # If it failed, the variable was not from the command line. Ignore it,
21622      # but warn the user (except for BASH, which is always set by the calling BASH).
21623      if test "xTIME" != xBASH; then
21624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21625$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21626      fi
21627      # Try to locate tool using the code snippet
21628      for ac_prog in time
21629do
21630  # Extract the first word of "$ac_prog", so it can be a program name with args.
21631set dummy $ac_prog; ac_word=$2
21632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21633$as_echo_n "checking for $ac_word... " >&6; }
21634if ${ac_cv_path_TIME+:} false; then :
21635  $as_echo_n "(cached) " >&6
21636else
21637  case $TIME in
21638  [\\/]* | ?:[\\/]*)
21639  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21640  ;;
21641  *)
21642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21643for as_dir in $PATH
21644do
21645  IFS=$as_save_IFS
21646  test -z "$as_dir" && as_dir=.
21647    for ac_exec_ext in '' $ac_executable_extensions; do
21648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21649    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21651    break 2
21652  fi
21653done
21654  done
21655IFS=$as_save_IFS
21656
21657  ;;
21658esac
21659fi
21660TIME=$ac_cv_path_TIME
21661if test -n "$TIME"; then
21662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21663$as_echo "$TIME" >&6; }
21664else
21665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21666$as_echo "no" >&6; }
21667fi
21668
21669
21670  test -n "$TIME" && break
21671done
21672
21673    else
21674      # If it succeeded, then it was overridden by the user. We will use it
21675      # for the tool.
21676
21677      # First remove it from the list of overridden variables, so we can test
21678      # for unknown variables in the end.
21679      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21680
21681      # Check if we try to supply an empty value
21682      if test "x$TIME" = x; then
21683        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21684$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21685        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21686$as_echo_n "checking for TIME... " >&6; }
21687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21688$as_echo "disabled" >&6; }
21689      else
21690        # Check if the provided tool contains a complete path.
21691        tool_specified="$TIME"
21692        tool_basename="${tool_specified##*/}"
21693        if test "x$tool_basename" = "x$tool_specified"; then
21694          # A command without a complete path is provided, search $PATH.
21695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21696$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21697          # Extract the first word of "$tool_basename", so it can be a program name with args.
21698set dummy $tool_basename; ac_word=$2
21699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21700$as_echo_n "checking for $ac_word... " >&6; }
21701if ${ac_cv_path_TIME+:} false; then :
21702  $as_echo_n "(cached) " >&6
21703else
21704  case $TIME in
21705  [\\/]* | ?:[\\/]*)
21706  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21707  ;;
21708  *)
21709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21710for as_dir in $PATH
21711do
21712  IFS=$as_save_IFS
21713  test -z "$as_dir" && as_dir=.
21714    for ac_exec_ext in '' $ac_executable_extensions; do
21715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21716    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21718    break 2
21719  fi
21720done
21721  done
21722IFS=$as_save_IFS
21723
21724  ;;
21725esac
21726fi
21727TIME=$ac_cv_path_TIME
21728if test -n "$TIME"; then
21729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21730$as_echo "$TIME" >&6; }
21731else
21732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21733$as_echo "no" >&6; }
21734fi
21735
21736
21737          if test "x$TIME" = x; then
21738            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21739          fi
21740        else
21741          # Otherwise we believe it is a complete path. Use it as it is.
21742          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21743$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21744          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21745$as_echo_n "checking for TIME... " >&6; }
21746          if test ! -x "$tool_specified"; then
21747            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21748$as_echo "not found" >&6; }
21749            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21750          fi
21751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21752$as_echo "$tool_specified" >&6; }
21753        fi
21754      fi
21755    fi
21756
21757  fi
21758
21759
21760
21761
21762  # Publish this variable in the help.
21763
21764
21765  if [ -z "${PATCH+x}" ]; then
21766    # The variable is not set by user, try to locate tool using the code snippet
21767    for ac_prog in gpatch patch
21768do
21769  # Extract the first word of "$ac_prog", so it can be a program name with args.
21770set dummy $ac_prog; ac_word=$2
21771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21772$as_echo_n "checking for $ac_word... " >&6; }
21773if ${ac_cv_path_PATCH+:} false; then :
21774  $as_echo_n "(cached) " >&6
21775else
21776  case $PATCH in
21777  [\\/]* | ?:[\\/]*)
21778  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21779  ;;
21780  *)
21781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21782for as_dir in $PATH
21783do
21784  IFS=$as_save_IFS
21785  test -z "$as_dir" && as_dir=.
21786    for ac_exec_ext in '' $ac_executable_extensions; do
21787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21788    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21790    break 2
21791  fi
21792done
21793  done
21794IFS=$as_save_IFS
21795
21796  ;;
21797esac
21798fi
21799PATCH=$ac_cv_path_PATCH
21800if test -n "$PATCH"; then
21801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21802$as_echo "$PATCH" >&6; }
21803else
21804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21805$as_echo "no" >&6; }
21806fi
21807
21808
21809  test -n "$PATCH" && break
21810done
21811
21812  else
21813    # The variable is set, but is it from the command line or the environment?
21814
21815    # Try to remove the string !PATCH! from our list.
21816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21818      # If it failed, the variable was not from the command line. Ignore it,
21819      # but warn the user (except for BASH, which is always set by the calling BASH).
21820      if test "xPATCH" != xBASH; then
21821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21822$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21823      fi
21824      # Try to locate tool using the code snippet
21825      for ac_prog in gpatch patch
21826do
21827  # Extract the first word of "$ac_prog", so it can be a program name with args.
21828set dummy $ac_prog; ac_word=$2
21829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21830$as_echo_n "checking for $ac_word... " >&6; }
21831if ${ac_cv_path_PATCH+:} false; then :
21832  $as_echo_n "(cached) " >&6
21833else
21834  case $PATCH in
21835  [\\/]* | ?:[\\/]*)
21836  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21837  ;;
21838  *)
21839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21840for as_dir in $PATH
21841do
21842  IFS=$as_save_IFS
21843  test -z "$as_dir" && as_dir=.
21844    for ac_exec_ext in '' $ac_executable_extensions; do
21845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21846    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21848    break 2
21849  fi
21850done
21851  done
21852IFS=$as_save_IFS
21853
21854  ;;
21855esac
21856fi
21857PATCH=$ac_cv_path_PATCH
21858if test -n "$PATCH"; then
21859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21860$as_echo "$PATCH" >&6; }
21861else
21862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21863$as_echo "no" >&6; }
21864fi
21865
21866
21867  test -n "$PATCH" && break
21868done
21869
21870    else
21871      # If it succeeded, then it was overridden by the user. We will use it
21872      # for the tool.
21873
21874      # First remove it from the list of overridden variables, so we can test
21875      # for unknown variables in the end.
21876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21877
21878      # Check if we try to supply an empty value
21879      if test "x$PATCH" = x; then
21880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21881$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21883$as_echo_n "checking for PATCH... " >&6; }
21884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21885$as_echo "disabled" >&6; }
21886      else
21887        # Check if the provided tool contains a complete path.
21888        tool_specified="$PATCH"
21889        tool_basename="${tool_specified##*/}"
21890        if test "x$tool_basename" = "x$tool_specified"; then
21891          # A command without a complete path is provided, search $PATH.
21892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21893$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21894          # Extract the first word of "$tool_basename", so it can be a program name with args.
21895set dummy $tool_basename; ac_word=$2
21896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21897$as_echo_n "checking for $ac_word... " >&6; }
21898if ${ac_cv_path_PATCH+:} false; then :
21899  $as_echo_n "(cached) " >&6
21900else
21901  case $PATCH in
21902  [\\/]* | ?:[\\/]*)
21903  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21904  ;;
21905  *)
21906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21907for as_dir in $PATH
21908do
21909  IFS=$as_save_IFS
21910  test -z "$as_dir" && as_dir=.
21911    for ac_exec_ext in '' $ac_executable_extensions; do
21912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21913    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21915    break 2
21916  fi
21917done
21918  done
21919IFS=$as_save_IFS
21920
21921  ;;
21922esac
21923fi
21924PATCH=$ac_cv_path_PATCH
21925if test -n "$PATCH"; then
21926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21927$as_echo "$PATCH" >&6; }
21928else
21929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21930$as_echo "no" >&6; }
21931fi
21932
21933
21934          if test "x$PATCH" = x; then
21935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21936          fi
21937        else
21938          # Otherwise we believe it is a complete path. Use it as it is.
21939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21940$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21942$as_echo_n "checking for PATCH... " >&6; }
21943          if test ! -x "$tool_specified"; then
21944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21945$as_echo "not found" >&6; }
21946            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
21947          fi
21948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21949$as_echo "$tool_specified" >&6; }
21950        fi
21951      fi
21952    fi
21953
21954  fi
21955
21956
21957  # Check if it's GNU time
21958  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
21959  if test "x$IS_GNU_TIME" != x; then
21960    IS_GNU_TIME=yes
21961  else
21962    IS_GNU_TIME=no
21963  fi
21964
21965
21966  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
21967
21968
21969
21970  # Publish this variable in the help.
21971
21972
21973  if [ -z "${DSYMUTIL+x}" ]; then
21974    # The variable is not set by user, try to locate tool using the code snippet
21975    for ac_prog in dsymutil
21976do
21977  # Extract the first word of "$ac_prog", so it can be a program name with args.
21978set dummy $ac_prog; ac_word=$2
21979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21980$as_echo_n "checking for $ac_word... " >&6; }
21981if ${ac_cv_path_DSYMUTIL+:} false; then :
21982  $as_echo_n "(cached) " >&6
21983else
21984  case $DSYMUTIL in
21985  [\\/]* | ?:[\\/]*)
21986  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
21987  ;;
21988  *)
21989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21990for as_dir in $PATH
21991do
21992  IFS=$as_save_IFS
21993  test -z "$as_dir" && as_dir=.
21994    for ac_exec_ext in '' $ac_executable_extensions; do
21995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21996    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
21997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21998    break 2
21999  fi
22000done
22001  done
22002IFS=$as_save_IFS
22003
22004  ;;
22005esac
22006fi
22007DSYMUTIL=$ac_cv_path_DSYMUTIL
22008if test -n "$DSYMUTIL"; then
22009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22010$as_echo "$DSYMUTIL" >&6; }
22011else
22012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22013$as_echo "no" >&6; }
22014fi
22015
22016
22017  test -n "$DSYMUTIL" && break
22018done
22019
22020  else
22021    # The variable is set, but is it from the command line or the environment?
22022
22023    # Try to remove the string !DSYMUTIL! from our list.
22024    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22025    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22026      # If it failed, the variable was not from the command line. Ignore it,
22027      # but warn the user (except for BASH, which is always set by the calling BASH).
22028      if test "xDSYMUTIL" != xBASH; then
22029        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22030$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22031      fi
22032      # Try to locate tool using the code snippet
22033      for ac_prog in dsymutil
22034do
22035  # Extract the first word of "$ac_prog", so it can be a program name with args.
22036set dummy $ac_prog; ac_word=$2
22037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22038$as_echo_n "checking for $ac_word... " >&6; }
22039if ${ac_cv_path_DSYMUTIL+:} false; then :
22040  $as_echo_n "(cached) " >&6
22041else
22042  case $DSYMUTIL in
22043  [\\/]* | ?:[\\/]*)
22044  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22045  ;;
22046  *)
22047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22048for as_dir in $PATH
22049do
22050  IFS=$as_save_IFS
22051  test -z "$as_dir" && as_dir=.
22052    for ac_exec_ext in '' $ac_executable_extensions; do
22053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22054    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22056    break 2
22057  fi
22058done
22059  done
22060IFS=$as_save_IFS
22061
22062  ;;
22063esac
22064fi
22065DSYMUTIL=$ac_cv_path_DSYMUTIL
22066if test -n "$DSYMUTIL"; then
22067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22068$as_echo "$DSYMUTIL" >&6; }
22069else
22070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22071$as_echo "no" >&6; }
22072fi
22073
22074
22075  test -n "$DSYMUTIL" && break
22076done
22077
22078    else
22079      # If it succeeded, then it was overridden by the user. We will use it
22080      # for the tool.
22081
22082      # First remove it from the list of overridden variables, so we can test
22083      # for unknown variables in the end.
22084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22085
22086      # Check if we try to supply an empty value
22087      if test "x$DSYMUTIL" = x; then
22088        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22089$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22090        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22091$as_echo_n "checking for DSYMUTIL... " >&6; }
22092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22093$as_echo "disabled" >&6; }
22094      else
22095        # Check if the provided tool contains a complete path.
22096        tool_specified="$DSYMUTIL"
22097        tool_basename="${tool_specified##*/}"
22098        if test "x$tool_basename" = "x$tool_specified"; then
22099          # A command without a complete path is provided, search $PATH.
22100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22101$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22102          # Extract the first word of "$tool_basename", so it can be a program name with args.
22103set dummy $tool_basename; ac_word=$2
22104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22105$as_echo_n "checking for $ac_word... " >&6; }
22106if ${ac_cv_path_DSYMUTIL+:} false; then :
22107  $as_echo_n "(cached) " >&6
22108else
22109  case $DSYMUTIL in
22110  [\\/]* | ?:[\\/]*)
22111  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22112  ;;
22113  *)
22114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22115for as_dir in $PATH
22116do
22117  IFS=$as_save_IFS
22118  test -z "$as_dir" && as_dir=.
22119    for ac_exec_ext in '' $ac_executable_extensions; do
22120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22121    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22123    break 2
22124  fi
22125done
22126  done
22127IFS=$as_save_IFS
22128
22129  ;;
22130esac
22131fi
22132DSYMUTIL=$ac_cv_path_DSYMUTIL
22133if test -n "$DSYMUTIL"; then
22134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22135$as_echo "$DSYMUTIL" >&6; }
22136else
22137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22138$as_echo "no" >&6; }
22139fi
22140
22141
22142          if test "x$DSYMUTIL" = x; then
22143            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22144          fi
22145        else
22146          # Otherwise we believe it is a complete path. Use it as it is.
22147          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22148$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22149          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22150$as_echo_n "checking for DSYMUTIL... " >&6; }
22151          if test ! -x "$tool_specified"; then
22152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22153$as_echo "not found" >&6; }
22154            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22155          fi
22156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22157$as_echo "$tool_specified" >&6; }
22158        fi
22159      fi
22160    fi
22161
22162  fi
22163
22164
22165
22166  if test "x$DSYMUTIL" = x; then
22167    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22168  fi
22169
22170
22171
22172
22173
22174  # Publish this variable in the help.
22175
22176
22177  if [ -z "${XATTR+x}" ]; then
22178    # The variable is not set by user, try to locate tool using the code snippet
22179    for ac_prog in xattr
22180do
22181  # Extract the first word of "$ac_prog", so it can be a program name with args.
22182set dummy $ac_prog; ac_word=$2
22183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22184$as_echo_n "checking for $ac_word... " >&6; }
22185if ${ac_cv_path_XATTR+:} false; then :
22186  $as_echo_n "(cached) " >&6
22187else
22188  case $XATTR in
22189  [\\/]* | ?:[\\/]*)
22190  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22191  ;;
22192  *)
22193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22194for as_dir in $PATH
22195do
22196  IFS=$as_save_IFS
22197  test -z "$as_dir" && as_dir=.
22198    for ac_exec_ext in '' $ac_executable_extensions; do
22199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22200    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22202    break 2
22203  fi
22204done
22205  done
22206IFS=$as_save_IFS
22207
22208  ;;
22209esac
22210fi
22211XATTR=$ac_cv_path_XATTR
22212if test -n "$XATTR"; then
22213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22214$as_echo "$XATTR" >&6; }
22215else
22216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22217$as_echo "no" >&6; }
22218fi
22219
22220
22221  test -n "$XATTR" && break
22222done
22223
22224  else
22225    # The variable is set, but is it from the command line or the environment?
22226
22227    # Try to remove the string !XATTR! from our list.
22228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22230      # If it failed, the variable was not from the command line. Ignore it,
22231      # but warn the user (except for BASH, which is always set by the calling BASH).
22232      if test "xXATTR" != xBASH; then
22233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22234$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22235      fi
22236      # Try to locate tool using the code snippet
22237      for ac_prog in xattr
22238do
22239  # Extract the first word of "$ac_prog", so it can be a program name with args.
22240set dummy $ac_prog; ac_word=$2
22241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22242$as_echo_n "checking for $ac_word... " >&6; }
22243if ${ac_cv_path_XATTR+:} false; then :
22244  $as_echo_n "(cached) " >&6
22245else
22246  case $XATTR in
22247  [\\/]* | ?:[\\/]*)
22248  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22249  ;;
22250  *)
22251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22252for as_dir in $PATH
22253do
22254  IFS=$as_save_IFS
22255  test -z "$as_dir" && as_dir=.
22256    for ac_exec_ext in '' $ac_executable_extensions; do
22257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22258    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22260    break 2
22261  fi
22262done
22263  done
22264IFS=$as_save_IFS
22265
22266  ;;
22267esac
22268fi
22269XATTR=$ac_cv_path_XATTR
22270if test -n "$XATTR"; then
22271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22272$as_echo "$XATTR" >&6; }
22273else
22274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22275$as_echo "no" >&6; }
22276fi
22277
22278
22279  test -n "$XATTR" && break
22280done
22281
22282    else
22283      # If it succeeded, then it was overridden by the user. We will use it
22284      # for the tool.
22285
22286      # First remove it from the list of overridden variables, so we can test
22287      # for unknown variables in the end.
22288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22289
22290      # Check if we try to supply an empty value
22291      if test "x$XATTR" = x; then
22292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22293$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22295$as_echo_n "checking for XATTR... " >&6; }
22296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22297$as_echo "disabled" >&6; }
22298      else
22299        # Check if the provided tool contains a complete path.
22300        tool_specified="$XATTR"
22301        tool_basename="${tool_specified##*/}"
22302        if test "x$tool_basename" = "x$tool_specified"; then
22303          # A command without a complete path is provided, search $PATH.
22304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22305$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22306          # Extract the first word of "$tool_basename", so it can be a program name with args.
22307set dummy $tool_basename; ac_word=$2
22308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22309$as_echo_n "checking for $ac_word... " >&6; }
22310if ${ac_cv_path_XATTR+:} false; then :
22311  $as_echo_n "(cached) " >&6
22312else
22313  case $XATTR in
22314  [\\/]* | ?:[\\/]*)
22315  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22316  ;;
22317  *)
22318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22319for as_dir in $PATH
22320do
22321  IFS=$as_save_IFS
22322  test -z "$as_dir" && as_dir=.
22323    for ac_exec_ext in '' $ac_executable_extensions; do
22324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22325    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22327    break 2
22328  fi
22329done
22330  done
22331IFS=$as_save_IFS
22332
22333  ;;
22334esac
22335fi
22336XATTR=$ac_cv_path_XATTR
22337if test -n "$XATTR"; then
22338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22339$as_echo "$XATTR" >&6; }
22340else
22341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22342$as_echo "no" >&6; }
22343fi
22344
22345
22346          if test "x$XATTR" = x; then
22347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22348          fi
22349        else
22350          # Otherwise we believe it is a complete path. Use it as it is.
22351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22352$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22354$as_echo_n "checking for XATTR... " >&6; }
22355          if test ! -x "$tool_specified"; then
22356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22357$as_echo "not found" >&6; }
22358            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22359          fi
22360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22361$as_echo "$tool_specified" >&6; }
22362        fi
22363      fi
22364    fi
22365
22366  fi
22367
22368
22369
22370  if test "x$XATTR" = x; then
22371    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22372  fi
22373
22374
22375
22376
22377  # Publish this variable in the help.
22378
22379
22380  if [ -z "${CODESIGN+x}" ]; then
22381    # The variable is not set by user, try to locate tool using the code snippet
22382    for ac_prog in codesign
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_CODESIGN+:} false; then :
22389  $as_echo_n "(cached) " >&6
22390else
22391  case $CODESIGN in
22392  [\\/]* | ?:[\\/]*)
22393  ac_cv_path_CODESIGN="$CODESIGN" # 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_CODESIGN="$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
22414CODESIGN=$ac_cv_path_CODESIGN
22415if test -n "$CODESIGN"; then
22416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22417$as_echo "$CODESIGN" >&6; }
22418else
22419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22420$as_echo "no" >&6; }
22421fi
22422
22423
22424  test -n "$CODESIGN" && 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 !CODESIGN! from our list.
22431    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
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 "xCODESIGN" != xBASH; then
22436        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22437$as_echo "$as_me: WARNING: Ignoring value of CODESIGN 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 codesign
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_CODESIGN+:} false; then :
22447  $as_echo_n "(cached) " >&6
22448else
22449  case $CODESIGN in
22450  [\\/]* | ?:[\\/]*)
22451  ac_cv_path_CODESIGN="$CODESIGN" # 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_CODESIGN="$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
22472CODESIGN=$ac_cv_path_CODESIGN
22473if test -n "$CODESIGN"; then
22474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22475$as_echo "$CODESIGN" >&6; }
22476else
22477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22478$as_echo "no" >&6; }
22479fi
22480
22481
22482  test -n "$CODESIGN" && 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$CODESIGN" = x; then
22495        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22496$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22498$as_echo_n "checking for CODESIGN... " >&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="$CODESIGN"
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 CODESIGN=$tool_basename" >&5
22508$as_echo "$as_me: Will search for user supplied tool CODESIGN=$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_CODESIGN+:} false; then :
22514  $as_echo_n "(cached) " >&6
22515else
22516  case $CODESIGN in
22517  [\\/]* | ?:[\\/]*)
22518  ac_cv_path_CODESIGN="$CODESIGN" # 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_CODESIGN="$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
22539CODESIGN=$ac_cv_path_CODESIGN
22540if test -n "$CODESIGN"; then
22541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22542$as_echo "$CODESIGN" >&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$CODESIGN" = 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 CODESIGN=$tool_specified" >&5
22555$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22556          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22557$as_echo_n "checking for CODESIGN... " >&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 CODESIGN=$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    if test "x$CODESIGN" != "x"; then
22573      # Verify that the openjdk_codesign certificate is present
22574      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22575$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22576      rm -f codesign-testfile
22577      touch codesign-testfile
22578      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22579      rm -f codesign-testfile
22580      if test "x$CODESIGN" = x; then
22581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22582$as_echo "no" >&6; }
22583      else
22584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22585$as_echo "yes" >&6; }
22586      fi
22587    fi
22588
22589
22590
22591  # Publish this variable in the help.
22592
22593
22594  if [ -z "${SETFILE+x}" ]; then
22595    # The variable is not set by user, try to locate tool using the code snippet
22596    for ac_prog in SetFile
22597do
22598  # Extract the first word of "$ac_prog", so it can be a program name with args.
22599set dummy $ac_prog; ac_word=$2
22600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22601$as_echo_n "checking for $ac_word... " >&6; }
22602if ${ac_cv_path_SETFILE+:} false; then :
22603  $as_echo_n "(cached) " >&6
22604else
22605  case $SETFILE in
22606  [\\/]* | ?:[\\/]*)
22607  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22608  ;;
22609  *)
22610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22611for as_dir in $PATH
22612do
22613  IFS=$as_save_IFS
22614  test -z "$as_dir" && as_dir=.
22615    for ac_exec_ext in '' $ac_executable_extensions; do
22616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22617    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22619    break 2
22620  fi
22621done
22622  done
22623IFS=$as_save_IFS
22624
22625  ;;
22626esac
22627fi
22628SETFILE=$ac_cv_path_SETFILE
22629if test -n "$SETFILE"; then
22630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22631$as_echo "$SETFILE" >&6; }
22632else
22633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22634$as_echo "no" >&6; }
22635fi
22636
22637
22638  test -n "$SETFILE" && break
22639done
22640
22641  else
22642    # The variable is set, but is it from the command line or the environment?
22643
22644    # Try to remove the string !SETFILE! from our list.
22645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22647      # If it failed, the variable was not from the command line. Ignore it,
22648      # but warn the user (except for BASH, which is always set by the calling BASH).
22649      if test "xSETFILE" != xBASH; then
22650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22651$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22652      fi
22653      # Try to locate tool using the code snippet
22654      for ac_prog in SetFile
22655do
22656  # Extract the first word of "$ac_prog", so it can be a program name with args.
22657set dummy $ac_prog; ac_word=$2
22658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22659$as_echo_n "checking for $ac_word... " >&6; }
22660if ${ac_cv_path_SETFILE+:} false; then :
22661  $as_echo_n "(cached) " >&6
22662else
22663  case $SETFILE in
22664  [\\/]* | ?:[\\/]*)
22665  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22666  ;;
22667  *)
22668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22669for as_dir in $PATH
22670do
22671  IFS=$as_save_IFS
22672  test -z "$as_dir" && as_dir=.
22673    for ac_exec_ext in '' $ac_executable_extensions; do
22674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22675    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22677    break 2
22678  fi
22679done
22680  done
22681IFS=$as_save_IFS
22682
22683  ;;
22684esac
22685fi
22686SETFILE=$ac_cv_path_SETFILE
22687if test -n "$SETFILE"; then
22688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22689$as_echo "$SETFILE" >&6; }
22690else
22691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22692$as_echo "no" >&6; }
22693fi
22694
22695
22696  test -n "$SETFILE" && break
22697done
22698
22699    else
22700      # If it succeeded, then it was overridden by the user. We will use it
22701      # for the tool.
22702
22703      # First remove it from the list of overridden variables, so we can test
22704      # for unknown variables in the end.
22705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22706
22707      # Check if we try to supply an empty value
22708      if test "x$SETFILE" = x; then
22709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22710$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22712$as_echo_n "checking for SETFILE... " >&6; }
22713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22714$as_echo "disabled" >&6; }
22715      else
22716        # Check if the provided tool contains a complete path.
22717        tool_specified="$SETFILE"
22718        tool_basename="${tool_specified##*/}"
22719        if test "x$tool_basename" = "x$tool_specified"; then
22720          # A command without a complete path is provided, search $PATH.
22721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22722$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22723          # Extract the first word of "$tool_basename", so it can be a program name with args.
22724set dummy $tool_basename; ac_word=$2
22725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22726$as_echo_n "checking for $ac_word... " >&6; }
22727if ${ac_cv_path_SETFILE+:} false; then :
22728  $as_echo_n "(cached) " >&6
22729else
22730  case $SETFILE in
22731  [\\/]* | ?:[\\/]*)
22732  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22733  ;;
22734  *)
22735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22736for as_dir in $PATH
22737do
22738  IFS=$as_save_IFS
22739  test -z "$as_dir" && as_dir=.
22740    for ac_exec_ext in '' $ac_executable_extensions; do
22741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22742    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22744    break 2
22745  fi
22746done
22747  done
22748IFS=$as_save_IFS
22749
22750  ;;
22751esac
22752fi
22753SETFILE=$ac_cv_path_SETFILE
22754if test -n "$SETFILE"; then
22755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22756$as_echo "$SETFILE" >&6; }
22757else
22758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22759$as_echo "no" >&6; }
22760fi
22761
22762
22763          if test "x$SETFILE" = x; then
22764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22765          fi
22766        else
22767          # Otherwise we believe it is a complete path. Use it as it is.
22768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22769$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22771$as_echo_n "checking for SETFILE... " >&6; }
22772          if test ! -x "$tool_specified"; then
22773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22774$as_echo "not found" >&6; }
22775            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22776          fi
22777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22778$as_echo "$tool_specified" >&6; }
22779        fi
22780      fi
22781    fi
22782
22783  fi
22784
22785
22786
22787  if test "x$SETFILE" = x; then
22788    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22789  fi
22790
22791
22792  fi
22793
22794
22795  # Test if bash supports pipefail.
22796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22797$as_echo_n "checking if bash supports pipefail... " >&6; }
22798  if ${BASH} -c 'set -o pipefail'; then
22799    BASH_ARGS="$BASH_ARGS -o pipefail"
22800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22801$as_echo "yes" >&6; }
22802  else
22803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22804$as_echo "no" >&6; }
22805  fi
22806
22807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22808$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22809  if ${BASH} -e -c 'true'; then
22810    BASH_ARGS="$BASH_ARGS -e"
22811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22812$as_echo "yes" >&6; }
22813  else
22814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22815$as_echo "no" >&6; }
22816  fi
22817
22818
22819
22820
22821# Check if pkg-config is available.
22822
22823
22824if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22825	if test -n "$ac_tool_prefix"; then
22826  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22827set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22829$as_echo_n "checking for $ac_word... " >&6; }
22830if ${ac_cv_path_PKG_CONFIG+:} false; then :
22831  $as_echo_n "(cached) " >&6
22832else
22833  case $PKG_CONFIG in
22834  [\\/]* | ?:[\\/]*)
22835  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22836  ;;
22837  *)
22838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22839for as_dir in $PATH
22840do
22841  IFS=$as_save_IFS
22842  test -z "$as_dir" && as_dir=.
22843    for ac_exec_ext in '' $ac_executable_extensions; do
22844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22845    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22847    break 2
22848  fi
22849done
22850  done
22851IFS=$as_save_IFS
22852
22853  ;;
22854esac
22855fi
22856PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22857if test -n "$PKG_CONFIG"; then
22858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22859$as_echo "$PKG_CONFIG" >&6; }
22860else
22861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22862$as_echo "no" >&6; }
22863fi
22864
22865
22866fi
22867if test -z "$ac_cv_path_PKG_CONFIG"; then
22868  ac_pt_PKG_CONFIG=$PKG_CONFIG
22869  # Extract the first word of "pkg-config", so it can be a program name with args.
22870set dummy pkg-config; ac_word=$2
22871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22872$as_echo_n "checking for $ac_word... " >&6; }
22873if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22874  $as_echo_n "(cached) " >&6
22875else
22876  case $ac_pt_PKG_CONFIG in
22877  [\\/]* | ?:[\\/]*)
22878  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22879  ;;
22880  *)
22881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22882for as_dir in $PATH
22883do
22884  IFS=$as_save_IFS
22885  test -z "$as_dir" && as_dir=.
22886    for ac_exec_ext in '' $ac_executable_extensions; do
22887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22888    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22890    break 2
22891  fi
22892done
22893  done
22894IFS=$as_save_IFS
22895
22896  ;;
22897esac
22898fi
22899ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22900if test -n "$ac_pt_PKG_CONFIG"; then
22901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22902$as_echo "$ac_pt_PKG_CONFIG" >&6; }
22903else
22904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22905$as_echo "no" >&6; }
22906fi
22907
22908  if test "x$ac_pt_PKG_CONFIG" = x; then
22909    PKG_CONFIG=""
22910  else
22911    case $cross_compiling:$ac_tool_warned in
22912yes:)
22913{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22914$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22915ac_tool_warned=yes ;;
22916esac
22917    PKG_CONFIG=$ac_pt_PKG_CONFIG
22918  fi
22919else
22920  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22921fi
22922
22923fi
22924if test -n "$PKG_CONFIG"; then
22925	_pkg_min_version=0.9.0
22926	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22927$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22928	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22929		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22930$as_echo "yes" >&6; }
22931	else
22932		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22933$as_echo "no" >&6; }
22934		PKG_CONFIG=""
22935	fi
22936
22937fi
22938
22939# After basic tools have been setup, we can check build os specific details.
22940
22941  ###############################################################################
22942
22943  # Note that this is the build platform OS version!
22944
22945  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
22946  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
22947  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
22948  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
22949
22950
22951
22952
22953
22954###############################################################################
22955#
22956# Determine OpenJDK variants, options and version numbers.
22957#
22958###############################################################################
22959
22960# We need build & target for this.
22961
22962
22963  ###############################################################################
22964  #
22965  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
22966  # We always build headless support.
22967  #
22968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
22969$as_echo_n "checking headful support... " >&6; }
22970  # Check whether --enable-headful was given.
22971if test "${enable_headful+set}" = set; then :
22972  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
22973else
22974  SUPPORT_HEADFUL=yes
22975fi
22976
22977
22978  SUPPORT_HEADLESS=yes
22979  BUILD_HEADLESS="BUILD_HEADLESS:=true"
22980
22981  if test "x$SUPPORT_HEADFUL" = xyes; then
22982    # We are building both headful and headless.
22983    headful_msg="include support for both headful and headless"
22984  fi
22985
22986  if test "x$SUPPORT_HEADFUL" = xno; then
22987    # Thus we are building headless only.
22988    BUILD_HEADLESS="BUILD_HEADLESS:=true"
22989    headful_msg="headless only"
22990  fi
22991
22992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
22993$as_echo "$headful_msg" >&6; }
22994
22995
22996
22997
22998
22999  # Control wether Hotspot runs Queens test after build.
23000  # Check whether --enable-hotspot-test-in-build was given.
23001if test "${enable_hotspot_test_in_build+set}" = set; then :
23002  enableval=$enable_hotspot_test_in_build;
23003else
23004  enable_hotspot_test_in_build=no
23005fi
23006
23007  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23008    TEST_IN_BUILD=true
23009  else
23010    TEST_IN_BUILD=false
23011  fi
23012
23013
23014  ###############################################################################
23015  #
23016  # Choose cacerts source file
23017  #
23018
23019# Check whether --with-cacerts-file was given.
23020if test "${with_cacerts_file+set}" = set; then :
23021  withval=$with_cacerts_file;
23022fi
23023
23024  if test "x$with_cacerts_file" != x; then
23025    CACERTS_FILE=$with_cacerts_file
23026  fi
23027
23028
23029  ###############################################################################
23030  #
23031  # Enable or disable unlimited crypto
23032  #
23033  # Check whether --enable-unlimited-crypto was given.
23034if test "${enable_unlimited_crypto+set}" = set; then :
23035  enableval=$enable_unlimited_crypto;
23036else
23037  enable_unlimited_crypto=no
23038fi
23039
23040  if test "x$enable_unlimited_crypto" = "xyes"; then
23041    UNLIMITED_CRYPTO=true
23042  else
23043    UNLIMITED_CRYPTO=false
23044  fi
23045
23046
23047  ###############################################################################
23048  #
23049  # Enable or disable the elliptic curve crypto implementation
23050  #
23051
23052
23053  ###############################################################################
23054  #
23055  # Compress jars
23056  #
23057  COMPRESS_JARS=false
23058
23059
23060
23061
23062  # Source the version numbers
23063  . $AUTOCONF_DIR/version-numbers
23064
23065  # Get the settings from parameters
23066
23067# Check whether --with-milestone was given.
23068if test "${with_milestone+set}" = set; then :
23069  withval=$with_milestone;
23070fi
23071
23072  if test "x$with_milestone" = xyes; then
23073    as_fn_error $? "Milestone must have a value" "$LINENO" 5
23074  elif test "x$with_milestone" != x; then
23075    MILESTONE="$with_milestone"
23076  fi
23077  if test "x$MILESTONE" = x; then
23078    MILESTONE=internal
23079  fi
23080
23081
23082# Check whether --with-update-version was given.
23083if test "${with_update_version+set}" = set; then :
23084  withval=$with_update_version;
23085fi
23086
23087  if test "x$with_update_version" = xyes; then
23088    as_fn_error $? "Update version must have a value" "$LINENO" 5
23089  elif test "x$with_update_version" != x; then
23090    JDK_UPDATE_VERSION="$with_update_version"
23091    # On macosx 10.7, it's not possible to set --with-update-version=0X due
23092    # to a bug in expr (which reduces it to just X). To work around this, we
23093    # always add a 0 to one digit update versions.
23094    if test "${#JDK_UPDATE_VERSION}" = "1"; then
23095      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
23096    fi
23097  fi
23098
23099
23100# Check whether --with-user-release-suffix was given.
23101if test "${with_user_release_suffix+set}" = set; then :
23102  withval=$with_user_release_suffix;
23103fi
23104
23105  if test "x$with_user_release_suffix" = xyes; then
23106    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
23107  elif test "x$with_user_release_suffix" != x; then
23108    USER_RELEASE_SUFFIX="$with_user_release_suffix"
23109  fi
23110
23111
23112# Check whether --with-build-number was given.
23113if test "${with_build_number+set}" = set; then :
23114  withval=$with_build_number;
23115fi
23116
23117  if test "x$with_build_number" = xyes; then
23118    as_fn_error $? "Build number must have a value" "$LINENO" 5
23119  elif test "x$with_build_number" != x; then
23120    JDK_BUILD_NUMBER="$with_build_number"
23121  fi
23122  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
23123  if test "x$JDK_BUILD_NUMBER" = x; then
23124    JDK_BUILD_NUMBER=b00
23125    if test "x$USER_RELEASE_SUFFIX" = x; then
23126      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
23127      # Avoid [:alnum:] since it depends on the locale.
23128      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
23129      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23130    fi
23131  fi
23132
23133  # Now set the JDK version, milestone, build number etc.
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150# Check whether --with-copyright-year was given.
23151if test "${with_copyright_year+set}" = set; then :
23152  withval=$with_copyright_year;
23153fi
23154
23155  if test "x$with_copyright_year" = xyes; then
23156    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23157  elif test "x$with_copyright_year" != x; then
23158    COPYRIGHT_YEAR="$with_copyright_year"
23159  else
23160    COPYRIGHT_YEAR=`date +'%Y'`
23161  fi
23162
23163
23164  if test "x$JDK_UPDATE_VERSION" != x; then
23165    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
23166  else
23167    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
23168  fi
23169
23170
23171  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
23172
23173
23174
23175###############################################################################
23176#
23177# Setup BootJDK, used to bootstrap the build.
23178#
23179###############################################################################
23180
23181
23182  BOOT_JDK_FOUND=no
23183
23184# Check whether --with-boot-jdk was given.
23185if test "${with_boot_jdk+set}" = set; then :
23186  withval=$with_boot_jdk;
23187fi
23188
23189
23190  # We look for the Boot JDK through various means, going from more certain to
23191  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23192  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23193  # must check if this is indeed valid; otherwise we'll continue looking.
23194
23195  # Test: Is bootjdk explicitely set by command line arguments?
23196
23197  if test "x$BOOT_JDK_FOUND" = xno; then
23198    # Now execute the test
23199
23200  if test "x$with_boot_jdk" != x; then
23201    BOOT_JDK=$with_boot_jdk
23202    BOOT_JDK_FOUND=maybe
23203    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23204$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23205  fi
23206
23207
23208    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23209    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23210      # Do we have a bin/java?
23211      if test ! -x "$BOOT_JDK/bin/java"; then
23212        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23214        BOOT_JDK_FOUND=no
23215      else
23216        # Do we have a bin/javac?
23217        if test ! -x "$BOOT_JDK/bin/javac"; then
23218          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23220          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23221$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23222          BOOT_JDK_FOUND=no
23223        else
23224          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23225          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23226
23227          # Extra M4 quote needed to protect [] in grep expression.
23228          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23229          if test "x$FOUND_CORRECT_VERSION" = x; then
23230            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23232            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23233$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23234            BOOT_JDK_FOUND=no
23235          else
23236            # We're done! :-)
23237            BOOT_JDK_FOUND=yes
23238
23239  # Only process if variable expands to non-empty
23240
23241  if test "x$BOOT_JDK" != x; then
23242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23243
23244  # Input might be given as Windows format, start by converting to
23245  # unix format.
23246  path="$BOOT_JDK"
23247  new_path=`$CYGPATH -u "$path"`
23248
23249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23252  # "foo.exe" is OK but "foo" is an error.
23253  #
23254  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23255  # It is also a way to make sure we got the proper file name for the real test later on.
23256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23257  if test "x$test_shortpath" = x; then
23258    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23259$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23260    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23261  fi
23262
23263  # Call helper function which possibly converts this using DOS-style short mode.
23264  # If so, the updated path is stored in $new_path.
23265
23266  input_path="$new_path"
23267  # Check if we need to convert this using DOS-style short mode. If the path
23268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23269  # take no chances and rewrite it.
23270  # Note: m4 eats our [], so we need to use [ and ] instead.
23271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23272  if test "x$has_forbidden_chars" != x; then
23273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23277      # Going to short mode and back again did indeed matter. Since short mode is
23278      # case insensitive, let's make it lowercase to improve readability.
23279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23280      # Now convert it back to Unix-style (cygpath)
23281      input_path=`$CYGPATH -u "$shortmode_path"`
23282      new_path="$input_path"
23283    fi
23284  fi
23285
23286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23287  if test "x$test_cygdrive_prefix" = x; then
23288    # As a simple fix, exclude /usr/bin since it's not a real path.
23289    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23291      # a path prefixed by /cygdrive for fixpath to work.
23292      new_path="$CYGWIN_ROOT_PATH$input_path"
23293    fi
23294  fi
23295
23296
23297  if test "x$path" != "x$new_path"; then
23298    BOOT_JDK="$new_path"
23299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23300$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23301  fi
23302
23303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23304
23305  path="$BOOT_JDK"
23306  has_colon=`$ECHO $path | $GREP ^.:`
23307  new_path="$path"
23308  if test "x$has_colon" = x; then
23309    # Not in mixed or Windows style, start by that.
23310    new_path=`cmd //c echo $path`
23311  fi
23312
23313
23314  input_path="$new_path"
23315  # Check if we need to convert this using DOS-style short mode. If the path
23316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23317  # take no chances and rewrite it.
23318  # Note: m4 eats our [], so we need to use [ and ] instead.
23319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23320  if test "x$has_forbidden_chars" != x; then
23321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23323  fi
23324
23325
23326  windows_path="$new_path"
23327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23328    unix_path=`$CYGPATH -u "$windows_path"`
23329    new_path="$unix_path"
23330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23332    new_path="$unix_path"
23333  fi
23334
23335  if test "x$path" != "x$new_path"; then
23336    BOOT_JDK="$new_path"
23337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23339  fi
23340
23341  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23342  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23343
23344    else
23345      # We're on a unix platform. Hooray! :)
23346      path="$BOOT_JDK"
23347      has_space=`$ECHO "$path" | $GREP " "`
23348      if test "x$has_space" != x; then
23349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23350$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23351        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23352      fi
23353
23354      # Use eval to expand a potential ~
23355      eval path="$path"
23356      if test ! -f "$path" && test ! -d "$path"; then
23357        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23358      fi
23359
23360      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23361    fi
23362  fi
23363
23364            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23365$as_echo_n "checking for Boot JDK... " >&6; }
23366            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23367$as_echo "$BOOT_JDK" >&6; }
23368            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23369$as_echo_n "checking Boot JDK version... " >&6; }
23370            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23371            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23372$as_echo "$BOOT_JDK_VERSION" >&6; }
23373          fi # end check jdk version
23374        fi # end check javac
23375      fi # end check java
23376    fi # end check boot jdk found
23377  fi
23378
23379  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23380    # Having specified an argument which is incorrect will produce an instant failure;
23381    # we should not go on looking
23382    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23383  fi
23384
23385  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23386
23387  if test "x$BOOT_JDK_FOUND" = xno; then
23388    # Now execute the test
23389
23390  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23391    # First check at user selected default
23392
23393  if test "x$BOOT_JDK_FOUND" = xno; then
23394    # Now execute the test
23395
23396  if test -x /usr/libexec/java_home; then
23397    BOOT_JDK=`/usr/libexec/java_home `
23398    BOOT_JDK_FOUND=maybe
23399    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23400$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23401  fi
23402
23403
23404    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23405    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23406      # Do we have a bin/java?
23407      if test ! -x "$BOOT_JDK/bin/java"; then
23408        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23410        BOOT_JDK_FOUND=no
23411      else
23412        # Do we have a bin/javac?
23413        if test ! -x "$BOOT_JDK/bin/javac"; then
23414          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23416          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23417$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23418          BOOT_JDK_FOUND=no
23419        else
23420          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23421          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23422
23423          # Extra M4 quote needed to protect [] in grep expression.
23424          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23425          if test "x$FOUND_CORRECT_VERSION" = x; then
23426            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23428            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23429$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23430            BOOT_JDK_FOUND=no
23431          else
23432            # We're done! :-)
23433            BOOT_JDK_FOUND=yes
23434
23435  # Only process if variable expands to non-empty
23436
23437  if test "x$BOOT_JDK" != x; then
23438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23439
23440  # Input might be given as Windows format, start by converting to
23441  # unix format.
23442  path="$BOOT_JDK"
23443  new_path=`$CYGPATH -u "$path"`
23444
23445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23448  # "foo.exe" is OK but "foo" is an error.
23449  #
23450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23451  # It is also a way to make sure we got the proper file name for the real test later on.
23452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23453  if test "x$test_shortpath" = x; then
23454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23456    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23457  fi
23458
23459  # Call helper function which possibly converts this using DOS-style short mode.
23460  # If so, the updated path is stored in $new_path.
23461
23462  input_path="$new_path"
23463  # Check if we need to convert this using DOS-style short mode. If the path
23464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23465  # take no chances and rewrite it.
23466  # Note: m4 eats our [], so we need to use [ and ] instead.
23467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23468  if test "x$has_forbidden_chars" != x; then
23469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23473      # Going to short mode and back again did indeed matter. Since short mode is
23474      # case insensitive, let's make it lowercase to improve readability.
23475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23476      # Now convert it back to Unix-style (cygpath)
23477      input_path=`$CYGPATH -u "$shortmode_path"`
23478      new_path="$input_path"
23479    fi
23480  fi
23481
23482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23483  if test "x$test_cygdrive_prefix" = x; then
23484    # As a simple fix, exclude /usr/bin since it's not a real path.
23485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23487      # a path prefixed by /cygdrive for fixpath to work.
23488      new_path="$CYGWIN_ROOT_PATH$input_path"
23489    fi
23490  fi
23491
23492
23493  if test "x$path" != "x$new_path"; then
23494    BOOT_JDK="$new_path"
23495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23497  fi
23498
23499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23500
23501  path="$BOOT_JDK"
23502  has_colon=`$ECHO $path | $GREP ^.:`
23503  new_path="$path"
23504  if test "x$has_colon" = x; then
23505    # Not in mixed or Windows style, start by that.
23506    new_path=`cmd //c echo $path`
23507  fi
23508
23509
23510  input_path="$new_path"
23511  # Check if we need to convert this using DOS-style short mode. If the path
23512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23513  # take no chances and rewrite it.
23514  # Note: m4 eats our [], so we need to use [ and ] instead.
23515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23516  if test "x$has_forbidden_chars" != x; then
23517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23519  fi
23520
23521
23522  windows_path="$new_path"
23523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23524    unix_path=`$CYGPATH -u "$windows_path"`
23525    new_path="$unix_path"
23526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23528    new_path="$unix_path"
23529  fi
23530
23531  if test "x$path" != "x$new_path"; then
23532    BOOT_JDK="$new_path"
23533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23535  fi
23536
23537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23539
23540    else
23541      # We're on a unix platform. Hooray! :)
23542      path="$BOOT_JDK"
23543      has_space=`$ECHO "$path" | $GREP " "`
23544      if test "x$has_space" != x; then
23545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23548      fi
23549
23550      # Use eval to expand a potential ~
23551      eval path="$path"
23552      if test ! -f "$path" && test ! -d "$path"; then
23553        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23554      fi
23555
23556      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23557    fi
23558  fi
23559
23560            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23561$as_echo_n "checking for Boot JDK... " >&6; }
23562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23563$as_echo "$BOOT_JDK" >&6; }
23564            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23565$as_echo_n "checking Boot JDK version... " >&6; }
23566            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23568$as_echo "$BOOT_JDK_VERSION" >&6; }
23569          fi # end check jdk version
23570        fi # end check javac
23571      fi # end check java
23572    fi # end check boot jdk found
23573  fi
23574
23575    # If that did not work out (e.g. too old), try explicit versions instead
23576
23577  if test "x$BOOT_JDK_FOUND" = xno; then
23578    # Now execute the test
23579
23580  if test -x /usr/libexec/java_home; then
23581    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23582    BOOT_JDK_FOUND=maybe
23583    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23584$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23585  fi
23586
23587
23588    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23589    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23590      # Do we have a bin/java?
23591      if test ! -x "$BOOT_JDK/bin/java"; then
23592        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23594        BOOT_JDK_FOUND=no
23595      else
23596        # Do we have a bin/javac?
23597        if test ! -x "$BOOT_JDK/bin/javac"; then
23598          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23600          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23601$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23602          BOOT_JDK_FOUND=no
23603        else
23604          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23605          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23606
23607          # Extra M4 quote needed to protect [] in grep expression.
23608          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23609          if test "x$FOUND_CORRECT_VERSION" = x; then
23610            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23612            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23613$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23614            BOOT_JDK_FOUND=no
23615          else
23616            # We're done! :-)
23617            BOOT_JDK_FOUND=yes
23618
23619  # Only process if variable expands to non-empty
23620
23621  if test "x$BOOT_JDK" != x; then
23622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23623
23624  # Input might be given as Windows format, start by converting to
23625  # unix format.
23626  path="$BOOT_JDK"
23627  new_path=`$CYGPATH -u "$path"`
23628
23629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23632  # "foo.exe" is OK but "foo" is an error.
23633  #
23634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23635  # It is also a way to make sure we got the proper file name for the real test later on.
23636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23637  if test "x$test_shortpath" = x; then
23638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23639$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23640    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23641  fi
23642
23643  # Call helper function which possibly converts this using DOS-style short mode.
23644  # If so, the updated path is stored in $new_path.
23645
23646  input_path="$new_path"
23647  # Check if we need to convert this using DOS-style short mode. If the path
23648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23649  # take no chances and rewrite it.
23650  # Note: m4 eats our [], so we need to use [ and ] instead.
23651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23652  if test "x$has_forbidden_chars" != x; then
23653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23657      # Going to short mode and back again did indeed matter. Since short mode is
23658      # case insensitive, let's make it lowercase to improve readability.
23659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23660      # Now convert it back to Unix-style (cygpath)
23661      input_path=`$CYGPATH -u "$shortmode_path"`
23662      new_path="$input_path"
23663    fi
23664  fi
23665
23666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23667  if test "x$test_cygdrive_prefix" = x; then
23668    # As a simple fix, exclude /usr/bin since it's not a real path.
23669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23671      # a path prefixed by /cygdrive for fixpath to work.
23672      new_path="$CYGWIN_ROOT_PATH$input_path"
23673    fi
23674  fi
23675
23676
23677  if test "x$path" != "x$new_path"; then
23678    BOOT_JDK="$new_path"
23679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23681  fi
23682
23683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23684
23685  path="$BOOT_JDK"
23686  has_colon=`$ECHO $path | $GREP ^.:`
23687  new_path="$path"
23688  if test "x$has_colon" = x; then
23689    # Not in mixed or Windows style, start by that.
23690    new_path=`cmd //c echo $path`
23691  fi
23692
23693
23694  input_path="$new_path"
23695  # Check if we need to convert this using DOS-style short mode. If the path
23696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23697  # take no chances and rewrite it.
23698  # Note: m4 eats our [], so we need to use [ and ] instead.
23699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23700  if test "x$has_forbidden_chars" != x; then
23701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23703  fi
23704
23705
23706  windows_path="$new_path"
23707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23708    unix_path=`$CYGPATH -u "$windows_path"`
23709    new_path="$unix_path"
23710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23712    new_path="$unix_path"
23713  fi
23714
23715  if test "x$path" != "x$new_path"; then
23716    BOOT_JDK="$new_path"
23717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23719  fi
23720
23721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23723
23724    else
23725      # We're on a unix platform. Hooray! :)
23726      path="$BOOT_JDK"
23727      has_space=`$ECHO "$path" | $GREP " "`
23728      if test "x$has_space" != x; then
23729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23731        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23732      fi
23733
23734      # Use eval to expand a potential ~
23735      eval path="$path"
23736      if test ! -f "$path" && test ! -d "$path"; then
23737        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23738      fi
23739
23740      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23741    fi
23742  fi
23743
23744            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23745$as_echo_n "checking for Boot JDK... " >&6; }
23746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23747$as_echo "$BOOT_JDK" >&6; }
23748            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23749$as_echo_n "checking Boot JDK version... " >&6; }
23750            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23752$as_echo "$BOOT_JDK_VERSION" >&6; }
23753          fi # end check jdk version
23754        fi # end check javac
23755      fi # end check java
23756    fi # end check boot jdk found
23757  fi
23758
23759
23760  if test "x$BOOT_JDK_FOUND" = xno; then
23761    # Now execute the test
23762
23763  if test -x /usr/libexec/java_home; then
23764    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
23765    BOOT_JDK_FOUND=maybe
23766    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
23767$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
23768  fi
23769
23770
23771    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23772    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23773      # Do we have a bin/java?
23774      if test ! -x "$BOOT_JDK/bin/java"; then
23775        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23777        BOOT_JDK_FOUND=no
23778      else
23779        # Do we have a bin/javac?
23780        if test ! -x "$BOOT_JDK/bin/javac"; then
23781          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23783          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23784$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23785          BOOT_JDK_FOUND=no
23786        else
23787          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23788          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23789
23790          # Extra M4 quote needed to protect [] in grep expression.
23791          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23792          if test "x$FOUND_CORRECT_VERSION" = x; then
23793            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23795            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23796$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23797            BOOT_JDK_FOUND=no
23798          else
23799            # We're done! :-)
23800            BOOT_JDK_FOUND=yes
23801
23802  # Only process if variable expands to non-empty
23803
23804  if test "x$BOOT_JDK" != x; then
23805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23806
23807  # Input might be given as Windows format, start by converting to
23808  # unix format.
23809  path="$BOOT_JDK"
23810  new_path=`$CYGPATH -u "$path"`
23811
23812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23815  # "foo.exe" is OK but "foo" is an error.
23816  #
23817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23818  # It is also a way to make sure we got the proper file name for the real test later on.
23819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23820  if test "x$test_shortpath" = x; then
23821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23823    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23824  fi
23825
23826  # Call helper function which possibly converts this using DOS-style short mode.
23827  # If so, the updated path is stored in $new_path.
23828
23829  input_path="$new_path"
23830  # Check if we need to convert this using DOS-style short mode. If the path
23831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23832  # take no chances and rewrite it.
23833  # Note: m4 eats our [], so we need to use [ and ] instead.
23834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23835  if test "x$has_forbidden_chars" != x; then
23836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23840      # Going to short mode and back again did indeed matter. Since short mode is
23841      # case insensitive, let's make it lowercase to improve readability.
23842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23843      # Now convert it back to Unix-style (cygpath)
23844      input_path=`$CYGPATH -u "$shortmode_path"`
23845      new_path="$input_path"
23846    fi
23847  fi
23848
23849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23850  if test "x$test_cygdrive_prefix" = x; then
23851    # As a simple fix, exclude /usr/bin since it's not a real path.
23852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23854      # a path prefixed by /cygdrive for fixpath to work.
23855      new_path="$CYGWIN_ROOT_PATH$input_path"
23856    fi
23857  fi
23858
23859
23860  if test "x$path" != "x$new_path"; then
23861    BOOT_JDK="$new_path"
23862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23864  fi
23865
23866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23867
23868  path="$BOOT_JDK"
23869  has_colon=`$ECHO $path | $GREP ^.:`
23870  new_path="$path"
23871  if test "x$has_colon" = x; then
23872    # Not in mixed or Windows style, start by that.
23873    new_path=`cmd //c echo $path`
23874  fi
23875
23876
23877  input_path="$new_path"
23878  # Check if we need to convert this using DOS-style short mode. If the path
23879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23880  # take no chances and rewrite it.
23881  # Note: m4 eats our [], so we need to use [ and ] instead.
23882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23883  if test "x$has_forbidden_chars" != x; then
23884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23886  fi
23887
23888
23889  windows_path="$new_path"
23890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23891    unix_path=`$CYGPATH -u "$windows_path"`
23892    new_path="$unix_path"
23893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23895    new_path="$unix_path"
23896  fi
23897
23898  if test "x$path" != "x$new_path"; then
23899    BOOT_JDK="$new_path"
23900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23901$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23902  fi
23903
23904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23906
23907    else
23908      # We're on a unix platform. Hooray! :)
23909      path="$BOOT_JDK"
23910      has_space=`$ECHO "$path" | $GREP " "`
23911      if test "x$has_space" != x; then
23912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23913$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23914        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23915      fi
23916
23917      # Use eval to expand a potential ~
23918      eval path="$path"
23919      if test ! -f "$path" && test ! -d "$path"; then
23920        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23921      fi
23922
23923      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23924    fi
23925  fi
23926
23927            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23928$as_echo_n "checking for Boot JDK... " >&6; }
23929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23930$as_echo "$BOOT_JDK" >&6; }
23931            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23932$as_echo_n "checking Boot JDK version... " >&6; }
23933            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23935$as_echo "$BOOT_JDK_VERSION" >&6; }
23936          fi # end check jdk version
23937        fi # end check javac
23938      fi # end check java
23939    fi # end check boot jdk found
23940  fi
23941
23942
23943  if test "x$BOOT_JDK_FOUND" = xno; then
23944    # Now execute the test
23945
23946  if test -x /usr/libexec/java_home; then
23947    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
23948    BOOT_JDK_FOUND=maybe
23949    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
23950$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
23951  fi
23952
23953
23954    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23955    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23956      # Do we have a bin/java?
23957      if test ! -x "$BOOT_JDK/bin/java"; then
23958        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23960        BOOT_JDK_FOUND=no
23961      else
23962        # Do we have a bin/javac?
23963        if test ! -x "$BOOT_JDK/bin/javac"; then
23964          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23966          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23967$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23968          BOOT_JDK_FOUND=no
23969        else
23970          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23971          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23972
23973          # Extra M4 quote needed to protect [] in grep expression.
23974          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23975          if test "x$FOUND_CORRECT_VERSION" = x; then
23976            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23978            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23979$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23980            BOOT_JDK_FOUND=no
23981          else
23982            # We're done! :-)
23983            BOOT_JDK_FOUND=yes
23984
23985  # Only process if variable expands to non-empty
23986
23987  if test "x$BOOT_JDK" != x; then
23988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23989
23990  # Input might be given as Windows format, start by converting to
23991  # unix format.
23992  path="$BOOT_JDK"
23993  new_path=`$CYGPATH -u "$path"`
23994
23995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23998  # "foo.exe" is OK but "foo" is an error.
23999  #
24000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24001  # It is also a way to make sure we got the proper file name for the real test later on.
24002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24003  if test "x$test_shortpath" = x; then
24004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24005$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24006    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24007  fi
24008
24009  # Call helper function which possibly converts this using DOS-style short mode.
24010  # If so, the updated path is stored in $new_path.
24011
24012  input_path="$new_path"
24013  # Check if we need to convert this using DOS-style short mode. If the path
24014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24015  # take no chances and rewrite it.
24016  # Note: m4 eats our [], so we need to use [ and ] instead.
24017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24018  if test "x$has_forbidden_chars" != x; then
24019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24023      # Going to short mode and back again did indeed matter. Since short mode is
24024      # case insensitive, let's make it lowercase to improve readability.
24025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24026      # Now convert it back to Unix-style (cygpath)
24027      input_path=`$CYGPATH -u "$shortmode_path"`
24028      new_path="$input_path"
24029    fi
24030  fi
24031
24032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24033  if test "x$test_cygdrive_prefix" = x; then
24034    # As a simple fix, exclude /usr/bin since it's not a real path.
24035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24037      # a path prefixed by /cygdrive for fixpath to work.
24038      new_path="$CYGWIN_ROOT_PATH$input_path"
24039    fi
24040  fi
24041
24042
24043  if test "x$path" != "x$new_path"; then
24044    BOOT_JDK="$new_path"
24045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24046$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24047  fi
24048
24049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24050
24051  path="$BOOT_JDK"
24052  has_colon=`$ECHO $path | $GREP ^.:`
24053  new_path="$path"
24054  if test "x$has_colon" = x; then
24055    # Not in mixed or Windows style, start by that.
24056    new_path=`cmd //c echo $path`
24057  fi
24058
24059
24060  input_path="$new_path"
24061  # Check if we need to convert this using DOS-style short mode. If the path
24062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24063  # take no chances and rewrite it.
24064  # Note: m4 eats our [], so we need to use [ and ] instead.
24065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24066  if test "x$has_forbidden_chars" != x; then
24067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24069  fi
24070
24071
24072  windows_path="$new_path"
24073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24074    unix_path=`$CYGPATH -u "$windows_path"`
24075    new_path="$unix_path"
24076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24078    new_path="$unix_path"
24079  fi
24080
24081  if test "x$path" != "x$new_path"; then
24082    BOOT_JDK="$new_path"
24083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24084$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24085  fi
24086
24087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24089
24090    else
24091      # We're on a unix platform. Hooray! :)
24092      path="$BOOT_JDK"
24093      has_space=`$ECHO "$path" | $GREP " "`
24094      if test "x$has_space" != x; then
24095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24097        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24098      fi
24099
24100      # Use eval to expand a potential ~
24101      eval path="$path"
24102      if test ! -f "$path" && test ! -d "$path"; then
24103        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24104      fi
24105
24106      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24107    fi
24108  fi
24109
24110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24111$as_echo_n "checking for Boot JDK... " >&6; }
24112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24113$as_echo "$BOOT_JDK" >&6; }
24114            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24115$as_echo_n "checking Boot JDK version... " >&6; }
24116            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24118$as_echo "$BOOT_JDK_VERSION" >&6; }
24119          fi # end check jdk version
24120        fi # end check javac
24121      fi # end check java
24122    fi # end check boot jdk found
24123  fi
24124
24125  fi
24126
24127
24128    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24129    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24130      # Do we have a bin/java?
24131      if test ! -x "$BOOT_JDK/bin/java"; then
24132        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24134        BOOT_JDK_FOUND=no
24135      else
24136        # Do we have a bin/javac?
24137        if test ! -x "$BOOT_JDK/bin/javac"; then
24138          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24140          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24141$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24142          BOOT_JDK_FOUND=no
24143        else
24144          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24145          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24146
24147          # Extra M4 quote needed to protect [] in grep expression.
24148          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24149          if test "x$FOUND_CORRECT_VERSION" = x; then
24150            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24152            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24153$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24154            BOOT_JDK_FOUND=no
24155          else
24156            # We're done! :-)
24157            BOOT_JDK_FOUND=yes
24158
24159  # Only process if variable expands to non-empty
24160
24161  if test "x$BOOT_JDK" != x; then
24162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24163
24164  # Input might be given as Windows format, start by converting to
24165  # unix format.
24166  path="$BOOT_JDK"
24167  new_path=`$CYGPATH -u "$path"`
24168
24169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24172  # "foo.exe" is OK but "foo" is an error.
24173  #
24174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24175  # It is also a way to make sure we got the proper file name for the real test later on.
24176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24177  if test "x$test_shortpath" = x; then
24178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24179$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24180    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24181  fi
24182
24183  # Call helper function which possibly converts this using DOS-style short mode.
24184  # If so, the updated path is stored in $new_path.
24185
24186  input_path="$new_path"
24187  # Check if we need to convert this using DOS-style short mode. If the path
24188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24189  # take no chances and rewrite it.
24190  # Note: m4 eats our [], so we need to use [ and ] instead.
24191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24192  if test "x$has_forbidden_chars" != x; then
24193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24197      # Going to short mode and back again did indeed matter. Since short mode is
24198      # case insensitive, let's make it lowercase to improve readability.
24199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24200      # Now convert it back to Unix-style (cygpath)
24201      input_path=`$CYGPATH -u "$shortmode_path"`
24202      new_path="$input_path"
24203    fi
24204  fi
24205
24206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24207  if test "x$test_cygdrive_prefix" = x; then
24208    # As a simple fix, exclude /usr/bin since it's not a real path.
24209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24211      # a path prefixed by /cygdrive for fixpath to work.
24212      new_path="$CYGWIN_ROOT_PATH$input_path"
24213    fi
24214  fi
24215
24216
24217  if test "x$path" != "x$new_path"; then
24218    BOOT_JDK="$new_path"
24219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24220$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24221  fi
24222
24223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24224
24225  path="$BOOT_JDK"
24226  has_colon=`$ECHO $path | $GREP ^.:`
24227  new_path="$path"
24228  if test "x$has_colon" = x; then
24229    # Not in mixed or Windows style, start by that.
24230    new_path=`cmd //c echo $path`
24231  fi
24232
24233
24234  input_path="$new_path"
24235  # Check if we need to convert this using DOS-style short mode. If the path
24236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24237  # take no chances and rewrite it.
24238  # Note: m4 eats our [], so we need to use [ and ] instead.
24239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24240  if test "x$has_forbidden_chars" != x; then
24241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24243  fi
24244
24245
24246  windows_path="$new_path"
24247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24248    unix_path=`$CYGPATH -u "$windows_path"`
24249    new_path="$unix_path"
24250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24252    new_path="$unix_path"
24253  fi
24254
24255  if test "x$path" != "x$new_path"; then
24256    BOOT_JDK="$new_path"
24257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24258$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24259  fi
24260
24261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24263
24264    else
24265      # We're on a unix platform. Hooray! :)
24266      path="$BOOT_JDK"
24267      has_space=`$ECHO "$path" | $GREP " "`
24268      if test "x$has_space" != x; then
24269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24270$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24271        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24272      fi
24273
24274      # Use eval to expand a potential ~
24275      eval path="$path"
24276      if test ! -f "$path" && test ! -d "$path"; then
24277        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24278      fi
24279
24280      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24281    fi
24282  fi
24283
24284            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24285$as_echo_n "checking for Boot JDK... " >&6; }
24286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24287$as_echo "$BOOT_JDK" >&6; }
24288            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24289$as_echo_n "checking Boot JDK version... " >&6; }
24290            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24292$as_echo "$BOOT_JDK_VERSION" >&6; }
24293          fi # end check jdk version
24294        fi # end check javac
24295      fi # end check java
24296    fi # end check boot jdk found
24297  fi
24298
24299
24300  # Test: Is $JAVA_HOME set?
24301
24302  if test "x$BOOT_JDK_FOUND" = xno; then
24303    # Now execute the test
24304
24305  if test "x$JAVA_HOME" != x; then
24306    JAVA_HOME_PROCESSED="$JAVA_HOME"
24307
24308  # Only process if variable expands to non-empty
24309
24310  if test "x$JAVA_HOME_PROCESSED" != x; then
24311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24312
24313  # Input might be given as Windows format, start by converting to
24314  # unix format.
24315  path="$JAVA_HOME_PROCESSED"
24316  new_path=`$CYGPATH -u "$path"`
24317
24318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24321  # "foo.exe" is OK but "foo" is an error.
24322  #
24323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24324  # It is also a way to make sure we got the proper file name for the real test later on.
24325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24326  if test "x$test_shortpath" = x; then
24327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24328$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24329    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24330  fi
24331
24332  # Call helper function which possibly converts this using DOS-style short mode.
24333  # If so, the updated path is stored in $new_path.
24334
24335  input_path="$new_path"
24336  # Check if we need to convert this using DOS-style short mode. If the path
24337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24338  # take no chances and rewrite it.
24339  # Note: m4 eats our [], so we need to use [ and ] instead.
24340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24341  if test "x$has_forbidden_chars" != x; then
24342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24346      # Going to short mode and back again did indeed matter. Since short mode is
24347      # case insensitive, let's make it lowercase to improve readability.
24348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24349      # Now convert it back to Unix-style (cygpath)
24350      input_path=`$CYGPATH -u "$shortmode_path"`
24351      new_path="$input_path"
24352    fi
24353  fi
24354
24355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24356  if test "x$test_cygdrive_prefix" = x; then
24357    # As a simple fix, exclude /usr/bin since it's not a real path.
24358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24360      # a path prefixed by /cygdrive for fixpath to work.
24361      new_path="$CYGWIN_ROOT_PATH$input_path"
24362    fi
24363  fi
24364
24365
24366  if test "x$path" != "x$new_path"; then
24367    JAVA_HOME_PROCESSED="$new_path"
24368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24369$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24370  fi
24371
24372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24373
24374  path="$JAVA_HOME_PROCESSED"
24375  has_colon=`$ECHO $path | $GREP ^.:`
24376  new_path="$path"
24377  if test "x$has_colon" = x; then
24378    # Not in mixed or Windows style, start by that.
24379    new_path=`cmd //c echo $path`
24380  fi
24381
24382
24383  input_path="$new_path"
24384  # Check if we need to convert this using DOS-style short mode. If the path
24385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24386  # take no chances and rewrite it.
24387  # Note: m4 eats our [], so we need to use [ and ] instead.
24388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24389  if test "x$has_forbidden_chars" != x; then
24390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24392  fi
24393
24394
24395  windows_path="$new_path"
24396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24397    unix_path=`$CYGPATH -u "$windows_path"`
24398    new_path="$unix_path"
24399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24401    new_path="$unix_path"
24402  fi
24403
24404  if test "x$path" != "x$new_path"; then
24405    JAVA_HOME_PROCESSED="$new_path"
24406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24407$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24408  fi
24409
24410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24412
24413    else
24414      # We're on a unix platform. Hooray! :)
24415      path="$JAVA_HOME_PROCESSED"
24416      has_space=`$ECHO "$path" | $GREP " "`
24417      if test "x$has_space" != x; then
24418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24419$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24420        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24421      fi
24422
24423      # Use eval to expand a potential ~
24424      eval path="$path"
24425      if test ! -f "$path" && test ! -d "$path"; then
24426        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24427      fi
24428
24429      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24430    fi
24431  fi
24432
24433    if test ! -d "$JAVA_HOME_PROCESSED"; then
24434      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24435$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24436    else
24437      # Aha, the user has set a JAVA_HOME
24438      # let us use that as the Boot JDK.
24439      BOOT_JDK="$JAVA_HOME_PROCESSED"
24440      BOOT_JDK_FOUND=maybe
24441      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24442$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24443    fi
24444  fi
24445
24446
24447    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24448    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24449      # Do we have a bin/java?
24450      if test ! -x "$BOOT_JDK/bin/java"; then
24451        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24453        BOOT_JDK_FOUND=no
24454      else
24455        # Do we have a bin/javac?
24456        if test ! -x "$BOOT_JDK/bin/javac"; then
24457          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24459          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24460$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24461          BOOT_JDK_FOUND=no
24462        else
24463          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24464          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24465
24466          # Extra M4 quote needed to protect [] in grep expression.
24467          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24468          if test "x$FOUND_CORRECT_VERSION" = x; then
24469            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24471            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24472$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24473            BOOT_JDK_FOUND=no
24474          else
24475            # We're done! :-)
24476            BOOT_JDK_FOUND=yes
24477
24478  # Only process if variable expands to non-empty
24479
24480  if test "x$BOOT_JDK" != x; then
24481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24482
24483  # Input might be given as Windows format, start by converting to
24484  # unix format.
24485  path="$BOOT_JDK"
24486  new_path=`$CYGPATH -u "$path"`
24487
24488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24491  # "foo.exe" is OK but "foo" is an error.
24492  #
24493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24494  # It is also a way to make sure we got the proper file name for the real test later on.
24495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24496  if test "x$test_shortpath" = x; then
24497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24499    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24500  fi
24501
24502  # Call helper function which possibly converts this using DOS-style short mode.
24503  # If so, the updated path is stored in $new_path.
24504
24505  input_path="$new_path"
24506  # Check if we need to convert this using DOS-style short mode. If the path
24507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24508  # take no chances and rewrite it.
24509  # Note: m4 eats our [], so we need to use [ and ] instead.
24510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24511  if test "x$has_forbidden_chars" != x; then
24512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24516      # Going to short mode and back again did indeed matter. Since short mode is
24517      # case insensitive, let's make it lowercase to improve readability.
24518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24519      # Now convert it back to Unix-style (cygpath)
24520      input_path=`$CYGPATH -u "$shortmode_path"`
24521      new_path="$input_path"
24522    fi
24523  fi
24524
24525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24526  if test "x$test_cygdrive_prefix" = x; then
24527    # As a simple fix, exclude /usr/bin since it's not a real path.
24528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24530      # a path prefixed by /cygdrive for fixpath to work.
24531      new_path="$CYGWIN_ROOT_PATH$input_path"
24532    fi
24533  fi
24534
24535
24536  if test "x$path" != "x$new_path"; then
24537    BOOT_JDK="$new_path"
24538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24540  fi
24541
24542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24543
24544  path="$BOOT_JDK"
24545  has_colon=`$ECHO $path | $GREP ^.:`
24546  new_path="$path"
24547  if test "x$has_colon" = x; then
24548    # Not in mixed or Windows style, start by that.
24549    new_path=`cmd //c echo $path`
24550  fi
24551
24552
24553  input_path="$new_path"
24554  # Check if we need to convert this using DOS-style short mode. If the path
24555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24556  # take no chances and rewrite it.
24557  # Note: m4 eats our [], so we need to use [ and ] instead.
24558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24559  if test "x$has_forbidden_chars" != x; then
24560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24562  fi
24563
24564
24565  windows_path="$new_path"
24566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24567    unix_path=`$CYGPATH -u "$windows_path"`
24568    new_path="$unix_path"
24569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24571    new_path="$unix_path"
24572  fi
24573
24574  if test "x$path" != "x$new_path"; then
24575    BOOT_JDK="$new_path"
24576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24577$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24578  fi
24579
24580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24582
24583    else
24584      # We're on a unix platform. Hooray! :)
24585      path="$BOOT_JDK"
24586      has_space=`$ECHO "$path" | $GREP " "`
24587      if test "x$has_space" != x; then
24588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24589$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24590        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24591      fi
24592
24593      # Use eval to expand a potential ~
24594      eval path="$path"
24595      if test ! -f "$path" && test ! -d "$path"; then
24596        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24597      fi
24598
24599      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24600    fi
24601  fi
24602
24603            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24604$as_echo_n "checking for Boot JDK... " >&6; }
24605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24606$as_echo "$BOOT_JDK" >&6; }
24607            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24608$as_echo_n "checking Boot JDK version... " >&6; }
24609            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24610            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24611$as_echo "$BOOT_JDK_VERSION" >&6; }
24612          fi # end check jdk version
24613        fi # end check javac
24614      fi # end check java
24615    fi # end check boot jdk found
24616  fi
24617
24618
24619  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
24620
24621  if test "x$BOOT_JDK_FOUND" = xno; then
24622    # Now execute the test
24623
24624  # Extract the first word of "javac", so it can be a program name with args.
24625set dummy javac; ac_word=$2
24626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24627$as_echo_n "checking for $ac_word... " >&6; }
24628if ${ac_cv_path_JAVAC_CHECK+:} false; then :
24629  $as_echo_n "(cached) " >&6
24630else
24631  case $JAVAC_CHECK in
24632  [\\/]* | ?:[\\/]*)
24633  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
24634  ;;
24635  *)
24636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24637for as_dir in $PATH
24638do
24639  IFS=$as_save_IFS
24640  test -z "$as_dir" && as_dir=.
24641    for ac_exec_ext in '' $ac_executable_extensions; do
24642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24643    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
24644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24645    break 2
24646  fi
24647done
24648  done
24649IFS=$as_save_IFS
24650
24651  ;;
24652esac
24653fi
24654JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
24655if test -n "$JAVAC_CHECK"; then
24656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
24657$as_echo "$JAVAC_CHECK" >&6; }
24658else
24659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24660$as_echo "no" >&6; }
24661fi
24662
24663
24664  # Extract the first word of "java", so it can be a program name with args.
24665set dummy java; ac_word=$2
24666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24667$as_echo_n "checking for $ac_word... " >&6; }
24668if ${ac_cv_path_JAVA_CHECK+:} false; then :
24669  $as_echo_n "(cached) " >&6
24670else
24671  case $JAVA_CHECK in
24672  [\\/]* | ?:[\\/]*)
24673  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
24674  ;;
24675  *)
24676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24677for as_dir in $PATH
24678do
24679  IFS=$as_save_IFS
24680  test -z "$as_dir" && as_dir=.
24681    for ac_exec_ext in '' $ac_executable_extensions; do
24682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24683    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
24684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24685    break 2
24686  fi
24687done
24688  done
24689IFS=$as_save_IFS
24690
24691  ;;
24692esac
24693fi
24694JAVA_CHECK=$ac_cv_path_JAVA_CHECK
24695if test -n "$JAVA_CHECK"; then
24696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
24697$as_echo "$JAVA_CHECK" >&6; }
24698else
24699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24700$as_echo "no" >&6; }
24701fi
24702
24703
24704  BINARY="$JAVAC_CHECK"
24705  if test "x$JAVAC_CHECK" = x; then
24706    BINARY="$JAVA_CHECK"
24707  fi
24708  if test "x$BINARY" != x; then
24709    # So there is a java(c) binary, it might be part of a JDK.
24710    # Lets find the JDK/JRE directory by following symbolic links.
24711    # Linux/GNU systems often have links from /usr/bin/java to
24712    # /etc/alternatives/java to the real JDK binary.
24713
24714  if test "x$OPENJDK_BUILD_OS" != xwindows; then
24715    # Follow a chain of symbolic links. Use readlink
24716    # where it exists, else fall back to horribly
24717    # complicated shell code.
24718    if test "x$READLINK_TESTED" != yes; then
24719      # On MacOSX there is a readlink tool with a different
24720      # purpose than the GNU readlink tool. Check the found readlink.
24721      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
24722      if test "x$ISGNU" = x; then
24723        # A readlink that we do not know how to use.
24724        # Are there other non-GNU readlinks out there?
24725        READLINK_TESTED=yes
24726        READLINK=
24727      fi
24728    fi
24729
24730    if test "x$READLINK" != x; then
24731      BINARY=`$READLINK -f $BINARY`
24732    else
24733      # Save the current directory for restoring afterwards
24734      STARTDIR=$PWD
24735      COUNTER=0
24736      sym_link_dir=`$DIRNAME $BINARY`
24737      sym_link_file=`$BASENAME $BINARY`
24738      cd $sym_link_dir
24739      # Use -P flag to resolve symlinks in directories.
24740      cd `$THEPWDCMD -P`
24741      sym_link_dir=`$THEPWDCMD -P`
24742      # Resolve file symlinks
24743      while test $COUNTER -lt 20; do
24744        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
24745        if test "x$ISLINK" == x; then
24746          # This is not a symbolic link! We are done!
24747          break
24748        fi
24749        # Again resolve directory symlinks since the target of the just found
24750        # link could be in a different directory
24751        cd `$DIRNAME $ISLINK`
24752        sym_link_dir=`$THEPWDCMD -P`
24753        sym_link_file=`$BASENAME $ISLINK`
24754        let COUNTER=COUNTER+1
24755      done
24756      cd $STARTDIR
24757      BINARY=$sym_link_dir/$sym_link_file
24758    fi
24759  fi
24760
24761    BOOT_JDK=`dirname "$BINARY"`
24762    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
24763    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
24764      # Looks like we found ourselves an JDK
24765      BOOT_JDK_FOUND=maybe
24766      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
24767$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
24768    fi
24769  fi
24770
24771
24772    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24773    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24774      # Do we have a bin/java?
24775      if test ! -x "$BOOT_JDK/bin/java"; then
24776        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24778        BOOT_JDK_FOUND=no
24779      else
24780        # Do we have a bin/javac?
24781        if test ! -x "$BOOT_JDK/bin/javac"; then
24782          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24784          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24785$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24786          BOOT_JDK_FOUND=no
24787        else
24788          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24789          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24790
24791          # Extra M4 quote needed to protect [] in grep expression.
24792          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24793          if test "x$FOUND_CORRECT_VERSION" = x; then
24794            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24796            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24797$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24798            BOOT_JDK_FOUND=no
24799          else
24800            # We're done! :-)
24801            BOOT_JDK_FOUND=yes
24802
24803  # Only process if variable expands to non-empty
24804
24805  if test "x$BOOT_JDK" != x; then
24806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24807
24808  # Input might be given as Windows format, start by converting to
24809  # unix format.
24810  path="$BOOT_JDK"
24811  new_path=`$CYGPATH -u "$path"`
24812
24813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24816  # "foo.exe" is OK but "foo" is an error.
24817  #
24818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24819  # It is also a way to make sure we got the proper file name for the real test later on.
24820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24821  if test "x$test_shortpath" = x; then
24822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24824    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24825  fi
24826
24827  # Call helper function which possibly converts this using DOS-style short mode.
24828  # If so, the updated path is stored in $new_path.
24829
24830  input_path="$new_path"
24831  # Check if we need to convert this using DOS-style short mode. If the path
24832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24833  # take no chances and rewrite it.
24834  # Note: m4 eats our [], so we need to use [ and ] instead.
24835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24836  if test "x$has_forbidden_chars" != x; then
24837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24841      # Going to short mode and back again did indeed matter. Since short mode is
24842      # case insensitive, let's make it lowercase to improve readability.
24843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24844      # Now convert it back to Unix-style (cygpath)
24845      input_path=`$CYGPATH -u "$shortmode_path"`
24846      new_path="$input_path"
24847    fi
24848  fi
24849
24850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24851  if test "x$test_cygdrive_prefix" = x; then
24852    # As a simple fix, exclude /usr/bin since it's not a real path.
24853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24855      # a path prefixed by /cygdrive for fixpath to work.
24856      new_path="$CYGWIN_ROOT_PATH$input_path"
24857    fi
24858  fi
24859
24860
24861  if test "x$path" != "x$new_path"; then
24862    BOOT_JDK="$new_path"
24863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24865  fi
24866
24867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24868
24869  path="$BOOT_JDK"
24870  has_colon=`$ECHO $path | $GREP ^.:`
24871  new_path="$path"
24872  if test "x$has_colon" = x; then
24873    # Not in mixed or Windows style, start by that.
24874    new_path=`cmd //c echo $path`
24875  fi
24876
24877
24878  input_path="$new_path"
24879  # Check if we need to convert this using DOS-style short mode. If the path
24880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24881  # take no chances and rewrite it.
24882  # Note: m4 eats our [], so we need to use [ and ] instead.
24883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24884  if test "x$has_forbidden_chars" != x; then
24885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24887  fi
24888
24889
24890  windows_path="$new_path"
24891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24892    unix_path=`$CYGPATH -u "$windows_path"`
24893    new_path="$unix_path"
24894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24896    new_path="$unix_path"
24897  fi
24898
24899  if test "x$path" != "x$new_path"; then
24900    BOOT_JDK="$new_path"
24901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24903  fi
24904
24905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24907
24908    else
24909      # We're on a unix platform. Hooray! :)
24910      path="$BOOT_JDK"
24911      has_space=`$ECHO "$path" | $GREP " "`
24912      if test "x$has_space" != x; then
24913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24914$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24915        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24916      fi
24917
24918      # Use eval to expand a potential ~
24919      eval path="$path"
24920      if test ! -f "$path" && test ! -d "$path"; then
24921        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24922      fi
24923
24924      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24925    fi
24926  fi
24927
24928            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24929$as_echo_n "checking for Boot JDK... " >&6; }
24930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24931$as_echo "$BOOT_JDK" >&6; }
24932            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24933$as_echo_n "checking Boot JDK version... " >&6; }
24934            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24936$as_echo "$BOOT_JDK_VERSION" >&6; }
24937          fi # end check jdk version
24938        fi # end check javac
24939      fi # end check java
24940    fi # end check boot jdk found
24941  fi
24942
24943
24944  # Test: Is there a JDK installed in default, well-known locations?
24945
24946  if test "x$BOOT_JDK_FOUND" = xno; then
24947    # Now execute the test
24948
24949  if test "x$OPENJDK_TARGET_OS" = xwindows; then
24950
24951  if test "x$BOOT_JDK_FOUND" = xno; then
24952    # Now execute the test
24953
24954  if test "x$ProgramW6432" != x; then
24955    VIRTUAL_DIR="$ProgramW6432/Java"
24956
24957  windows_path="$VIRTUAL_DIR"
24958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24959    unix_path=`$CYGPATH -u "$windows_path"`
24960    VIRTUAL_DIR="$unix_path"
24961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24963    VIRTUAL_DIR="$unix_path"
24964  fi
24965
24966
24967  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24968  BOOT_JDK_SUFFIX=""
24969  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24970  if test "x$ALL_JDKS_FOUND" != x; then
24971    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24972
24973  if test "x$BOOT_JDK_FOUND" = xno; then
24974    # Now execute the test
24975
24976        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24977        if test -d "$BOOT_JDK"; then
24978          BOOT_JDK_FOUND=maybe
24979          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24980$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24981        fi
24982
24983
24984    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24985    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24986      # Do we have a bin/java?
24987      if test ! -x "$BOOT_JDK/bin/java"; then
24988        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24990        BOOT_JDK_FOUND=no
24991      else
24992        # Do we have a bin/javac?
24993        if test ! -x "$BOOT_JDK/bin/javac"; then
24994          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24996          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24997$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24998          BOOT_JDK_FOUND=no
24999        else
25000          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25001          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25002
25003          # Extra M4 quote needed to protect [] in grep expression.
25004          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25005          if test "x$FOUND_CORRECT_VERSION" = x; then
25006            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25008            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25009$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25010            BOOT_JDK_FOUND=no
25011          else
25012            # We're done! :-)
25013            BOOT_JDK_FOUND=yes
25014
25015  # Only process if variable expands to non-empty
25016
25017  if test "x$BOOT_JDK" != x; then
25018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25019
25020  # Input might be given as Windows format, start by converting to
25021  # unix format.
25022  path="$BOOT_JDK"
25023  new_path=`$CYGPATH -u "$path"`
25024
25025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25028  # "foo.exe" is OK but "foo" is an error.
25029  #
25030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25031  # It is also a way to make sure we got the proper file name for the real test later on.
25032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25033  if test "x$test_shortpath" = x; then
25034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25036    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25037  fi
25038
25039  # Call helper function which possibly converts this using DOS-style short mode.
25040  # If so, the updated path is stored in $new_path.
25041
25042  input_path="$new_path"
25043  # Check if we need to convert this using DOS-style short mode. If the path
25044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25045  # take no chances and rewrite it.
25046  # Note: m4 eats our [], so we need to use [ and ] instead.
25047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25048  if test "x$has_forbidden_chars" != x; then
25049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25053      # Going to short mode and back again did indeed matter. Since short mode is
25054      # case insensitive, let's make it lowercase to improve readability.
25055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25056      # Now convert it back to Unix-style (cygpath)
25057      input_path=`$CYGPATH -u "$shortmode_path"`
25058      new_path="$input_path"
25059    fi
25060  fi
25061
25062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25063  if test "x$test_cygdrive_prefix" = x; then
25064    # As a simple fix, exclude /usr/bin since it's not a real path.
25065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25067      # a path prefixed by /cygdrive for fixpath to work.
25068      new_path="$CYGWIN_ROOT_PATH$input_path"
25069    fi
25070  fi
25071
25072
25073  if test "x$path" != "x$new_path"; then
25074    BOOT_JDK="$new_path"
25075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25077  fi
25078
25079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25080
25081  path="$BOOT_JDK"
25082  has_colon=`$ECHO $path | $GREP ^.:`
25083  new_path="$path"
25084  if test "x$has_colon" = x; then
25085    # Not in mixed or Windows style, start by that.
25086    new_path=`cmd //c echo $path`
25087  fi
25088
25089
25090  input_path="$new_path"
25091  # Check if we need to convert this using DOS-style short mode. If the path
25092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25093  # take no chances and rewrite it.
25094  # Note: m4 eats our [], so we need to use [ and ] instead.
25095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25096  if test "x$has_forbidden_chars" != x; then
25097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25099  fi
25100
25101
25102  windows_path="$new_path"
25103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25104    unix_path=`$CYGPATH -u "$windows_path"`
25105    new_path="$unix_path"
25106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25108    new_path="$unix_path"
25109  fi
25110
25111  if test "x$path" != "x$new_path"; then
25112    BOOT_JDK="$new_path"
25113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25114$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25115  fi
25116
25117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25119
25120    else
25121      # We're on a unix platform. Hooray! :)
25122      path="$BOOT_JDK"
25123      has_space=`$ECHO "$path" | $GREP " "`
25124      if test "x$has_space" != x; then
25125        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25126$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25127        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25128      fi
25129
25130      # Use eval to expand a potential ~
25131      eval path="$path"
25132      if test ! -f "$path" && test ! -d "$path"; then
25133        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25134      fi
25135
25136      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25137    fi
25138  fi
25139
25140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25141$as_echo_n "checking for Boot JDK... " >&6; }
25142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25143$as_echo "$BOOT_JDK" >&6; }
25144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25145$as_echo_n "checking Boot JDK version... " >&6; }
25146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25148$as_echo "$BOOT_JDK_VERSION" >&6; }
25149          fi # end check jdk version
25150        fi # end check javac
25151      fi # end check java
25152    fi # end check boot jdk found
25153  fi
25154
25155    done
25156  fi
25157
25158  fi
25159
25160
25161    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25162    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25163      # Do we have a bin/java?
25164      if test ! -x "$BOOT_JDK/bin/java"; then
25165        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25167        BOOT_JDK_FOUND=no
25168      else
25169        # Do we have a bin/javac?
25170        if test ! -x "$BOOT_JDK/bin/javac"; then
25171          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25173          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25174$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25175          BOOT_JDK_FOUND=no
25176        else
25177          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25178          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25179
25180          # Extra M4 quote needed to protect [] in grep expression.
25181          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25182          if test "x$FOUND_CORRECT_VERSION" = x; then
25183            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25185            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25186$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25187            BOOT_JDK_FOUND=no
25188          else
25189            # We're done! :-)
25190            BOOT_JDK_FOUND=yes
25191
25192  # Only process if variable expands to non-empty
25193
25194  if test "x$BOOT_JDK" != x; then
25195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25196
25197  # Input might be given as Windows format, start by converting to
25198  # unix format.
25199  path="$BOOT_JDK"
25200  new_path=`$CYGPATH -u "$path"`
25201
25202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25205  # "foo.exe" is OK but "foo" is an error.
25206  #
25207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25208  # It is also a way to make sure we got the proper file name for the real test later on.
25209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25210  if test "x$test_shortpath" = x; then
25211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25213    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25214  fi
25215
25216  # Call helper function which possibly converts this using DOS-style short mode.
25217  # If so, the updated path is stored in $new_path.
25218
25219  input_path="$new_path"
25220  # Check if we need to convert this using DOS-style short mode. If the path
25221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25222  # take no chances and rewrite it.
25223  # Note: m4 eats our [], so we need to use [ and ] instead.
25224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25225  if test "x$has_forbidden_chars" != x; then
25226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25230      # Going to short mode and back again did indeed matter. Since short mode is
25231      # case insensitive, let's make it lowercase to improve readability.
25232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25233      # Now convert it back to Unix-style (cygpath)
25234      input_path=`$CYGPATH -u "$shortmode_path"`
25235      new_path="$input_path"
25236    fi
25237  fi
25238
25239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25240  if test "x$test_cygdrive_prefix" = x; then
25241    # As a simple fix, exclude /usr/bin since it's not a real path.
25242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25244      # a path prefixed by /cygdrive for fixpath to work.
25245      new_path="$CYGWIN_ROOT_PATH$input_path"
25246    fi
25247  fi
25248
25249
25250  if test "x$path" != "x$new_path"; then
25251    BOOT_JDK="$new_path"
25252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25254  fi
25255
25256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25257
25258  path="$BOOT_JDK"
25259  has_colon=`$ECHO $path | $GREP ^.:`
25260  new_path="$path"
25261  if test "x$has_colon" = x; then
25262    # Not in mixed or Windows style, start by that.
25263    new_path=`cmd //c echo $path`
25264  fi
25265
25266
25267  input_path="$new_path"
25268  # Check if we need to convert this using DOS-style short mode. If the path
25269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25270  # take no chances and rewrite it.
25271  # Note: m4 eats our [], so we need to use [ and ] instead.
25272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25273  if test "x$has_forbidden_chars" != x; then
25274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25276  fi
25277
25278
25279  windows_path="$new_path"
25280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25281    unix_path=`$CYGPATH -u "$windows_path"`
25282    new_path="$unix_path"
25283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25285    new_path="$unix_path"
25286  fi
25287
25288  if test "x$path" != "x$new_path"; then
25289    BOOT_JDK="$new_path"
25290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25292  fi
25293
25294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25296
25297    else
25298      # We're on a unix platform. Hooray! :)
25299      path="$BOOT_JDK"
25300      has_space=`$ECHO "$path" | $GREP " "`
25301      if test "x$has_space" != x; then
25302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25303$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25305      fi
25306
25307      # Use eval to expand a potential ~
25308      eval path="$path"
25309      if test ! -f "$path" && test ! -d "$path"; then
25310        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25311      fi
25312
25313      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25314    fi
25315  fi
25316
25317            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25318$as_echo_n "checking for Boot JDK... " >&6; }
25319            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25320$as_echo "$BOOT_JDK" >&6; }
25321            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25322$as_echo_n "checking Boot JDK version... " >&6; }
25323            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25324            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25325$as_echo "$BOOT_JDK_VERSION" >&6; }
25326          fi # end check jdk version
25327        fi # end check javac
25328      fi # end check java
25329    fi # end check boot jdk found
25330  fi
25331
25332
25333  if test "x$BOOT_JDK_FOUND" = xno; then
25334    # Now execute the test
25335
25336  if test "x$PROGRAMW6432" != x; then
25337    VIRTUAL_DIR="$PROGRAMW6432/Java"
25338
25339  windows_path="$VIRTUAL_DIR"
25340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25341    unix_path=`$CYGPATH -u "$windows_path"`
25342    VIRTUAL_DIR="$unix_path"
25343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25345    VIRTUAL_DIR="$unix_path"
25346  fi
25347
25348
25349  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25350  BOOT_JDK_SUFFIX=""
25351  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25352  if test "x$ALL_JDKS_FOUND" != x; then
25353    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25354
25355  if test "x$BOOT_JDK_FOUND" = xno; then
25356    # Now execute the test
25357
25358        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25359        if test -d "$BOOT_JDK"; then
25360          BOOT_JDK_FOUND=maybe
25361          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25362$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
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 | grep  '\"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      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25519    fi
25520  fi
25521
25522            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25523$as_echo_n "checking for Boot JDK... " >&6; }
25524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25525$as_echo "$BOOT_JDK" >&6; }
25526            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25527$as_echo_n "checking Boot JDK version... " >&6; }
25528            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25530$as_echo "$BOOT_JDK_VERSION" >&6; }
25531          fi # end check jdk version
25532        fi # end check javac
25533      fi # end check java
25534    fi # end check boot jdk found
25535  fi
25536
25537    done
25538  fi
25539
25540  fi
25541
25542
25543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25545      # Do we have a bin/java?
25546      if test ! -x "$BOOT_JDK/bin/java"; then
25547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25549        BOOT_JDK_FOUND=no
25550      else
25551        # Do we have a bin/javac?
25552        if test ! -x "$BOOT_JDK/bin/javac"; then
25553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25557          BOOT_JDK_FOUND=no
25558        else
25559          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25560          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25561
25562          # Extra M4 quote needed to protect [] in grep expression.
25563          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25564          if test "x$FOUND_CORRECT_VERSION" = x; then
25565            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25567            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25568$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25569            BOOT_JDK_FOUND=no
25570          else
25571            # We're done! :-)
25572            BOOT_JDK_FOUND=yes
25573
25574  # Only process if variable expands to non-empty
25575
25576  if test "x$BOOT_JDK" != x; then
25577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25578
25579  # Input might be given as Windows format, start by converting to
25580  # unix format.
25581  path="$BOOT_JDK"
25582  new_path=`$CYGPATH -u "$path"`
25583
25584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25587  # "foo.exe" is OK but "foo" is an error.
25588  #
25589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25590  # It is also a way to make sure we got the proper file name for the real test later on.
25591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25592  if test "x$test_shortpath" = x; then
25593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25596  fi
25597
25598  # Call helper function which possibly converts this using DOS-style short mode.
25599  # If so, the updated path is stored in $new_path.
25600
25601  input_path="$new_path"
25602  # Check if we need to convert this using DOS-style short mode. If the path
25603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25604  # take no chances and rewrite it.
25605  # Note: m4 eats our [], so we need to use [ and ] instead.
25606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25607  if test "x$has_forbidden_chars" != x; then
25608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25612      # Going to short mode and back again did indeed matter. Since short mode is
25613      # case insensitive, let's make it lowercase to improve readability.
25614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25615      # Now convert it back to Unix-style (cygpath)
25616      input_path=`$CYGPATH -u "$shortmode_path"`
25617      new_path="$input_path"
25618    fi
25619  fi
25620
25621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25622  if test "x$test_cygdrive_prefix" = x; then
25623    # As a simple fix, exclude /usr/bin since it's not a real path.
25624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25626      # a path prefixed by /cygdrive for fixpath to work.
25627      new_path="$CYGWIN_ROOT_PATH$input_path"
25628    fi
25629  fi
25630
25631
25632  if test "x$path" != "x$new_path"; then
25633    BOOT_JDK="$new_path"
25634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25636  fi
25637
25638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25639
25640  path="$BOOT_JDK"
25641  has_colon=`$ECHO $path | $GREP ^.:`
25642  new_path="$path"
25643  if test "x$has_colon" = x; then
25644    # Not in mixed or Windows style, start by that.
25645    new_path=`cmd //c echo $path`
25646  fi
25647
25648
25649  input_path="$new_path"
25650  # Check if we need to convert this using DOS-style short mode. If the path
25651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25652  # take no chances and rewrite it.
25653  # Note: m4 eats our [], so we need to use [ and ] instead.
25654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25655  if test "x$has_forbidden_chars" != x; then
25656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25658  fi
25659
25660
25661  windows_path="$new_path"
25662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25663    unix_path=`$CYGPATH -u "$windows_path"`
25664    new_path="$unix_path"
25665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25667    new_path="$unix_path"
25668  fi
25669
25670  if test "x$path" != "x$new_path"; then
25671    BOOT_JDK="$new_path"
25672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25674  fi
25675
25676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25678
25679    else
25680      # We're on a unix platform. Hooray! :)
25681      path="$BOOT_JDK"
25682      has_space=`$ECHO "$path" | $GREP " "`
25683      if test "x$has_space" != x; then
25684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25686        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25687      fi
25688
25689      # Use eval to expand a potential ~
25690      eval path="$path"
25691      if test ! -f "$path" && test ! -d "$path"; then
25692        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25693      fi
25694
25695      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25696    fi
25697  fi
25698
25699            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25700$as_echo_n "checking for Boot JDK... " >&6; }
25701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25702$as_echo "$BOOT_JDK" >&6; }
25703            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25704$as_echo_n "checking Boot JDK version... " >&6; }
25705            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25706            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25707$as_echo "$BOOT_JDK_VERSION" >&6; }
25708          fi # end check jdk version
25709        fi # end check javac
25710      fi # end check java
25711    fi # end check boot jdk found
25712  fi
25713
25714
25715  if test "x$BOOT_JDK_FOUND" = xno; then
25716    # Now execute the test
25717
25718  if test "x$PROGRAMFILES" != x; then
25719    VIRTUAL_DIR="$PROGRAMFILES/Java"
25720
25721  windows_path="$VIRTUAL_DIR"
25722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25723    unix_path=`$CYGPATH -u "$windows_path"`
25724    VIRTUAL_DIR="$unix_path"
25725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25727    VIRTUAL_DIR="$unix_path"
25728  fi
25729
25730
25731  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25732  BOOT_JDK_SUFFIX=""
25733  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25734  if test "x$ALL_JDKS_FOUND" != x; then
25735    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25736
25737  if test "x$BOOT_JDK_FOUND" = xno; then
25738    # Now execute the test
25739
25740        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25741        if test -d "$BOOT_JDK"; then
25742          BOOT_JDK_FOUND=maybe
25743          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25744$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25745        fi
25746
25747
25748    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25749    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25750      # Do we have a bin/java?
25751      if test ! -x "$BOOT_JDK/bin/java"; then
25752        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25754        BOOT_JDK_FOUND=no
25755      else
25756        # Do we have a bin/javac?
25757        if test ! -x "$BOOT_JDK/bin/javac"; then
25758          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25760          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25761$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25762          BOOT_JDK_FOUND=no
25763        else
25764          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25765          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25766
25767          # Extra M4 quote needed to protect [] in grep expression.
25768          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25769          if test "x$FOUND_CORRECT_VERSION" = x; then
25770            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25772            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25773$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25774            BOOT_JDK_FOUND=no
25775          else
25776            # We're done! :-)
25777            BOOT_JDK_FOUND=yes
25778
25779  # Only process if variable expands to non-empty
25780
25781  if test "x$BOOT_JDK" != x; then
25782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25783
25784  # Input might be given as Windows format, start by converting to
25785  # unix format.
25786  path="$BOOT_JDK"
25787  new_path=`$CYGPATH -u "$path"`
25788
25789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25792  # "foo.exe" is OK but "foo" is an error.
25793  #
25794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25795  # It is also a way to make sure we got the proper file name for the real test later on.
25796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25797  if test "x$test_shortpath" = x; then
25798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25800    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25801  fi
25802
25803  # Call helper function which possibly converts this using DOS-style short mode.
25804  # If so, the updated path is stored in $new_path.
25805
25806  input_path="$new_path"
25807  # Check if we need to convert this using DOS-style short mode. If the path
25808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25809  # take no chances and rewrite it.
25810  # Note: m4 eats our [], so we need to use [ and ] instead.
25811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25812  if test "x$has_forbidden_chars" != x; then
25813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25817      # Going to short mode and back again did indeed matter. Since short mode is
25818      # case insensitive, let's make it lowercase to improve readability.
25819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25820      # Now convert it back to Unix-style (cygpath)
25821      input_path=`$CYGPATH -u "$shortmode_path"`
25822      new_path="$input_path"
25823    fi
25824  fi
25825
25826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25827  if test "x$test_cygdrive_prefix" = x; then
25828    # As a simple fix, exclude /usr/bin since it's not a real path.
25829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25831      # a path prefixed by /cygdrive for fixpath to work.
25832      new_path="$CYGWIN_ROOT_PATH$input_path"
25833    fi
25834  fi
25835
25836
25837  if test "x$path" != "x$new_path"; then
25838    BOOT_JDK="$new_path"
25839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25841  fi
25842
25843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25844
25845  path="$BOOT_JDK"
25846  has_colon=`$ECHO $path | $GREP ^.:`
25847  new_path="$path"
25848  if test "x$has_colon" = x; then
25849    # Not in mixed or Windows style, start by that.
25850    new_path=`cmd //c echo $path`
25851  fi
25852
25853
25854  input_path="$new_path"
25855  # Check if we need to convert this using DOS-style short mode. If the path
25856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25857  # take no chances and rewrite it.
25858  # Note: m4 eats our [], so we need to use [ and ] instead.
25859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25860  if test "x$has_forbidden_chars" != x; then
25861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25863  fi
25864
25865
25866  windows_path="$new_path"
25867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25868    unix_path=`$CYGPATH -u "$windows_path"`
25869    new_path="$unix_path"
25870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25872    new_path="$unix_path"
25873  fi
25874
25875  if test "x$path" != "x$new_path"; then
25876    BOOT_JDK="$new_path"
25877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25879  fi
25880
25881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25883
25884    else
25885      # We're on a unix platform. Hooray! :)
25886      path="$BOOT_JDK"
25887      has_space=`$ECHO "$path" | $GREP " "`
25888      if test "x$has_space" != x; then
25889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25890$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25892      fi
25893
25894      # Use eval to expand a potential ~
25895      eval path="$path"
25896      if test ! -f "$path" && test ! -d "$path"; then
25897        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25898      fi
25899
25900      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25901    fi
25902  fi
25903
25904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25905$as_echo_n "checking for Boot JDK... " >&6; }
25906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25907$as_echo "$BOOT_JDK" >&6; }
25908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25909$as_echo_n "checking Boot JDK version... " >&6; }
25910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25912$as_echo "$BOOT_JDK_VERSION" >&6; }
25913          fi # end check jdk version
25914        fi # end check javac
25915      fi # end check java
25916    fi # end check boot jdk found
25917  fi
25918
25919    done
25920  fi
25921
25922  fi
25923
25924
25925    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25926    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25927      # Do we have a bin/java?
25928      if test ! -x "$BOOT_JDK/bin/java"; then
25929        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25931        BOOT_JDK_FOUND=no
25932      else
25933        # Do we have a bin/javac?
25934        if test ! -x "$BOOT_JDK/bin/javac"; then
25935          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25937          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25938$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25939          BOOT_JDK_FOUND=no
25940        else
25941          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25942          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25943
25944          # Extra M4 quote needed to protect [] in grep expression.
25945          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25946          if test "x$FOUND_CORRECT_VERSION" = x; then
25947            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25949            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25950$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25951            BOOT_JDK_FOUND=no
25952          else
25953            # We're done! :-)
25954            BOOT_JDK_FOUND=yes
25955
25956  # Only process if variable expands to non-empty
25957
25958  if test "x$BOOT_JDK" != x; then
25959    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25960
25961  # Input might be given as Windows format, start by converting to
25962  # unix format.
25963  path="$BOOT_JDK"
25964  new_path=`$CYGPATH -u "$path"`
25965
25966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25969  # "foo.exe" is OK but "foo" is an error.
25970  #
25971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25972  # It is also a way to make sure we got the proper file name for the real test later on.
25973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25974  if test "x$test_shortpath" = x; then
25975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25977    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25978  fi
25979
25980  # Call helper function which possibly converts this using DOS-style short mode.
25981  # If so, the updated path is stored in $new_path.
25982
25983  input_path="$new_path"
25984  # Check if we need to convert this using DOS-style short mode. If the path
25985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25986  # take no chances and rewrite it.
25987  # Note: m4 eats our [], so we need to use [ and ] instead.
25988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25989  if test "x$has_forbidden_chars" != x; then
25990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25994      # Going to short mode and back again did indeed matter. Since short mode is
25995      # case insensitive, let's make it lowercase to improve readability.
25996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25997      # Now convert it back to Unix-style (cygpath)
25998      input_path=`$CYGPATH -u "$shortmode_path"`
25999      new_path="$input_path"
26000    fi
26001  fi
26002
26003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26004  if test "x$test_cygdrive_prefix" = x; then
26005    # As a simple fix, exclude /usr/bin since it's not a real path.
26006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26008      # a path prefixed by /cygdrive for fixpath to work.
26009      new_path="$CYGWIN_ROOT_PATH$input_path"
26010    fi
26011  fi
26012
26013
26014  if test "x$path" != "x$new_path"; then
26015    BOOT_JDK="$new_path"
26016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26017$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26018  fi
26019
26020    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26021
26022  path="$BOOT_JDK"
26023  has_colon=`$ECHO $path | $GREP ^.:`
26024  new_path="$path"
26025  if test "x$has_colon" = x; then
26026    # Not in mixed or Windows style, start by that.
26027    new_path=`cmd //c echo $path`
26028  fi
26029
26030
26031  input_path="$new_path"
26032  # Check if we need to convert this using DOS-style short mode. If the path
26033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26034  # take no chances and rewrite it.
26035  # Note: m4 eats our [], so we need to use [ and ] instead.
26036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26037  if test "x$has_forbidden_chars" != x; then
26038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26040  fi
26041
26042
26043  windows_path="$new_path"
26044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26045    unix_path=`$CYGPATH -u "$windows_path"`
26046    new_path="$unix_path"
26047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26049    new_path="$unix_path"
26050  fi
26051
26052  if test "x$path" != "x$new_path"; then
26053    BOOT_JDK="$new_path"
26054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26056  fi
26057
26058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26060
26061    else
26062      # We're on a unix platform. Hooray! :)
26063      path="$BOOT_JDK"
26064      has_space=`$ECHO "$path" | $GREP " "`
26065      if test "x$has_space" != x; then
26066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26067$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26068        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26069      fi
26070
26071      # Use eval to expand a potential ~
26072      eval path="$path"
26073      if test ! -f "$path" && test ! -d "$path"; then
26074        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26075      fi
26076
26077      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26078    fi
26079  fi
26080
26081            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26082$as_echo_n "checking for Boot JDK... " >&6; }
26083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26084$as_echo "$BOOT_JDK" >&6; }
26085            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26086$as_echo_n "checking Boot JDK version... " >&6; }
26087            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26089$as_echo "$BOOT_JDK_VERSION" >&6; }
26090          fi # end check jdk version
26091        fi # end check javac
26092      fi # end check java
26093    fi # end check boot jdk found
26094  fi
26095
26096
26097  if test "x$BOOT_JDK_FOUND" = xno; then
26098    # Now execute the test
26099
26100  if test "x$ProgramFiles" != x; then
26101    VIRTUAL_DIR="$ProgramFiles/Java"
26102
26103  windows_path="$VIRTUAL_DIR"
26104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26105    unix_path=`$CYGPATH -u "$windows_path"`
26106    VIRTUAL_DIR="$unix_path"
26107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26109    VIRTUAL_DIR="$unix_path"
26110  fi
26111
26112
26113  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26114  BOOT_JDK_SUFFIX=""
26115  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26116  if test "x$ALL_JDKS_FOUND" != x; then
26117    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26118
26119  if test "x$BOOT_JDK_FOUND" = xno; then
26120    # Now execute the test
26121
26122        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26123        if test -d "$BOOT_JDK"; then
26124          BOOT_JDK_FOUND=maybe
26125          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26126$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26127        fi
26128
26129
26130    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26131    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26132      # Do we have a bin/java?
26133      if test ! -x "$BOOT_JDK/bin/java"; then
26134        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26136        BOOT_JDK_FOUND=no
26137      else
26138        # Do we have a bin/javac?
26139        if test ! -x "$BOOT_JDK/bin/javac"; then
26140          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26142          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26143$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26144          BOOT_JDK_FOUND=no
26145        else
26146          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26147          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26148
26149          # Extra M4 quote needed to protect [] in grep expression.
26150          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26151          if test "x$FOUND_CORRECT_VERSION" = x; then
26152            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26154            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26155$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26156            BOOT_JDK_FOUND=no
26157          else
26158            # We're done! :-)
26159            BOOT_JDK_FOUND=yes
26160
26161  # Only process if variable expands to non-empty
26162
26163  if test "x$BOOT_JDK" != x; then
26164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26165
26166  # Input might be given as Windows format, start by converting to
26167  # unix format.
26168  path="$BOOT_JDK"
26169  new_path=`$CYGPATH -u "$path"`
26170
26171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26174  # "foo.exe" is OK but "foo" is an error.
26175  #
26176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26177  # It is also a way to make sure we got the proper file name for the real test later on.
26178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26179  if test "x$test_shortpath" = x; then
26180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26183  fi
26184
26185  # Call helper function which possibly converts this using DOS-style short mode.
26186  # If so, the updated path is stored in $new_path.
26187
26188  input_path="$new_path"
26189  # Check if we need to convert this using DOS-style short mode. If the path
26190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26191  # take no chances and rewrite it.
26192  # Note: m4 eats our [], so we need to use [ and ] instead.
26193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26194  if test "x$has_forbidden_chars" != x; then
26195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26199      # Going to short mode and back again did indeed matter. Since short mode is
26200      # case insensitive, let's make it lowercase to improve readability.
26201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26202      # Now convert it back to Unix-style (cygpath)
26203      input_path=`$CYGPATH -u "$shortmode_path"`
26204      new_path="$input_path"
26205    fi
26206  fi
26207
26208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26209  if test "x$test_cygdrive_prefix" = x; then
26210    # As a simple fix, exclude /usr/bin since it's not a real path.
26211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26213      # a path prefixed by /cygdrive for fixpath to work.
26214      new_path="$CYGWIN_ROOT_PATH$input_path"
26215    fi
26216  fi
26217
26218
26219  if test "x$path" != "x$new_path"; then
26220    BOOT_JDK="$new_path"
26221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26223  fi
26224
26225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26226
26227  path="$BOOT_JDK"
26228  has_colon=`$ECHO $path | $GREP ^.:`
26229  new_path="$path"
26230  if test "x$has_colon" = x; then
26231    # Not in mixed or Windows style, start by that.
26232    new_path=`cmd //c echo $path`
26233  fi
26234
26235
26236  input_path="$new_path"
26237  # Check if we need to convert this using DOS-style short mode. If the path
26238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26239  # take no chances and rewrite it.
26240  # Note: m4 eats our [], so we need to use [ and ] instead.
26241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26242  if test "x$has_forbidden_chars" != x; then
26243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26245  fi
26246
26247
26248  windows_path="$new_path"
26249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26250    unix_path=`$CYGPATH -u "$windows_path"`
26251    new_path="$unix_path"
26252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26254    new_path="$unix_path"
26255  fi
26256
26257  if test "x$path" != "x$new_path"; then
26258    BOOT_JDK="$new_path"
26259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26261  fi
26262
26263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26265
26266    else
26267      # We're on a unix platform. Hooray! :)
26268      path="$BOOT_JDK"
26269      has_space=`$ECHO "$path" | $GREP " "`
26270      if test "x$has_space" != x; then
26271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26274      fi
26275
26276      # Use eval to expand a potential ~
26277      eval path="$path"
26278      if test ! -f "$path" && test ! -d "$path"; then
26279        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26280      fi
26281
26282      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26283    fi
26284  fi
26285
26286            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26287$as_echo_n "checking for Boot JDK... " >&6; }
26288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26289$as_echo "$BOOT_JDK" >&6; }
26290            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26291$as_echo_n "checking Boot JDK version... " >&6; }
26292            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26294$as_echo "$BOOT_JDK_VERSION" >&6; }
26295          fi # end check jdk version
26296        fi # end check javac
26297      fi # end check java
26298    fi # end check boot jdk found
26299  fi
26300
26301    done
26302  fi
26303
26304  fi
26305
26306
26307    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26308    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26309      # Do we have a bin/java?
26310      if test ! -x "$BOOT_JDK/bin/java"; then
26311        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26312$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26313        BOOT_JDK_FOUND=no
26314      else
26315        # Do we have a bin/javac?
26316        if test ! -x "$BOOT_JDK/bin/javac"; then
26317          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26319          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26320$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26321          BOOT_JDK_FOUND=no
26322        else
26323          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26324          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26325
26326          # Extra M4 quote needed to protect [] in grep expression.
26327          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26328          if test "x$FOUND_CORRECT_VERSION" = x; then
26329            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26331            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26332$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26333            BOOT_JDK_FOUND=no
26334          else
26335            # We're done! :-)
26336            BOOT_JDK_FOUND=yes
26337
26338  # Only process if variable expands to non-empty
26339
26340  if test "x$BOOT_JDK" != x; then
26341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26342
26343  # Input might be given as Windows format, start by converting to
26344  # unix format.
26345  path="$BOOT_JDK"
26346  new_path=`$CYGPATH -u "$path"`
26347
26348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26351  # "foo.exe" is OK but "foo" is an error.
26352  #
26353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26354  # It is also a way to make sure we got the proper file name for the real test later on.
26355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26356  if test "x$test_shortpath" = x; then
26357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26359    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26360  fi
26361
26362  # Call helper function which possibly converts this using DOS-style short mode.
26363  # If so, the updated path is stored in $new_path.
26364
26365  input_path="$new_path"
26366  # Check if we need to convert this using DOS-style short mode. If the path
26367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26368  # take no chances and rewrite it.
26369  # Note: m4 eats our [], so we need to use [ and ] instead.
26370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26371  if test "x$has_forbidden_chars" != x; then
26372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26376      # Going to short mode and back again did indeed matter. Since short mode is
26377      # case insensitive, let's make it lowercase to improve readability.
26378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26379      # Now convert it back to Unix-style (cygpath)
26380      input_path=`$CYGPATH -u "$shortmode_path"`
26381      new_path="$input_path"
26382    fi
26383  fi
26384
26385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26386  if test "x$test_cygdrive_prefix" = x; then
26387    # As a simple fix, exclude /usr/bin since it's not a real path.
26388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26390      # a path prefixed by /cygdrive for fixpath to work.
26391      new_path="$CYGWIN_ROOT_PATH$input_path"
26392    fi
26393  fi
26394
26395
26396  if test "x$path" != "x$new_path"; then
26397    BOOT_JDK="$new_path"
26398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26400  fi
26401
26402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26403
26404  path="$BOOT_JDK"
26405  has_colon=`$ECHO $path | $GREP ^.:`
26406  new_path="$path"
26407  if test "x$has_colon" = x; then
26408    # Not in mixed or Windows style, start by that.
26409    new_path=`cmd //c echo $path`
26410  fi
26411
26412
26413  input_path="$new_path"
26414  # Check if we need to convert this using DOS-style short mode. If the path
26415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26416  # take no chances and rewrite it.
26417  # Note: m4 eats our [], so we need to use [ and ] instead.
26418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26419  if test "x$has_forbidden_chars" != x; then
26420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26422  fi
26423
26424
26425  windows_path="$new_path"
26426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26427    unix_path=`$CYGPATH -u "$windows_path"`
26428    new_path="$unix_path"
26429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26431    new_path="$unix_path"
26432  fi
26433
26434  if test "x$path" != "x$new_path"; then
26435    BOOT_JDK="$new_path"
26436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26438  fi
26439
26440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26442
26443    else
26444      # We're on a unix platform. Hooray! :)
26445      path="$BOOT_JDK"
26446      has_space=`$ECHO "$path" | $GREP " "`
26447      if test "x$has_space" != x; then
26448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26450        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26451      fi
26452
26453      # Use eval to expand a potential ~
26454      eval path="$path"
26455      if test ! -f "$path" && test ! -d "$path"; then
26456        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26457      fi
26458
26459      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26460    fi
26461  fi
26462
26463            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26464$as_echo_n "checking for Boot JDK... " >&6; }
26465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26466$as_echo "$BOOT_JDK" >&6; }
26467            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26468$as_echo_n "checking Boot JDK version... " >&6; }
26469            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26471$as_echo "$BOOT_JDK_VERSION" >&6; }
26472          fi # end check jdk version
26473        fi # end check javac
26474      fi # end check java
26475    fi # end check boot jdk found
26476  fi
26477
26478
26479  if test "x$BOOT_JDK_FOUND" = xno; then
26480    # Now execute the test
26481
26482  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26483  BOOT_JDK_SUFFIX=""
26484  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26485  if test "x$ALL_JDKS_FOUND" != x; then
26486    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26487
26488  if test "x$BOOT_JDK_FOUND" = xno; then
26489    # Now execute the test
26490
26491        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26492        if test -d "$BOOT_JDK"; then
26493          BOOT_JDK_FOUND=maybe
26494          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26495$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26496        fi
26497
26498
26499    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26500    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26501      # Do we have a bin/java?
26502      if test ! -x "$BOOT_JDK/bin/java"; then
26503        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26505        BOOT_JDK_FOUND=no
26506      else
26507        # Do we have a bin/javac?
26508        if test ! -x "$BOOT_JDK/bin/javac"; then
26509          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26511          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26512$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26513          BOOT_JDK_FOUND=no
26514        else
26515          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26516          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26517
26518          # Extra M4 quote needed to protect [] in grep expression.
26519          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26520          if test "x$FOUND_CORRECT_VERSION" = x; then
26521            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26523            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26524$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26525            BOOT_JDK_FOUND=no
26526          else
26527            # We're done! :-)
26528            BOOT_JDK_FOUND=yes
26529
26530  # Only process if variable expands to non-empty
26531
26532  if test "x$BOOT_JDK" != x; then
26533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26534
26535  # Input might be given as Windows format, start by converting to
26536  # unix format.
26537  path="$BOOT_JDK"
26538  new_path=`$CYGPATH -u "$path"`
26539
26540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26543  # "foo.exe" is OK but "foo" is an error.
26544  #
26545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26546  # It is also a way to make sure we got the proper file name for the real test later on.
26547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26548  if test "x$test_shortpath" = x; then
26549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26551    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26552  fi
26553
26554  # Call helper function which possibly converts this using DOS-style short mode.
26555  # If so, the updated path is stored in $new_path.
26556
26557  input_path="$new_path"
26558  # Check if we need to convert this using DOS-style short mode. If the path
26559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26560  # take no chances and rewrite it.
26561  # Note: m4 eats our [], so we need to use [ and ] instead.
26562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26563  if test "x$has_forbidden_chars" != x; then
26564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26568      # Going to short mode and back again did indeed matter. Since short mode is
26569      # case insensitive, let's make it lowercase to improve readability.
26570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26571      # Now convert it back to Unix-style (cygpath)
26572      input_path=`$CYGPATH -u "$shortmode_path"`
26573      new_path="$input_path"
26574    fi
26575  fi
26576
26577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26578  if test "x$test_cygdrive_prefix" = x; then
26579    # As a simple fix, exclude /usr/bin since it's not a real path.
26580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26582      # a path prefixed by /cygdrive for fixpath to work.
26583      new_path="$CYGWIN_ROOT_PATH$input_path"
26584    fi
26585  fi
26586
26587
26588  if test "x$path" != "x$new_path"; then
26589    BOOT_JDK="$new_path"
26590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26592  fi
26593
26594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26595
26596  path="$BOOT_JDK"
26597  has_colon=`$ECHO $path | $GREP ^.:`
26598  new_path="$path"
26599  if test "x$has_colon" = x; then
26600    # Not in mixed or Windows style, start by that.
26601    new_path=`cmd //c echo $path`
26602  fi
26603
26604
26605  input_path="$new_path"
26606  # Check if we need to convert this using DOS-style short mode. If the path
26607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26608  # take no chances and rewrite it.
26609  # Note: m4 eats our [], so we need to use [ and ] instead.
26610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26611  if test "x$has_forbidden_chars" != x; then
26612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26614  fi
26615
26616
26617  windows_path="$new_path"
26618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26619    unix_path=`$CYGPATH -u "$windows_path"`
26620    new_path="$unix_path"
26621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26623    new_path="$unix_path"
26624  fi
26625
26626  if test "x$path" != "x$new_path"; then
26627    BOOT_JDK="$new_path"
26628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26630  fi
26631
26632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26634
26635    else
26636      # We're on a unix platform. Hooray! :)
26637      path="$BOOT_JDK"
26638      has_space=`$ECHO "$path" | $GREP " "`
26639      if test "x$has_space" != x; then
26640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26643      fi
26644
26645      # Use eval to expand a potential ~
26646      eval path="$path"
26647      if test ! -f "$path" && test ! -d "$path"; then
26648        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26649      fi
26650
26651      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26652    fi
26653  fi
26654
26655            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26656$as_echo_n "checking for Boot JDK... " >&6; }
26657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26658$as_echo "$BOOT_JDK" >&6; }
26659            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26660$as_echo_n "checking Boot JDK version... " >&6; }
26661            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26663$as_echo "$BOOT_JDK_VERSION" >&6; }
26664          fi # end check jdk version
26665        fi # end check javac
26666      fi # end check java
26667    fi # end check boot jdk found
26668  fi
26669
26670    done
26671  fi
26672
26673
26674    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26675    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26676      # Do we have a bin/java?
26677      if test ! -x "$BOOT_JDK/bin/java"; then
26678        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26680        BOOT_JDK_FOUND=no
26681      else
26682        # Do we have a bin/javac?
26683        if test ! -x "$BOOT_JDK/bin/javac"; then
26684          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26686          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26687$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26688          BOOT_JDK_FOUND=no
26689        else
26690          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26691          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26692
26693          # Extra M4 quote needed to protect [] in grep expression.
26694          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26695          if test "x$FOUND_CORRECT_VERSION" = x; then
26696            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26698            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26699$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26700            BOOT_JDK_FOUND=no
26701          else
26702            # We're done! :-)
26703            BOOT_JDK_FOUND=yes
26704
26705  # Only process if variable expands to non-empty
26706
26707  if test "x$BOOT_JDK" != x; then
26708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26709
26710  # Input might be given as Windows format, start by converting to
26711  # unix format.
26712  path="$BOOT_JDK"
26713  new_path=`$CYGPATH -u "$path"`
26714
26715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26718  # "foo.exe" is OK but "foo" is an error.
26719  #
26720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26721  # It is also a way to make sure we got the proper file name for the real test later on.
26722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26723  if test "x$test_shortpath" = x; then
26724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26726    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26727  fi
26728
26729  # Call helper function which possibly converts this using DOS-style short mode.
26730  # If so, the updated path is stored in $new_path.
26731
26732  input_path="$new_path"
26733  # Check if we need to convert this using DOS-style short mode. If the path
26734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26735  # take no chances and rewrite it.
26736  # Note: m4 eats our [], so we need to use [ and ] instead.
26737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26738  if test "x$has_forbidden_chars" != x; then
26739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26743      # Going to short mode and back again did indeed matter. Since short mode is
26744      # case insensitive, let's make it lowercase to improve readability.
26745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26746      # Now convert it back to Unix-style (cygpath)
26747      input_path=`$CYGPATH -u "$shortmode_path"`
26748      new_path="$input_path"
26749    fi
26750  fi
26751
26752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26753  if test "x$test_cygdrive_prefix" = x; then
26754    # As a simple fix, exclude /usr/bin since it's not a real path.
26755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26757      # a path prefixed by /cygdrive for fixpath to work.
26758      new_path="$CYGWIN_ROOT_PATH$input_path"
26759    fi
26760  fi
26761
26762
26763  if test "x$path" != "x$new_path"; then
26764    BOOT_JDK="$new_path"
26765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26767  fi
26768
26769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26770
26771  path="$BOOT_JDK"
26772  has_colon=`$ECHO $path | $GREP ^.:`
26773  new_path="$path"
26774  if test "x$has_colon" = x; then
26775    # Not in mixed or Windows style, start by that.
26776    new_path=`cmd //c echo $path`
26777  fi
26778
26779
26780  input_path="$new_path"
26781  # Check if we need to convert this using DOS-style short mode. If the path
26782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26783  # take no chances and rewrite it.
26784  # Note: m4 eats our [], so we need to use [ and ] instead.
26785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26786  if test "x$has_forbidden_chars" != x; then
26787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26789  fi
26790
26791
26792  windows_path="$new_path"
26793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26794    unix_path=`$CYGPATH -u "$windows_path"`
26795    new_path="$unix_path"
26796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26798    new_path="$unix_path"
26799  fi
26800
26801  if test "x$path" != "x$new_path"; then
26802    BOOT_JDK="$new_path"
26803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26805  fi
26806
26807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26809
26810    else
26811      # We're on a unix platform. Hooray! :)
26812      path="$BOOT_JDK"
26813      has_space=`$ECHO "$path" | $GREP " "`
26814      if test "x$has_space" != x; then
26815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26818      fi
26819
26820      # Use eval to expand a potential ~
26821      eval path="$path"
26822      if test ! -f "$path" && test ! -d "$path"; then
26823        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26824      fi
26825
26826      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26827    fi
26828  fi
26829
26830            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26831$as_echo_n "checking for Boot JDK... " >&6; }
26832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26833$as_echo "$BOOT_JDK" >&6; }
26834            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26835$as_echo_n "checking Boot JDK version... " >&6; }
26836            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26838$as_echo "$BOOT_JDK_VERSION" >&6; }
26839          fi # end check jdk version
26840        fi # end check javac
26841      fi # end check java
26842    fi # end check boot jdk found
26843  fi
26844
26845  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
26846
26847  if test "x$BOOT_JDK_FOUND" = xno; then
26848    # Now execute the test
26849
26850  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
26851  BOOT_JDK_SUFFIX="/Contents/Home"
26852  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26853  if test "x$ALL_JDKS_FOUND" != x; then
26854    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26855
26856  if test "x$BOOT_JDK_FOUND" = xno; then
26857    # Now execute the test
26858
26859        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26860        if test -d "$BOOT_JDK"; then
26861          BOOT_JDK_FOUND=maybe
26862          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26863$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26864        fi
26865
26866
26867    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26868    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26869      # Do we have a bin/java?
26870      if test ! -x "$BOOT_JDK/bin/java"; then
26871        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26873        BOOT_JDK_FOUND=no
26874      else
26875        # Do we have a bin/javac?
26876        if test ! -x "$BOOT_JDK/bin/javac"; then
26877          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26879          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26880$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26881          BOOT_JDK_FOUND=no
26882        else
26883          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26884          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26885
26886          # Extra M4 quote needed to protect [] in grep expression.
26887          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26888          if test "x$FOUND_CORRECT_VERSION" = x; then
26889            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26891            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26892$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26893            BOOT_JDK_FOUND=no
26894          else
26895            # We're done! :-)
26896            BOOT_JDK_FOUND=yes
26897
26898  # Only process if variable expands to non-empty
26899
26900  if test "x$BOOT_JDK" != x; then
26901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26902
26903  # Input might be given as Windows format, start by converting to
26904  # unix format.
26905  path="$BOOT_JDK"
26906  new_path=`$CYGPATH -u "$path"`
26907
26908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26911  # "foo.exe" is OK but "foo" is an error.
26912  #
26913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26914  # It is also a way to make sure we got the proper file name for the real test later on.
26915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26916  if test "x$test_shortpath" = x; then
26917    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26919    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26920  fi
26921
26922  # Call helper function which possibly converts this using DOS-style short mode.
26923  # If so, the updated path is stored in $new_path.
26924
26925  input_path="$new_path"
26926  # Check if we need to convert this using DOS-style short mode. If the path
26927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26928  # take no chances and rewrite it.
26929  # Note: m4 eats our [], so we need to use [ and ] instead.
26930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26931  if test "x$has_forbidden_chars" != x; then
26932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26936      # Going to short mode and back again did indeed matter. Since short mode is
26937      # case insensitive, let's make it lowercase to improve readability.
26938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26939      # Now convert it back to Unix-style (cygpath)
26940      input_path=`$CYGPATH -u "$shortmode_path"`
26941      new_path="$input_path"
26942    fi
26943  fi
26944
26945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26946  if test "x$test_cygdrive_prefix" = x; then
26947    # As a simple fix, exclude /usr/bin since it's not a real path.
26948    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26950      # a path prefixed by /cygdrive for fixpath to work.
26951      new_path="$CYGWIN_ROOT_PATH$input_path"
26952    fi
26953  fi
26954
26955
26956  if test "x$path" != "x$new_path"; then
26957    BOOT_JDK="$new_path"
26958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26959$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26960  fi
26961
26962    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26963
26964  path="$BOOT_JDK"
26965  has_colon=`$ECHO $path | $GREP ^.:`
26966  new_path="$path"
26967  if test "x$has_colon" = x; then
26968    # Not in mixed or Windows style, start by that.
26969    new_path=`cmd //c echo $path`
26970  fi
26971
26972
26973  input_path="$new_path"
26974  # Check if we need to convert this using DOS-style short mode. If the path
26975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26976  # take no chances and rewrite it.
26977  # Note: m4 eats our [], so we need to use [ and ] instead.
26978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26979  if test "x$has_forbidden_chars" != x; then
26980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26982  fi
26983
26984
26985  windows_path="$new_path"
26986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26987    unix_path=`$CYGPATH -u "$windows_path"`
26988    new_path="$unix_path"
26989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26991    new_path="$unix_path"
26992  fi
26993
26994  if test "x$path" != "x$new_path"; then
26995    BOOT_JDK="$new_path"
26996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26998  fi
26999
27000  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27001  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27002
27003    else
27004      # We're on a unix platform. Hooray! :)
27005      path="$BOOT_JDK"
27006      has_space=`$ECHO "$path" | $GREP " "`
27007      if test "x$has_space" != x; then
27008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27009$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27010        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27011      fi
27012
27013      # Use eval to expand a potential ~
27014      eval path="$path"
27015      if test ! -f "$path" && test ! -d "$path"; then
27016        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27017      fi
27018
27019      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27020    fi
27021  fi
27022
27023            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27024$as_echo_n "checking for Boot JDK... " >&6; }
27025            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27026$as_echo "$BOOT_JDK" >&6; }
27027            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27028$as_echo_n "checking Boot JDK version... " >&6; }
27029            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27031$as_echo "$BOOT_JDK_VERSION" >&6; }
27032          fi # end check jdk version
27033        fi # end check javac
27034      fi # end check java
27035    fi # end check boot jdk found
27036  fi
27037
27038    done
27039  fi
27040
27041
27042    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27043    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27044      # Do we have a bin/java?
27045      if test ! -x "$BOOT_JDK/bin/java"; then
27046        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27048        BOOT_JDK_FOUND=no
27049      else
27050        # Do we have a bin/javac?
27051        if test ! -x "$BOOT_JDK/bin/javac"; then
27052          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27054          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27055$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27056          BOOT_JDK_FOUND=no
27057        else
27058          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27059          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27060
27061          # Extra M4 quote needed to protect [] in grep expression.
27062          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27063          if test "x$FOUND_CORRECT_VERSION" = x; then
27064            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27066            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27067$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27068            BOOT_JDK_FOUND=no
27069          else
27070            # We're done! :-)
27071            BOOT_JDK_FOUND=yes
27072
27073  # Only process if variable expands to non-empty
27074
27075  if test "x$BOOT_JDK" != x; then
27076    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27077
27078  # Input might be given as Windows format, start by converting to
27079  # unix format.
27080  path="$BOOT_JDK"
27081  new_path=`$CYGPATH -u "$path"`
27082
27083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27086  # "foo.exe" is OK but "foo" is an error.
27087  #
27088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27089  # It is also a way to make sure we got the proper file name for the real test later on.
27090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27091  if test "x$test_shortpath" = x; then
27092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27094    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27095  fi
27096
27097  # Call helper function which possibly converts this using DOS-style short mode.
27098  # If so, the updated path is stored in $new_path.
27099
27100  input_path="$new_path"
27101  # Check if we need to convert this using DOS-style short mode. If the path
27102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27103  # take no chances and rewrite it.
27104  # Note: m4 eats our [], so we need to use [ and ] instead.
27105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27106  if test "x$has_forbidden_chars" != x; then
27107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27111      # Going to short mode and back again did indeed matter. Since short mode is
27112      # case insensitive, let's make it lowercase to improve readability.
27113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27114      # Now convert it back to Unix-style (cygpath)
27115      input_path=`$CYGPATH -u "$shortmode_path"`
27116      new_path="$input_path"
27117    fi
27118  fi
27119
27120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27121  if test "x$test_cygdrive_prefix" = x; then
27122    # As a simple fix, exclude /usr/bin since it's not a real path.
27123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27125      # a path prefixed by /cygdrive for fixpath to work.
27126      new_path="$CYGWIN_ROOT_PATH$input_path"
27127    fi
27128  fi
27129
27130
27131  if test "x$path" != "x$new_path"; then
27132    BOOT_JDK="$new_path"
27133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27135  fi
27136
27137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27138
27139  path="$BOOT_JDK"
27140  has_colon=`$ECHO $path | $GREP ^.:`
27141  new_path="$path"
27142  if test "x$has_colon" = x; then
27143    # Not in mixed or Windows style, start by that.
27144    new_path=`cmd //c echo $path`
27145  fi
27146
27147
27148  input_path="$new_path"
27149  # Check if we need to convert this using DOS-style short mode. If the path
27150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27151  # take no chances and rewrite it.
27152  # Note: m4 eats our [], so we need to use [ and ] instead.
27153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27154  if test "x$has_forbidden_chars" != x; then
27155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27157  fi
27158
27159
27160  windows_path="$new_path"
27161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27162    unix_path=`$CYGPATH -u "$windows_path"`
27163    new_path="$unix_path"
27164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27166    new_path="$unix_path"
27167  fi
27168
27169  if test "x$path" != "x$new_path"; then
27170    BOOT_JDK="$new_path"
27171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27173  fi
27174
27175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27177
27178    else
27179      # We're on a unix platform. Hooray! :)
27180      path="$BOOT_JDK"
27181      has_space=`$ECHO "$path" | $GREP " "`
27182      if test "x$has_space" != x; then
27183        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27184$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27185        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27186      fi
27187
27188      # Use eval to expand a potential ~
27189      eval path="$path"
27190      if test ! -f "$path" && test ! -d "$path"; then
27191        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27192      fi
27193
27194      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27195    fi
27196  fi
27197
27198            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27199$as_echo_n "checking for Boot JDK... " >&6; }
27200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27201$as_echo "$BOOT_JDK" >&6; }
27202            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27203$as_echo_n "checking Boot JDK version... " >&6; }
27204            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27206$as_echo "$BOOT_JDK_VERSION" >&6; }
27207          fi # end check jdk version
27208        fi # end check javac
27209      fi # end check java
27210    fi # end check boot jdk found
27211  fi
27212
27213
27214  if test "x$BOOT_JDK_FOUND" = xno; then
27215    # Now execute the test
27216
27217  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27218  BOOT_JDK_SUFFIX="/Contents/Home"
27219  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27220  if test "x$ALL_JDKS_FOUND" != x; then
27221    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27222
27223  if test "x$BOOT_JDK_FOUND" = xno; then
27224    # Now execute the test
27225
27226        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27227        if test -d "$BOOT_JDK"; then
27228          BOOT_JDK_FOUND=maybe
27229          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27230$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27231        fi
27232
27233
27234    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27235    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27236      # Do we have a bin/java?
27237      if test ! -x "$BOOT_JDK/bin/java"; then
27238        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27240        BOOT_JDK_FOUND=no
27241      else
27242        # Do we have a bin/javac?
27243        if test ! -x "$BOOT_JDK/bin/javac"; then
27244          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27246          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27247$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27248          BOOT_JDK_FOUND=no
27249        else
27250          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27251          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27252
27253          # Extra M4 quote needed to protect [] in grep expression.
27254          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27255          if test "x$FOUND_CORRECT_VERSION" = x; then
27256            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27258            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27259$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27260            BOOT_JDK_FOUND=no
27261          else
27262            # We're done! :-)
27263            BOOT_JDK_FOUND=yes
27264
27265  # Only process if variable expands to non-empty
27266
27267  if test "x$BOOT_JDK" != x; then
27268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27269
27270  # Input might be given as Windows format, start by converting to
27271  # unix format.
27272  path="$BOOT_JDK"
27273  new_path=`$CYGPATH -u "$path"`
27274
27275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27278  # "foo.exe" is OK but "foo" is an error.
27279  #
27280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27281  # It is also a way to make sure we got the proper file name for the real test later on.
27282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27283  if test "x$test_shortpath" = x; then
27284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27286    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27287  fi
27288
27289  # Call helper function which possibly converts this using DOS-style short mode.
27290  # If so, the updated path is stored in $new_path.
27291
27292  input_path="$new_path"
27293  # Check if we need to convert this using DOS-style short mode. If the path
27294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27295  # take no chances and rewrite it.
27296  # Note: m4 eats our [], so we need to use [ and ] instead.
27297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27298  if test "x$has_forbidden_chars" != x; then
27299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27303      # Going to short mode and back again did indeed matter. Since short mode is
27304      # case insensitive, let's make it lowercase to improve readability.
27305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27306      # Now convert it back to Unix-style (cygpath)
27307      input_path=`$CYGPATH -u "$shortmode_path"`
27308      new_path="$input_path"
27309    fi
27310  fi
27311
27312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27313  if test "x$test_cygdrive_prefix" = x; then
27314    # As a simple fix, exclude /usr/bin since it's not a real path.
27315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27317      # a path prefixed by /cygdrive for fixpath to work.
27318      new_path="$CYGWIN_ROOT_PATH$input_path"
27319    fi
27320  fi
27321
27322
27323  if test "x$path" != "x$new_path"; then
27324    BOOT_JDK="$new_path"
27325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27327  fi
27328
27329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27330
27331  path="$BOOT_JDK"
27332  has_colon=`$ECHO $path | $GREP ^.:`
27333  new_path="$path"
27334  if test "x$has_colon" = x; then
27335    # Not in mixed or Windows style, start by that.
27336    new_path=`cmd //c echo $path`
27337  fi
27338
27339
27340  input_path="$new_path"
27341  # Check if we need to convert this using DOS-style short mode. If the path
27342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27343  # take no chances and rewrite it.
27344  # Note: m4 eats our [], so we need to use [ and ] instead.
27345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27346  if test "x$has_forbidden_chars" != x; then
27347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27349  fi
27350
27351
27352  windows_path="$new_path"
27353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27354    unix_path=`$CYGPATH -u "$windows_path"`
27355    new_path="$unix_path"
27356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27358    new_path="$unix_path"
27359  fi
27360
27361  if test "x$path" != "x$new_path"; then
27362    BOOT_JDK="$new_path"
27363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27365  fi
27366
27367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27369
27370    else
27371      # We're on a unix platform. Hooray! :)
27372      path="$BOOT_JDK"
27373      has_space=`$ECHO "$path" | $GREP " "`
27374      if test "x$has_space" != x; then
27375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27376$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27377        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27378      fi
27379
27380      # Use eval to expand a potential ~
27381      eval path="$path"
27382      if test ! -f "$path" && test ! -d "$path"; then
27383        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27384      fi
27385
27386      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27387    fi
27388  fi
27389
27390            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27391$as_echo_n "checking for Boot JDK... " >&6; }
27392            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27393$as_echo "$BOOT_JDK" >&6; }
27394            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27395$as_echo_n "checking Boot JDK version... " >&6; }
27396            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27398$as_echo "$BOOT_JDK_VERSION" >&6; }
27399          fi # end check jdk version
27400        fi # end check javac
27401      fi # end check java
27402    fi # end check boot jdk found
27403  fi
27404
27405    done
27406  fi
27407
27408
27409    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27410    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27411      # Do we have a bin/java?
27412      if test ! -x "$BOOT_JDK/bin/java"; then
27413        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27415        BOOT_JDK_FOUND=no
27416      else
27417        # Do we have a bin/javac?
27418        if test ! -x "$BOOT_JDK/bin/javac"; then
27419          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27421          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27422$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27423          BOOT_JDK_FOUND=no
27424        else
27425          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27426          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27427
27428          # Extra M4 quote needed to protect [] in grep expression.
27429          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27430          if test "x$FOUND_CORRECT_VERSION" = x; then
27431            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27433            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27434$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27435            BOOT_JDK_FOUND=no
27436          else
27437            # We're done! :-)
27438            BOOT_JDK_FOUND=yes
27439
27440  # Only process if variable expands to non-empty
27441
27442  if test "x$BOOT_JDK" != x; then
27443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27444
27445  # Input might be given as Windows format, start by converting to
27446  # unix format.
27447  path="$BOOT_JDK"
27448  new_path=`$CYGPATH -u "$path"`
27449
27450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27453  # "foo.exe" is OK but "foo" is an error.
27454  #
27455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27456  # It is also a way to make sure we got the proper file name for the real test later on.
27457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27458  if test "x$test_shortpath" = x; then
27459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27461    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27462  fi
27463
27464  # Call helper function which possibly converts this using DOS-style short mode.
27465  # If so, the updated path is stored in $new_path.
27466
27467  input_path="$new_path"
27468  # Check if we need to convert this using DOS-style short mode. If the path
27469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27470  # take no chances and rewrite it.
27471  # Note: m4 eats our [], so we need to use [ and ] instead.
27472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27473  if test "x$has_forbidden_chars" != x; then
27474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27478      # Going to short mode and back again did indeed matter. Since short mode is
27479      # case insensitive, let's make it lowercase to improve readability.
27480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27481      # Now convert it back to Unix-style (cygpath)
27482      input_path=`$CYGPATH -u "$shortmode_path"`
27483      new_path="$input_path"
27484    fi
27485  fi
27486
27487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27488  if test "x$test_cygdrive_prefix" = x; then
27489    # As a simple fix, exclude /usr/bin since it's not a real path.
27490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27492      # a path prefixed by /cygdrive for fixpath to work.
27493      new_path="$CYGWIN_ROOT_PATH$input_path"
27494    fi
27495  fi
27496
27497
27498  if test "x$path" != "x$new_path"; then
27499    BOOT_JDK="$new_path"
27500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27501$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27502  fi
27503
27504    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27505
27506  path="$BOOT_JDK"
27507  has_colon=`$ECHO $path | $GREP ^.:`
27508  new_path="$path"
27509  if test "x$has_colon" = x; then
27510    # Not in mixed or Windows style, start by that.
27511    new_path=`cmd //c echo $path`
27512  fi
27513
27514
27515  input_path="$new_path"
27516  # Check if we need to convert this using DOS-style short mode. If the path
27517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27518  # take no chances and rewrite it.
27519  # Note: m4 eats our [], so we need to use [ and ] instead.
27520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27521  if test "x$has_forbidden_chars" != x; then
27522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27524  fi
27525
27526
27527  windows_path="$new_path"
27528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27529    unix_path=`$CYGPATH -u "$windows_path"`
27530    new_path="$unix_path"
27531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27533    new_path="$unix_path"
27534  fi
27535
27536  if test "x$path" != "x$new_path"; then
27537    BOOT_JDK="$new_path"
27538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27540  fi
27541
27542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27544
27545    else
27546      # We're on a unix platform. Hooray! :)
27547      path="$BOOT_JDK"
27548      has_space=`$ECHO "$path" | $GREP " "`
27549      if test "x$has_space" != x; then
27550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27552        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27553      fi
27554
27555      # Use eval to expand a potential ~
27556      eval path="$path"
27557      if test ! -f "$path" && test ! -d "$path"; then
27558        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27559      fi
27560
27561      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27562    fi
27563  fi
27564
27565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27566$as_echo_n "checking for Boot JDK... " >&6; }
27567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27568$as_echo "$BOOT_JDK" >&6; }
27569            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27570$as_echo_n "checking Boot JDK version... " >&6; }
27571            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27573$as_echo "$BOOT_JDK_VERSION" >&6; }
27574          fi # end check jdk version
27575        fi # end check javac
27576      fi # end check java
27577    fi # end check boot jdk found
27578  fi
27579
27580  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27581
27582  if test "x$BOOT_JDK_FOUND" = xno; then
27583    # Now execute the test
27584
27585  BOOT_JDK_PREFIX="/usr/lib/jvm"
27586  BOOT_JDK_SUFFIX=""
27587  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27588  if test "x$ALL_JDKS_FOUND" != x; then
27589    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27590
27591  if test "x$BOOT_JDK_FOUND" = xno; then
27592    # Now execute the test
27593
27594        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27595        if test -d "$BOOT_JDK"; then
27596          BOOT_JDK_FOUND=maybe
27597          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27598$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27599        fi
27600
27601
27602    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27603    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27604      # Do we have a bin/java?
27605      if test ! -x "$BOOT_JDK/bin/java"; then
27606        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27608        BOOT_JDK_FOUND=no
27609      else
27610        # Do we have a bin/javac?
27611        if test ! -x "$BOOT_JDK/bin/javac"; then
27612          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27614          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27615$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27616          BOOT_JDK_FOUND=no
27617        else
27618          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27619          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27620
27621          # Extra M4 quote needed to protect [] in grep expression.
27622          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27623          if test "x$FOUND_CORRECT_VERSION" = x; then
27624            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27626            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27627$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27628            BOOT_JDK_FOUND=no
27629          else
27630            # We're done! :-)
27631            BOOT_JDK_FOUND=yes
27632
27633  # Only process if variable expands to non-empty
27634
27635  if test "x$BOOT_JDK" != x; then
27636    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27637
27638  # Input might be given as Windows format, start by converting to
27639  # unix format.
27640  path="$BOOT_JDK"
27641  new_path=`$CYGPATH -u "$path"`
27642
27643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27646  # "foo.exe" is OK but "foo" is an error.
27647  #
27648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27649  # It is also a way to make sure we got the proper file name for the real test later on.
27650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27651  if test "x$test_shortpath" = x; then
27652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27654    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27655  fi
27656
27657  # Call helper function which possibly converts this using DOS-style short mode.
27658  # If so, the updated path is stored in $new_path.
27659
27660  input_path="$new_path"
27661  # Check if we need to convert this using DOS-style short mode. If the path
27662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27663  # take no chances and rewrite it.
27664  # Note: m4 eats our [], so we need to use [ and ] instead.
27665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27666  if test "x$has_forbidden_chars" != x; then
27667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27671      # Going to short mode and back again did indeed matter. Since short mode is
27672      # case insensitive, let's make it lowercase to improve readability.
27673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27674      # Now convert it back to Unix-style (cygpath)
27675      input_path=`$CYGPATH -u "$shortmode_path"`
27676      new_path="$input_path"
27677    fi
27678  fi
27679
27680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27681  if test "x$test_cygdrive_prefix" = x; then
27682    # As a simple fix, exclude /usr/bin since it's not a real path.
27683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27685      # a path prefixed by /cygdrive for fixpath to work.
27686      new_path="$CYGWIN_ROOT_PATH$input_path"
27687    fi
27688  fi
27689
27690
27691  if test "x$path" != "x$new_path"; then
27692    BOOT_JDK="$new_path"
27693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27695  fi
27696
27697    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27698
27699  path="$BOOT_JDK"
27700  has_colon=`$ECHO $path | $GREP ^.:`
27701  new_path="$path"
27702  if test "x$has_colon" = x; then
27703    # Not in mixed or Windows style, start by that.
27704    new_path=`cmd //c echo $path`
27705  fi
27706
27707
27708  input_path="$new_path"
27709  # Check if we need to convert this using DOS-style short mode. If the path
27710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27711  # take no chances and rewrite it.
27712  # Note: m4 eats our [], so we need to use [ and ] instead.
27713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27714  if test "x$has_forbidden_chars" != x; then
27715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27717  fi
27718
27719
27720  windows_path="$new_path"
27721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27722    unix_path=`$CYGPATH -u "$windows_path"`
27723    new_path="$unix_path"
27724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27726    new_path="$unix_path"
27727  fi
27728
27729  if test "x$path" != "x$new_path"; then
27730    BOOT_JDK="$new_path"
27731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27733  fi
27734
27735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27737
27738    else
27739      # We're on a unix platform. Hooray! :)
27740      path="$BOOT_JDK"
27741      has_space=`$ECHO "$path" | $GREP " "`
27742      if test "x$has_space" != x; then
27743        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27744$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27745        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27746      fi
27747
27748      # Use eval to expand a potential ~
27749      eval path="$path"
27750      if test ! -f "$path" && test ! -d "$path"; then
27751        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27752      fi
27753
27754      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27755    fi
27756  fi
27757
27758            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27759$as_echo_n "checking for Boot JDK... " >&6; }
27760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27761$as_echo "$BOOT_JDK" >&6; }
27762            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27763$as_echo_n "checking Boot JDK version... " >&6; }
27764            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27766$as_echo "$BOOT_JDK_VERSION" >&6; }
27767          fi # end check jdk version
27768        fi # end check javac
27769      fi # end check java
27770    fi # end check boot jdk found
27771  fi
27772
27773    done
27774  fi
27775
27776
27777    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27778    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27779      # Do we have a bin/java?
27780      if test ! -x "$BOOT_JDK/bin/java"; then
27781        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27783        BOOT_JDK_FOUND=no
27784      else
27785        # Do we have a bin/javac?
27786        if test ! -x "$BOOT_JDK/bin/javac"; then
27787          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27789          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27790$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27791          BOOT_JDK_FOUND=no
27792        else
27793          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27794          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27795
27796          # Extra M4 quote needed to protect [] in grep expression.
27797          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27798          if test "x$FOUND_CORRECT_VERSION" = x; then
27799            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27801            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27802$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27803            BOOT_JDK_FOUND=no
27804          else
27805            # We're done! :-)
27806            BOOT_JDK_FOUND=yes
27807
27808  # Only process if variable expands to non-empty
27809
27810  if test "x$BOOT_JDK" != x; then
27811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27812
27813  # Input might be given as Windows format, start by converting to
27814  # unix format.
27815  path="$BOOT_JDK"
27816  new_path=`$CYGPATH -u "$path"`
27817
27818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27821  # "foo.exe" is OK but "foo" is an error.
27822  #
27823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27824  # It is also a way to make sure we got the proper file name for the real test later on.
27825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27826  if test "x$test_shortpath" = x; then
27827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27829    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27830  fi
27831
27832  # Call helper function which possibly converts this using DOS-style short mode.
27833  # If so, the updated path is stored in $new_path.
27834
27835  input_path="$new_path"
27836  # Check if we need to convert this using DOS-style short mode. If the path
27837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27838  # take no chances and rewrite it.
27839  # Note: m4 eats our [], so we need to use [ and ] instead.
27840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27841  if test "x$has_forbidden_chars" != x; then
27842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27846      # Going to short mode and back again did indeed matter. Since short mode is
27847      # case insensitive, let's make it lowercase to improve readability.
27848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27849      # Now convert it back to Unix-style (cygpath)
27850      input_path=`$CYGPATH -u "$shortmode_path"`
27851      new_path="$input_path"
27852    fi
27853  fi
27854
27855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27856  if test "x$test_cygdrive_prefix" = x; then
27857    # As a simple fix, exclude /usr/bin since it's not a real path.
27858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27860      # a path prefixed by /cygdrive for fixpath to work.
27861      new_path="$CYGWIN_ROOT_PATH$input_path"
27862    fi
27863  fi
27864
27865
27866  if test "x$path" != "x$new_path"; then
27867    BOOT_JDK="$new_path"
27868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27870  fi
27871
27872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27873
27874  path="$BOOT_JDK"
27875  has_colon=`$ECHO $path | $GREP ^.:`
27876  new_path="$path"
27877  if test "x$has_colon" = x; then
27878    # Not in mixed or Windows style, start by that.
27879    new_path=`cmd //c echo $path`
27880  fi
27881
27882
27883  input_path="$new_path"
27884  # Check if we need to convert this using DOS-style short mode. If the path
27885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27886  # take no chances and rewrite it.
27887  # Note: m4 eats our [], so we need to use [ and ] instead.
27888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27889  if test "x$has_forbidden_chars" != x; then
27890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27892  fi
27893
27894
27895  windows_path="$new_path"
27896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27897    unix_path=`$CYGPATH -u "$windows_path"`
27898    new_path="$unix_path"
27899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27901    new_path="$unix_path"
27902  fi
27903
27904  if test "x$path" != "x$new_path"; then
27905    BOOT_JDK="$new_path"
27906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27908  fi
27909
27910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27912
27913    else
27914      # We're on a unix platform. Hooray! :)
27915      path="$BOOT_JDK"
27916      has_space=`$ECHO "$path" | $GREP " "`
27917      if test "x$has_space" != x; then
27918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27921      fi
27922
27923      # Use eval to expand a potential ~
27924      eval path="$path"
27925      if test ! -f "$path" && test ! -d "$path"; then
27926        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27927      fi
27928
27929      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27930    fi
27931  fi
27932
27933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27934$as_echo_n "checking for Boot JDK... " >&6; }
27935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27936$as_echo "$BOOT_JDK" >&6; }
27937            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27938$as_echo_n "checking Boot JDK version... " >&6; }
27939            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27941$as_echo "$BOOT_JDK_VERSION" >&6; }
27942          fi # end check jdk version
27943        fi # end check javac
27944      fi # end check java
27945    fi # end check boot jdk found
27946  fi
27947
27948  fi
27949
27950
27951    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27952    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27953      # Do we have a bin/java?
27954      if test ! -x "$BOOT_JDK/bin/java"; then
27955        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27957        BOOT_JDK_FOUND=no
27958      else
27959        # Do we have a bin/javac?
27960        if test ! -x "$BOOT_JDK/bin/javac"; then
27961          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27963          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27964$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27965          BOOT_JDK_FOUND=no
27966        else
27967          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27968          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27969
27970          # Extra M4 quote needed to protect [] in grep expression.
27971          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27972          if test "x$FOUND_CORRECT_VERSION" = x; then
27973            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27975            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27976$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27977            BOOT_JDK_FOUND=no
27978          else
27979            # We're done! :-)
27980            BOOT_JDK_FOUND=yes
27981
27982  # Only process if variable expands to non-empty
27983
27984  if test "x$BOOT_JDK" != x; then
27985    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27986
27987  # Input might be given as Windows format, start by converting to
27988  # unix format.
27989  path="$BOOT_JDK"
27990  new_path=`$CYGPATH -u "$path"`
27991
27992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27995  # "foo.exe" is OK but "foo" is an error.
27996  #
27997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27998  # It is also a way to make sure we got the proper file name for the real test later on.
27999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28000  if test "x$test_shortpath" = x; then
28001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28002$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28003    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28004  fi
28005
28006  # Call helper function which possibly converts this using DOS-style short mode.
28007  # If so, the updated path is stored in $new_path.
28008
28009  input_path="$new_path"
28010  # Check if we need to convert this using DOS-style short mode. If the path
28011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28012  # take no chances and rewrite it.
28013  # Note: m4 eats our [], so we need to use [ and ] instead.
28014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28015  if test "x$has_forbidden_chars" != x; then
28016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28020      # Going to short mode and back again did indeed matter. Since short mode is
28021      # case insensitive, let's make it lowercase to improve readability.
28022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28023      # Now convert it back to Unix-style (cygpath)
28024      input_path=`$CYGPATH -u "$shortmode_path"`
28025      new_path="$input_path"
28026    fi
28027  fi
28028
28029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28030  if test "x$test_cygdrive_prefix" = x; then
28031    # As a simple fix, exclude /usr/bin since it's not a real path.
28032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28034      # a path prefixed by /cygdrive for fixpath to work.
28035      new_path="$CYGWIN_ROOT_PATH$input_path"
28036    fi
28037  fi
28038
28039
28040  if test "x$path" != "x$new_path"; then
28041    BOOT_JDK="$new_path"
28042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28043$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28044  fi
28045
28046    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28047
28048  path="$BOOT_JDK"
28049  has_colon=`$ECHO $path | $GREP ^.:`
28050  new_path="$path"
28051  if test "x$has_colon" = x; then
28052    # Not in mixed or Windows style, start by that.
28053    new_path=`cmd //c echo $path`
28054  fi
28055
28056
28057  input_path="$new_path"
28058  # Check if we need to convert this using DOS-style short mode. If the path
28059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28060  # take no chances and rewrite it.
28061  # Note: m4 eats our [], so we need to use [ and ] instead.
28062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28063  if test "x$has_forbidden_chars" != x; then
28064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28066  fi
28067
28068
28069  windows_path="$new_path"
28070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28071    unix_path=`$CYGPATH -u "$windows_path"`
28072    new_path="$unix_path"
28073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28075    new_path="$unix_path"
28076  fi
28077
28078  if test "x$path" != "x$new_path"; then
28079    BOOT_JDK="$new_path"
28080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28081$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28082  fi
28083
28084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28086
28087    else
28088      # We're on a unix platform. Hooray! :)
28089      path="$BOOT_JDK"
28090      has_space=`$ECHO "$path" | $GREP " "`
28091      if test "x$has_space" != x; then
28092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28094        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28095      fi
28096
28097      # Use eval to expand a potential ~
28098      eval path="$path"
28099      if test ! -f "$path" && test ! -d "$path"; then
28100        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28101      fi
28102
28103      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28104    fi
28105  fi
28106
28107            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28108$as_echo_n "checking for Boot JDK... " >&6; }
28109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28110$as_echo "$BOOT_JDK" >&6; }
28111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28112$as_echo_n "checking Boot JDK version... " >&6; }
28113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28115$as_echo "$BOOT_JDK_VERSION" >&6; }
28116          fi # end check jdk version
28117        fi # end check javac
28118      fi # end check java
28119    fi # end check boot jdk found
28120  fi
28121
28122
28123  # If we haven't found anything yet, we've truly lost. Give up.
28124  if test "x$BOOT_JDK_FOUND" = xno; then
28125
28126  # Print a helpful message on how to acquire the necessary build dependency.
28127  # openjdk is the help tag: freetype, cups, alsa etc
28128  MISSING_DEPENDENCY=openjdk
28129
28130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28131    cygwin_help $MISSING_DEPENDENCY
28132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28133    msys_help $MISSING_DEPENDENCY
28134  else
28135    PKGHANDLER_COMMAND=
28136
28137    case $PKGHANDLER in
28138      apt-get)
28139        apt_help     $MISSING_DEPENDENCY ;;
28140      yum)
28141        yum_help     $MISSING_DEPENDENCY ;;
28142      port)
28143        port_help    $MISSING_DEPENDENCY ;;
28144      pkgutil)
28145        pkgutil_help $MISSING_DEPENDENCY ;;
28146      pkgadd)
28147        pkgadd_help  $MISSING_DEPENDENCY ;;
28148    esac
28149
28150    if test "x$PKGHANDLER_COMMAND" != x; then
28151      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28152    fi
28153  fi
28154
28155    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28156$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28157    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28158$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28159    as_fn_error $? "Cannot continue" "$LINENO" 5
28160  fi
28161
28162
28163
28164  # Setup tools from the Boot JDK.
28165
28166  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28167
28168  # Publish this variable in the help.
28169
28170
28171  if [ -z "${JAVA+x}" ]; then
28172    # The variable is not set by user, try to locate tool using the code snippet
28173
28174      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28175$as_echo_n "checking for java in Boot JDK... " >&6; }
28176      JAVA=$BOOT_JDK/bin/java
28177      if test ! -x $JAVA; then
28178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28179$as_echo "not found" >&6; }
28180        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28181$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28182        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28183      fi
28184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28185$as_echo "ok" >&6; }
28186
28187
28188  else
28189    # The variable is set, but is it from the command line or the environment?
28190
28191    # Try to remove the string !JAVA! from our list.
28192    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28193    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28194      # If it failed, the variable was not from the command line. Ignore it,
28195      # but warn the user (except for BASH, which is always set by the calling BASH).
28196      if test "xJAVA" != xBASH; then
28197        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28198$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28199      fi
28200      # Try to locate tool using the code snippet
28201
28202      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28203$as_echo_n "checking for java in Boot JDK... " >&6; }
28204      JAVA=$BOOT_JDK/bin/java
28205      if test ! -x $JAVA; then
28206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28207$as_echo "not found" >&6; }
28208        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28209$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28210        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28211      fi
28212      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28213$as_echo "ok" >&6; }
28214
28215
28216    else
28217      # If it succeeded, then it was overridden by the user. We will use it
28218      # for the tool.
28219
28220      # First remove it from the list of overridden variables, so we can test
28221      # for unknown variables in the end.
28222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28223
28224      # Check if we try to supply an empty value
28225      if test "x$JAVA" = x; then
28226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28227$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28229$as_echo_n "checking for JAVA... " >&6; }
28230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28231$as_echo "disabled" >&6; }
28232      else
28233        # Check if the provided tool contains a complete path.
28234        tool_specified="$JAVA"
28235        tool_basename="${tool_specified##*/}"
28236        if test "x$tool_basename" = "x$tool_specified"; then
28237          # A command without a complete path is provided, search $PATH.
28238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28239$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28240          # Extract the first word of "$tool_basename", so it can be a program name with args.
28241set dummy $tool_basename; ac_word=$2
28242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28243$as_echo_n "checking for $ac_word... " >&6; }
28244if ${ac_cv_path_JAVA+:} false; then :
28245  $as_echo_n "(cached) " >&6
28246else
28247  case $JAVA in
28248  [\\/]* | ?:[\\/]*)
28249  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28250  ;;
28251  *)
28252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28253for as_dir in $PATH
28254do
28255  IFS=$as_save_IFS
28256  test -z "$as_dir" && as_dir=.
28257    for ac_exec_ext in '' $ac_executable_extensions; do
28258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28259    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28261    break 2
28262  fi
28263done
28264  done
28265IFS=$as_save_IFS
28266
28267  ;;
28268esac
28269fi
28270JAVA=$ac_cv_path_JAVA
28271if test -n "$JAVA"; then
28272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28273$as_echo "$JAVA" >&6; }
28274else
28275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28276$as_echo "no" >&6; }
28277fi
28278
28279
28280          if test "x$JAVA" = x; then
28281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28282          fi
28283        else
28284          # Otherwise we believe it is a complete path. Use it as it is.
28285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28286$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28288$as_echo_n "checking for JAVA... " >&6; }
28289          if test ! -x "$tool_specified"; then
28290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28291$as_echo "not found" >&6; }
28292            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28293          fi
28294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28295$as_echo "$tool_specified" >&6; }
28296        fi
28297      fi
28298    fi
28299
28300  fi
28301
28302
28303
28304  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28305
28306  # Publish this variable in the help.
28307
28308
28309  if [ -z "${JAVAC+x}" ]; then
28310    # The variable is not set by user, try to locate tool using the code snippet
28311
28312      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28313$as_echo_n "checking for javac in Boot JDK... " >&6; }
28314      JAVAC=$BOOT_JDK/bin/javac
28315      if test ! -x $JAVAC; then
28316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28317$as_echo "not found" >&6; }
28318        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28319$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28320        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28321      fi
28322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28323$as_echo "ok" >&6; }
28324
28325
28326  else
28327    # The variable is set, but is it from the command line or the environment?
28328
28329    # Try to remove the string !JAVAC! from our list.
28330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28332      # If it failed, the variable was not from the command line. Ignore it,
28333      # but warn the user (except for BASH, which is always set by the calling BASH).
28334      if test "xJAVAC" != xBASH; then
28335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28336$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28337      fi
28338      # Try to locate tool using the code snippet
28339
28340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28341$as_echo_n "checking for javac in Boot JDK... " >&6; }
28342      JAVAC=$BOOT_JDK/bin/javac
28343      if test ! -x $JAVAC; then
28344        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28345$as_echo "not found" >&6; }
28346        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28347$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28348        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28349      fi
28350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28351$as_echo "ok" >&6; }
28352
28353
28354    else
28355      # If it succeeded, then it was overridden by the user. We will use it
28356      # for the tool.
28357
28358      # First remove it from the list of overridden variables, so we can test
28359      # for unknown variables in the end.
28360      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28361
28362      # Check if we try to supply an empty value
28363      if test "x$JAVAC" = x; then
28364        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28365$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28366        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28367$as_echo_n "checking for JAVAC... " >&6; }
28368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28369$as_echo "disabled" >&6; }
28370      else
28371        # Check if the provided tool contains a complete path.
28372        tool_specified="$JAVAC"
28373        tool_basename="${tool_specified##*/}"
28374        if test "x$tool_basename" = "x$tool_specified"; then
28375          # A command without a complete path is provided, search $PATH.
28376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28377$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28378          # Extract the first word of "$tool_basename", so it can be a program name with args.
28379set dummy $tool_basename; ac_word=$2
28380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28381$as_echo_n "checking for $ac_word... " >&6; }
28382if ${ac_cv_path_JAVAC+:} false; then :
28383  $as_echo_n "(cached) " >&6
28384else
28385  case $JAVAC in
28386  [\\/]* | ?:[\\/]*)
28387  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28388  ;;
28389  *)
28390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28391for as_dir in $PATH
28392do
28393  IFS=$as_save_IFS
28394  test -z "$as_dir" && as_dir=.
28395    for ac_exec_ext in '' $ac_executable_extensions; do
28396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28397    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28399    break 2
28400  fi
28401done
28402  done
28403IFS=$as_save_IFS
28404
28405  ;;
28406esac
28407fi
28408JAVAC=$ac_cv_path_JAVAC
28409if test -n "$JAVAC"; then
28410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28411$as_echo "$JAVAC" >&6; }
28412else
28413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28414$as_echo "no" >&6; }
28415fi
28416
28417
28418          if test "x$JAVAC" = x; then
28419            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28420          fi
28421        else
28422          # Otherwise we believe it is a complete path. Use it as it is.
28423          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28424$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28425          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28426$as_echo_n "checking for JAVAC... " >&6; }
28427          if test ! -x "$tool_specified"; then
28428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28429$as_echo "not found" >&6; }
28430            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28431          fi
28432          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28433$as_echo "$tool_specified" >&6; }
28434        fi
28435      fi
28436    fi
28437
28438  fi
28439
28440
28441
28442  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28443
28444  # Publish this variable in the help.
28445
28446
28447  if [ -z "${JAVAH+x}" ]; then
28448    # The variable is not set by user, try to locate tool using the code snippet
28449
28450      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28451$as_echo_n "checking for javah in Boot JDK... " >&6; }
28452      JAVAH=$BOOT_JDK/bin/javah
28453      if test ! -x $JAVAH; then
28454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28455$as_echo "not found" >&6; }
28456        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28457$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28458        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28459      fi
28460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28461$as_echo "ok" >&6; }
28462
28463
28464  else
28465    # The variable is set, but is it from the command line or the environment?
28466
28467    # Try to remove the string !JAVAH! from our list.
28468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28470      # If it failed, the variable was not from the command line. Ignore it,
28471      # but warn the user (except for BASH, which is always set by the calling BASH).
28472      if test "xJAVAH" != xBASH; then
28473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28474$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28475      fi
28476      # Try to locate tool using the code snippet
28477
28478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28479$as_echo_n "checking for javah in Boot JDK... " >&6; }
28480      JAVAH=$BOOT_JDK/bin/javah
28481      if test ! -x $JAVAH; then
28482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28483$as_echo "not found" >&6; }
28484        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28485$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28486        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28487      fi
28488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28489$as_echo "ok" >&6; }
28490
28491
28492    else
28493      # If it succeeded, then it was overridden by the user. We will use it
28494      # for the tool.
28495
28496      # First remove it from the list of overridden variables, so we can test
28497      # for unknown variables in the end.
28498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28499
28500      # Check if we try to supply an empty value
28501      if test "x$JAVAH" = x; then
28502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28503$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28505$as_echo_n "checking for JAVAH... " >&6; }
28506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28507$as_echo "disabled" >&6; }
28508      else
28509        # Check if the provided tool contains a complete path.
28510        tool_specified="$JAVAH"
28511        tool_basename="${tool_specified##*/}"
28512        if test "x$tool_basename" = "x$tool_specified"; then
28513          # A command without a complete path is provided, search $PATH.
28514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28515$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28516          # Extract the first word of "$tool_basename", so it can be a program name with args.
28517set dummy $tool_basename; ac_word=$2
28518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28519$as_echo_n "checking for $ac_word... " >&6; }
28520if ${ac_cv_path_JAVAH+:} false; then :
28521  $as_echo_n "(cached) " >&6
28522else
28523  case $JAVAH in
28524  [\\/]* | ?:[\\/]*)
28525  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28526  ;;
28527  *)
28528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28529for as_dir in $PATH
28530do
28531  IFS=$as_save_IFS
28532  test -z "$as_dir" && as_dir=.
28533    for ac_exec_ext in '' $ac_executable_extensions; do
28534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28535    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28537    break 2
28538  fi
28539done
28540  done
28541IFS=$as_save_IFS
28542
28543  ;;
28544esac
28545fi
28546JAVAH=$ac_cv_path_JAVAH
28547if test -n "$JAVAH"; then
28548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28549$as_echo "$JAVAH" >&6; }
28550else
28551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28552$as_echo "no" >&6; }
28553fi
28554
28555
28556          if test "x$JAVAH" = x; then
28557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28558          fi
28559        else
28560          # Otherwise we believe it is a complete path. Use it as it is.
28561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28562$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28564$as_echo_n "checking for JAVAH... " >&6; }
28565          if test ! -x "$tool_specified"; then
28566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28567$as_echo "not found" >&6; }
28568            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28569          fi
28570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28571$as_echo "$tool_specified" >&6; }
28572        fi
28573      fi
28574    fi
28575
28576  fi
28577
28578
28579
28580  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28581
28582  # Publish this variable in the help.
28583
28584
28585  if [ -z "${JAR+x}" ]; then
28586    # The variable is not set by user, try to locate tool using the code snippet
28587
28588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28589$as_echo_n "checking for jar in Boot JDK... " >&6; }
28590      JAR=$BOOT_JDK/bin/jar
28591      if test ! -x $JAR; then
28592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28593$as_echo "not found" >&6; }
28594        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28595$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28596        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28597      fi
28598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28599$as_echo "ok" >&6; }
28600
28601
28602  else
28603    # The variable is set, but is it from the command line or the environment?
28604
28605    # Try to remove the string !JAR! from our list.
28606    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
28607    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28608      # If it failed, the variable was not from the command line. Ignore it,
28609      # but warn the user (except for BASH, which is always set by the calling BASH).
28610      if test "xJAR" != xBASH; then
28611        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
28612$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
28613      fi
28614      # Try to locate tool using the code snippet
28615
28616      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28617$as_echo_n "checking for jar in Boot JDK... " >&6; }
28618      JAR=$BOOT_JDK/bin/jar
28619      if test ! -x $JAR; then
28620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28621$as_echo "not found" >&6; }
28622        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28623$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28624        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28625      fi
28626      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28627$as_echo "ok" >&6; }
28628
28629
28630    else
28631      # If it succeeded, then it was overridden by the user. We will use it
28632      # for the tool.
28633
28634      # First remove it from the list of overridden variables, so we can test
28635      # for unknown variables in the end.
28636      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28637
28638      # Check if we try to supply an empty value
28639      if test "x$JAR" = x; then
28640        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
28641$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
28642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28643$as_echo_n "checking for JAR... " >&6; }
28644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28645$as_echo "disabled" >&6; }
28646      else
28647        # Check if the provided tool contains a complete path.
28648        tool_specified="$JAR"
28649        tool_basename="${tool_specified##*/}"
28650        if test "x$tool_basename" = "x$tool_specified"; then
28651          # A command without a complete path is provided, search $PATH.
28652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
28653$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
28654          # Extract the first word of "$tool_basename", so it can be a program name with args.
28655set dummy $tool_basename; ac_word=$2
28656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28657$as_echo_n "checking for $ac_word... " >&6; }
28658if ${ac_cv_path_JAR+:} false; then :
28659  $as_echo_n "(cached) " >&6
28660else
28661  case $JAR in
28662  [\\/]* | ?:[\\/]*)
28663  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
28664  ;;
28665  *)
28666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28667for as_dir in $PATH
28668do
28669  IFS=$as_save_IFS
28670  test -z "$as_dir" && as_dir=.
28671    for ac_exec_ext in '' $ac_executable_extensions; do
28672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28673    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
28674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28675    break 2
28676  fi
28677done
28678  done
28679IFS=$as_save_IFS
28680
28681  ;;
28682esac
28683fi
28684JAR=$ac_cv_path_JAR
28685if test -n "$JAR"; then
28686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
28687$as_echo "$JAR" >&6; }
28688else
28689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28690$as_echo "no" >&6; }
28691fi
28692
28693
28694          if test "x$JAR" = x; then
28695            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28696          fi
28697        else
28698          # Otherwise we believe it is a complete path. Use it as it is.
28699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
28700$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
28701          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28702$as_echo_n "checking for JAR... " >&6; }
28703          if test ! -x "$tool_specified"; then
28704            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28705$as_echo "not found" >&6; }
28706            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
28707          fi
28708          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28709$as_echo "$tool_specified" >&6; }
28710        fi
28711      fi
28712    fi
28713
28714  fi
28715
28716
28717
28718  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28719
28720  # Publish this variable in the help.
28721
28722
28723  if [ -z "${JARSIGNER+x}" ]; then
28724    # The variable is not set by user, try to locate tool using the code snippet
28725
28726      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28727$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28728      JARSIGNER=$BOOT_JDK/bin/jarsigner
28729      if test ! -x $JARSIGNER; then
28730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28731$as_echo "not found" >&6; }
28732        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28733$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28734        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28735      fi
28736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28737$as_echo "ok" >&6; }
28738
28739
28740  else
28741    # The variable is set, but is it from the command line or the environment?
28742
28743    # Try to remove the string !JARSIGNER! from our list.
28744    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
28745    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28746      # If it failed, the variable was not from the command line. Ignore it,
28747      # but warn the user (except for BASH, which is always set by the calling BASH).
28748      if test "xJARSIGNER" != xBASH; then
28749        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
28750$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
28751      fi
28752      # Try to locate tool using the code snippet
28753
28754      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28755$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28756      JARSIGNER=$BOOT_JDK/bin/jarsigner
28757      if test ! -x $JARSIGNER; then
28758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28759$as_echo "not found" >&6; }
28760        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28761$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28762        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28763      fi
28764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28765$as_echo "ok" >&6; }
28766
28767
28768    else
28769      # If it succeeded, then it was overridden by the user. We will use it
28770      # for the tool.
28771
28772      # First remove it from the list of overridden variables, so we can test
28773      # for unknown variables in the end.
28774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28775
28776      # Check if we try to supply an empty value
28777      if test "x$JARSIGNER" = x; then
28778        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
28779$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
28780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28781$as_echo_n "checking for JARSIGNER... " >&6; }
28782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28783$as_echo "disabled" >&6; }
28784      else
28785        # Check if the provided tool contains a complete path.
28786        tool_specified="$JARSIGNER"
28787        tool_basename="${tool_specified##*/}"
28788        if test "x$tool_basename" = "x$tool_specified"; then
28789          # A command without a complete path is provided, search $PATH.
28790          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
28791$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
28792          # Extract the first word of "$tool_basename", so it can be a program name with args.
28793set dummy $tool_basename; ac_word=$2
28794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28795$as_echo_n "checking for $ac_word... " >&6; }
28796if ${ac_cv_path_JARSIGNER+:} false; then :
28797  $as_echo_n "(cached) " >&6
28798else
28799  case $JARSIGNER in
28800  [\\/]* | ?:[\\/]*)
28801  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
28802  ;;
28803  *)
28804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28805for as_dir in $PATH
28806do
28807  IFS=$as_save_IFS
28808  test -z "$as_dir" && as_dir=.
28809    for ac_exec_ext in '' $ac_executable_extensions; do
28810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28811    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
28812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28813    break 2
28814  fi
28815done
28816  done
28817IFS=$as_save_IFS
28818
28819  ;;
28820esac
28821fi
28822JARSIGNER=$ac_cv_path_JARSIGNER
28823if test -n "$JARSIGNER"; then
28824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
28825$as_echo "$JARSIGNER" >&6; }
28826else
28827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28828$as_echo "no" >&6; }
28829fi
28830
28831
28832          if test "x$JARSIGNER" = x; then
28833            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28834          fi
28835        else
28836          # Otherwise we believe it is a complete path. Use it as it is.
28837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
28838$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
28839          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28840$as_echo_n "checking for JARSIGNER... " >&6; }
28841          if test ! -x "$tool_specified"; then
28842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28843$as_echo "not found" >&6; }
28844            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
28845          fi
28846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28847$as_echo "$tool_specified" >&6; }
28848        fi
28849      fi
28850    fi
28851
28852  fi
28853
28854
28855
28856  # Finally, set some other options...
28857
28858  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
28859  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
28860
28861
28862
28863  # Check if the boot jdk is 32 or 64 bit
28864  if "$JAVA" -d64 -version > /dev/null 2>&1; then
28865    BOOT_JDK_BITS="64"
28866  else
28867    BOOT_JDK_BITS="32"
28868  fi
28869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
28870$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
28871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
28872$as_echo "$BOOT_JDK_BITS" >&6; }
28873
28874
28875
28876###############################################################################
28877#
28878# Configure the sources to use. We can add or override individual directories.
28879#
28880###############################################################################
28881
28882
28883  # Where are the sources. Any of these can be overridden
28884  # using --with-override-corba and the likes.
28885  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
28886  CORBA_TOPDIR="$SRC_ROOT/corba"
28887  JAXP_TOPDIR="$SRC_ROOT/jaxp"
28888  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
28889  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
28890  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
28891  JDK_TOPDIR="$SRC_ROOT/jdk"
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902  ###############################################################################
28903  #
28904  # Pickup additional source for a component from outside of the source root
28905  # or override source for a component.
28906  #
28907
28908# Check whether --with-add-source-root was given.
28909if test "${with_add_source_root+set}" = set; then :
28910  withval=$with_add_source_root;
28911fi
28912
28913
28914
28915# Check whether --with-override-source-root was given.
28916if test "${with_override_source_root+set}" = set; then :
28917  withval=$with_override_source_root;
28918fi
28919
28920
28921
28922# Check whether --with-adds-and-overrides was given.
28923if test "${with_adds_and_overrides+set}" = set; then :
28924  withval=$with_adds_and_overrides;
28925fi
28926
28927
28928  if test "x$with_adds_and_overrides" != x; then
28929    with_add_source_root="$with_adds_and_overrides/adds"
28930    with_override_source_root="$with_adds_and_overrides/overrides"
28931  fi
28932
28933  if test "x$with_add_source_root" != x; then
28934    if ! test -d $with_add_source_root; then
28935      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
28936    fi
28937    CURDIR="$PWD"
28938    cd "$with_add_source_root"
28939    ADD_SRC_ROOT="`pwd`"
28940    cd "$CURDIR"
28941    # Verify that the addon source root does not have any root makefiles.
28942    # If it does, then it is usually an error, prevent this.
28943    if test -f $with_add_source_root/langtools/make/Makefile; then
28944      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
28945    fi
28946    if test -f $with_add_source_root/corba/make/Makefile; then
28947      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
28948    fi
28949    if test -f $with_add_source_root/jaxp/make/Makefile; then
28950      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
28951    fi
28952    if test -f $with_add_source_root/jaxws/make/Makefile; then
28953      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
28954    fi
28955    if test -f $with_add_source_root/hotspot/make/Makefile; then
28956      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
28957    fi
28958    if test -f $with_add_source_root/nashorn/make/Makefile; then
28959      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
28960    fi
28961    if test -f $with_add_source_root/jdk/make/Makefile; then
28962      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
28963    fi
28964  fi
28965
28966
28967  if test "x$with_override_source_root" != x; then
28968    if ! test -d $with_override_source_root; then
28969      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
28970    fi
28971    CURDIR="$PWD"
28972    cd "$with_override_source_root"
28973    OVERRIDE_SRC_ROOT="`pwd`"
28974    cd "$CURDIR"
28975    if test -f $with_override_source_root/langtools/make/Makefile; then
28976      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
28977    fi
28978    if test -f $with_override_source_root/corba/make/Makefile; then
28979      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
28980    fi
28981    if test -f $with_override_source_root/jaxp/make/Makefile; then
28982      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
28983    fi
28984    if test -f $with_override_source_root/jaxws/make/Makefile; then
28985      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
28986    fi
28987    if test -f $with_override_source_root/hotspot/make/Makefile; then
28988      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
28989    fi
28990    if test -f $with_override_source_root/nashorn/make/Makefile; then
28991      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
28992    fi
28993    if test -f $with_override_source_root/jdk/make/Makefile; then
28994      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
28995    fi
28996  fi
28997
28998
28999  ###############################################################################
29000  #
29001  # Override a repo completely, this is used for example when you have 3 small
29002  # development sandboxes of the langtools sources and want to avoid having 3 full
29003  # OpenJDK sources checked out on disk.
29004  #
29005  # Assuming that the 3 langtools sandboxes are located here:
29006  # /home/fredrik/sandbox1/langtools
29007  # /home/fredrik/sandbox2/langtools
29008  # /home/fredrik/sandbox3/langtools
29009  #
29010  # From the source root you create build subdirs manually:
29011  #     mkdir -p build1 build2 build3
29012  # in each build directory run:
29013  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
29014  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
29015  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
29016  #
29017
29018
29019# Check whether --with-override-langtools was given.
29020if test "${with_override_langtools+set}" = set; then :
29021  withval=$with_override_langtools;
29022fi
29023
29024
29025
29026# Check whether --with-override-corba was given.
29027if test "${with_override_corba+set}" = set; then :
29028  withval=$with_override_corba;
29029fi
29030
29031
29032
29033# Check whether --with-override-jaxp was given.
29034if test "${with_override_jaxp+set}" = set; then :
29035  withval=$with_override_jaxp;
29036fi
29037
29038
29039
29040# Check whether --with-override-jaxws was given.
29041if test "${with_override_jaxws+set}" = set; then :
29042  withval=$with_override_jaxws;
29043fi
29044
29045
29046
29047# Check whether --with-override-hotspot was given.
29048if test "${with_override_hotspot+set}" = set; then :
29049  withval=$with_override_hotspot;
29050fi
29051
29052
29053
29054# Check whether --with-override-nashorn was given.
29055if test "${with_override_nashorn+set}" = set; then :
29056  withval=$with_override_nashorn;
29057fi
29058
29059
29060
29061# Check whether --with-override-jdk was given.
29062if test "${with_override_jdk+set}" = set; then :
29063  withval=$with_override_jdk;
29064fi
29065
29066
29067  if test "x$with_override_langtools" != x; then
29068    CURDIR="$PWD"
29069    cd "$with_override_langtools"
29070    LANGTOOLS_TOPDIR="`pwd`"
29071    cd "$CURDIR"
29072    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
29073      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
29074    fi
29075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
29076$as_echo_n "checking if langtools should be overridden... " >&6; }
29077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
29078$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
29079  fi
29080  if test "x$with_override_corba" != x; then
29081    CURDIR="$PWD"
29082    cd "$with_override_corba"
29083    CORBA_TOPDIR="`pwd`"
29084    cd "$CURDIR"
29085    if ! test -f $CORBA_TOPDIR/make/Makefile; then
29086      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
29087    fi
29088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
29089$as_echo_n "checking if corba should be overridden... " >&6; }
29090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
29091$as_echo "yes with $CORBA_TOPDIR" >&6; }
29092  fi
29093  if test "x$with_override_jaxp" != x; then
29094    CURDIR="$PWD"
29095    cd "$with_override_jaxp"
29096    JAXP_TOPDIR="`pwd`"
29097    cd "$CURDIR"
29098    if ! test -f $JAXP_TOPDIR/make/Makefile; then
29099      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
29100    fi
29101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
29102$as_echo_n "checking if jaxp should be overridden... " >&6; }
29103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
29104$as_echo "yes with $JAXP_TOPDIR" >&6; }
29105  fi
29106  if test "x$with_override_jaxws" != x; then
29107    CURDIR="$PWD"
29108    cd "$with_override_jaxws"
29109    JAXWS_TOPDIR="`pwd`"
29110    cd "$CURDIR"
29111    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
29112      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
29113    fi
29114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
29115$as_echo_n "checking if jaxws should be overridden... " >&6; }
29116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
29117$as_echo "yes with $JAXWS_TOPDIR" >&6; }
29118  fi
29119  if test "x$with_override_hotspot" != x; then
29120    CURDIR="$PWD"
29121    cd "$with_override_hotspot"
29122    HOTSPOT_TOPDIR="`pwd`"
29123    cd "$CURDIR"
29124    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
29125      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
29126    fi
29127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
29128$as_echo_n "checking if hotspot should be overridden... " >&6; }
29129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
29130$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
29131  fi
29132  if test "x$with_override_nashorn" != x; then
29133    CURDIR="$PWD"
29134    cd "$with_override_nashorn"
29135    NASHORN_TOPDIR="`pwd`"
29136    cd "$CURDIR"
29137    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
29138      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
29139    fi
29140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
29141$as_echo_n "checking if nashorn should be overridden... " >&6; }
29142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
29143$as_echo "yes with $NASHORN_TOPDIR" >&6; }
29144  fi
29145  if test "x$with_override_jdk" != x; then
29146    CURDIR="$PWD"
29147    cd "$with_override_jdk"
29148    JDK_TOPDIR="`pwd`"
29149    cd "$CURDIR"
29150    if ! test -f $JDK_TOPDIR/make/Makefile; then
29151      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
29152    fi
29153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
29154$as_echo_n "checking if JDK should be overridden... " >&6; }
29155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
29156$as_echo "yes with $JDK_TOPDIR" >&6; }
29157  fi
29158
29159
29160  BUILD_OUTPUT="$OUTPUT_ROOT"
29161
29162
29163  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29164  BUILD_HOTSPOT=true
29165
29166
29167
29168# Check whether --with-import-hotspot was given.
29169if test "${with_import_hotspot+set}" = set; then :
29170  withval=$with_import_hotspot;
29171fi
29172
29173  if test "x$with_import_hotspot" != x; then
29174    CURDIR="$PWD"
29175    cd "$with_import_hotspot"
29176    HOTSPOT_DIST="`pwd`"
29177    cd "$CURDIR"
29178    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29179      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29180    fi
29181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29182$as_echo_n "checking if hotspot should be imported... " >&6; }
29183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29184$as_echo "yes from $HOTSPOT_DIST" >&6; }
29185    BUILD_HOTSPOT=false
29186  fi
29187
29188  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29189
29190
29191###############################################################################
29192#
29193# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29194# native code.
29195#
29196###############################################################################
29197
29198# See if we are doing a complete static build or not
29199
29200  # Check whether --enable-static-build was given.
29201if test "${enable_static_build+set}" = set; then :
29202  enableval=$enable_static_build;
29203fi
29204
29205  STATIC_BUILD=false
29206  if test "x$enable_static_build" = "xyes"; then
29207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29208$as_echo_n "checking if static build is enabled... " >&6; }
29209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29210$as_echo "yes" >&6; }
29211    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29212      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29213    fi
29214    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29215    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29216    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29217    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29218    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29219    STATIC_BUILD=true
29220  elif test "x$enable_static_build" = "xno"; then
29221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29222$as_echo_n "checking if static build is enabled... " >&6; }
29223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29224$as_echo "no" >&6; }
29225  elif test "x$enable_static_build" != "x"; then
29226    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29227  fi
29228
29229
29230
29231
29232# First determine the toolchain type (compiler family)
29233
29234
29235# Check whether --with-toolchain-type was given.
29236if test "${with_toolchain_type+set}" = set; then :
29237  withval=$with_toolchain_type;
29238fi
29239
29240
29241  # Use indirect variable referencing
29242  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29243  VALID_TOOLCHAINS=${!toolchain_var_name}
29244
29245  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29246    if test -n "$XCODEBUILD"; then
29247      # On Mac OS X, default toolchain to clang after Xcode 5
29248      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29249      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29250      if test $? -ne 0; then
29251        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29252      fi
29253      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29254          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29255          $CUT -f 1 -d .`
29256      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29257$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29258      if test $XCODE_MAJOR_VERSION -ge 5; then
29259          DEFAULT_TOOLCHAIN="clang"
29260      else
29261          DEFAULT_TOOLCHAIN="gcc"
29262      fi
29263    else
29264      # If Xcode is not installed, but the command line tools are
29265      # then we can't run xcodebuild. On these systems we should
29266      # default to clang
29267      DEFAULT_TOOLCHAIN="clang"
29268    fi
29269  else
29270    # First toolchain type in the list is the default
29271    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29272  fi
29273
29274  if test "x$with_toolchain_type" = xlist; then
29275    # List all toolchains
29276    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29277$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29278    for toolchain in $VALID_TOOLCHAINS; do
29279      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29280      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29281      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29282    done
29283
29284    exit 0
29285  elif test "x$with_toolchain_type" != x; then
29286    # User override; check that it is valid
29287    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29288      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29289$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29290      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29291$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29292      as_fn_error $? "Cannot continue." "$LINENO" 5
29293    fi
29294    TOOLCHAIN_TYPE=$with_toolchain_type
29295  else
29296    # No flag given, use default
29297    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29298  fi
29299
29300
29301  TOOLCHAIN_CC_BINARY_clang="clang"
29302  TOOLCHAIN_CC_BINARY_gcc="gcc"
29303  TOOLCHAIN_CC_BINARY_microsoft="cl"
29304  TOOLCHAIN_CC_BINARY_solstudio="cc"
29305  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29306
29307  TOOLCHAIN_CXX_BINARY_clang="clang++"
29308  TOOLCHAIN_CXX_BINARY_gcc="g++"
29309  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29310  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29311  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29312
29313  # Use indirect variable referencing
29314  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29315  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29316  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29317  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29318  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29319  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29320
29321
29322  # Define filename patterns
29323  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29324    LIBRARY_PREFIX=
29325    SHARED_LIBRARY_SUFFIX='.dll'
29326    STATIC_LIBRARY_SUFFIX='.lib'
29327    SHARED_LIBRARY='$1.dll'
29328    STATIC_LIBRARY='$1.lib'
29329    OBJ_SUFFIX='.obj'
29330    EXE_SUFFIX='.exe'
29331  else
29332    LIBRARY_PREFIX=lib
29333    SHARED_LIBRARY_SUFFIX='.so'
29334    STATIC_LIBRARY_SUFFIX='.a'
29335    SHARED_LIBRARY='lib$1.so'
29336    STATIC_LIBRARY='lib$1.a'
29337    OBJ_SUFFIX='.o'
29338    EXE_SUFFIX=''
29339    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29340      # For full static builds, we're overloading the SHARED_LIBRARY
29341      # variables in order to limit the amount of changes required.
29342      # It would be better to remove SHARED and just use LIBRARY and
29343      # LIBRARY_SUFFIX for libraries that can be built either
29344      # shared or static and use STATIC_* for libraries that are
29345      # always built statically.
29346      if test "x$STATIC_BUILD" = xtrue; then
29347        SHARED_LIBRARY='lib$1.a'
29348        SHARED_LIBRARY_SUFFIX='.a'
29349      else
29350        SHARED_LIBRARY='lib$1.dylib'
29351        SHARED_LIBRARY_SUFFIX='.dylib'
29352      fi
29353    fi
29354  fi
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29366    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29367$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29368  else
29369    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29370$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29371  fi
29372
29373
29374# User supplied flags should be used when configure detects compilers
29375
29376  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29377    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29378$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29379  fi
29380
29381  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29382    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29383$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29384  fi
29385
29386  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29387    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29388$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29389  fi
29390
29391
29392# Check whether --with-extra-cflags was given.
29393if test "${with_extra_cflags+set}" = set; then :
29394  withval=$with_extra_cflags;
29395fi
29396
29397
29398
29399# Check whether --with-extra-cxxflags was given.
29400if test "${with_extra_cxxflags+set}" = set; then :
29401  withval=$with_extra_cxxflags;
29402fi
29403
29404
29405
29406# Check whether --with-extra-ldflags was given.
29407if test "${with_extra_ldflags+set}" = set; then :
29408  withval=$with_extra_ldflags;
29409fi
29410
29411
29412  EXTRA_CFLAGS="$with_extra_cflags"
29413  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29414  EXTRA_LDFLAGS="$with_extra_ldflags"
29415
29416  # Hotspot needs these set in their legacy form
29417  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29418  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29419  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29420
29421
29422
29423
29424
29425  # The global CFLAGS and LDLAGS variables are used by configure tests and
29426  # should include the extra parameters
29427  CFLAGS="$EXTRA_CFLAGS"
29428  CXXFLAGS="$EXTRA_CXXFLAGS"
29429  LDFLAGS="$EXTRA_LDFLAGS"
29430  CPPFLAGS=""
29431
29432# The sysroot cflags are needed for configure to be able to run the compilers
29433
29434  if test "x$SYSROOT" != "x"; then
29435    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29436      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29437        # Solaris Studio does not have a concept of sysroot. Instead we must
29438        # make sure the default include and lib dirs are appended to each
29439        # compile and link command line.
29440        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29441        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29442            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29443            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29444      fi
29445    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29446      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29447      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29448    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29449      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29450      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29451    fi
29452    # Propagate the sysroot args to hotspot
29453    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29454    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29455    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29456    # The global CFLAGS and LDFLAGS variables need these for configure to function
29457    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29458    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29459    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29460    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29461  fi
29462
29463  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29464    # We also need -iframework<path>/System/Library/Frameworks
29465    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29466    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29467    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29468    # set this here so it doesn't have to be peppered throughout the forest
29469    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29470    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29471  fi
29472
29473
29474
29475
29476
29477# Then detect the actual binaries needed
29478
29479  # FIXME: Is this needed?
29480  ac_ext=cpp
29481ac_cpp='$CXXCPP $CPPFLAGS'
29482ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29483ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29484ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29485
29486
29487  # Store the CFLAGS etc passed to the configure script.
29488  ORG_CFLAGS="$CFLAGS"
29489  ORG_CXXFLAGS="$CXXFLAGS"
29490
29491  # autoconf magic only relies on PATH, so update it if tools dir is specified
29492  OLD_PATH="$PATH"
29493
29494  # On Windows, we need to detect the visual studio installation first.
29495  # This will change the PATH, but we need to keep that new PATH even
29496  # after toolchain detection is done, since the compiler (on x86) uses
29497  # it for DLL resolution in runtime.
29498  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29499      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29500
29501  # Store path to cygwin link.exe to help excluding it when searching for
29502  # VS linker. This must be done before changing the PATH when looking for VS.
29503  # Extract the first word of "link", so it can be a program name with args.
29504set dummy link; ac_word=$2
29505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29506$as_echo_n "checking for $ac_word... " >&6; }
29507if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29508  $as_echo_n "(cached) " >&6
29509else
29510  case $CYGWIN_LINK in
29511  [\\/]* | ?:[\\/]*)
29512  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29513  ;;
29514  *)
29515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29516for as_dir in $PATH
29517do
29518  IFS=$as_save_IFS
29519  test -z "$as_dir" && as_dir=.
29520    for ac_exec_ext in '' $ac_executable_extensions; do
29521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29522    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29524    break 2
29525  fi
29526done
29527  done
29528IFS=$as_save_IFS
29529
29530  ;;
29531esac
29532fi
29533CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29534if test -n "$CYGWIN_LINK"; then
29535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29536$as_echo "$CYGWIN_LINK" >&6; }
29537else
29538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29539$as_echo "no" >&6; }
29540fi
29541
29542
29543  if test "x$CYGWIN_LINK" != x; then
29544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29545$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29546    "$CYGWIN_LINK" --version > /dev/null
29547    if test $? -eq 0 ; then
29548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29549$as_echo "yes" >&6; }
29550    else
29551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29552$as_echo "no" >&6; }
29553      # This might be the VS linker. Don't exclude it later on.
29554      CYGWIN_LINK=""
29555    fi
29556  fi
29557
29558  # First-hand choice is to locate and run the vsvars bat file.
29559
29560
29561# Check whether --with-toolchain-version was given.
29562if test "${with_toolchain_version+set}" = set; then :
29563  withval=$with_toolchain_version;
29564fi
29565
29566
29567  if test "x$with_toolchain_version" = xlist; then
29568    # List all toolchains
29569    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29570$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29571    for version in $VALID_VS_VERSIONS; do
29572      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29573      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29574    done
29575
29576    exit 0
29577  elif test "x$DEVKIT_VS_VERSION" != x; then
29578    VS_VERSION=$DEVKIT_VS_VERSION
29579    TOOLCHAIN_VERSION=$VS_VERSION
29580    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29581    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29582    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29583    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29584    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29585    VS_PATH="$TOOLCHAIN_PATH:$PATH"
29586
29587    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29588    # can still be exported as INCLUDE for compiler invocations without
29589    # SYSROOT_CFLAGS
29590    OLDIFS="$IFS"
29591    IFS=";"
29592    for i in $DEVKIT_VS_INCLUDE; do
29593      ipath=$i
29594
29595  unix_path="$ipath"
29596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29597    windows_path=`$CYGPATH -m "$unix_path"`
29598    ipath="$windows_path"
29599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29600    windows_path=`cmd //c echo $unix_path`
29601    ipath="$windows_path"
29602  fi
29603
29604      VS_INCLUDE="$VS_INCLUDE;$ipath"
29605    done
29606    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29607    # as LIB for compiler invocations without SYSROOT_LDFLAGS
29608    for i in $DEVKIT_VS_LIB; do
29609      libpath=$i
29610
29611  unix_path="$libpath"
29612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29613    windows_path=`$CYGPATH -m "$unix_path"`
29614    libpath="$windows_path"
29615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29616    windows_path=`cmd //c echo $unix_path`
29617    libpath="$windows_path"
29618  fi
29619
29620      VS_LIB="$VS_LIB;$libpath"
29621    done
29622    IFS="$OLDIFS"
29623
29624    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29625$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29626
29627  elif test "x$with_toolchain_version" != x; then
29628    # User override; check that it is valid
29629    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29630      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29631$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29632      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29633$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29634      as_fn_error $? "Cannot continue." "$LINENO" 5
29635    fi
29636    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29637  else
29638    # No flag given, use default
29639    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29640  fi
29641
29642  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29643
29644  VS_VERSION="$VS_VERSION"
29645  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29646  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29647  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29648  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29649
29650  # When using --with-tools-dir, assume it points to the correct and default
29651  # version of Visual Studio or that --with-toolchain-version was also set.
29652  if test "x$with_tools_dir" != x; then
29653
29654  if test "x$VS_ENV_CMD" = x; then
29655    VS_VERSION="${VS_VERSION}"
29656    VS_BASE="$with_tools_dir/../.."
29657    METHOD="--with-tools-dir"
29658
29659    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29660      VCVARSFILE="vc/bin/vcvars32.bat"
29661    else
29662      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29663    fi
29664
29665
29666  windows_path="$VS_BASE"
29667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29668    unix_path=`$CYGPATH -u "$windows_path"`
29669    VS_BASE="$unix_path"
29670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29672    VS_BASE="$unix_path"
29673  fi
29674
29675    if test -d "$VS_BASE"; then
29676      if test -f "$VS_BASE/$VCVARSFILE"; then
29677        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29678$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29679        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29680        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29681        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29682        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29683      else
29684        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29685$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29686        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29687$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29688      fi
29689    fi
29690  fi
29691
29692
29693  if test "x$VS_ENV_CMD" = x; then
29694    VS_VERSION="${VS_VERSION}"
29695    VS_BASE="$with_tools_dir/../../.."
29696    METHOD="--with-tools-dir"
29697
29698    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29699      VCVARSFILE="vc/bin/vcvars32.bat"
29700    else
29701      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29702    fi
29703
29704
29705  windows_path="$VS_BASE"
29706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29707    unix_path=`$CYGPATH -u "$windows_path"`
29708    VS_BASE="$unix_path"
29709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29711    VS_BASE="$unix_path"
29712  fi
29713
29714    if test -d "$VS_BASE"; then
29715      if test -f "$VS_BASE/$VCVARSFILE"; then
29716        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29717$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29718        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29719        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29720        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29721        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29722      else
29723        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29724$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29725        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29726$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29727      fi
29728    fi
29729  fi
29730
29731    if test "x$VS_ENV_CMD" = x; then
29732      # Having specified an argument which is incorrect will produce an instant failure;
29733      # we should not go on looking
29734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29735$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29736      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29737$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29738      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29739$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29740      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29741    fi
29742  fi
29743
29744  VS_ENV_CMD=""
29745  VS_ENV_ARGS=""
29746
29747  if test "x$VS_COMNTOOLS" != x; then
29748
29749  if test "x$VS_ENV_CMD" = x; then
29750    VS_VERSION="${VS_VERSION}"
29751    VS_BASE="$VS_COMNTOOLS/../.."
29752    METHOD="$VS_COMNTOOLS_VAR variable"
29753
29754    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29755      VCVARSFILE="vc/bin/vcvars32.bat"
29756    else
29757      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29758    fi
29759
29760
29761  windows_path="$VS_BASE"
29762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29763    unix_path=`$CYGPATH -u "$windows_path"`
29764    VS_BASE="$unix_path"
29765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29767    VS_BASE="$unix_path"
29768  fi
29769
29770    if test -d "$VS_BASE"; then
29771      if test -f "$VS_BASE/$VCVARSFILE"; then
29772        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29773$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29774        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29775        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29776        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29777        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29778      else
29779        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29780$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29781        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29782$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29783      fi
29784    fi
29785  fi
29786
29787  fi
29788  if test "x$PROGRAMFILES" != x; then
29789
29790  if test "x$VS_ENV_CMD" = x; then
29791    VS_VERSION="${VS_VERSION}"
29792    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
29793    METHOD="well-known name"
29794
29795    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29796      VCVARSFILE="vc/bin/vcvars32.bat"
29797    else
29798      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29799    fi
29800
29801
29802  windows_path="$VS_BASE"
29803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29804    unix_path=`$CYGPATH -u "$windows_path"`
29805    VS_BASE="$unix_path"
29806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29808    VS_BASE="$unix_path"
29809  fi
29810
29811    if test -d "$VS_BASE"; then
29812      if test -f "$VS_BASE/$VCVARSFILE"; then
29813        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29814$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29815        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29816        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29817        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29818        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29819      else
29820        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29821$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29822        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29823$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29824      fi
29825    fi
29826  fi
29827
29828  fi
29829  # Work around the insanely named ProgramFiles(x86) env variable
29830  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
29831  if test "x$PROGRAMFILES_X86" != x; then
29832
29833  if test "x$VS_ENV_CMD" = x; then
29834    VS_VERSION="${VS_VERSION}"
29835    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
29836    METHOD="well-known name"
29837
29838    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29839      VCVARSFILE="vc/bin/vcvars32.bat"
29840    else
29841      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29842    fi
29843
29844
29845  windows_path="$VS_BASE"
29846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29847    unix_path=`$CYGPATH -u "$windows_path"`
29848    VS_BASE="$unix_path"
29849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29851    VS_BASE="$unix_path"
29852  fi
29853
29854    if test -d "$VS_BASE"; then
29855      if test -f "$VS_BASE/$VCVARSFILE"; then
29856        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29857$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29858        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29859        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29860        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29861        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29862      else
29863        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29864$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29865        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29866$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29867      fi
29868    fi
29869  fi
29870
29871  fi
29872
29873  if test "x$VS_ENV_CMD" = x; then
29874    VS_VERSION="${VS_VERSION}"
29875    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
29876    METHOD="well-known name"
29877
29878    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29879      VCVARSFILE="vc/bin/vcvars32.bat"
29880    else
29881      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29882    fi
29883
29884
29885  windows_path="$VS_BASE"
29886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29887    unix_path=`$CYGPATH -u "$windows_path"`
29888    VS_BASE="$unix_path"
29889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29891    VS_BASE="$unix_path"
29892  fi
29893
29894    if test -d "$VS_BASE"; then
29895      if test -f "$VS_BASE/$VCVARSFILE"; then
29896        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29897$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29898        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29899        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29900        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29901        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29902      else
29903        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29904$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29905        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29906$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29907      fi
29908    fi
29909  fi
29910
29911
29912  if test "x$VS_ENV_CMD" = x; then
29913    VS_VERSION="${VS_VERSION}"
29914    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
29915    METHOD="well-known name"
29916
29917    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29918      VCVARSFILE="vc/bin/vcvars32.bat"
29919    else
29920      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29921    fi
29922
29923
29924  windows_path="$VS_BASE"
29925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29926    unix_path=`$CYGPATH -u "$windows_path"`
29927    VS_BASE="$unix_path"
29928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29930    VS_BASE="$unix_path"
29931  fi
29932
29933    if test -d "$VS_BASE"; then
29934      if test -f "$VS_BASE/$VCVARSFILE"; then
29935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29936$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29937        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29938        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29939        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29940        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29941      else
29942        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29943$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29944        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29945$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29946      fi
29947    fi
29948  fi
29949
29950
29951  if test "x$SDK_INSTALL_DIR" != x; then
29952    if test "x$ProgramW6432" != x; then
29953
29954  if test "x$VS_ENV_CMD" = x; then
29955    VS_VERSION="${VS_VERSION}"
29956    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
29957    METHOD="well-known name"
29958
29959  windows_path="$WIN_SDK_BASE"
29960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29961    unix_path=`$CYGPATH -u "$windows_path"`
29962    WIN_SDK_BASE="$unix_path"
29963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29965    WIN_SDK_BASE="$unix_path"
29966  fi
29967
29968    if test -d "$WIN_SDK_BASE"; then
29969      # There have been cases of partial or broken SDK installations. A missing
29970      # lib dir is not going to work.
29971      if test ! -d "$WIN_SDK_BASE/lib"; then
29972        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29973$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29974        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29975$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29976      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29977        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29978$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29979        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29980        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29981          VS_ENV_ARGS="/x86"
29982        else
29983          VS_ENV_ARGS="/x64"
29984        fi
29985        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29986        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29987        # TODO: improve detection for other versions of SDK
29988        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29989      else
29990        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29991$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29992        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29993$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29994      fi
29995    fi
29996  fi
29997
29998    fi
29999    if test "x$PROGRAMW6432" != x; then
30000
30001  if test "x$VS_ENV_CMD" = x; then
30002    VS_VERSION="${VS_VERSION}"
30003    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30004    METHOD="well-known name"
30005
30006  windows_path="$WIN_SDK_BASE"
30007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30008    unix_path=`$CYGPATH -u "$windows_path"`
30009    WIN_SDK_BASE="$unix_path"
30010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30012    WIN_SDK_BASE="$unix_path"
30013  fi
30014
30015    if test -d "$WIN_SDK_BASE"; then
30016      # There have been cases of partial or broken SDK installations. A missing
30017      # lib dir is not going to work.
30018      if test ! -d "$WIN_SDK_BASE/lib"; then
30019        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30020$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30021        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30022$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30023      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30024        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30025$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30026        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30027        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30028          VS_ENV_ARGS="/x86"
30029        else
30030          VS_ENV_ARGS="/x64"
30031        fi
30032        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30033        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30034        # TODO: improve detection for other versions of SDK
30035        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30036      else
30037        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30038$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30039        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30040$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30041      fi
30042    fi
30043  fi
30044
30045    fi
30046    if test "x$PROGRAMFILES" != x; then
30047
30048  if test "x$VS_ENV_CMD" = x; then
30049    VS_VERSION="${VS_VERSION}"
30050    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30051    METHOD="well-known name"
30052
30053  windows_path="$WIN_SDK_BASE"
30054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30055    unix_path=`$CYGPATH -u "$windows_path"`
30056    WIN_SDK_BASE="$unix_path"
30057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30059    WIN_SDK_BASE="$unix_path"
30060  fi
30061
30062    if test -d "$WIN_SDK_BASE"; then
30063      # There have been cases of partial or broken SDK installations. A missing
30064      # lib dir is not going to work.
30065      if test ! -d "$WIN_SDK_BASE/lib"; then
30066        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30067$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30068        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30069$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30070      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30071        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30072$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30073        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30074        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30075          VS_ENV_ARGS="/x86"
30076        else
30077          VS_ENV_ARGS="/x64"
30078        fi
30079        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30080        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30081        # TODO: improve detection for other versions of SDK
30082        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30083      else
30084        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30085$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30086        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30087$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30088      fi
30089    fi
30090  fi
30091
30092    fi
30093
30094  if test "x$VS_ENV_CMD" = x; then
30095    VS_VERSION="${VS_VERSION}"
30096    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30097    METHOD="well-known name"
30098
30099  windows_path="$WIN_SDK_BASE"
30100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30101    unix_path=`$CYGPATH -u "$windows_path"`
30102    WIN_SDK_BASE="$unix_path"
30103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30105    WIN_SDK_BASE="$unix_path"
30106  fi
30107
30108    if test -d "$WIN_SDK_BASE"; then
30109      # There have been cases of partial or broken SDK installations. A missing
30110      # lib dir is not going to work.
30111      if test ! -d "$WIN_SDK_BASE/lib"; then
30112        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30113$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30114        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30115$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30116      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30117        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30118$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30119        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30120        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30121          VS_ENV_ARGS="/x86"
30122        else
30123          VS_ENV_ARGS="/x64"
30124        fi
30125        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30126        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30127        # TODO: improve detection for other versions of SDK
30128        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30129      else
30130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30131$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30132        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30133$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30134      fi
30135    fi
30136  fi
30137
30138
30139  if test "x$VS_ENV_CMD" = x; then
30140    VS_VERSION="${VS_VERSION}"
30141    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30142    METHOD="well-known name"
30143
30144  windows_path="$WIN_SDK_BASE"
30145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30146    unix_path=`$CYGPATH -u "$windows_path"`
30147    WIN_SDK_BASE="$unix_path"
30148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30150    WIN_SDK_BASE="$unix_path"
30151  fi
30152
30153    if test -d "$WIN_SDK_BASE"; then
30154      # There have been cases of partial or broken SDK installations. A missing
30155      # lib dir is not going to work.
30156      if test ! -d "$WIN_SDK_BASE/lib"; then
30157        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30158$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30159        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30160$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30161      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30162        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30163$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30164        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30165        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30166          VS_ENV_ARGS="/x86"
30167        else
30168          VS_ENV_ARGS="/x64"
30169        fi
30170        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30171        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30172        # TODO: improve detection for other versions of SDK
30173        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30174      else
30175        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30176$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30177        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30178$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30179      fi
30180    fi
30181  fi
30182
30183  fi
30184
30185    if test "x$VS_ENV_CMD" != x; then
30186      TOOLCHAIN_VERSION=$VS_VERSION
30187      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30188      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30189      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30190      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30191      # The rest of the variables are already evaled while probing
30192      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30193$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30194      break
30195    fi
30196  done
30197
30198
30199  # If we have a devkit, skip all of the below.
30200  if test "x$DEVKIT_VS_VERSION" = x; then
30201    if test "x$VS_ENV_CMD" != x; then
30202      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30203
30204  # Only process if variable expands to non-empty
30205
30206  if test "x$VS_ENV_CMD" != x; then
30207    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30208
30209  # First separate the path from the arguments. This will split at the first
30210  # space.
30211  complete="$VS_ENV_CMD"
30212  path="${complete%% *}"
30213  tmp="$complete EOL"
30214  arguments="${tmp#* }"
30215
30216  # Input might be given as Windows format, start by converting to
30217  # unix format.
30218  new_path=`$CYGPATH -u "$path"`
30219
30220  # Now try to locate executable using which
30221  new_path=`$WHICH "$new_path" 2> /dev/null`
30222  # bat and cmd files are not always considered executable in cygwin causing which
30223  # to not find them
30224  if test "x$new_path" = x \
30225      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30226      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30227    new_path=`$CYGPATH -u "$path"`
30228  fi
30229  if test "x$new_path" = x; then
30230    # Oops. Which didn't find the executable.
30231    # The splitting of arguments from the executable at a space might have been incorrect,
30232    # since paths with space are more likely in Windows. Give it another try with the whole
30233    # argument.
30234    path="$complete"
30235    arguments="EOL"
30236    new_path=`$CYGPATH -u "$path"`
30237    new_path=`$WHICH "$new_path" 2> /dev/null`
30238    # bat and cmd files are not always considered executable in cygwin causing which
30239    # to not find them
30240    if test "x$new_path" = x \
30241        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30242        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30243      new_path=`$CYGPATH -u "$path"`
30244    fi
30245    if test "x$new_path" = x; then
30246      # It's still not found. Now this is an unrecoverable error.
30247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30248$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30249      has_space=`$ECHO "$complete" | $GREP " "`
30250      if test "x$has_space" != x; then
30251        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30252$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30253      fi
30254      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30255    fi
30256  fi
30257
30258  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30259  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30260  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30261  # "foo.exe" is OK but "foo" is an error.
30262  #
30263  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30264  # It is also a way to make sure we got the proper file name for the real test later on.
30265  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30266  if test "x$test_shortpath" = x; then
30267    # Short path failed, file does not exist as specified.
30268    # Try adding .exe or .cmd
30269    if test -f "${new_path}.exe"; then
30270      input_to_shortpath="${new_path}.exe"
30271    elif test -f "${new_path}.cmd"; then
30272      input_to_shortpath="${new_path}.cmd"
30273    else
30274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30275$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30276      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30277$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30278      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30279    fi
30280  else
30281    input_to_shortpath="$new_path"
30282  fi
30283
30284  # Call helper function which possibly converts this using DOS-style short mode.
30285  # If so, the updated path is stored in $new_path.
30286  new_path="$input_to_shortpath"
30287
30288  input_path="$input_to_shortpath"
30289  # Check if we need to convert this using DOS-style short mode. If the path
30290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30291  # take no chances and rewrite it.
30292  # Note: m4 eats our [], so we need to use [ and ] instead.
30293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30294  if test "x$has_forbidden_chars" != x; then
30295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30299      # Going to short mode and back again did indeed matter. Since short mode is
30300      # case insensitive, let's make it lowercase to improve readability.
30301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30302      # Now convert it back to Unix-style (cygpath)
30303      input_path=`$CYGPATH -u "$shortmode_path"`
30304      new_path="$input_path"
30305    fi
30306  fi
30307
30308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30309  if test "x$test_cygdrive_prefix" = x; then
30310    # As a simple fix, exclude /usr/bin since it's not a real path.
30311    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30313      # a path prefixed by /cygdrive for fixpath to work.
30314      new_path="$CYGWIN_ROOT_PATH$input_path"
30315    fi
30316  fi
30317
30318  # remove trailing .exe if any
30319  new_path="${new_path/%.exe/}"
30320
30321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30322
30323  # First separate the path from the arguments. This will split at the first
30324  # space.
30325  complete="$VS_ENV_CMD"
30326  path="${complete%% *}"
30327  tmp="$complete EOL"
30328  arguments="${tmp#* }"
30329
30330  # Input might be given as Windows format, start by converting to
30331  # unix format.
30332  new_path="$path"
30333
30334  windows_path="$new_path"
30335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30336    unix_path=`$CYGPATH -u "$windows_path"`
30337    new_path="$unix_path"
30338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30340    new_path="$unix_path"
30341  fi
30342
30343
30344  # Now try to locate executable using which
30345  new_path=`$WHICH "$new_path" 2> /dev/null`
30346
30347  if test "x$new_path" = x; then
30348    # Oops. Which didn't find the executable.
30349    # The splitting of arguments from the executable at a space might have been incorrect,
30350    # since paths with space are more likely in Windows. Give it another try with the whole
30351    # argument.
30352    path="$complete"
30353    arguments="EOL"
30354    new_path="$path"
30355
30356  windows_path="$new_path"
30357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30358    unix_path=`$CYGPATH -u "$windows_path"`
30359    new_path="$unix_path"
30360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30362    new_path="$unix_path"
30363  fi
30364
30365
30366    new_path=`$WHICH "$new_path" 2> /dev/null`
30367    # bat and cmd files are not always considered executable in MSYS causing which
30368    # to not find them
30369    if test "x$new_path" = x \
30370        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30371        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30372      new_path="$path"
30373
30374  windows_path="$new_path"
30375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30376    unix_path=`$CYGPATH -u "$windows_path"`
30377    new_path="$unix_path"
30378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30380    new_path="$unix_path"
30381  fi
30382
30383    fi
30384
30385    if test "x$new_path" = x; then
30386      # It's still not found. Now this is an unrecoverable error.
30387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30388$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30389      has_space=`$ECHO "$complete" | $GREP " "`
30390      if test "x$has_space" != x; then
30391        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30392$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30393      fi
30394      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30395    fi
30396  fi
30397
30398  # Now new_path has a complete unix path to the binary
30399  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30400    # Keep paths in /bin as-is, but remove trailing .exe if any
30401    new_path="${new_path/%.exe/}"
30402    # Do not save /bin paths to all_fixpath_prefixes!
30403  else
30404    # Not in mixed or Windows style, start by that.
30405    new_path=`cmd //c echo $new_path`
30406
30407  input_path="$new_path"
30408  # Check if we need to convert this using DOS-style short mode. If the path
30409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30410  # take no chances and rewrite it.
30411  # Note: m4 eats our [], so we need to use [ and ] instead.
30412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30413  if test "x$has_forbidden_chars" != x; then
30414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30415    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30416  fi
30417
30418    # Output is in $new_path
30419
30420  windows_path="$new_path"
30421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30422    unix_path=`$CYGPATH -u "$windows_path"`
30423    new_path="$unix_path"
30424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30426    new_path="$unix_path"
30427  fi
30428
30429    # remove trailing .exe if any
30430    new_path="${new_path/%.exe/}"
30431
30432    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30433    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30434  fi
30435
30436    else
30437      # We're on a unix platform. Hooray! :)
30438      # First separate the path from the arguments. This will split at the first
30439      # space.
30440      complete="$VS_ENV_CMD"
30441      path="${complete%% *}"
30442      tmp="$complete EOL"
30443      arguments="${tmp#* }"
30444
30445      # Cannot rely on the command "which" here since it doesn't always work.
30446      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30447      if test -z "$is_absolute_path"; then
30448        # Path to executable is not absolute. Find it.
30449        IFS_save="$IFS"
30450        IFS=:
30451        for p in $PATH; do
30452          if test -f "$p/$path" && test -x "$p/$path"; then
30453            new_path="$p/$path"
30454            break
30455          fi
30456        done
30457        IFS="$IFS_save"
30458      else
30459        # This is an absolute path, we can use it without further modifications.
30460        new_path="$path"
30461      fi
30462
30463      if test "x$new_path" = x; then
30464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30465$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30466        has_space=`$ECHO "$complete" | $GREP " "`
30467        if test "x$has_space" != x; then
30468          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30469$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30470        fi
30471        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30472      fi
30473    fi
30474
30475    # Now join together the path and the arguments once again
30476    if test "x$arguments" != xEOL; then
30477      new_complete="$new_path ${arguments% *}"
30478    else
30479      new_complete="$new_path"
30480    fi
30481
30482    if test "x$complete" != "x$new_complete"; then
30483      VS_ENV_CMD="$new_complete"
30484      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30485$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30486    fi
30487  fi
30488
30489
30490      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30491      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30492$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30493
30494      # We need to create a couple of temporary files.
30495      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30496      $MKDIR -p $VS_ENV_TMP_DIR
30497
30498      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30499      # Instead create a shell script which will set the relevant variables when run.
30500      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30501
30502  unix_path="$WINPATH_VS_ENV_CMD"
30503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30504    windows_path=`$CYGPATH -m "$unix_path"`
30505    WINPATH_VS_ENV_CMD="$windows_path"
30506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30507    windows_path=`cmd //c echo $unix_path`
30508    WINPATH_VS_ENV_CMD="$windows_path"
30509  fi
30510
30511      WINPATH_BASH="$BASH"
30512
30513  unix_path="$WINPATH_BASH"
30514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30515    windows_path=`$CYGPATH -m "$unix_path"`
30516    WINPATH_BASH="$windows_path"
30517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30518    windows_path=`cmd //c echo $unix_path`
30519    WINPATH_BASH="$windows_path"
30520  fi
30521
30522
30523      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30524      # script (executable by bash) that will setup the important variables.
30525      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30526      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30527      # This will end up something like:
30528      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30529      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30530      # These will end up something like:
30531      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30532      # The trailing space for everyone except PATH is no typo, but is needed due
30533      # to trailing \ in the Windows paths. These will be stripped later.
30534      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30535          >> $EXTRACT_VC_ENV_BAT_FILE
30536      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30537          >> $EXTRACT_VC_ENV_BAT_FILE
30538      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30539          >> $EXTRACT_VC_ENV_BAT_FILE
30540      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30541          >> $EXTRACT_VC_ENV_BAT_FILE
30542      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30543          >> $EXTRACT_VC_ENV_BAT_FILE
30544      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30545          >> $EXTRACT_VC_ENV_BAT_FILE
30546
30547      # Now execute the newly created bat file.
30548      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30549      # Change directory so we don't need to mess with Windows paths in redirects.
30550      cd $VS_ENV_TMP_DIR
30551      cmd /c extract-vs-env.bat | $CAT
30552      cd $CURDIR
30553
30554      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30555        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30556$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30557        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30558$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30559        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30560$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30561        as_fn_error $? "Cannot continue" "$LINENO" 5
30562      fi
30563
30564      # Now set all paths and other env variables. This will allow the rest of
30565      # the configure script to find and run the compiler in the proper way.
30566      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30567$as_echo "$as_me: Setting extracted environment variables" >&6;}
30568      . $VS_ENV_TMP_DIR/set-vs-env.sh
30569      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30570      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30571    else
30572      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30573      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30574$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30575    fi
30576  fi
30577
30578  # At this point, we should have correct variables in the environment, or we can't continue.
30579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30580$as_echo_n "checking for Visual Studio variables... " >&6; }
30581
30582  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30583      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30584    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30585      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30586$as_echo "present but broken" >&6; }
30587      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30588    else
30589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30590$as_echo "ok" >&6; }
30591      # Remove any trailing "\" ";" and " " from the variables.
30592      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30593      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30594      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30595      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30596      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30597      # Remove any paths containing # (typically F#) as that messes up make. This
30598      # is needed if visual studio was installed with F# support.
30599      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30600
30601
30602
30603
30604
30605      # Convert VS_INCLUDE into SYSROOT_CFLAGS
30606      OLDIFS="$IFS"
30607      IFS=";"
30608      for i in $VS_INCLUDE; do
30609        ipath=$i
30610        # Only process non-empty elements
30611        if test "x$ipath" != x; then
30612          IFS="$OLDIFS"
30613          # Check that directory exists before calling fixup_path
30614          testpath=$ipath
30615
30616  windows_path="$testpath"
30617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30618    unix_path=`$CYGPATH -u "$windows_path"`
30619    testpath="$unix_path"
30620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30622    testpath="$unix_path"
30623  fi
30624
30625          if test -d "$testpath"; then
30626
30627  # Only process if variable expands to non-empty
30628
30629  if test "x$ipath" != x; then
30630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30631
30632  # Input might be given as Windows format, start by converting to
30633  # unix format.
30634  path="$ipath"
30635  new_path=`$CYGPATH -u "$path"`
30636
30637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30640  # "foo.exe" is OK but "foo" is an error.
30641  #
30642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30643  # It is also a way to make sure we got the proper file name for the real test later on.
30644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30645  if test "x$test_shortpath" = x; then
30646    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30647$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30648    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30649  fi
30650
30651  # Call helper function which possibly converts this using DOS-style short mode.
30652  # If so, the updated path is stored in $new_path.
30653
30654  input_path="$new_path"
30655  # Check if we need to convert this using DOS-style short mode. If the path
30656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30657  # take no chances and rewrite it.
30658  # Note: m4 eats our [], so we need to use [ and ] instead.
30659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30660  if test "x$has_forbidden_chars" != x; then
30661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30665      # Going to short mode and back again did indeed matter. Since short mode is
30666      # case insensitive, let's make it lowercase to improve readability.
30667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30668      # Now convert it back to Unix-style (cygpath)
30669      input_path=`$CYGPATH -u "$shortmode_path"`
30670      new_path="$input_path"
30671    fi
30672  fi
30673
30674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30675  if test "x$test_cygdrive_prefix" = x; then
30676    # As a simple fix, exclude /usr/bin since it's not a real path.
30677    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30679      # a path prefixed by /cygdrive for fixpath to work.
30680      new_path="$CYGWIN_ROOT_PATH$input_path"
30681    fi
30682  fi
30683
30684
30685  if test "x$path" != "x$new_path"; then
30686    ipath="$new_path"
30687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30688$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30689  fi
30690
30691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30692
30693  path="$ipath"
30694  has_colon=`$ECHO $path | $GREP ^.:`
30695  new_path="$path"
30696  if test "x$has_colon" = x; then
30697    # Not in mixed or Windows style, start by that.
30698    new_path=`cmd //c echo $path`
30699  fi
30700
30701
30702  input_path="$new_path"
30703  # Check if we need to convert this using DOS-style short mode. If the path
30704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30705  # take no chances and rewrite it.
30706  # Note: m4 eats our [], so we need to use [ and ] instead.
30707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30708  if test "x$has_forbidden_chars" != x; then
30709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30711  fi
30712
30713
30714  windows_path="$new_path"
30715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30716    unix_path=`$CYGPATH -u "$windows_path"`
30717    new_path="$unix_path"
30718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30720    new_path="$unix_path"
30721  fi
30722
30723  if test "x$path" != "x$new_path"; then
30724    ipath="$new_path"
30725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30726$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30727  fi
30728
30729  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30730  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30731
30732    else
30733      # We're on a unix platform. Hooray! :)
30734      path="$ipath"
30735      has_space=`$ECHO "$path" | $GREP " "`
30736      if test "x$has_space" != x; then
30737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30738$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30739        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30740      fi
30741
30742      # Use eval to expand a potential ~
30743      eval path="$path"
30744      if test ! -f "$path" && test ! -d "$path"; then
30745        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30746      fi
30747
30748      ipath="`cd "$path"; $THEPWDCMD -L`"
30749    fi
30750  fi
30751
30752            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30753          fi
30754          IFS=";"
30755        fi
30756      done
30757      # Convert VS_LIB into SYSROOT_LDFLAGS
30758      for i in $VS_LIB; do
30759        libpath=$i
30760        # Only process non-empty elements
30761        if test "x$libpath" != x; then
30762          IFS="$OLDIFS"
30763          # Check that directory exists before calling fixup_path
30764          testpath=$libpath
30765
30766  windows_path="$testpath"
30767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30768    unix_path=`$CYGPATH -u "$windows_path"`
30769    testpath="$unix_path"
30770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30772    testpath="$unix_path"
30773  fi
30774
30775          if test -d "$testpath"; then
30776
30777  # Only process if variable expands to non-empty
30778
30779  if test "x$libpath" != x; then
30780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30781
30782  # Input might be given as Windows format, start by converting to
30783  # unix format.
30784  path="$libpath"
30785  new_path=`$CYGPATH -u "$path"`
30786
30787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30790  # "foo.exe" is OK but "foo" is an error.
30791  #
30792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30793  # It is also a way to make sure we got the proper file name for the real test later on.
30794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30795  if test "x$test_shortpath" = x; then
30796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30797$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30798    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
30799  fi
30800
30801  # Call helper function which possibly converts this using DOS-style short mode.
30802  # If so, the updated path is stored in $new_path.
30803
30804  input_path="$new_path"
30805  # Check if we need to convert this using DOS-style short mode. If the path
30806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30807  # take no chances and rewrite it.
30808  # Note: m4 eats our [], so we need to use [ and ] instead.
30809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30810  if test "x$has_forbidden_chars" != x; then
30811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30815      # Going to short mode and back again did indeed matter. Since short mode is
30816      # case insensitive, let's make it lowercase to improve readability.
30817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30818      # Now convert it back to Unix-style (cygpath)
30819      input_path=`$CYGPATH -u "$shortmode_path"`
30820      new_path="$input_path"
30821    fi
30822  fi
30823
30824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30825  if test "x$test_cygdrive_prefix" = x; then
30826    # As a simple fix, exclude /usr/bin since it's not a real path.
30827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30829      # a path prefixed by /cygdrive for fixpath to work.
30830      new_path="$CYGWIN_ROOT_PATH$input_path"
30831    fi
30832  fi
30833
30834
30835  if test "x$path" != "x$new_path"; then
30836    libpath="$new_path"
30837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30838$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30839  fi
30840
30841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30842
30843  path="$libpath"
30844  has_colon=`$ECHO $path | $GREP ^.:`
30845  new_path="$path"
30846  if test "x$has_colon" = x; then
30847    # Not in mixed or Windows style, start by that.
30848    new_path=`cmd //c echo $path`
30849  fi
30850
30851
30852  input_path="$new_path"
30853  # Check if we need to convert this using DOS-style short mode. If the path
30854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30855  # take no chances and rewrite it.
30856  # Note: m4 eats our [], so we need to use [ and ] instead.
30857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30858  if test "x$has_forbidden_chars" != x; then
30859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30861  fi
30862
30863
30864  windows_path="$new_path"
30865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30866    unix_path=`$CYGPATH -u "$windows_path"`
30867    new_path="$unix_path"
30868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30870    new_path="$unix_path"
30871  fi
30872
30873  if test "x$path" != "x$new_path"; then
30874    libpath="$new_path"
30875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30876$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30877  fi
30878
30879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30881
30882    else
30883      # We're on a unix platform. Hooray! :)
30884      path="$libpath"
30885      has_space=`$ECHO "$path" | $GREP " "`
30886      if test "x$has_space" != x; then
30887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30888$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30890      fi
30891
30892      # Use eval to expand a potential ~
30893      eval path="$path"
30894      if test ! -f "$path" && test ! -d "$path"; then
30895        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
30896      fi
30897
30898      libpath="`cd "$path"; $THEPWDCMD -L`"
30899    fi
30900  fi
30901
30902            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
30903          fi
30904          IFS=";"
30905        fi
30906      done
30907      IFS="$OLDIFS"
30908    fi
30909  else
30910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30911$as_echo "not found" >&6; }
30912
30913    if test "x$VS_ENV_CMD" = x; then
30914      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
30915$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
30916      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
30917$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
30918    else
30919      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
30920$as_echo "$as_me: Running the extraction script failed." >&6;}
30921    fi
30922    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30923$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30924    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30925$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30926    as_fn_error $? "Cannot continue" "$LINENO" 5
30927  fi
30928
30929    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
30930    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
30931    PATH="$VS_PATH"
30932    # The microsoft toolchain also requires INCLUDE and LIB to be set.
30933    export INCLUDE="$VS_INCLUDE"
30934    export LIB="$VS_LIB"
30935  fi
30936
30937  # For solaris we really need solaris tools, and not the GNU equivalent.
30938  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
30939  # so add that to path before starting to probe.
30940  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
30941  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
30942    PATH="/usr/ccs/bin:$PATH"
30943  fi
30944
30945  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
30946  # override all other locations.
30947  if test "x$TOOLCHAIN_PATH" != x; then
30948    PATH=$TOOLCHAIN_PATH:$PATH
30949  fi
30950
30951
30952  #
30953  # Setup the compilers (CC and CXX)
30954  #
30955
30956  COMPILER_NAME=C
30957  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
30958
30959  if test "x$CC" != x; then
30960    # User has supplied compiler name already, always let that override.
30961    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
30962$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
30963    if test "x`basename $CC`" = "x$CC"; then
30964      # A command without a complete path is provided, search $PATH.
30965
30966      for ac_prog in $CC
30967do
30968  # Extract the first word of "$ac_prog", so it can be a program name with args.
30969set dummy $ac_prog; ac_word=$2
30970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30971$as_echo_n "checking for $ac_word... " >&6; }
30972if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30973  $as_echo_n "(cached) " >&6
30974else
30975  case $POTENTIAL_CC in
30976  [\\/]* | ?:[\\/]*)
30977  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30978  ;;
30979  *)
30980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30981for as_dir in $PATH
30982do
30983  IFS=$as_save_IFS
30984  test -z "$as_dir" && as_dir=.
30985    for ac_exec_ext in '' $ac_executable_extensions; do
30986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30987    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30989    break 2
30990  fi
30991done
30992  done
30993IFS=$as_save_IFS
30994
30995  ;;
30996esac
30997fi
30998POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30999if test -n "$POTENTIAL_CC"; then
31000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31001$as_echo "$POTENTIAL_CC" >&6; }
31002else
31003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31004$as_echo "no" >&6; }
31005fi
31006
31007
31008  test -n "$POTENTIAL_CC" && break
31009done
31010
31011      if test "x$POTENTIAL_CC" != x; then
31012        CC=$POTENTIAL_CC
31013      else
31014        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31015      fi
31016    else
31017      # Otherwise it might already be a complete path
31018      if test ! -x "$CC"; then
31019        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31020      fi
31021    fi
31022  else
31023    # No user supplied value. Locate compiler ourselves.
31024
31025    # If we are cross compiling, assume cross compilation tools follows the
31026    # cross compilation standard where they are prefixed with the autoconf
31027    # standard name for the target. For example the binary
31028    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31029    # If we are not cross compiling, then the default compiler name will be
31030    # used.
31031
31032    CC=
31033    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31034    # before checking the rest of the PATH.
31035    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31036    # step, this should not be necessary.
31037    if test -n "$TOOLCHAIN_PATH"; then
31038      PATH_save="$PATH"
31039      PATH="$TOOLCHAIN_PATH"
31040      for ac_prog in $SEARCH_LIST
31041do
31042  # Extract the first word of "$ac_prog", so it can be a program name with args.
31043set dummy $ac_prog; ac_word=$2
31044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31045$as_echo_n "checking for $ac_word... " >&6; }
31046if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31047  $as_echo_n "(cached) " >&6
31048else
31049  case $TOOLCHAIN_PATH_CC in
31050  [\\/]* | ?:[\\/]*)
31051  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31052  ;;
31053  *)
31054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31055for as_dir in $PATH
31056do
31057  IFS=$as_save_IFS
31058  test -z "$as_dir" && as_dir=.
31059    for ac_exec_ext in '' $ac_executable_extensions; do
31060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31061    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31063    break 2
31064  fi
31065done
31066  done
31067IFS=$as_save_IFS
31068
31069  ;;
31070esac
31071fi
31072TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31073if test -n "$TOOLCHAIN_PATH_CC"; then
31074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31075$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31076else
31077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31078$as_echo "no" >&6; }
31079fi
31080
31081
31082  test -n "$TOOLCHAIN_PATH_CC" && break
31083done
31084
31085      CC=$TOOLCHAIN_PATH_CC
31086      PATH="$PATH_save"
31087    fi
31088
31089    # AC_PATH_PROGS can't be run multiple times with the same variable,
31090    # so create a new name for this run.
31091    if test "x$CC" = x; then
31092      for ac_prog in $SEARCH_LIST
31093do
31094  # Extract the first word of "$ac_prog", so it can be a program name with args.
31095set dummy $ac_prog; ac_word=$2
31096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31097$as_echo_n "checking for $ac_word... " >&6; }
31098if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31099  $as_echo_n "(cached) " >&6
31100else
31101  case $POTENTIAL_CC in
31102  [\\/]* | ?:[\\/]*)
31103  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31104  ;;
31105  *)
31106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31107for as_dir in $PATH
31108do
31109  IFS=$as_save_IFS
31110  test -z "$as_dir" && as_dir=.
31111    for ac_exec_ext in '' $ac_executable_extensions; do
31112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31113    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31115    break 2
31116  fi
31117done
31118  done
31119IFS=$as_save_IFS
31120
31121  ;;
31122esac
31123fi
31124POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31125if test -n "$POTENTIAL_CC"; then
31126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31127$as_echo "$POTENTIAL_CC" >&6; }
31128else
31129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31130$as_echo "no" >&6; }
31131fi
31132
31133
31134  test -n "$POTENTIAL_CC" && break
31135done
31136
31137      CC=$POTENTIAL_CC
31138    fi
31139
31140    if test "x$CC" = x; then
31141
31142  # Print a helpful message on how to acquire the necessary build dependency.
31143  # devkit is the help tag: freetype, cups, alsa etc
31144  MISSING_DEPENDENCY=devkit
31145
31146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31147    cygwin_help $MISSING_DEPENDENCY
31148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31149    msys_help $MISSING_DEPENDENCY
31150  else
31151    PKGHANDLER_COMMAND=
31152
31153    case $PKGHANDLER in
31154      apt-get)
31155        apt_help     $MISSING_DEPENDENCY ;;
31156      yum)
31157        yum_help     $MISSING_DEPENDENCY ;;
31158      port)
31159        port_help    $MISSING_DEPENDENCY ;;
31160      pkgutil)
31161        pkgutil_help $MISSING_DEPENDENCY ;;
31162      pkgadd)
31163        pkgadd_help  $MISSING_DEPENDENCY ;;
31164    esac
31165
31166    if test "x$PKGHANDLER_COMMAND" != x; then
31167      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31168    fi
31169  fi
31170
31171      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31172    fi
31173  fi
31174
31175  # Now we have a compiler binary in CC. Make sure it's okay.
31176
31177  # Only process if variable expands to non-empty
31178
31179  if test "x$CC" != x; then
31180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31181
31182  # First separate the path from the arguments. This will split at the first
31183  # space.
31184  complete="$CC"
31185  path="${complete%% *}"
31186  tmp="$complete EOL"
31187  arguments="${tmp#* }"
31188
31189  # Input might be given as Windows format, start by converting to
31190  # unix format.
31191  new_path=`$CYGPATH -u "$path"`
31192
31193  # Now try to locate executable using which
31194  new_path=`$WHICH "$new_path" 2> /dev/null`
31195  # bat and cmd files are not always considered executable in cygwin causing which
31196  # to not find them
31197  if test "x$new_path" = x \
31198      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31199      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31200    new_path=`$CYGPATH -u "$path"`
31201  fi
31202  if test "x$new_path" = x; then
31203    # Oops. Which didn't find the executable.
31204    # The splitting of arguments from the executable at a space might have been incorrect,
31205    # since paths with space are more likely in Windows. Give it another try with the whole
31206    # argument.
31207    path="$complete"
31208    arguments="EOL"
31209    new_path=`$CYGPATH -u "$path"`
31210    new_path=`$WHICH "$new_path" 2> /dev/null`
31211    # bat and cmd files are not always considered executable in cygwin causing which
31212    # to not find them
31213    if test "x$new_path" = x \
31214        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31215        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31216      new_path=`$CYGPATH -u "$path"`
31217    fi
31218    if test "x$new_path" = x; then
31219      # It's still not found. Now this is an unrecoverable error.
31220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31221$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31222      has_space=`$ECHO "$complete" | $GREP " "`
31223      if test "x$has_space" != x; then
31224        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31225$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31226      fi
31227      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31228    fi
31229  fi
31230
31231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31234  # "foo.exe" is OK but "foo" is an error.
31235  #
31236  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31237  # It is also a way to make sure we got the proper file name for the real test later on.
31238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31239  if test "x$test_shortpath" = x; then
31240    # Short path failed, file does not exist as specified.
31241    # Try adding .exe or .cmd
31242    if test -f "${new_path}.exe"; then
31243      input_to_shortpath="${new_path}.exe"
31244    elif test -f "${new_path}.cmd"; then
31245      input_to_shortpath="${new_path}.cmd"
31246    else
31247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31248$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31249      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31250$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31251      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31252    fi
31253  else
31254    input_to_shortpath="$new_path"
31255  fi
31256
31257  # Call helper function which possibly converts this using DOS-style short mode.
31258  # If so, the updated path is stored in $new_path.
31259  new_path="$input_to_shortpath"
31260
31261  input_path="$input_to_shortpath"
31262  # Check if we need to convert this using DOS-style short mode. If the path
31263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31264  # take no chances and rewrite it.
31265  # Note: m4 eats our [], so we need to use [ and ] instead.
31266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31267  if test "x$has_forbidden_chars" != x; then
31268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31272      # Going to short mode and back again did indeed matter. Since short mode is
31273      # case insensitive, let's make it lowercase to improve readability.
31274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31275      # Now convert it back to Unix-style (cygpath)
31276      input_path=`$CYGPATH -u "$shortmode_path"`
31277      new_path="$input_path"
31278    fi
31279  fi
31280
31281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31282  if test "x$test_cygdrive_prefix" = x; then
31283    # As a simple fix, exclude /usr/bin since it's not a real path.
31284    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31286      # a path prefixed by /cygdrive for fixpath to work.
31287      new_path="$CYGWIN_ROOT_PATH$input_path"
31288    fi
31289  fi
31290
31291  # remove trailing .exe if any
31292  new_path="${new_path/%.exe/}"
31293
31294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31295
31296  # First separate the path from the arguments. This will split at the first
31297  # space.
31298  complete="$CC"
31299  path="${complete%% *}"
31300  tmp="$complete EOL"
31301  arguments="${tmp#* }"
31302
31303  # Input might be given as Windows format, start by converting to
31304  # unix format.
31305  new_path="$path"
31306
31307  windows_path="$new_path"
31308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31309    unix_path=`$CYGPATH -u "$windows_path"`
31310    new_path="$unix_path"
31311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31313    new_path="$unix_path"
31314  fi
31315
31316
31317  # Now try to locate executable using which
31318  new_path=`$WHICH "$new_path" 2> /dev/null`
31319
31320  if test "x$new_path" = x; then
31321    # Oops. Which didn't find the executable.
31322    # The splitting of arguments from the executable at a space might have been incorrect,
31323    # since paths with space are more likely in Windows. Give it another try with the whole
31324    # argument.
31325    path="$complete"
31326    arguments="EOL"
31327    new_path="$path"
31328
31329  windows_path="$new_path"
31330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31331    unix_path=`$CYGPATH -u "$windows_path"`
31332    new_path="$unix_path"
31333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31335    new_path="$unix_path"
31336  fi
31337
31338
31339    new_path=`$WHICH "$new_path" 2> /dev/null`
31340    # bat and cmd files are not always considered executable in MSYS causing which
31341    # to not find them
31342    if test "x$new_path" = x \
31343        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31344        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31345      new_path="$path"
31346
31347  windows_path="$new_path"
31348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31349    unix_path=`$CYGPATH -u "$windows_path"`
31350    new_path="$unix_path"
31351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31353    new_path="$unix_path"
31354  fi
31355
31356    fi
31357
31358    if test "x$new_path" = x; then
31359      # It's still not found. Now this is an unrecoverable error.
31360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31361$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31362      has_space=`$ECHO "$complete" | $GREP " "`
31363      if test "x$has_space" != x; then
31364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31366      fi
31367      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31368    fi
31369  fi
31370
31371  # Now new_path has a complete unix path to the binary
31372  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31373    # Keep paths in /bin as-is, but remove trailing .exe if any
31374    new_path="${new_path/%.exe/}"
31375    # Do not save /bin paths to all_fixpath_prefixes!
31376  else
31377    # Not in mixed or Windows style, start by that.
31378    new_path=`cmd //c echo $new_path`
31379
31380  input_path="$new_path"
31381  # Check if we need to convert this using DOS-style short mode. If the path
31382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31383  # take no chances and rewrite it.
31384  # Note: m4 eats our [], so we need to use [ and ] instead.
31385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31386  if test "x$has_forbidden_chars" != x; then
31387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31389  fi
31390
31391    # Output is in $new_path
31392
31393  windows_path="$new_path"
31394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31395    unix_path=`$CYGPATH -u "$windows_path"`
31396    new_path="$unix_path"
31397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31399    new_path="$unix_path"
31400  fi
31401
31402    # remove trailing .exe if any
31403    new_path="${new_path/%.exe/}"
31404
31405    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31406    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31407  fi
31408
31409    else
31410      # We're on a unix platform. Hooray! :)
31411      # First separate the path from the arguments. This will split at the first
31412      # space.
31413      complete="$CC"
31414      path="${complete%% *}"
31415      tmp="$complete EOL"
31416      arguments="${tmp#* }"
31417
31418      # Cannot rely on the command "which" here since it doesn't always work.
31419      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31420      if test -z "$is_absolute_path"; then
31421        # Path to executable is not absolute. Find it.
31422        IFS_save="$IFS"
31423        IFS=:
31424        for p in $PATH; do
31425          if test -f "$p/$path" && test -x "$p/$path"; then
31426            new_path="$p/$path"
31427            break
31428          fi
31429        done
31430        IFS="$IFS_save"
31431      else
31432        # This is an absolute path, we can use it without further modifications.
31433        new_path="$path"
31434      fi
31435
31436      if test "x$new_path" = x; then
31437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31438$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31439        has_space=`$ECHO "$complete" | $GREP " "`
31440        if test "x$has_space" != x; then
31441          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31442$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31443        fi
31444        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31445      fi
31446    fi
31447
31448    # Now join together the path and the arguments once again
31449    if test "x$arguments" != xEOL; then
31450      new_complete="$new_path ${arguments% *}"
31451    else
31452      new_complete="$new_path"
31453    fi
31454
31455    if test "x$complete" != "x$new_complete"; then
31456      CC="$new_complete"
31457      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31458$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31459    fi
31460  fi
31461
31462  TEST_COMPILER="$CC"
31463  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31464  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31465  if test "x$OPENJDK_BUILD_OS" != xaix; then
31466    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31468$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31469
31470  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31471    # Follow a chain of symbolic links. Use readlink
31472    # where it exists, else fall back to horribly
31473    # complicated shell code.
31474    if test "x$READLINK_TESTED" != yes; then
31475      # On MacOSX there is a readlink tool with a different
31476      # purpose than the GNU readlink tool. Check the found readlink.
31477      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31478      if test "x$ISGNU" = x; then
31479        # A readlink that we do not know how to use.
31480        # Are there other non-GNU readlinks out there?
31481        READLINK_TESTED=yes
31482        READLINK=
31483      fi
31484    fi
31485
31486    if test "x$READLINK" != x; then
31487      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31488    else
31489      # Save the current directory for restoring afterwards
31490      STARTDIR=$PWD
31491      COUNTER=0
31492      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31493      sym_link_file=`$BASENAME $TEST_COMPILER`
31494      cd $sym_link_dir
31495      # Use -P flag to resolve symlinks in directories.
31496      cd `$THEPWDCMD -P`
31497      sym_link_dir=`$THEPWDCMD -P`
31498      # Resolve file symlinks
31499      while test $COUNTER -lt 20; do
31500        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31501        if test "x$ISLINK" == x; then
31502          # This is not a symbolic link! We are done!
31503          break
31504        fi
31505        # Again resolve directory symlinks since the target of the just found
31506        # link could be in a different directory
31507        cd `$DIRNAME $ISLINK`
31508        sym_link_dir=`$THEPWDCMD -P`
31509        sym_link_file=`$BASENAME $ISLINK`
31510        let COUNTER=COUNTER+1
31511      done
31512      cd $STARTDIR
31513      TEST_COMPILER=$sym_link_dir/$sym_link_file
31514    fi
31515  fi
31516
31517    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31518$as_echo "$TEST_COMPILER" >&6; }
31519  fi
31520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31521$as_echo_n "checking if CC is disguised ccache... " >&6; }
31522
31523  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31524  if test "x$COMPILER_BASENAME" = "xccache"; then
31525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31526$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31527    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31528    # We want to control ccache invocation ourselves, so ignore this cc and try
31529    # searching again.
31530
31531    # Remove the path to the fake ccache cc from the PATH
31532    RETRY_COMPILER_SAVED_PATH="$PATH"
31533    COMPILER_DIRNAME=`$DIRNAME $CC`
31534    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31535
31536    # Try again looking for our compiler
31537    if test -n "$ac_tool_prefix"; then
31538  for ac_prog in $TOOLCHAIN_CC_BINARY
31539  do
31540    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31541set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31543$as_echo_n "checking for $ac_word... " >&6; }
31544if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31545  $as_echo_n "(cached) " >&6
31546else
31547  if test -n "$PROPER_COMPILER_CC"; then
31548  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31549else
31550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31551for as_dir in $PATH
31552do
31553  IFS=$as_save_IFS
31554  test -z "$as_dir" && as_dir=.
31555    for ac_exec_ext in '' $ac_executable_extensions; do
31556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31557    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31559    break 2
31560  fi
31561done
31562  done
31563IFS=$as_save_IFS
31564
31565fi
31566fi
31567PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31568if test -n "$PROPER_COMPILER_CC"; then
31569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31570$as_echo "$PROPER_COMPILER_CC" >&6; }
31571else
31572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31573$as_echo "no" >&6; }
31574fi
31575
31576
31577    test -n "$PROPER_COMPILER_CC" && break
31578  done
31579fi
31580if test -z "$PROPER_COMPILER_CC"; then
31581  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31582  for ac_prog in $TOOLCHAIN_CC_BINARY
31583do
31584  # Extract the first word of "$ac_prog", so it can be a program name with args.
31585set dummy $ac_prog; ac_word=$2
31586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31587$as_echo_n "checking for $ac_word... " >&6; }
31588if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31589  $as_echo_n "(cached) " >&6
31590else
31591  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31592  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31593else
31594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31595for as_dir in $PATH
31596do
31597  IFS=$as_save_IFS
31598  test -z "$as_dir" && as_dir=.
31599    for ac_exec_ext in '' $ac_executable_extensions; do
31600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31601    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31603    break 2
31604  fi
31605done
31606  done
31607IFS=$as_save_IFS
31608
31609fi
31610fi
31611ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31612if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31614$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31615else
31616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31617$as_echo "no" >&6; }
31618fi
31619
31620
31621  test -n "$ac_ct_PROPER_COMPILER_CC" && break
31622done
31623
31624  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31625    PROPER_COMPILER_CC=""
31626  else
31627    case $cross_compiling:$ac_tool_warned in
31628yes:)
31629{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31630$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31631ac_tool_warned=yes ;;
31632esac
31633    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31634  fi
31635fi
31636
31637
31638  # Only process if variable expands to non-empty
31639
31640  if test "x$PROPER_COMPILER_CC" != x; then
31641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31642
31643  # First separate the path from the arguments. This will split at the first
31644  # space.
31645  complete="$PROPER_COMPILER_CC"
31646  path="${complete%% *}"
31647  tmp="$complete EOL"
31648  arguments="${tmp#* }"
31649
31650  # Input might be given as Windows format, start by converting to
31651  # unix format.
31652  new_path=`$CYGPATH -u "$path"`
31653
31654  # Now try to locate executable using which
31655  new_path=`$WHICH "$new_path" 2> /dev/null`
31656  # bat and cmd files are not always considered executable in cygwin causing which
31657  # to not find them
31658  if test "x$new_path" = x \
31659      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31660      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31661    new_path=`$CYGPATH -u "$path"`
31662  fi
31663  if test "x$new_path" = x; then
31664    # Oops. Which didn't find the executable.
31665    # The splitting of arguments from the executable at a space might have been incorrect,
31666    # since paths with space are more likely in Windows. Give it another try with the whole
31667    # argument.
31668    path="$complete"
31669    arguments="EOL"
31670    new_path=`$CYGPATH -u "$path"`
31671    new_path=`$WHICH "$new_path" 2> /dev/null`
31672    # bat and cmd files are not always considered executable in cygwin causing which
31673    # to not find them
31674    if test "x$new_path" = x \
31675        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31676        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31677      new_path=`$CYGPATH -u "$path"`
31678    fi
31679    if test "x$new_path" = x; then
31680      # It's still not found. Now this is an unrecoverable error.
31681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31682$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31683      has_space=`$ECHO "$complete" | $GREP " "`
31684      if test "x$has_space" != x; then
31685        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31686$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31687      fi
31688      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31689    fi
31690  fi
31691
31692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31695  # "foo.exe" is OK but "foo" is an error.
31696  #
31697  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31698  # It is also a way to make sure we got the proper file name for the real test later on.
31699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31700  if test "x$test_shortpath" = x; then
31701    # Short path failed, file does not exist as specified.
31702    # Try adding .exe or .cmd
31703    if test -f "${new_path}.exe"; then
31704      input_to_shortpath="${new_path}.exe"
31705    elif test -f "${new_path}.cmd"; then
31706      input_to_shortpath="${new_path}.cmd"
31707    else
31708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31709$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31710      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31711$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31712      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31713    fi
31714  else
31715    input_to_shortpath="$new_path"
31716  fi
31717
31718  # Call helper function which possibly converts this using DOS-style short mode.
31719  # If so, the updated path is stored in $new_path.
31720  new_path="$input_to_shortpath"
31721
31722  input_path="$input_to_shortpath"
31723  # Check if we need to convert this using DOS-style short mode. If the path
31724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31725  # take no chances and rewrite it.
31726  # Note: m4 eats our [], so we need to use [ and ] instead.
31727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31728  if test "x$has_forbidden_chars" != x; then
31729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31730    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31731    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31732    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31733      # Going to short mode and back again did indeed matter. Since short mode is
31734      # case insensitive, let's make it lowercase to improve readability.
31735      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31736      # Now convert it back to Unix-style (cygpath)
31737      input_path=`$CYGPATH -u "$shortmode_path"`
31738      new_path="$input_path"
31739    fi
31740  fi
31741
31742  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31743  if test "x$test_cygdrive_prefix" = x; then
31744    # As a simple fix, exclude /usr/bin since it's not a real path.
31745    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31746      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31747      # a path prefixed by /cygdrive for fixpath to work.
31748      new_path="$CYGWIN_ROOT_PATH$input_path"
31749    fi
31750  fi
31751
31752  # remove trailing .exe if any
31753  new_path="${new_path/%.exe/}"
31754
31755    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31756
31757  # First separate the path from the arguments. This will split at the first
31758  # space.
31759  complete="$PROPER_COMPILER_CC"
31760  path="${complete%% *}"
31761  tmp="$complete EOL"
31762  arguments="${tmp#* }"
31763
31764  # Input might be given as Windows format, start by converting to
31765  # unix format.
31766  new_path="$path"
31767
31768  windows_path="$new_path"
31769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31770    unix_path=`$CYGPATH -u "$windows_path"`
31771    new_path="$unix_path"
31772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31774    new_path="$unix_path"
31775  fi
31776
31777
31778  # Now try to locate executable using which
31779  new_path=`$WHICH "$new_path" 2> /dev/null`
31780
31781  if test "x$new_path" = x; then
31782    # Oops. Which didn't find the executable.
31783    # The splitting of arguments from the executable at a space might have been incorrect,
31784    # since paths with space are more likely in Windows. Give it another try with the whole
31785    # argument.
31786    path="$complete"
31787    arguments="EOL"
31788    new_path="$path"
31789
31790  windows_path="$new_path"
31791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31792    unix_path=`$CYGPATH -u "$windows_path"`
31793    new_path="$unix_path"
31794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31796    new_path="$unix_path"
31797  fi
31798
31799
31800    new_path=`$WHICH "$new_path" 2> /dev/null`
31801    # bat and cmd files are not always considered executable in MSYS causing which
31802    # to not find them
31803    if test "x$new_path" = x \
31804        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31805        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31806      new_path="$path"
31807
31808  windows_path="$new_path"
31809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31810    unix_path=`$CYGPATH -u "$windows_path"`
31811    new_path="$unix_path"
31812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31814    new_path="$unix_path"
31815  fi
31816
31817    fi
31818
31819    if test "x$new_path" = x; then
31820      # It's still not found. Now this is an unrecoverable error.
31821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31822$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31823      has_space=`$ECHO "$complete" | $GREP " "`
31824      if test "x$has_space" != x; then
31825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31827      fi
31828      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31829    fi
31830  fi
31831
31832  # Now new_path has a complete unix path to the binary
31833  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31834    # Keep paths in /bin as-is, but remove trailing .exe if any
31835    new_path="${new_path/%.exe/}"
31836    # Do not save /bin paths to all_fixpath_prefixes!
31837  else
31838    # Not in mixed or Windows style, start by that.
31839    new_path=`cmd //c echo $new_path`
31840
31841  input_path="$new_path"
31842  # Check if we need to convert this using DOS-style short mode. If the path
31843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31844  # take no chances and rewrite it.
31845  # Note: m4 eats our [], so we need to use [ and ] instead.
31846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31847  if test "x$has_forbidden_chars" != x; then
31848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31850  fi
31851
31852    # Output is in $new_path
31853
31854  windows_path="$new_path"
31855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31856    unix_path=`$CYGPATH -u "$windows_path"`
31857    new_path="$unix_path"
31858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31860    new_path="$unix_path"
31861  fi
31862
31863    # remove trailing .exe if any
31864    new_path="${new_path/%.exe/}"
31865
31866    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31867    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31868  fi
31869
31870    else
31871      # We're on a unix platform. Hooray! :)
31872      # First separate the path from the arguments. This will split at the first
31873      # space.
31874      complete="$PROPER_COMPILER_CC"
31875      path="${complete%% *}"
31876      tmp="$complete EOL"
31877      arguments="${tmp#* }"
31878
31879      # Cannot rely on the command "which" here since it doesn't always work.
31880      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31881      if test -z "$is_absolute_path"; then
31882        # Path to executable is not absolute. Find it.
31883        IFS_save="$IFS"
31884        IFS=:
31885        for p in $PATH; do
31886          if test -f "$p/$path" && test -x "$p/$path"; then
31887            new_path="$p/$path"
31888            break
31889          fi
31890        done
31891        IFS="$IFS_save"
31892      else
31893        # This is an absolute path, we can use it without further modifications.
31894        new_path="$path"
31895      fi
31896
31897      if test "x$new_path" = x; then
31898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31899$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31900        has_space=`$ECHO "$complete" | $GREP " "`
31901        if test "x$has_space" != x; then
31902          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31903$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31904        fi
31905        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31906      fi
31907    fi
31908
31909    # Now join together the path and the arguments once again
31910    if test "x$arguments" != xEOL; then
31911      new_complete="$new_path ${arguments% *}"
31912    else
31913      new_complete="$new_path"
31914    fi
31915
31916    if test "x$complete" != "x$new_complete"; then
31917      PROPER_COMPILER_CC="$new_complete"
31918      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
31919$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
31920    fi
31921  fi
31922
31923    PATH="$RETRY_COMPILER_SAVED_PATH"
31924
31925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
31926$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
31927
31928  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31929    # Follow a chain of symbolic links. Use readlink
31930    # where it exists, else fall back to horribly
31931    # complicated shell code.
31932    if test "x$READLINK_TESTED" != yes; then
31933      # On MacOSX there is a readlink tool with a different
31934      # purpose than the GNU readlink tool. Check the found readlink.
31935      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31936      if test "x$ISGNU" = x; then
31937        # A readlink that we do not know how to use.
31938        # Are there other non-GNU readlinks out there?
31939        READLINK_TESTED=yes
31940        READLINK=
31941      fi
31942    fi
31943
31944    if test "x$READLINK" != x; then
31945      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
31946    else
31947      # Save the current directory for restoring afterwards
31948      STARTDIR=$PWD
31949      COUNTER=0
31950      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
31951      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
31952      cd $sym_link_dir
31953      # Use -P flag to resolve symlinks in directories.
31954      cd `$THEPWDCMD -P`
31955      sym_link_dir=`$THEPWDCMD -P`
31956      # Resolve file symlinks
31957      while test $COUNTER -lt 20; do
31958        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31959        if test "x$ISLINK" == x; then
31960          # This is not a symbolic link! We are done!
31961          break
31962        fi
31963        # Again resolve directory symlinks since the target of the just found
31964        # link could be in a different directory
31965        cd `$DIRNAME $ISLINK`
31966        sym_link_dir=`$THEPWDCMD -P`
31967        sym_link_file=`$BASENAME $ISLINK`
31968        let COUNTER=COUNTER+1
31969      done
31970      cd $STARTDIR
31971      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
31972    fi
31973  fi
31974
31975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31976$as_echo "$PROPER_COMPILER_CC" >&6; }
31977    CC="$PROPER_COMPILER_CC"
31978  else
31979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
31980$as_echo "no, keeping CC" >&6; }
31981  fi
31982
31983
31984  COMPILER=$CC
31985  COMPILER_NAME=$COMPILER_NAME
31986
31987  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31988    # cc -V output typically looks like
31989    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31990    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31991    # Check that this is likely to be the Solaris Studio cc.
31992    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31993    if test $? -ne 0; then
31994      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31995      { $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
31996$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31997      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31998$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31999      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32000$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32001      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32002    fi
32003    # Remove usage instructions (if present), and
32004    # collapse compiler output into a single line
32005    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32006        $SED -e 's/ *[Uu]sage:.*//'`
32007    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32008        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32009  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32010    # xlc -qversion output typically looks like
32011    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32012    #     Version: 11.01.0000.0015
32013    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32014    # Check that this is likely to be the IBM XL C compiler.
32015    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32016    if test $? -ne 0; then
32017      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32018      { $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
32019$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32020      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32021$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32022      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32023$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32024      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32025    fi
32026    # Collapse compiler output into a single line
32027    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32028    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32029        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32030  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32031    # There is no specific version flag, but all output starts with a version string.
32032    # First line typically looks something like:
32033    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32034    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32035    # Check that this is likely to be Microsoft CL.EXE.
32036    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32037    if test $? -ne 0; then
32038      { $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
32039$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32040      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32041$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32042      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32043    fi
32044    # Collapse compiler output into a single line
32045    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32046    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32047        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32048  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32049    # gcc --version output typically looks like
32050    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32051    #     Copyright (C) 2013 Free Software Foundation, Inc.
32052    #     This is free software; see the source for copying conditions.  There is NO
32053    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32054    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32055    # Check that this is likely to be GCC.
32056    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32057    if test $? -ne 0; then
32058      { $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
32059$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32060      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32061$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32062      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32063    fi
32064    # Remove Copyright and legalese from version string, and
32065    # collapse into a single line
32066    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32067        $SED -e 's/ *Copyright .*//'`
32068    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32069        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32070  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32071    # clang --version output typically looks like
32072    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32073    #    clang version 3.3 (tags/RELEASE_33/final)
32074    # or
32075    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32076    #    Target: x86_64-pc-linux-gnu
32077    #    Thread model: posix
32078    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32079    # Check that this is likely to be clang
32080    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32081    if test $? -ne 0; then
32082      { $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
32083$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32084      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32085$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32086      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32087    fi
32088    # Collapse compiler output into a single line
32089    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32090    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32091        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32092  else
32093      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32094  fi
32095  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32096  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32097  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32098  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32099
32100  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32101$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32102
32103
32104  # Now that we have resolved CC ourself, let autoconf have its go at it
32105  ac_ext=c
32106ac_cpp='$CPP $CPPFLAGS'
32107ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32108ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32109ac_compiler_gnu=$ac_cv_c_compiler_gnu
32110if test -n "$ac_tool_prefix"; then
32111  for ac_prog in $CC
32112  do
32113    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32114set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32116$as_echo_n "checking for $ac_word... " >&6; }
32117if ${ac_cv_prog_CC+:} false; then :
32118  $as_echo_n "(cached) " >&6
32119else
32120  if test -n "$CC"; then
32121  ac_cv_prog_CC="$CC" # Let the user override the test.
32122else
32123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32124for as_dir in $PATH
32125do
32126  IFS=$as_save_IFS
32127  test -z "$as_dir" && as_dir=.
32128    for ac_exec_ext in '' $ac_executable_extensions; do
32129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32130    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32132    break 2
32133  fi
32134done
32135  done
32136IFS=$as_save_IFS
32137
32138fi
32139fi
32140CC=$ac_cv_prog_CC
32141if test -n "$CC"; then
32142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32143$as_echo "$CC" >&6; }
32144else
32145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32146$as_echo "no" >&6; }
32147fi
32148
32149
32150    test -n "$CC" && break
32151  done
32152fi
32153if test -z "$CC"; then
32154  ac_ct_CC=$CC
32155  for ac_prog in $CC
32156do
32157  # Extract the first word of "$ac_prog", so it can be a program name with args.
32158set dummy $ac_prog; ac_word=$2
32159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32160$as_echo_n "checking for $ac_word... " >&6; }
32161if ${ac_cv_prog_ac_ct_CC+:} false; then :
32162  $as_echo_n "(cached) " >&6
32163else
32164  if test -n "$ac_ct_CC"; then
32165  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32166else
32167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32168for as_dir in $PATH
32169do
32170  IFS=$as_save_IFS
32171  test -z "$as_dir" && as_dir=.
32172    for ac_exec_ext in '' $ac_executable_extensions; do
32173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32174    ac_cv_prog_ac_ct_CC="$ac_prog"
32175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32176    break 2
32177  fi
32178done
32179  done
32180IFS=$as_save_IFS
32181
32182fi
32183fi
32184ac_ct_CC=$ac_cv_prog_ac_ct_CC
32185if test -n "$ac_ct_CC"; then
32186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32187$as_echo "$ac_ct_CC" >&6; }
32188else
32189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32190$as_echo "no" >&6; }
32191fi
32192
32193
32194  test -n "$ac_ct_CC" && break
32195done
32196
32197  if test "x$ac_ct_CC" = x; then
32198    CC=""
32199  else
32200    case $cross_compiling:$ac_tool_warned in
32201yes:)
32202{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32203$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32204ac_tool_warned=yes ;;
32205esac
32206    CC=$ac_ct_CC
32207  fi
32208fi
32209
32210
32211test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32212$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32213as_fn_error $? "no acceptable C compiler found in \$PATH
32214See \`config.log' for more details" "$LINENO" 5; }
32215
32216# Provide some information about the compiler.
32217$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32218set X $ac_compile
32219ac_compiler=$2
32220for ac_option in --version -v -V -qversion; do
32221  { { ac_try="$ac_compiler $ac_option >&5"
32222case "(($ac_try" in
32223  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32224  *) ac_try_echo=$ac_try;;
32225esac
32226eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32227$as_echo "$ac_try_echo"; } >&5
32228  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32229  ac_status=$?
32230  if test -s conftest.err; then
32231    sed '10a\
32232... rest of stderr output deleted ...
32233         10q' conftest.err >conftest.er1
32234    cat conftest.er1 >&5
32235  fi
32236  rm -f conftest.er1 conftest.err
32237  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32238  test $ac_status = 0; }
32239done
32240
32241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32242/* end confdefs.h.  */
32243
32244int
32245main ()
32246{
32247
32248  ;
32249  return 0;
32250}
32251_ACEOF
32252ac_clean_files_save=$ac_clean_files
32253ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32254# Try to create an executable without -o first, disregard a.out.
32255# It will help us diagnose broken compilers, and finding out an intuition
32256# of exeext.
32257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32258$as_echo_n "checking whether the C compiler works... " >&6; }
32259ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32260
32261# The possible output files:
32262ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32263
32264ac_rmfiles=
32265for ac_file in $ac_files
32266do
32267  case $ac_file in
32268    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32269    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32270  esac
32271done
32272rm -f $ac_rmfiles
32273
32274if { { ac_try="$ac_link_default"
32275case "(($ac_try" in
32276  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32277  *) ac_try_echo=$ac_try;;
32278esac
32279eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32280$as_echo "$ac_try_echo"; } >&5
32281  (eval "$ac_link_default") 2>&5
32282  ac_status=$?
32283  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32284  test $ac_status = 0; }; then :
32285  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32286# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32287# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32288# so that the user can short-circuit this test for compilers unknown to
32289# Autoconf.
32290for ac_file in $ac_files ''
32291do
32292  test -f "$ac_file" || continue
32293  case $ac_file in
32294    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32295	;;
32296    [ab].out )
32297	# We found the default executable, but exeext='' is most
32298	# certainly right.
32299	break;;
32300    *.* )
32301	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32302	then :; else
32303	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32304	fi
32305	# We set ac_cv_exeext here because the later test for it is not
32306	# safe: cross compilers may not add the suffix if given an `-o'
32307	# argument, so we may need to know it at that point already.
32308	# Even if this section looks crufty: it has the advantage of
32309	# actually working.
32310	break;;
32311    * )
32312	break;;
32313  esac
32314done
32315test "$ac_cv_exeext" = no && ac_cv_exeext=
32316
32317else
32318  ac_file=''
32319fi
32320if test -z "$ac_file"; then :
32321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32322$as_echo "no" >&6; }
32323$as_echo "$as_me: failed program was:" >&5
32324sed 's/^/| /' conftest.$ac_ext >&5
32325
32326{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32328as_fn_error 77 "C compiler cannot create executables
32329See \`config.log' for more details" "$LINENO" 5; }
32330else
32331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32332$as_echo "yes" >&6; }
32333fi
32334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32335$as_echo_n "checking for C compiler default output file name... " >&6; }
32336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32337$as_echo "$ac_file" >&6; }
32338ac_exeext=$ac_cv_exeext
32339
32340rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32341ac_clean_files=$ac_clean_files_save
32342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32343$as_echo_n "checking for suffix of executables... " >&6; }
32344if { { ac_try="$ac_link"
32345case "(($ac_try" in
32346  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32347  *) ac_try_echo=$ac_try;;
32348esac
32349eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32350$as_echo "$ac_try_echo"; } >&5
32351  (eval "$ac_link") 2>&5
32352  ac_status=$?
32353  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32354  test $ac_status = 0; }; then :
32355  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32356# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32357# work properly (i.e., refer to `conftest.exe'), while it won't with
32358# `rm'.
32359for ac_file in conftest.exe conftest conftest.*; do
32360  test -f "$ac_file" || continue
32361  case $ac_file in
32362    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32363    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32364	  break;;
32365    * ) break;;
32366  esac
32367done
32368else
32369  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32370$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32371as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32372See \`config.log' for more details" "$LINENO" 5; }
32373fi
32374rm -f conftest conftest$ac_cv_exeext
32375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32376$as_echo "$ac_cv_exeext" >&6; }
32377
32378rm -f conftest.$ac_ext
32379EXEEXT=$ac_cv_exeext
32380ac_exeext=$EXEEXT
32381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32382/* end confdefs.h.  */
32383#include <stdio.h>
32384int
32385main ()
32386{
32387FILE *f = fopen ("conftest.out", "w");
32388 return ferror (f) || fclose (f) != 0;
32389
32390  ;
32391  return 0;
32392}
32393_ACEOF
32394ac_clean_files="$ac_clean_files conftest.out"
32395# Check that the compiler produces executables we can run.  If not, either
32396# the compiler is broken, or we cross compile.
32397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32398$as_echo_n "checking whether we are cross compiling... " >&6; }
32399if test "$cross_compiling" != yes; then
32400  { { ac_try="$ac_link"
32401case "(($ac_try" in
32402  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32403  *) ac_try_echo=$ac_try;;
32404esac
32405eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32406$as_echo "$ac_try_echo"; } >&5
32407  (eval "$ac_link") 2>&5
32408  ac_status=$?
32409  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32410  test $ac_status = 0; }
32411  if { ac_try='./conftest$ac_cv_exeext'
32412  { { case "(($ac_try" in
32413  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32414  *) ac_try_echo=$ac_try;;
32415esac
32416eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32417$as_echo "$ac_try_echo"; } >&5
32418  (eval "$ac_try") 2>&5
32419  ac_status=$?
32420  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32421  test $ac_status = 0; }; }; then
32422    cross_compiling=no
32423  else
32424    if test "$cross_compiling" = maybe; then
32425	cross_compiling=yes
32426    else
32427	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32429as_fn_error $? "cannot run C compiled programs.
32430If you meant to cross compile, use \`--host'.
32431See \`config.log' for more details" "$LINENO" 5; }
32432    fi
32433  fi
32434fi
32435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32436$as_echo "$cross_compiling" >&6; }
32437
32438rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32439ac_clean_files=$ac_clean_files_save
32440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32441$as_echo_n "checking for suffix of object files... " >&6; }
32442if ${ac_cv_objext+:} false; then :
32443  $as_echo_n "(cached) " >&6
32444else
32445  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32446/* end confdefs.h.  */
32447
32448int
32449main ()
32450{
32451
32452  ;
32453  return 0;
32454}
32455_ACEOF
32456rm -f conftest.o conftest.obj
32457if { { ac_try="$ac_compile"
32458case "(($ac_try" in
32459  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32460  *) ac_try_echo=$ac_try;;
32461esac
32462eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32463$as_echo "$ac_try_echo"; } >&5
32464  (eval "$ac_compile") 2>&5
32465  ac_status=$?
32466  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32467  test $ac_status = 0; }; then :
32468  for ac_file in conftest.o conftest.obj conftest.*; do
32469  test -f "$ac_file" || continue;
32470  case $ac_file in
32471    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32472    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32473       break;;
32474  esac
32475done
32476else
32477  $as_echo "$as_me: failed program was:" >&5
32478sed 's/^/| /' conftest.$ac_ext >&5
32479
32480{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32481$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32482as_fn_error $? "cannot compute suffix of object files: cannot compile
32483See \`config.log' for more details" "$LINENO" 5; }
32484fi
32485rm -f conftest.$ac_cv_objext conftest.$ac_ext
32486fi
32487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32488$as_echo "$ac_cv_objext" >&6; }
32489OBJEXT=$ac_cv_objext
32490ac_objext=$OBJEXT
32491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32492$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32493if ${ac_cv_c_compiler_gnu+:} false; then :
32494  $as_echo_n "(cached) " >&6
32495else
32496  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32497/* end confdefs.h.  */
32498
32499int
32500main ()
32501{
32502#ifndef __GNUC__
32503       choke me
32504#endif
32505
32506  ;
32507  return 0;
32508}
32509_ACEOF
32510if ac_fn_c_try_compile "$LINENO"; then :
32511  ac_compiler_gnu=yes
32512else
32513  ac_compiler_gnu=no
32514fi
32515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32516ac_cv_c_compiler_gnu=$ac_compiler_gnu
32517
32518fi
32519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32520$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32521if test $ac_compiler_gnu = yes; then
32522  GCC=yes
32523else
32524  GCC=
32525fi
32526ac_test_CFLAGS=${CFLAGS+set}
32527ac_save_CFLAGS=$CFLAGS
32528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32529$as_echo_n "checking whether $CC accepts -g... " >&6; }
32530if ${ac_cv_prog_cc_g+:} false; then :
32531  $as_echo_n "(cached) " >&6
32532else
32533  ac_save_c_werror_flag=$ac_c_werror_flag
32534   ac_c_werror_flag=yes
32535   ac_cv_prog_cc_g=no
32536   CFLAGS="-g"
32537   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32538/* end confdefs.h.  */
32539
32540int
32541main ()
32542{
32543
32544  ;
32545  return 0;
32546}
32547_ACEOF
32548if ac_fn_c_try_compile "$LINENO"; then :
32549  ac_cv_prog_cc_g=yes
32550else
32551  CFLAGS=""
32552      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32553/* end confdefs.h.  */
32554
32555int
32556main ()
32557{
32558
32559  ;
32560  return 0;
32561}
32562_ACEOF
32563if ac_fn_c_try_compile "$LINENO"; then :
32564
32565else
32566  ac_c_werror_flag=$ac_save_c_werror_flag
32567	 CFLAGS="-g"
32568	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32569/* end confdefs.h.  */
32570
32571int
32572main ()
32573{
32574
32575  ;
32576  return 0;
32577}
32578_ACEOF
32579if ac_fn_c_try_compile "$LINENO"; then :
32580  ac_cv_prog_cc_g=yes
32581fi
32582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32583fi
32584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32585fi
32586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32587   ac_c_werror_flag=$ac_save_c_werror_flag
32588fi
32589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32590$as_echo "$ac_cv_prog_cc_g" >&6; }
32591if test "$ac_test_CFLAGS" = set; then
32592  CFLAGS=$ac_save_CFLAGS
32593elif test $ac_cv_prog_cc_g = yes; then
32594  if test "$GCC" = yes; then
32595    CFLAGS="-g -O2"
32596  else
32597    CFLAGS="-g"
32598  fi
32599else
32600  if test "$GCC" = yes; then
32601    CFLAGS="-O2"
32602  else
32603    CFLAGS=
32604  fi
32605fi
32606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32607$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32608if ${ac_cv_prog_cc_c89+:} false; then :
32609  $as_echo_n "(cached) " >&6
32610else
32611  ac_cv_prog_cc_c89=no
32612ac_save_CC=$CC
32613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32614/* end confdefs.h.  */
32615#include <stdarg.h>
32616#include <stdio.h>
32617struct stat;
32618/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32619struct buf { int x; };
32620FILE * (*rcsopen) (struct buf *, struct stat *, int);
32621static char *e (p, i)
32622     char **p;
32623     int i;
32624{
32625  return p[i];
32626}
32627static char *f (char * (*g) (char **, int), char **p, ...)
32628{
32629  char *s;
32630  va_list v;
32631  va_start (v,p);
32632  s = g (p, va_arg (v,int));
32633  va_end (v);
32634  return s;
32635}
32636
32637/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32638   function prototypes and stuff, but not '\xHH' hex character constants.
32639   These don't provoke an error unfortunately, instead are silently treated
32640   as 'x'.  The following induces an error, until -std is added to get
32641   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32642   array size at least.  It's necessary to write '\x00'==0 to get something
32643   that's true only with -std.  */
32644int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32645
32646/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32647   inside strings and character constants.  */
32648#define FOO(x) 'x'
32649int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32650
32651int test (int i, double x);
32652struct s1 {int (*f) (int a);};
32653struct s2 {int (*f) (double a);};
32654int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32655int argc;
32656char **argv;
32657int
32658main ()
32659{
32660return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32661  ;
32662  return 0;
32663}
32664_ACEOF
32665for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32666	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32667do
32668  CC="$ac_save_CC $ac_arg"
32669  if ac_fn_c_try_compile "$LINENO"; then :
32670  ac_cv_prog_cc_c89=$ac_arg
32671fi
32672rm -f core conftest.err conftest.$ac_objext
32673  test "x$ac_cv_prog_cc_c89" != "xno" && break
32674done
32675rm -f conftest.$ac_ext
32676CC=$ac_save_CC
32677
32678fi
32679# AC_CACHE_VAL
32680case "x$ac_cv_prog_cc_c89" in
32681  x)
32682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32683$as_echo "none needed" >&6; } ;;
32684  xno)
32685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32686$as_echo "unsupported" >&6; } ;;
32687  *)
32688    CC="$CC $ac_cv_prog_cc_c89"
32689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32690$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32691esac
32692if test "x$ac_cv_prog_cc_c89" != xno; then :
32693
32694fi
32695
32696ac_ext=cpp
32697ac_cpp='$CXXCPP $CPPFLAGS'
32698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32701
32702
32703
32704  COMPILER_NAME=C++
32705  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32706
32707  if test "x$CXX" != x; then
32708    # User has supplied compiler name already, always let that override.
32709    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32710$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32711    if test "x`basename $CXX`" = "x$CXX"; then
32712      # A command without a complete path is provided, search $PATH.
32713
32714      for ac_prog in $CXX
32715do
32716  # Extract the first word of "$ac_prog", so it can be a program name with args.
32717set dummy $ac_prog; ac_word=$2
32718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32719$as_echo_n "checking for $ac_word... " >&6; }
32720if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32721  $as_echo_n "(cached) " >&6
32722else
32723  case $POTENTIAL_CXX in
32724  [\\/]* | ?:[\\/]*)
32725  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32726  ;;
32727  *)
32728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32729for as_dir in $PATH
32730do
32731  IFS=$as_save_IFS
32732  test -z "$as_dir" && as_dir=.
32733    for ac_exec_ext in '' $ac_executable_extensions; do
32734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32735    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32737    break 2
32738  fi
32739done
32740  done
32741IFS=$as_save_IFS
32742
32743  ;;
32744esac
32745fi
32746POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32747if test -n "$POTENTIAL_CXX"; then
32748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32749$as_echo "$POTENTIAL_CXX" >&6; }
32750else
32751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32752$as_echo "no" >&6; }
32753fi
32754
32755
32756  test -n "$POTENTIAL_CXX" && break
32757done
32758
32759      if test "x$POTENTIAL_CXX" != x; then
32760        CXX=$POTENTIAL_CXX
32761      else
32762        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32763      fi
32764    else
32765      # Otherwise it might already be a complete path
32766      if test ! -x "$CXX"; then
32767        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32768      fi
32769    fi
32770  else
32771    # No user supplied value. Locate compiler ourselves.
32772
32773    # If we are cross compiling, assume cross compilation tools follows the
32774    # cross compilation standard where they are prefixed with the autoconf
32775    # standard name for the target. For example the binary
32776    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32777    # If we are not cross compiling, then the default compiler name will be
32778    # used.
32779
32780    CXX=
32781    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32782    # before checking the rest of the PATH.
32783    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32784    # step, this should not be necessary.
32785    if test -n "$TOOLCHAIN_PATH"; then
32786      PATH_save="$PATH"
32787      PATH="$TOOLCHAIN_PATH"
32788      for ac_prog in $SEARCH_LIST
32789do
32790  # Extract the first word of "$ac_prog", so it can be a program name with args.
32791set dummy $ac_prog; ac_word=$2
32792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32793$as_echo_n "checking for $ac_word... " >&6; }
32794if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32795  $as_echo_n "(cached) " >&6
32796else
32797  case $TOOLCHAIN_PATH_CXX in
32798  [\\/]* | ?:[\\/]*)
32799  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32800  ;;
32801  *)
32802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32803for as_dir in $PATH
32804do
32805  IFS=$as_save_IFS
32806  test -z "$as_dir" && as_dir=.
32807    for ac_exec_ext in '' $ac_executable_extensions; do
32808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32809    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32811    break 2
32812  fi
32813done
32814  done
32815IFS=$as_save_IFS
32816
32817  ;;
32818esac
32819fi
32820TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32821if test -n "$TOOLCHAIN_PATH_CXX"; then
32822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32823$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32824else
32825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32826$as_echo "no" >&6; }
32827fi
32828
32829
32830  test -n "$TOOLCHAIN_PATH_CXX" && break
32831done
32832
32833      CXX=$TOOLCHAIN_PATH_CXX
32834      PATH="$PATH_save"
32835    fi
32836
32837    # AC_PATH_PROGS can't be run multiple times with the same variable,
32838    # so create a new name for this run.
32839    if test "x$CXX" = x; then
32840      for ac_prog in $SEARCH_LIST
32841do
32842  # Extract the first word of "$ac_prog", so it can be a program name with args.
32843set dummy $ac_prog; ac_word=$2
32844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32845$as_echo_n "checking for $ac_word... " >&6; }
32846if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32847  $as_echo_n "(cached) " >&6
32848else
32849  case $POTENTIAL_CXX in
32850  [\\/]* | ?:[\\/]*)
32851  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32852  ;;
32853  *)
32854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32855for as_dir in $PATH
32856do
32857  IFS=$as_save_IFS
32858  test -z "$as_dir" && as_dir=.
32859    for ac_exec_ext in '' $ac_executable_extensions; do
32860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32861    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32863    break 2
32864  fi
32865done
32866  done
32867IFS=$as_save_IFS
32868
32869  ;;
32870esac
32871fi
32872POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32873if test -n "$POTENTIAL_CXX"; then
32874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32875$as_echo "$POTENTIAL_CXX" >&6; }
32876else
32877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32878$as_echo "no" >&6; }
32879fi
32880
32881
32882  test -n "$POTENTIAL_CXX" && break
32883done
32884
32885      CXX=$POTENTIAL_CXX
32886    fi
32887
32888    if test "x$CXX" = x; then
32889
32890  # Print a helpful message on how to acquire the necessary build dependency.
32891  # devkit is the help tag: freetype, cups, alsa etc
32892  MISSING_DEPENDENCY=devkit
32893
32894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32895    cygwin_help $MISSING_DEPENDENCY
32896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32897    msys_help $MISSING_DEPENDENCY
32898  else
32899    PKGHANDLER_COMMAND=
32900
32901    case $PKGHANDLER in
32902      apt-get)
32903        apt_help     $MISSING_DEPENDENCY ;;
32904      yum)
32905        yum_help     $MISSING_DEPENDENCY ;;
32906      port)
32907        port_help    $MISSING_DEPENDENCY ;;
32908      pkgutil)
32909        pkgutil_help $MISSING_DEPENDENCY ;;
32910      pkgadd)
32911        pkgadd_help  $MISSING_DEPENDENCY ;;
32912    esac
32913
32914    if test "x$PKGHANDLER_COMMAND" != x; then
32915      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32916    fi
32917  fi
32918
32919      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32920    fi
32921  fi
32922
32923  # Now we have a compiler binary in CXX. Make sure it's okay.
32924
32925  # Only process if variable expands to non-empty
32926
32927  if test "x$CXX" != x; then
32928    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32929
32930  # First separate the path from the arguments. This will split at the first
32931  # space.
32932  complete="$CXX"
32933  path="${complete%% *}"
32934  tmp="$complete EOL"
32935  arguments="${tmp#* }"
32936
32937  # Input might be given as Windows format, start by converting to
32938  # unix format.
32939  new_path=`$CYGPATH -u "$path"`
32940
32941  # Now try to locate executable using which
32942  new_path=`$WHICH "$new_path" 2> /dev/null`
32943  # bat and cmd files are not always considered executable in cygwin causing which
32944  # to not find them
32945  if test "x$new_path" = x \
32946      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32947      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32948    new_path=`$CYGPATH -u "$path"`
32949  fi
32950  if test "x$new_path" = x; then
32951    # Oops. Which didn't find the executable.
32952    # The splitting of arguments from the executable at a space might have been incorrect,
32953    # since paths with space are more likely in Windows. Give it another try with the whole
32954    # argument.
32955    path="$complete"
32956    arguments="EOL"
32957    new_path=`$CYGPATH -u "$path"`
32958    new_path=`$WHICH "$new_path" 2> /dev/null`
32959    # bat and cmd files are not always considered executable in cygwin causing which
32960    # to not find them
32961    if test "x$new_path" = x \
32962        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32963        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32964      new_path=`$CYGPATH -u "$path"`
32965    fi
32966    if test "x$new_path" = x; then
32967      # It's still not found. Now this is an unrecoverable error.
32968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32969$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32970      has_space=`$ECHO "$complete" | $GREP " "`
32971      if test "x$has_space" != x; then
32972        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32973$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32974      fi
32975      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32976    fi
32977  fi
32978
32979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32982  # "foo.exe" is OK but "foo" is an error.
32983  #
32984  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32985  # It is also a way to make sure we got the proper file name for the real test later on.
32986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32987  if test "x$test_shortpath" = x; then
32988    # Short path failed, file does not exist as specified.
32989    # Try adding .exe or .cmd
32990    if test -f "${new_path}.exe"; then
32991      input_to_shortpath="${new_path}.exe"
32992    elif test -f "${new_path}.cmd"; then
32993      input_to_shortpath="${new_path}.cmd"
32994    else
32995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
32996$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
32997      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32998$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32999      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33000    fi
33001  else
33002    input_to_shortpath="$new_path"
33003  fi
33004
33005  # Call helper function which possibly converts this using DOS-style short mode.
33006  # If so, the updated path is stored in $new_path.
33007  new_path="$input_to_shortpath"
33008
33009  input_path="$input_to_shortpath"
33010  # Check if we need to convert this using DOS-style short mode. If the path
33011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33012  # take no chances and rewrite it.
33013  # Note: m4 eats our [], so we need to use [ and ] instead.
33014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33015  if test "x$has_forbidden_chars" != x; then
33016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33020      # Going to short mode and back again did indeed matter. Since short mode is
33021      # case insensitive, let's make it lowercase to improve readability.
33022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33023      # Now convert it back to Unix-style (cygpath)
33024      input_path=`$CYGPATH -u "$shortmode_path"`
33025      new_path="$input_path"
33026    fi
33027  fi
33028
33029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33030  if test "x$test_cygdrive_prefix" = x; then
33031    # As a simple fix, exclude /usr/bin since it's not a real path.
33032    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33034      # a path prefixed by /cygdrive for fixpath to work.
33035      new_path="$CYGWIN_ROOT_PATH$input_path"
33036    fi
33037  fi
33038
33039  # remove trailing .exe if any
33040  new_path="${new_path/%.exe/}"
33041
33042    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33043
33044  # First separate the path from the arguments. This will split at the first
33045  # space.
33046  complete="$CXX"
33047  path="${complete%% *}"
33048  tmp="$complete EOL"
33049  arguments="${tmp#* }"
33050
33051  # Input might be given as Windows format, start by converting to
33052  # unix format.
33053  new_path="$path"
33054
33055  windows_path="$new_path"
33056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33057    unix_path=`$CYGPATH -u "$windows_path"`
33058    new_path="$unix_path"
33059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33061    new_path="$unix_path"
33062  fi
33063
33064
33065  # Now try to locate executable using which
33066  new_path=`$WHICH "$new_path" 2> /dev/null`
33067
33068  if test "x$new_path" = x; then
33069    # Oops. Which didn't find the executable.
33070    # The splitting of arguments from the executable at a space might have been incorrect,
33071    # since paths with space are more likely in Windows. Give it another try with the whole
33072    # argument.
33073    path="$complete"
33074    arguments="EOL"
33075    new_path="$path"
33076
33077  windows_path="$new_path"
33078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33079    unix_path=`$CYGPATH -u "$windows_path"`
33080    new_path="$unix_path"
33081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33083    new_path="$unix_path"
33084  fi
33085
33086
33087    new_path=`$WHICH "$new_path" 2> /dev/null`
33088    # bat and cmd files are not always considered executable in MSYS causing which
33089    # to not find them
33090    if test "x$new_path" = x \
33091        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33092        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33093      new_path="$path"
33094
33095  windows_path="$new_path"
33096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33097    unix_path=`$CYGPATH -u "$windows_path"`
33098    new_path="$unix_path"
33099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33101    new_path="$unix_path"
33102  fi
33103
33104    fi
33105
33106    if test "x$new_path" = x; then
33107      # It's still not found. Now this is an unrecoverable error.
33108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33109$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33110      has_space=`$ECHO "$complete" | $GREP " "`
33111      if test "x$has_space" != x; then
33112        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33113$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33114      fi
33115      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33116    fi
33117  fi
33118
33119  # Now new_path has a complete unix path to the binary
33120  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33121    # Keep paths in /bin as-is, but remove trailing .exe if any
33122    new_path="${new_path/%.exe/}"
33123    # Do not save /bin paths to all_fixpath_prefixes!
33124  else
33125    # Not in mixed or Windows style, start by that.
33126    new_path=`cmd //c echo $new_path`
33127
33128  input_path="$new_path"
33129  # Check if we need to convert this using DOS-style short mode. If the path
33130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33131  # take no chances and rewrite it.
33132  # Note: m4 eats our [], so we need to use [ and ] instead.
33133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33134  if test "x$has_forbidden_chars" != x; then
33135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33137  fi
33138
33139    # Output is in $new_path
33140
33141  windows_path="$new_path"
33142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33143    unix_path=`$CYGPATH -u "$windows_path"`
33144    new_path="$unix_path"
33145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33147    new_path="$unix_path"
33148  fi
33149
33150    # remove trailing .exe if any
33151    new_path="${new_path/%.exe/}"
33152
33153    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33154    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33155  fi
33156
33157    else
33158      # We're on a unix platform. Hooray! :)
33159      # First separate the path from the arguments. This will split at the first
33160      # space.
33161      complete="$CXX"
33162      path="${complete%% *}"
33163      tmp="$complete EOL"
33164      arguments="${tmp#* }"
33165
33166      # Cannot rely on the command "which" here since it doesn't always work.
33167      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33168      if test -z "$is_absolute_path"; then
33169        # Path to executable is not absolute. Find it.
33170        IFS_save="$IFS"
33171        IFS=:
33172        for p in $PATH; do
33173          if test -f "$p/$path" && test -x "$p/$path"; then
33174            new_path="$p/$path"
33175            break
33176          fi
33177        done
33178        IFS="$IFS_save"
33179      else
33180        # This is an absolute path, we can use it without further modifications.
33181        new_path="$path"
33182      fi
33183
33184      if test "x$new_path" = x; then
33185        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33186$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33187        has_space=`$ECHO "$complete" | $GREP " "`
33188        if test "x$has_space" != x; then
33189          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33190$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33191        fi
33192        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33193      fi
33194    fi
33195
33196    # Now join together the path and the arguments once again
33197    if test "x$arguments" != xEOL; then
33198      new_complete="$new_path ${arguments% *}"
33199    else
33200      new_complete="$new_path"
33201    fi
33202
33203    if test "x$complete" != "x$new_complete"; then
33204      CXX="$new_complete"
33205      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33206$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33207    fi
33208  fi
33209
33210  TEST_COMPILER="$CXX"
33211  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33212  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33213  if test "x$OPENJDK_BUILD_OS" != xaix; then
33214    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33216$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33217
33218  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33219    # Follow a chain of symbolic links. Use readlink
33220    # where it exists, else fall back to horribly
33221    # complicated shell code.
33222    if test "x$READLINK_TESTED" != yes; then
33223      # On MacOSX there is a readlink tool with a different
33224      # purpose than the GNU readlink tool. Check the found readlink.
33225      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33226      if test "x$ISGNU" = x; then
33227        # A readlink that we do not know how to use.
33228        # Are there other non-GNU readlinks out there?
33229        READLINK_TESTED=yes
33230        READLINK=
33231      fi
33232    fi
33233
33234    if test "x$READLINK" != x; then
33235      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33236    else
33237      # Save the current directory for restoring afterwards
33238      STARTDIR=$PWD
33239      COUNTER=0
33240      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33241      sym_link_file=`$BASENAME $TEST_COMPILER`
33242      cd $sym_link_dir
33243      # Use -P flag to resolve symlinks in directories.
33244      cd `$THEPWDCMD -P`
33245      sym_link_dir=`$THEPWDCMD -P`
33246      # Resolve file symlinks
33247      while test $COUNTER -lt 20; do
33248        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33249        if test "x$ISLINK" == x; then
33250          # This is not a symbolic link! We are done!
33251          break
33252        fi
33253        # Again resolve directory symlinks since the target of the just found
33254        # link could be in a different directory
33255        cd `$DIRNAME $ISLINK`
33256        sym_link_dir=`$THEPWDCMD -P`
33257        sym_link_file=`$BASENAME $ISLINK`
33258        let COUNTER=COUNTER+1
33259      done
33260      cd $STARTDIR
33261      TEST_COMPILER=$sym_link_dir/$sym_link_file
33262    fi
33263  fi
33264
33265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33266$as_echo "$TEST_COMPILER" >&6; }
33267  fi
33268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33269$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33270
33271  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33272  if test "x$COMPILER_BASENAME" = "xccache"; then
33273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33274$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33275    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33276    # We want to control ccache invocation ourselves, so ignore this cc and try
33277    # searching again.
33278
33279    # Remove the path to the fake ccache cc from the PATH
33280    RETRY_COMPILER_SAVED_PATH="$PATH"
33281    COMPILER_DIRNAME=`$DIRNAME $CXX`
33282    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33283
33284    # Try again looking for our compiler
33285    if test -n "$ac_tool_prefix"; then
33286  for ac_prog in $TOOLCHAIN_CXX_BINARY
33287  do
33288    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33289set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33291$as_echo_n "checking for $ac_word... " >&6; }
33292if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33293  $as_echo_n "(cached) " >&6
33294else
33295  if test -n "$PROPER_COMPILER_CXX"; then
33296  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33297else
33298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33299for as_dir in $PATH
33300do
33301  IFS=$as_save_IFS
33302  test -z "$as_dir" && as_dir=.
33303    for ac_exec_ext in '' $ac_executable_extensions; do
33304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33305    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33307    break 2
33308  fi
33309done
33310  done
33311IFS=$as_save_IFS
33312
33313fi
33314fi
33315PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33316if test -n "$PROPER_COMPILER_CXX"; then
33317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33318$as_echo "$PROPER_COMPILER_CXX" >&6; }
33319else
33320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33321$as_echo "no" >&6; }
33322fi
33323
33324
33325    test -n "$PROPER_COMPILER_CXX" && break
33326  done
33327fi
33328if test -z "$PROPER_COMPILER_CXX"; then
33329  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33330  for ac_prog in $TOOLCHAIN_CXX_BINARY
33331do
33332  # Extract the first word of "$ac_prog", so it can be a program name with args.
33333set dummy $ac_prog; ac_word=$2
33334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33335$as_echo_n "checking for $ac_word... " >&6; }
33336if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33337  $as_echo_n "(cached) " >&6
33338else
33339  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33340  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33341else
33342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33343for as_dir in $PATH
33344do
33345  IFS=$as_save_IFS
33346  test -z "$as_dir" && as_dir=.
33347    for ac_exec_ext in '' $ac_executable_extensions; do
33348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33349    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33351    break 2
33352  fi
33353done
33354  done
33355IFS=$as_save_IFS
33356
33357fi
33358fi
33359ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33360if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33362$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33363else
33364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33365$as_echo "no" >&6; }
33366fi
33367
33368
33369  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33370done
33371
33372  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33373    PROPER_COMPILER_CXX=""
33374  else
33375    case $cross_compiling:$ac_tool_warned in
33376yes:)
33377{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33378$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33379ac_tool_warned=yes ;;
33380esac
33381    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33382  fi
33383fi
33384
33385
33386  # Only process if variable expands to non-empty
33387
33388  if test "x$PROPER_COMPILER_CXX" != x; then
33389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33390
33391  # First separate the path from the arguments. This will split at the first
33392  # space.
33393  complete="$PROPER_COMPILER_CXX"
33394  path="${complete%% *}"
33395  tmp="$complete EOL"
33396  arguments="${tmp#* }"
33397
33398  # Input might be given as Windows format, start by converting to
33399  # unix format.
33400  new_path=`$CYGPATH -u "$path"`
33401
33402  # Now try to locate executable using which
33403  new_path=`$WHICH "$new_path" 2> /dev/null`
33404  # bat and cmd files are not always considered executable in cygwin causing which
33405  # to not find them
33406  if test "x$new_path" = x \
33407      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33408      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33409    new_path=`$CYGPATH -u "$path"`
33410  fi
33411  if test "x$new_path" = x; then
33412    # Oops. Which didn't find the executable.
33413    # The splitting of arguments from the executable at a space might have been incorrect,
33414    # since paths with space are more likely in Windows. Give it another try with the whole
33415    # argument.
33416    path="$complete"
33417    arguments="EOL"
33418    new_path=`$CYGPATH -u "$path"`
33419    new_path=`$WHICH "$new_path" 2> /dev/null`
33420    # bat and cmd files are not always considered executable in cygwin causing which
33421    # to not find them
33422    if test "x$new_path" = x \
33423        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33424        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33425      new_path=`$CYGPATH -u "$path"`
33426    fi
33427    if test "x$new_path" = x; then
33428      # It's still not found. Now this is an unrecoverable error.
33429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33430$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33431      has_space=`$ECHO "$complete" | $GREP " "`
33432      if test "x$has_space" != x; then
33433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33435      fi
33436      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33437    fi
33438  fi
33439
33440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33443  # "foo.exe" is OK but "foo" is an error.
33444  #
33445  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33446  # It is also a way to make sure we got the proper file name for the real test later on.
33447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33448  if test "x$test_shortpath" = x; then
33449    # Short path failed, file does not exist as specified.
33450    # Try adding .exe or .cmd
33451    if test -f "${new_path}.exe"; then
33452      input_to_shortpath="${new_path}.exe"
33453    elif test -f "${new_path}.cmd"; then
33454      input_to_shortpath="${new_path}.cmd"
33455    else
33456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33457$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33458      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33459$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33460      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33461    fi
33462  else
33463    input_to_shortpath="$new_path"
33464  fi
33465
33466  # Call helper function which possibly converts this using DOS-style short mode.
33467  # If so, the updated path is stored in $new_path.
33468  new_path="$input_to_shortpath"
33469
33470  input_path="$input_to_shortpath"
33471  # Check if we need to convert this using DOS-style short mode. If the path
33472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33473  # take no chances and rewrite it.
33474  # Note: m4 eats our [], so we need to use [ and ] instead.
33475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33476  if test "x$has_forbidden_chars" != x; then
33477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33481      # Going to short mode and back again did indeed matter. Since short mode is
33482      # case insensitive, let's make it lowercase to improve readability.
33483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33484      # Now convert it back to Unix-style (cygpath)
33485      input_path=`$CYGPATH -u "$shortmode_path"`
33486      new_path="$input_path"
33487    fi
33488  fi
33489
33490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33491  if test "x$test_cygdrive_prefix" = x; then
33492    # As a simple fix, exclude /usr/bin since it's not a real path.
33493    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33495      # a path prefixed by /cygdrive for fixpath to work.
33496      new_path="$CYGWIN_ROOT_PATH$input_path"
33497    fi
33498  fi
33499
33500  # remove trailing .exe if any
33501  new_path="${new_path/%.exe/}"
33502
33503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33504
33505  # First separate the path from the arguments. This will split at the first
33506  # space.
33507  complete="$PROPER_COMPILER_CXX"
33508  path="${complete%% *}"
33509  tmp="$complete EOL"
33510  arguments="${tmp#* }"
33511
33512  # Input might be given as Windows format, start by converting to
33513  # unix format.
33514  new_path="$path"
33515
33516  windows_path="$new_path"
33517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33518    unix_path=`$CYGPATH -u "$windows_path"`
33519    new_path="$unix_path"
33520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33522    new_path="$unix_path"
33523  fi
33524
33525
33526  # Now try to locate executable using which
33527  new_path=`$WHICH "$new_path" 2> /dev/null`
33528
33529  if test "x$new_path" = x; then
33530    # Oops. Which didn't find the executable.
33531    # The splitting of arguments from the executable at a space might have been incorrect,
33532    # since paths with space are more likely in Windows. Give it another try with the whole
33533    # argument.
33534    path="$complete"
33535    arguments="EOL"
33536    new_path="$path"
33537
33538  windows_path="$new_path"
33539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33540    unix_path=`$CYGPATH -u "$windows_path"`
33541    new_path="$unix_path"
33542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33544    new_path="$unix_path"
33545  fi
33546
33547
33548    new_path=`$WHICH "$new_path" 2> /dev/null`
33549    # bat and cmd files are not always considered executable in MSYS causing which
33550    # to not find them
33551    if test "x$new_path" = x \
33552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33554      new_path="$path"
33555
33556  windows_path="$new_path"
33557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33558    unix_path=`$CYGPATH -u "$windows_path"`
33559    new_path="$unix_path"
33560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33562    new_path="$unix_path"
33563  fi
33564
33565    fi
33566
33567    if test "x$new_path" = x; then
33568      # It's still not found. Now this is an unrecoverable error.
33569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33570$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33571      has_space=`$ECHO "$complete" | $GREP " "`
33572      if test "x$has_space" != x; then
33573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33575      fi
33576      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33577    fi
33578  fi
33579
33580  # Now new_path has a complete unix path to the binary
33581  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33582    # Keep paths in /bin as-is, but remove trailing .exe if any
33583    new_path="${new_path/%.exe/}"
33584    # Do not save /bin paths to all_fixpath_prefixes!
33585  else
33586    # Not in mixed or Windows style, start by that.
33587    new_path=`cmd //c echo $new_path`
33588
33589  input_path="$new_path"
33590  # Check if we need to convert this using DOS-style short mode. If the path
33591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33592  # take no chances and rewrite it.
33593  # Note: m4 eats our [], so we need to use [ and ] instead.
33594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33595  if test "x$has_forbidden_chars" != x; then
33596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33598  fi
33599
33600    # Output is in $new_path
33601
33602  windows_path="$new_path"
33603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33604    unix_path=`$CYGPATH -u "$windows_path"`
33605    new_path="$unix_path"
33606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33608    new_path="$unix_path"
33609  fi
33610
33611    # remove trailing .exe if any
33612    new_path="${new_path/%.exe/}"
33613
33614    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33615    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33616  fi
33617
33618    else
33619      # We're on a unix platform. Hooray! :)
33620      # First separate the path from the arguments. This will split at the first
33621      # space.
33622      complete="$PROPER_COMPILER_CXX"
33623      path="${complete%% *}"
33624      tmp="$complete EOL"
33625      arguments="${tmp#* }"
33626
33627      # Cannot rely on the command "which" here since it doesn't always work.
33628      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33629      if test -z "$is_absolute_path"; then
33630        # Path to executable is not absolute. Find it.
33631        IFS_save="$IFS"
33632        IFS=:
33633        for p in $PATH; do
33634          if test -f "$p/$path" && test -x "$p/$path"; then
33635            new_path="$p/$path"
33636            break
33637          fi
33638        done
33639        IFS="$IFS_save"
33640      else
33641        # This is an absolute path, we can use it without further modifications.
33642        new_path="$path"
33643      fi
33644
33645      if test "x$new_path" = x; then
33646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33647$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33648        has_space=`$ECHO "$complete" | $GREP " "`
33649        if test "x$has_space" != x; then
33650          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33651$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33652        fi
33653        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33654      fi
33655    fi
33656
33657    # Now join together the path and the arguments once again
33658    if test "x$arguments" != xEOL; then
33659      new_complete="$new_path ${arguments% *}"
33660    else
33661      new_complete="$new_path"
33662    fi
33663
33664    if test "x$complete" != "x$new_complete"; then
33665      PROPER_COMPILER_CXX="$new_complete"
33666      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33667$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33668    fi
33669  fi
33670
33671    PATH="$RETRY_COMPILER_SAVED_PATH"
33672
33673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33674$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33675
33676  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33677    # Follow a chain of symbolic links. Use readlink
33678    # where it exists, else fall back to horribly
33679    # complicated shell code.
33680    if test "x$READLINK_TESTED" != yes; then
33681      # On MacOSX there is a readlink tool with a different
33682      # purpose than the GNU readlink tool. Check the found readlink.
33683      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33684      if test "x$ISGNU" = x; then
33685        # A readlink that we do not know how to use.
33686        # Are there other non-GNU readlinks out there?
33687        READLINK_TESTED=yes
33688        READLINK=
33689      fi
33690    fi
33691
33692    if test "x$READLINK" != x; then
33693      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33694    else
33695      # Save the current directory for restoring afterwards
33696      STARTDIR=$PWD
33697      COUNTER=0
33698      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33699      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33700      cd $sym_link_dir
33701      # Use -P flag to resolve symlinks in directories.
33702      cd `$THEPWDCMD -P`
33703      sym_link_dir=`$THEPWDCMD -P`
33704      # Resolve file symlinks
33705      while test $COUNTER -lt 20; do
33706        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33707        if test "x$ISLINK" == x; then
33708          # This is not a symbolic link! We are done!
33709          break
33710        fi
33711        # Again resolve directory symlinks since the target of the just found
33712        # link could be in a different directory
33713        cd `$DIRNAME $ISLINK`
33714        sym_link_dir=`$THEPWDCMD -P`
33715        sym_link_file=`$BASENAME $ISLINK`
33716        let COUNTER=COUNTER+1
33717      done
33718      cd $STARTDIR
33719      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33720    fi
33721  fi
33722
33723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33724$as_echo "$PROPER_COMPILER_CXX" >&6; }
33725    CXX="$PROPER_COMPILER_CXX"
33726  else
33727    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33728$as_echo "no, keeping CXX" >&6; }
33729  fi
33730
33731
33732  COMPILER=$CXX
33733  COMPILER_NAME=$COMPILER_NAME
33734
33735  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33736    # cc -V output typically looks like
33737    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33738    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33739    # Check that this is likely to be the Solaris Studio cc.
33740    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33741    if test $? -ne 0; then
33742      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33743      { $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
33744$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33745      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33746$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33747      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33748$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33749      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33750    fi
33751    # Remove usage instructions (if present), and
33752    # collapse compiler output into a single line
33753    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33754        $SED -e 's/ *[Uu]sage:.*//'`
33755    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33756        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33757  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33758    # xlc -qversion output typically looks like
33759    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33760    #     Version: 11.01.0000.0015
33761    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33762    # Check that this is likely to be the IBM XL C compiler.
33763    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33764    if test $? -ne 0; then
33765      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33766      { $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
33767$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33768      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33769$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33770      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33771$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33772      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33773    fi
33774    # Collapse compiler output into a single line
33775    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33776    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33777        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33778  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33779    # There is no specific version flag, but all output starts with a version string.
33780    # First line typically looks something like:
33781    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33782    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33783    # Check that this is likely to be Microsoft CL.EXE.
33784    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33785    if test $? -ne 0; then
33786      { $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
33787$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33788      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33789$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33790      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33791    fi
33792    # Collapse compiler output into a single line
33793    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33794    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33795        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33796  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33797    # gcc --version output typically looks like
33798    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33799    #     Copyright (C) 2013 Free Software Foundation, Inc.
33800    #     This is free software; see the source for copying conditions.  There is NO
33801    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33802    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33803    # Check that this is likely to be GCC.
33804    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33805    if test $? -ne 0; then
33806      { $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
33807$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33808      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33809$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33810      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33811    fi
33812    # Remove Copyright and legalese from version string, and
33813    # collapse into a single line
33814    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33815        $SED -e 's/ *Copyright .*//'`
33816    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33817        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33818  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33819    # clang --version output typically looks like
33820    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33821    #    clang version 3.3 (tags/RELEASE_33/final)
33822    # or
33823    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33824    #    Target: x86_64-pc-linux-gnu
33825    #    Thread model: posix
33826    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33827    # Check that this is likely to be clang
33828    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33829    if test $? -ne 0; then
33830      { $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
33831$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33832      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33833$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33834      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33835    fi
33836    # Collapse compiler output into a single line
33837    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33838    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33839        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33840  else
33841      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33842  fi
33843  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33844  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33845  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33846  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33847
33848  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33849$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33850
33851
33852  # Now that we have resolved CXX ourself, let autoconf have its go at it
33853  ac_ext=cpp
33854ac_cpp='$CXXCPP $CPPFLAGS'
33855ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33856ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33857ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33858if test -z "$CXX"; then
33859  if test -n "$CCC"; then
33860    CXX=$CCC
33861  else
33862    if test -n "$ac_tool_prefix"; then
33863  for ac_prog in $CXX
33864  do
33865    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33866set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33868$as_echo_n "checking for $ac_word... " >&6; }
33869if ${ac_cv_prog_CXX+:} false; then :
33870  $as_echo_n "(cached) " >&6
33871else
33872  if test -n "$CXX"; then
33873  ac_cv_prog_CXX="$CXX" # Let the user override the test.
33874else
33875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33876for as_dir in $PATH
33877do
33878  IFS=$as_save_IFS
33879  test -z "$as_dir" && as_dir=.
33880    for ac_exec_ext in '' $ac_executable_extensions; do
33881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33882    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33884    break 2
33885  fi
33886done
33887  done
33888IFS=$as_save_IFS
33889
33890fi
33891fi
33892CXX=$ac_cv_prog_CXX
33893if test -n "$CXX"; then
33894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33895$as_echo "$CXX" >&6; }
33896else
33897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33898$as_echo "no" >&6; }
33899fi
33900
33901
33902    test -n "$CXX" && break
33903  done
33904fi
33905if test -z "$CXX"; then
33906  ac_ct_CXX=$CXX
33907  for ac_prog in $CXX
33908do
33909  # Extract the first word of "$ac_prog", so it can be a program name with args.
33910set dummy $ac_prog; ac_word=$2
33911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33912$as_echo_n "checking for $ac_word... " >&6; }
33913if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33914  $as_echo_n "(cached) " >&6
33915else
33916  if test -n "$ac_ct_CXX"; then
33917  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33918else
33919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33920for as_dir in $PATH
33921do
33922  IFS=$as_save_IFS
33923  test -z "$as_dir" && as_dir=.
33924    for ac_exec_ext in '' $ac_executable_extensions; do
33925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33926    ac_cv_prog_ac_ct_CXX="$ac_prog"
33927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33928    break 2
33929  fi
33930done
33931  done
33932IFS=$as_save_IFS
33933
33934fi
33935fi
33936ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33937if test -n "$ac_ct_CXX"; then
33938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33939$as_echo "$ac_ct_CXX" >&6; }
33940else
33941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33942$as_echo "no" >&6; }
33943fi
33944
33945
33946  test -n "$ac_ct_CXX" && break
33947done
33948
33949  if test "x$ac_ct_CXX" = x; then
33950    CXX="g++"
33951  else
33952    case $cross_compiling:$ac_tool_warned in
33953yes:)
33954{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33955$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33956ac_tool_warned=yes ;;
33957esac
33958    CXX=$ac_ct_CXX
33959  fi
33960fi
33961
33962  fi
33963fi
33964# Provide some information about the compiler.
33965$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33966set X $ac_compile
33967ac_compiler=$2
33968for ac_option in --version -v -V -qversion; do
33969  { { ac_try="$ac_compiler $ac_option >&5"
33970case "(($ac_try" in
33971  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33972  *) ac_try_echo=$ac_try;;
33973esac
33974eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33975$as_echo "$ac_try_echo"; } >&5
33976  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33977  ac_status=$?
33978  if test -s conftest.err; then
33979    sed '10a\
33980... rest of stderr output deleted ...
33981         10q' conftest.err >conftest.er1
33982    cat conftest.er1 >&5
33983  fi
33984  rm -f conftest.er1 conftest.err
33985  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33986  test $ac_status = 0; }
33987done
33988
33989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33990$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33991if ${ac_cv_cxx_compiler_gnu+:} false; then :
33992  $as_echo_n "(cached) " >&6
33993else
33994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33995/* end confdefs.h.  */
33996
33997int
33998main ()
33999{
34000#ifndef __GNUC__
34001       choke me
34002#endif
34003
34004  ;
34005  return 0;
34006}
34007_ACEOF
34008if ac_fn_cxx_try_compile "$LINENO"; then :
34009  ac_compiler_gnu=yes
34010else
34011  ac_compiler_gnu=no
34012fi
34013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34014ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34015
34016fi
34017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34018$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34019if test $ac_compiler_gnu = yes; then
34020  GXX=yes
34021else
34022  GXX=
34023fi
34024ac_test_CXXFLAGS=${CXXFLAGS+set}
34025ac_save_CXXFLAGS=$CXXFLAGS
34026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34027$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34028if ${ac_cv_prog_cxx_g+:} false; then :
34029  $as_echo_n "(cached) " >&6
34030else
34031  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34032   ac_cxx_werror_flag=yes
34033   ac_cv_prog_cxx_g=no
34034   CXXFLAGS="-g"
34035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34036/* end confdefs.h.  */
34037
34038int
34039main ()
34040{
34041
34042  ;
34043  return 0;
34044}
34045_ACEOF
34046if ac_fn_cxx_try_compile "$LINENO"; then :
34047  ac_cv_prog_cxx_g=yes
34048else
34049  CXXFLAGS=""
34050      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34051/* end confdefs.h.  */
34052
34053int
34054main ()
34055{
34056
34057  ;
34058  return 0;
34059}
34060_ACEOF
34061if ac_fn_cxx_try_compile "$LINENO"; then :
34062
34063else
34064  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34065	 CXXFLAGS="-g"
34066	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34067/* end confdefs.h.  */
34068
34069int
34070main ()
34071{
34072
34073  ;
34074  return 0;
34075}
34076_ACEOF
34077if ac_fn_cxx_try_compile "$LINENO"; then :
34078  ac_cv_prog_cxx_g=yes
34079fi
34080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34081fi
34082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34083fi
34084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34085   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34086fi
34087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34088$as_echo "$ac_cv_prog_cxx_g" >&6; }
34089if test "$ac_test_CXXFLAGS" = set; then
34090  CXXFLAGS=$ac_save_CXXFLAGS
34091elif test $ac_cv_prog_cxx_g = yes; then
34092  if test "$GXX" = yes; then
34093    CXXFLAGS="-g -O2"
34094  else
34095    CXXFLAGS="-g"
34096  fi
34097else
34098  if test "$GXX" = yes; then
34099    CXXFLAGS="-O2"
34100  else
34101    CXXFLAGS=
34102  fi
34103fi
34104ac_ext=cpp
34105ac_cpp='$CXXCPP $CPPFLAGS'
34106ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34107ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34108ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34109
34110
34111  #
34112  # Setup the preprocessor (CPP and CXXCPP)
34113  #
34114  ac_ext=c
34115ac_cpp='$CPP $CPPFLAGS'
34116ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34117ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34118ac_compiler_gnu=$ac_cv_c_compiler_gnu
34119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34120$as_echo_n "checking how to run the C preprocessor... " >&6; }
34121# On Suns, sometimes $CPP names a directory.
34122if test -n "$CPP" && test -d "$CPP"; then
34123  CPP=
34124fi
34125if test -z "$CPP"; then
34126  if ${ac_cv_prog_CPP+:} false; then :
34127  $as_echo_n "(cached) " >&6
34128else
34129      # Double quotes because CPP needs to be expanded
34130    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34131    do
34132      ac_preproc_ok=false
34133for ac_c_preproc_warn_flag in '' yes
34134do
34135  # Use a header file that comes with gcc, so configuring glibc
34136  # with a fresh cross-compiler works.
34137  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34138  # <limits.h> exists even on freestanding compilers.
34139  # On the NeXT, cc -E runs the code through the compiler's parser,
34140  # not just through cpp. "Syntax error" is here to catch this case.
34141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34142/* end confdefs.h.  */
34143#ifdef __STDC__
34144# include <limits.h>
34145#else
34146# include <assert.h>
34147#endif
34148		     Syntax error
34149_ACEOF
34150if ac_fn_c_try_cpp "$LINENO"; then :
34151
34152else
34153  # Broken: fails on valid input.
34154continue
34155fi
34156rm -f conftest.err conftest.i conftest.$ac_ext
34157
34158  # OK, works on sane cases.  Now check whether nonexistent headers
34159  # can be detected and how.
34160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34161/* end confdefs.h.  */
34162#include <ac_nonexistent.h>
34163_ACEOF
34164if ac_fn_c_try_cpp "$LINENO"; then :
34165  # Broken: success on invalid input.
34166continue
34167else
34168  # Passes both tests.
34169ac_preproc_ok=:
34170break
34171fi
34172rm -f conftest.err conftest.i conftest.$ac_ext
34173
34174done
34175# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34176rm -f conftest.i conftest.err conftest.$ac_ext
34177if $ac_preproc_ok; then :
34178  break
34179fi
34180
34181    done
34182    ac_cv_prog_CPP=$CPP
34183
34184fi
34185  CPP=$ac_cv_prog_CPP
34186else
34187  ac_cv_prog_CPP=$CPP
34188fi
34189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34190$as_echo "$CPP" >&6; }
34191ac_preproc_ok=false
34192for ac_c_preproc_warn_flag in '' yes
34193do
34194  # Use a header file that comes with gcc, so configuring glibc
34195  # with a fresh cross-compiler works.
34196  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34197  # <limits.h> exists even on freestanding compilers.
34198  # On the NeXT, cc -E runs the code through the compiler's parser,
34199  # not just through cpp. "Syntax error" is here to catch this case.
34200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34201/* end confdefs.h.  */
34202#ifdef __STDC__
34203# include <limits.h>
34204#else
34205# include <assert.h>
34206#endif
34207		     Syntax error
34208_ACEOF
34209if ac_fn_c_try_cpp "$LINENO"; then :
34210
34211else
34212  # Broken: fails on valid input.
34213continue
34214fi
34215rm -f conftest.err conftest.i conftest.$ac_ext
34216
34217  # OK, works on sane cases.  Now check whether nonexistent headers
34218  # can be detected and how.
34219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34220/* end confdefs.h.  */
34221#include <ac_nonexistent.h>
34222_ACEOF
34223if ac_fn_c_try_cpp "$LINENO"; then :
34224  # Broken: success on invalid input.
34225continue
34226else
34227  # Passes both tests.
34228ac_preproc_ok=:
34229break
34230fi
34231rm -f conftest.err conftest.i conftest.$ac_ext
34232
34233done
34234# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34235rm -f conftest.i conftest.err conftest.$ac_ext
34236if $ac_preproc_ok; then :
34237
34238else
34239  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34240$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34241as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34242See \`config.log' for more details" "$LINENO" 5; }
34243fi
34244
34245ac_ext=cpp
34246ac_cpp='$CXXCPP $CPPFLAGS'
34247ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34248ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34249ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34250
34251
34252  # Only process if variable expands to non-empty
34253
34254  if test "x$CPP" != x; then
34255    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34256
34257  # First separate the path from the arguments. This will split at the first
34258  # space.
34259  complete="$CPP"
34260  path="${complete%% *}"
34261  tmp="$complete EOL"
34262  arguments="${tmp#* }"
34263
34264  # Input might be given as Windows format, start by converting to
34265  # unix format.
34266  new_path=`$CYGPATH -u "$path"`
34267
34268  # Now try to locate executable using which
34269  new_path=`$WHICH "$new_path" 2> /dev/null`
34270  # bat and cmd files are not always considered executable in cygwin causing which
34271  # to not find them
34272  if test "x$new_path" = x \
34273      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34274      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34275    new_path=`$CYGPATH -u "$path"`
34276  fi
34277  if test "x$new_path" = x; then
34278    # Oops. Which didn't find the executable.
34279    # The splitting of arguments from the executable at a space might have been incorrect,
34280    # since paths with space are more likely in Windows. Give it another try with the whole
34281    # argument.
34282    path="$complete"
34283    arguments="EOL"
34284    new_path=`$CYGPATH -u "$path"`
34285    new_path=`$WHICH "$new_path" 2> /dev/null`
34286    # bat and cmd files are not always considered executable in cygwin causing which
34287    # to not find them
34288    if test "x$new_path" = x \
34289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34291      new_path=`$CYGPATH -u "$path"`
34292    fi
34293    if test "x$new_path" = x; then
34294      # It's still not found. Now this is an unrecoverable error.
34295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34296$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34297      has_space=`$ECHO "$complete" | $GREP " "`
34298      if test "x$has_space" != x; then
34299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34301      fi
34302      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34303    fi
34304  fi
34305
34306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34309  # "foo.exe" is OK but "foo" is an error.
34310  #
34311  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34312  # It is also a way to make sure we got the proper file name for the real test later on.
34313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34314  if test "x$test_shortpath" = x; then
34315    # Short path failed, file does not exist as specified.
34316    # Try adding .exe or .cmd
34317    if test -f "${new_path}.exe"; then
34318      input_to_shortpath="${new_path}.exe"
34319    elif test -f "${new_path}.cmd"; then
34320      input_to_shortpath="${new_path}.cmd"
34321    else
34322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34323$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34324      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34325$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34326      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34327    fi
34328  else
34329    input_to_shortpath="$new_path"
34330  fi
34331
34332  # Call helper function which possibly converts this using DOS-style short mode.
34333  # If so, the updated path is stored in $new_path.
34334  new_path="$input_to_shortpath"
34335
34336  input_path="$input_to_shortpath"
34337  # Check if we need to convert this using DOS-style short mode. If the path
34338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34339  # take no chances and rewrite it.
34340  # Note: m4 eats our [], so we need to use [ and ] instead.
34341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34342  if test "x$has_forbidden_chars" != x; then
34343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34347      # Going to short mode and back again did indeed matter. Since short mode is
34348      # case insensitive, let's make it lowercase to improve readability.
34349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34350      # Now convert it back to Unix-style (cygpath)
34351      input_path=`$CYGPATH -u "$shortmode_path"`
34352      new_path="$input_path"
34353    fi
34354  fi
34355
34356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34357  if test "x$test_cygdrive_prefix" = x; then
34358    # As a simple fix, exclude /usr/bin since it's not a real path.
34359    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34361      # a path prefixed by /cygdrive for fixpath to work.
34362      new_path="$CYGWIN_ROOT_PATH$input_path"
34363    fi
34364  fi
34365
34366  # remove trailing .exe if any
34367  new_path="${new_path/%.exe/}"
34368
34369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34370
34371  # First separate the path from the arguments. This will split at the first
34372  # space.
34373  complete="$CPP"
34374  path="${complete%% *}"
34375  tmp="$complete EOL"
34376  arguments="${tmp#* }"
34377
34378  # Input might be given as Windows format, start by converting to
34379  # unix format.
34380  new_path="$path"
34381
34382  windows_path="$new_path"
34383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34384    unix_path=`$CYGPATH -u "$windows_path"`
34385    new_path="$unix_path"
34386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34388    new_path="$unix_path"
34389  fi
34390
34391
34392  # Now try to locate executable using which
34393  new_path=`$WHICH "$new_path" 2> /dev/null`
34394
34395  if test "x$new_path" = x; then
34396    # Oops. Which didn't find the executable.
34397    # The splitting of arguments from the executable at a space might have been incorrect,
34398    # since paths with space are more likely in Windows. Give it another try with the whole
34399    # argument.
34400    path="$complete"
34401    arguments="EOL"
34402    new_path="$path"
34403
34404  windows_path="$new_path"
34405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34406    unix_path=`$CYGPATH -u "$windows_path"`
34407    new_path="$unix_path"
34408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34410    new_path="$unix_path"
34411  fi
34412
34413
34414    new_path=`$WHICH "$new_path" 2> /dev/null`
34415    # bat and cmd files are not always considered executable in MSYS causing which
34416    # to not find them
34417    if test "x$new_path" = x \
34418        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34419        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34420      new_path="$path"
34421
34422  windows_path="$new_path"
34423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34424    unix_path=`$CYGPATH -u "$windows_path"`
34425    new_path="$unix_path"
34426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34428    new_path="$unix_path"
34429  fi
34430
34431    fi
34432
34433    if test "x$new_path" = x; then
34434      # It's still not found. Now this is an unrecoverable error.
34435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34436$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34437      has_space=`$ECHO "$complete" | $GREP " "`
34438      if test "x$has_space" != x; then
34439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34441      fi
34442      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34443    fi
34444  fi
34445
34446  # Now new_path has a complete unix path to the binary
34447  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34448    # Keep paths in /bin as-is, but remove trailing .exe if any
34449    new_path="${new_path/%.exe/}"
34450    # Do not save /bin paths to all_fixpath_prefixes!
34451  else
34452    # Not in mixed or Windows style, start by that.
34453    new_path=`cmd //c echo $new_path`
34454
34455  input_path="$new_path"
34456  # Check if we need to convert this using DOS-style short mode. If the path
34457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34458  # take no chances and rewrite it.
34459  # Note: m4 eats our [], so we need to use [ and ] instead.
34460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34461  if test "x$has_forbidden_chars" != x; then
34462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34464  fi
34465
34466    # Output is in $new_path
34467
34468  windows_path="$new_path"
34469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34470    unix_path=`$CYGPATH -u "$windows_path"`
34471    new_path="$unix_path"
34472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34474    new_path="$unix_path"
34475  fi
34476
34477    # remove trailing .exe if any
34478    new_path="${new_path/%.exe/}"
34479
34480    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34481    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34482  fi
34483
34484    else
34485      # We're on a unix platform. Hooray! :)
34486      # First separate the path from the arguments. This will split at the first
34487      # space.
34488      complete="$CPP"
34489      path="${complete%% *}"
34490      tmp="$complete EOL"
34491      arguments="${tmp#* }"
34492
34493      # Cannot rely on the command "which" here since it doesn't always work.
34494      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34495      if test -z "$is_absolute_path"; then
34496        # Path to executable is not absolute. Find it.
34497        IFS_save="$IFS"
34498        IFS=:
34499        for p in $PATH; do
34500          if test -f "$p/$path" && test -x "$p/$path"; then
34501            new_path="$p/$path"
34502            break
34503          fi
34504        done
34505        IFS="$IFS_save"
34506      else
34507        # This is an absolute path, we can use it without further modifications.
34508        new_path="$path"
34509      fi
34510
34511      if test "x$new_path" = x; then
34512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34513$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34514        has_space=`$ECHO "$complete" | $GREP " "`
34515        if test "x$has_space" != x; then
34516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34518        fi
34519        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34520      fi
34521    fi
34522
34523    # Now join together the path and the arguments once again
34524    if test "x$arguments" != xEOL; then
34525      new_complete="$new_path ${arguments% *}"
34526    else
34527      new_complete="$new_path"
34528    fi
34529
34530    if test "x$complete" != "x$new_complete"; then
34531      CPP="$new_complete"
34532      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34533$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34534    fi
34535  fi
34536
34537  ac_ext=cpp
34538ac_cpp='$CXXCPP $CPPFLAGS'
34539ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34540ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34541ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34543$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34544if test -z "$CXXCPP"; then
34545  if ${ac_cv_prog_CXXCPP+:} false; then :
34546  $as_echo_n "(cached) " >&6
34547else
34548      # Double quotes because CXXCPP needs to be expanded
34549    for CXXCPP in "$CXX -E" "/lib/cpp"
34550    do
34551      ac_preproc_ok=false
34552for ac_cxx_preproc_warn_flag in '' yes
34553do
34554  # Use a header file that comes with gcc, so configuring glibc
34555  # with a fresh cross-compiler works.
34556  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34557  # <limits.h> exists even on freestanding compilers.
34558  # On the NeXT, cc -E runs the code through the compiler's parser,
34559  # not just through cpp. "Syntax error" is here to catch this case.
34560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34561/* end confdefs.h.  */
34562#ifdef __STDC__
34563# include <limits.h>
34564#else
34565# include <assert.h>
34566#endif
34567		     Syntax error
34568_ACEOF
34569if ac_fn_cxx_try_cpp "$LINENO"; then :
34570
34571else
34572  # Broken: fails on valid input.
34573continue
34574fi
34575rm -f conftest.err conftest.i conftest.$ac_ext
34576
34577  # OK, works on sane cases.  Now check whether nonexistent headers
34578  # can be detected and how.
34579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34580/* end confdefs.h.  */
34581#include <ac_nonexistent.h>
34582_ACEOF
34583if ac_fn_cxx_try_cpp "$LINENO"; then :
34584  # Broken: success on invalid input.
34585continue
34586else
34587  # Passes both tests.
34588ac_preproc_ok=:
34589break
34590fi
34591rm -f conftest.err conftest.i conftest.$ac_ext
34592
34593done
34594# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34595rm -f conftest.i conftest.err conftest.$ac_ext
34596if $ac_preproc_ok; then :
34597  break
34598fi
34599
34600    done
34601    ac_cv_prog_CXXCPP=$CXXCPP
34602
34603fi
34604  CXXCPP=$ac_cv_prog_CXXCPP
34605else
34606  ac_cv_prog_CXXCPP=$CXXCPP
34607fi
34608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34609$as_echo "$CXXCPP" >&6; }
34610ac_preproc_ok=false
34611for ac_cxx_preproc_warn_flag in '' yes
34612do
34613  # Use a header file that comes with gcc, so configuring glibc
34614  # with a fresh cross-compiler works.
34615  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34616  # <limits.h> exists even on freestanding compilers.
34617  # On the NeXT, cc -E runs the code through the compiler's parser,
34618  # not just through cpp. "Syntax error" is here to catch this case.
34619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34620/* end confdefs.h.  */
34621#ifdef __STDC__
34622# include <limits.h>
34623#else
34624# include <assert.h>
34625#endif
34626		     Syntax error
34627_ACEOF
34628if ac_fn_cxx_try_cpp "$LINENO"; then :
34629
34630else
34631  # Broken: fails on valid input.
34632continue
34633fi
34634rm -f conftest.err conftest.i conftest.$ac_ext
34635
34636  # OK, works on sane cases.  Now check whether nonexistent headers
34637  # can be detected and how.
34638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34639/* end confdefs.h.  */
34640#include <ac_nonexistent.h>
34641_ACEOF
34642if ac_fn_cxx_try_cpp "$LINENO"; then :
34643  # Broken: success on invalid input.
34644continue
34645else
34646  # Passes both tests.
34647ac_preproc_ok=:
34648break
34649fi
34650rm -f conftest.err conftest.i conftest.$ac_ext
34651
34652done
34653# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34654rm -f conftest.i conftest.err conftest.$ac_ext
34655if $ac_preproc_ok; then :
34656
34657else
34658  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34660as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34661See \`config.log' for more details" "$LINENO" 5; }
34662fi
34663
34664ac_ext=cpp
34665ac_cpp='$CXXCPP $CPPFLAGS'
34666ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34667ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34668ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34669
34670
34671  # Only process if variable expands to non-empty
34672
34673  if test "x$CXXCPP" != x; then
34674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34675
34676  # First separate the path from the arguments. This will split at the first
34677  # space.
34678  complete="$CXXCPP"
34679  path="${complete%% *}"
34680  tmp="$complete EOL"
34681  arguments="${tmp#* }"
34682
34683  # Input might be given as Windows format, start by converting to
34684  # unix format.
34685  new_path=`$CYGPATH -u "$path"`
34686
34687  # Now try to locate executable using which
34688  new_path=`$WHICH "$new_path" 2> /dev/null`
34689  # bat and cmd files are not always considered executable in cygwin causing which
34690  # to not find them
34691  if test "x$new_path" = x \
34692      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34693      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34694    new_path=`$CYGPATH -u "$path"`
34695  fi
34696  if test "x$new_path" = x; then
34697    # Oops. Which didn't find the executable.
34698    # The splitting of arguments from the executable at a space might have been incorrect,
34699    # since paths with space are more likely in Windows. Give it another try with the whole
34700    # argument.
34701    path="$complete"
34702    arguments="EOL"
34703    new_path=`$CYGPATH -u "$path"`
34704    new_path=`$WHICH "$new_path" 2> /dev/null`
34705    # bat and cmd files are not always considered executable in cygwin causing which
34706    # to not find them
34707    if test "x$new_path" = x \
34708        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34709        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34710      new_path=`$CYGPATH -u "$path"`
34711    fi
34712    if test "x$new_path" = x; then
34713      # It's still not found. Now this is an unrecoverable error.
34714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34715$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34716      has_space=`$ECHO "$complete" | $GREP " "`
34717      if test "x$has_space" != x; then
34718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34720      fi
34721      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34722    fi
34723  fi
34724
34725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34728  # "foo.exe" is OK but "foo" is an error.
34729  #
34730  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34731  # It is also a way to make sure we got the proper file name for the real test later on.
34732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34733  if test "x$test_shortpath" = x; then
34734    # Short path failed, file does not exist as specified.
34735    # Try adding .exe or .cmd
34736    if test -f "${new_path}.exe"; then
34737      input_to_shortpath="${new_path}.exe"
34738    elif test -f "${new_path}.cmd"; then
34739      input_to_shortpath="${new_path}.cmd"
34740    else
34741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34742$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34743      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34744$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34745      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34746    fi
34747  else
34748    input_to_shortpath="$new_path"
34749  fi
34750
34751  # Call helper function which possibly converts this using DOS-style short mode.
34752  # If so, the updated path is stored in $new_path.
34753  new_path="$input_to_shortpath"
34754
34755  input_path="$input_to_shortpath"
34756  # Check if we need to convert this using DOS-style short mode. If the path
34757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34758  # take no chances and rewrite it.
34759  # Note: m4 eats our [], so we need to use [ and ] instead.
34760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34761  if test "x$has_forbidden_chars" != x; then
34762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34766      # Going to short mode and back again did indeed matter. Since short mode is
34767      # case insensitive, let's make it lowercase to improve readability.
34768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34769      # Now convert it back to Unix-style (cygpath)
34770      input_path=`$CYGPATH -u "$shortmode_path"`
34771      new_path="$input_path"
34772    fi
34773  fi
34774
34775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34776  if test "x$test_cygdrive_prefix" = x; then
34777    # As a simple fix, exclude /usr/bin since it's not a real path.
34778    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34780      # a path prefixed by /cygdrive for fixpath to work.
34781      new_path="$CYGWIN_ROOT_PATH$input_path"
34782    fi
34783  fi
34784
34785  # remove trailing .exe if any
34786  new_path="${new_path/%.exe/}"
34787
34788    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34789
34790  # First separate the path from the arguments. This will split at the first
34791  # space.
34792  complete="$CXXCPP"
34793  path="${complete%% *}"
34794  tmp="$complete EOL"
34795  arguments="${tmp#* }"
34796
34797  # Input might be given as Windows format, start by converting to
34798  # unix format.
34799  new_path="$path"
34800
34801  windows_path="$new_path"
34802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34803    unix_path=`$CYGPATH -u "$windows_path"`
34804    new_path="$unix_path"
34805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34807    new_path="$unix_path"
34808  fi
34809
34810
34811  # Now try to locate executable using which
34812  new_path=`$WHICH "$new_path" 2> /dev/null`
34813
34814  if test "x$new_path" = x; then
34815    # Oops. Which didn't find the executable.
34816    # The splitting of arguments from the executable at a space might have been incorrect,
34817    # since paths with space are more likely in Windows. Give it another try with the whole
34818    # argument.
34819    path="$complete"
34820    arguments="EOL"
34821    new_path="$path"
34822
34823  windows_path="$new_path"
34824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34825    unix_path=`$CYGPATH -u "$windows_path"`
34826    new_path="$unix_path"
34827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34829    new_path="$unix_path"
34830  fi
34831
34832
34833    new_path=`$WHICH "$new_path" 2> /dev/null`
34834    # bat and cmd files are not always considered executable in MSYS causing which
34835    # to not find them
34836    if test "x$new_path" = x \
34837        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34838        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34839      new_path="$path"
34840
34841  windows_path="$new_path"
34842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34843    unix_path=`$CYGPATH -u "$windows_path"`
34844    new_path="$unix_path"
34845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34847    new_path="$unix_path"
34848  fi
34849
34850    fi
34851
34852    if test "x$new_path" = x; then
34853      # It's still not found. Now this is an unrecoverable error.
34854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34855$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34856      has_space=`$ECHO "$complete" | $GREP " "`
34857      if test "x$has_space" != x; then
34858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34860      fi
34861      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34862    fi
34863  fi
34864
34865  # Now new_path has a complete unix path to the binary
34866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34867    # Keep paths in /bin as-is, but remove trailing .exe if any
34868    new_path="${new_path/%.exe/}"
34869    # Do not save /bin paths to all_fixpath_prefixes!
34870  else
34871    # Not in mixed or Windows style, start by that.
34872    new_path=`cmd //c echo $new_path`
34873
34874  input_path="$new_path"
34875  # Check if we need to convert this using DOS-style short mode. If the path
34876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34877  # take no chances and rewrite it.
34878  # Note: m4 eats our [], so we need to use [ and ] instead.
34879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34880  if test "x$has_forbidden_chars" != x; then
34881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34883  fi
34884
34885    # Output is in $new_path
34886
34887  windows_path="$new_path"
34888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34889    unix_path=`$CYGPATH -u "$windows_path"`
34890    new_path="$unix_path"
34891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34893    new_path="$unix_path"
34894  fi
34895
34896    # remove trailing .exe if any
34897    new_path="${new_path/%.exe/}"
34898
34899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34901  fi
34902
34903    else
34904      # We're on a unix platform. Hooray! :)
34905      # First separate the path from the arguments. This will split at the first
34906      # space.
34907      complete="$CXXCPP"
34908      path="${complete%% *}"
34909      tmp="$complete EOL"
34910      arguments="${tmp#* }"
34911
34912      # Cannot rely on the command "which" here since it doesn't always work.
34913      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34914      if test -z "$is_absolute_path"; then
34915        # Path to executable is not absolute. Find it.
34916        IFS_save="$IFS"
34917        IFS=:
34918        for p in $PATH; do
34919          if test -f "$p/$path" && test -x "$p/$path"; then
34920            new_path="$p/$path"
34921            break
34922          fi
34923        done
34924        IFS="$IFS_save"
34925      else
34926        # This is an absolute path, we can use it without further modifications.
34927        new_path="$path"
34928      fi
34929
34930      if test "x$new_path" = x; then
34931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34932$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34933        has_space=`$ECHO "$complete" | $GREP " "`
34934        if test "x$has_space" != x; then
34935          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34936$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34937        fi
34938        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34939      fi
34940    fi
34941
34942    # Now join together the path and the arguments once again
34943    if test "x$arguments" != xEOL; then
34944      new_complete="$new_path ${arguments% *}"
34945    else
34946      new_complete="$new_path"
34947    fi
34948
34949    if test "x$complete" != "x$new_complete"; then
34950      CXXCPP="$new_complete"
34951      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34952$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34953    fi
34954  fi
34955
34956
34957  #
34958  # Setup the linker (LD)
34959  #
34960  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34961    # In the Microsoft toolchain we have a separate LD command "link".
34962    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34963    # a cygwin program for something completely different.
34964    # Extract the first word of "link", so it can be a program name with args.
34965set dummy link; ac_word=$2
34966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34967$as_echo_n "checking for $ac_word... " >&6; }
34968if ${ac_cv_prog_LD+:} false; then :
34969  $as_echo_n "(cached) " >&6
34970else
34971  if test -n "$LD"; then
34972  ac_cv_prog_LD="$LD" # Let the user override the test.
34973else
34974  ac_prog_rejected=no
34975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34976for as_dir in $PATH
34977do
34978  IFS=$as_save_IFS
34979  test -z "$as_dir" && as_dir=.
34980    for ac_exec_ext in '' $ac_executable_extensions; do
34981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34982    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34983       ac_prog_rejected=yes
34984       continue
34985     fi
34986    ac_cv_prog_LD="link"
34987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34988    break 2
34989  fi
34990done
34991  done
34992IFS=$as_save_IFS
34993
34994if test $ac_prog_rejected = yes; then
34995  # We found a bogon in the path, so make sure we never use it.
34996  set dummy $ac_cv_prog_LD
34997  shift
34998  if test $# != 0; then
34999    # We chose a different compiler from the bogus one.
35000    # However, it has the same basename, so the bogon will be chosen
35001    # first if we set LD to just the basename; use the full file name.
35002    shift
35003    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35004  fi
35005fi
35006fi
35007fi
35008LD=$ac_cv_prog_LD
35009if test -n "$LD"; then
35010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35011$as_echo "$LD" >&6; }
35012else
35013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35014$as_echo "no" >&6; }
35015fi
35016
35017
35018
35019  # Only process if variable expands to non-empty
35020
35021  if test "x$LD" != x; then
35022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35023
35024  # First separate the path from the arguments. This will split at the first
35025  # space.
35026  complete="$LD"
35027  path="${complete%% *}"
35028  tmp="$complete EOL"
35029  arguments="${tmp#* }"
35030
35031  # Input might be given as Windows format, start by converting to
35032  # unix format.
35033  new_path=`$CYGPATH -u "$path"`
35034
35035  # Now try to locate executable using which
35036  new_path=`$WHICH "$new_path" 2> /dev/null`
35037  # bat and cmd files are not always considered executable in cygwin causing which
35038  # to not find them
35039  if test "x$new_path" = x \
35040      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35041      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35042    new_path=`$CYGPATH -u "$path"`
35043  fi
35044  if test "x$new_path" = x; then
35045    # Oops. Which didn't find the executable.
35046    # The splitting of arguments from the executable at a space might have been incorrect,
35047    # since paths with space are more likely in Windows. Give it another try with the whole
35048    # argument.
35049    path="$complete"
35050    arguments="EOL"
35051    new_path=`$CYGPATH -u "$path"`
35052    new_path=`$WHICH "$new_path" 2> /dev/null`
35053    # bat and cmd files are not always considered executable in cygwin causing which
35054    # to not find them
35055    if test "x$new_path" = x \
35056        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35057        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35058      new_path=`$CYGPATH -u "$path"`
35059    fi
35060    if test "x$new_path" = x; then
35061      # It's still not found. Now this is an unrecoverable error.
35062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35063$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35064      has_space=`$ECHO "$complete" | $GREP " "`
35065      if test "x$has_space" != x; then
35066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35068      fi
35069      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35070    fi
35071  fi
35072
35073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35076  # "foo.exe" is OK but "foo" is an error.
35077  #
35078  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35079  # It is also a way to make sure we got the proper file name for the real test later on.
35080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35081  if test "x$test_shortpath" = x; then
35082    # Short path failed, file does not exist as specified.
35083    # Try adding .exe or .cmd
35084    if test -f "${new_path}.exe"; then
35085      input_to_shortpath="${new_path}.exe"
35086    elif test -f "${new_path}.cmd"; then
35087      input_to_shortpath="${new_path}.cmd"
35088    else
35089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35090$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35093      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35094    fi
35095  else
35096    input_to_shortpath="$new_path"
35097  fi
35098
35099  # Call helper function which possibly converts this using DOS-style short mode.
35100  # If so, the updated path is stored in $new_path.
35101  new_path="$input_to_shortpath"
35102
35103  input_path="$input_to_shortpath"
35104  # Check if we need to convert this using DOS-style short mode. If the path
35105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35106  # take no chances and rewrite it.
35107  # Note: m4 eats our [], so we need to use [ and ] instead.
35108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35109  if test "x$has_forbidden_chars" != x; then
35110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35114      # Going to short mode and back again did indeed matter. Since short mode is
35115      # case insensitive, let's make it lowercase to improve readability.
35116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35117      # Now convert it back to Unix-style (cygpath)
35118      input_path=`$CYGPATH -u "$shortmode_path"`
35119      new_path="$input_path"
35120    fi
35121  fi
35122
35123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35124  if test "x$test_cygdrive_prefix" = x; then
35125    # As a simple fix, exclude /usr/bin since it's not a real path.
35126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35128      # a path prefixed by /cygdrive for fixpath to work.
35129      new_path="$CYGWIN_ROOT_PATH$input_path"
35130    fi
35131  fi
35132
35133  # remove trailing .exe if any
35134  new_path="${new_path/%.exe/}"
35135
35136    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35137
35138  # First separate the path from the arguments. This will split at the first
35139  # space.
35140  complete="$LD"
35141  path="${complete%% *}"
35142  tmp="$complete EOL"
35143  arguments="${tmp#* }"
35144
35145  # Input might be given as Windows format, start by converting to
35146  # unix format.
35147  new_path="$path"
35148
35149  windows_path="$new_path"
35150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35151    unix_path=`$CYGPATH -u "$windows_path"`
35152    new_path="$unix_path"
35153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35155    new_path="$unix_path"
35156  fi
35157
35158
35159  # Now try to locate executable using which
35160  new_path=`$WHICH "$new_path" 2> /dev/null`
35161
35162  if test "x$new_path" = x; then
35163    # Oops. Which didn't find the executable.
35164    # The splitting of arguments from the executable at a space might have been incorrect,
35165    # since paths with space are more likely in Windows. Give it another try with the whole
35166    # argument.
35167    path="$complete"
35168    arguments="EOL"
35169    new_path="$path"
35170
35171  windows_path="$new_path"
35172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35173    unix_path=`$CYGPATH -u "$windows_path"`
35174    new_path="$unix_path"
35175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35177    new_path="$unix_path"
35178  fi
35179
35180
35181    new_path=`$WHICH "$new_path" 2> /dev/null`
35182    # bat and cmd files are not always considered executable in MSYS causing which
35183    # to not find them
35184    if test "x$new_path" = x \
35185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35187      new_path="$path"
35188
35189  windows_path="$new_path"
35190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35191    unix_path=`$CYGPATH -u "$windows_path"`
35192    new_path="$unix_path"
35193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35195    new_path="$unix_path"
35196  fi
35197
35198    fi
35199
35200    if test "x$new_path" = x; then
35201      # It's still not found. Now this is an unrecoverable error.
35202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35203$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35204      has_space=`$ECHO "$complete" | $GREP " "`
35205      if test "x$has_space" != x; then
35206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35208      fi
35209      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35210    fi
35211  fi
35212
35213  # Now new_path has a complete unix path to the binary
35214  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35215    # Keep paths in /bin as-is, but remove trailing .exe if any
35216    new_path="${new_path/%.exe/}"
35217    # Do not save /bin paths to all_fixpath_prefixes!
35218  else
35219    # Not in mixed or Windows style, start by that.
35220    new_path=`cmd //c echo $new_path`
35221
35222  input_path="$new_path"
35223  # Check if we need to convert this using DOS-style short mode. If the path
35224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35225  # take no chances and rewrite it.
35226  # Note: m4 eats our [], so we need to use [ and ] instead.
35227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35228  if test "x$has_forbidden_chars" != x; then
35229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35231  fi
35232
35233    # Output is in $new_path
35234
35235  windows_path="$new_path"
35236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35237    unix_path=`$CYGPATH -u "$windows_path"`
35238    new_path="$unix_path"
35239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35241    new_path="$unix_path"
35242  fi
35243
35244    # remove trailing .exe if any
35245    new_path="${new_path/%.exe/}"
35246
35247    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35248    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35249  fi
35250
35251    else
35252      # We're on a unix platform. Hooray! :)
35253      # First separate the path from the arguments. This will split at the first
35254      # space.
35255      complete="$LD"
35256      path="${complete%% *}"
35257      tmp="$complete EOL"
35258      arguments="${tmp#* }"
35259
35260      # Cannot rely on the command "which" here since it doesn't always work.
35261      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35262      if test -z "$is_absolute_path"; then
35263        # Path to executable is not absolute. Find it.
35264        IFS_save="$IFS"
35265        IFS=:
35266        for p in $PATH; do
35267          if test -f "$p/$path" && test -x "$p/$path"; then
35268            new_path="$p/$path"
35269            break
35270          fi
35271        done
35272        IFS="$IFS_save"
35273      else
35274        # This is an absolute path, we can use it without further modifications.
35275        new_path="$path"
35276      fi
35277
35278      if test "x$new_path" = x; then
35279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35280$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35281        has_space=`$ECHO "$complete" | $GREP " "`
35282        if test "x$has_space" != x; then
35283          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35284$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35285        fi
35286        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35287      fi
35288    fi
35289
35290    # Now join together the path and the arguments once again
35291    if test "x$arguments" != xEOL; then
35292      new_complete="$new_path ${arguments% *}"
35293    else
35294      new_complete="$new_path"
35295    fi
35296
35297    if test "x$complete" != "x$new_complete"; then
35298      LD="$new_complete"
35299      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35300$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35301    fi
35302  fi
35303
35304    # Verify that we indeed succeeded with this trick.
35305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35306$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35307    "$LD" --version > /dev/null
35308    if test $? -eq 0 ; then
35309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35310$as_echo "no" >&6; }
35311      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35312    else
35313      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35314$as_echo "yes" >&6; }
35315    fi
35316    LDCXX="$LD"
35317  else
35318    # All other toolchains use the compiler to link.
35319    LD="$CC"
35320    LDCXX="$CXX"
35321  fi
35322
35323  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35324
35325
35326  #
35327  # Setup the assembler (AS)
35328  #
35329  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35330    # FIXME: should this really be solaris, or solstudio?
35331
35332
35333  # Publish this variable in the help.
35334
35335
35336  if [ -z "${AS+x}" ]; then
35337    # The variable is not set by user, try to locate tool using the code snippet
35338    for ac_prog in as
35339do
35340  # Extract the first word of "$ac_prog", so it can be a program name with args.
35341set dummy $ac_prog; ac_word=$2
35342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35343$as_echo_n "checking for $ac_word... " >&6; }
35344if ${ac_cv_path_AS+:} false; then :
35345  $as_echo_n "(cached) " >&6
35346else
35347  case $AS in
35348  [\\/]* | ?:[\\/]*)
35349  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35350  ;;
35351  *)
35352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35353for as_dir in $PATH
35354do
35355  IFS=$as_save_IFS
35356  test -z "$as_dir" && as_dir=.
35357    for ac_exec_ext in '' $ac_executable_extensions; do
35358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35359    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35361    break 2
35362  fi
35363done
35364  done
35365IFS=$as_save_IFS
35366
35367  ;;
35368esac
35369fi
35370AS=$ac_cv_path_AS
35371if test -n "$AS"; then
35372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35373$as_echo "$AS" >&6; }
35374else
35375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35376$as_echo "no" >&6; }
35377fi
35378
35379
35380  test -n "$AS" && break
35381done
35382
35383  else
35384    # The variable is set, but is it from the command line or the environment?
35385
35386    # Try to remove the string !AS! from our list.
35387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35389      # If it failed, the variable was not from the command line. Ignore it,
35390      # but warn the user (except for BASH, which is always set by the calling BASH).
35391      if test "xAS" != xBASH; then
35392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35393$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35394      fi
35395      # Try to locate tool using the code snippet
35396      for ac_prog in as
35397do
35398  # Extract the first word of "$ac_prog", so it can be a program name with args.
35399set dummy $ac_prog; ac_word=$2
35400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35401$as_echo_n "checking for $ac_word... " >&6; }
35402if ${ac_cv_path_AS+:} false; then :
35403  $as_echo_n "(cached) " >&6
35404else
35405  case $AS in
35406  [\\/]* | ?:[\\/]*)
35407  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35408  ;;
35409  *)
35410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35411for as_dir in $PATH
35412do
35413  IFS=$as_save_IFS
35414  test -z "$as_dir" && as_dir=.
35415    for ac_exec_ext in '' $ac_executable_extensions; do
35416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35417    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35419    break 2
35420  fi
35421done
35422  done
35423IFS=$as_save_IFS
35424
35425  ;;
35426esac
35427fi
35428AS=$ac_cv_path_AS
35429if test -n "$AS"; then
35430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35431$as_echo "$AS" >&6; }
35432else
35433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35434$as_echo "no" >&6; }
35435fi
35436
35437
35438  test -n "$AS" && break
35439done
35440
35441    else
35442      # If it succeeded, then it was overridden by the user. We will use it
35443      # for the tool.
35444
35445      # First remove it from the list of overridden variables, so we can test
35446      # for unknown variables in the end.
35447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35448
35449      # Check if we try to supply an empty value
35450      if test "x$AS" = x; then
35451        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35452$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35454$as_echo_n "checking for AS... " >&6; }
35455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35456$as_echo "disabled" >&6; }
35457      else
35458        # Check if the provided tool contains a complete path.
35459        tool_specified="$AS"
35460        tool_basename="${tool_specified##*/}"
35461        if test "x$tool_basename" = "x$tool_specified"; then
35462          # A command without a complete path is provided, search $PATH.
35463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35464$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35465          # Extract the first word of "$tool_basename", so it can be a program name with args.
35466set dummy $tool_basename; ac_word=$2
35467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35468$as_echo_n "checking for $ac_word... " >&6; }
35469if ${ac_cv_path_AS+:} false; then :
35470  $as_echo_n "(cached) " >&6
35471else
35472  case $AS in
35473  [\\/]* | ?:[\\/]*)
35474  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35475  ;;
35476  *)
35477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35478for as_dir in $PATH
35479do
35480  IFS=$as_save_IFS
35481  test -z "$as_dir" && as_dir=.
35482    for ac_exec_ext in '' $ac_executable_extensions; do
35483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35484    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35486    break 2
35487  fi
35488done
35489  done
35490IFS=$as_save_IFS
35491
35492  ;;
35493esac
35494fi
35495AS=$ac_cv_path_AS
35496if test -n "$AS"; then
35497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35498$as_echo "$AS" >&6; }
35499else
35500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35501$as_echo "no" >&6; }
35502fi
35503
35504
35505          if test "x$AS" = x; then
35506            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35507          fi
35508        else
35509          # Otherwise we believe it is a complete path. Use it as it is.
35510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35511$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35512          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35513$as_echo_n "checking for AS... " >&6; }
35514          if test ! -x "$tool_specified"; then
35515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35516$as_echo "not found" >&6; }
35517            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35518          fi
35519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35520$as_echo "$tool_specified" >&6; }
35521        fi
35522      fi
35523    fi
35524
35525  fi
35526
35527
35528
35529  # Only process if variable expands to non-empty
35530
35531  if test "x$AS" != x; then
35532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35533
35534  # First separate the path from the arguments. This will split at the first
35535  # space.
35536  complete="$AS"
35537  path="${complete%% *}"
35538  tmp="$complete EOL"
35539  arguments="${tmp#* }"
35540
35541  # Input might be given as Windows format, start by converting to
35542  # unix format.
35543  new_path=`$CYGPATH -u "$path"`
35544
35545  # Now try to locate executable using which
35546  new_path=`$WHICH "$new_path" 2> /dev/null`
35547  # bat and cmd files are not always considered executable in cygwin causing which
35548  # to not find them
35549  if test "x$new_path" = x \
35550      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35551      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35552    new_path=`$CYGPATH -u "$path"`
35553  fi
35554  if test "x$new_path" = x; then
35555    # Oops. Which didn't find the executable.
35556    # The splitting of arguments from the executable at a space might have been incorrect,
35557    # since paths with space are more likely in Windows. Give it another try with the whole
35558    # argument.
35559    path="$complete"
35560    arguments="EOL"
35561    new_path=`$CYGPATH -u "$path"`
35562    new_path=`$WHICH "$new_path" 2> /dev/null`
35563    # bat and cmd files are not always considered executable in cygwin causing which
35564    # to not find them
35565    if test "x$new_path" = x \
35566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35568      new_path=`$CYGPATH -u "$path"`
35569    fi
35570    if test "x$new_path" = x; then
35571      # It's still not found. Now this is an unrecoverable error.
35572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35573$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35574      has_space=`$ECHO "$complete" | $GREP " "`
35575      if test "x$has_space" != x; then
35576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35578      fi
35579      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35580    fi
35581  fi
35582
35583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35586  # "foo.exe" is OK but "foo" is an error.
35587  #
35588  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35589  # It is also a way to make sure we got the proper file name for the real test later on.
35590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35591  if test "x$test_shortpath" = x; then
35592    # Short path failed, file does not exist as specified.
35593    # Try adding .exe or .cmd
35594    if test -f "${new_path}.exe"; then
35595      input_to_shortpath="${new_path}.exe"
35596    elif test -f "${new_path}.cmd"; then
35597      input_to_shortpath="${new_path}.cmd"
35598    else
35599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35600$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35603      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35604    fi
35605  else
35606    input_to_shortpath="$new_path"
35607  fi
35608
35609  # Call helper function which possibly converts this using DOS-style short mode.
35610  # If so, the updated path is stored in $new_path.
35611  new_path="$input_to_shortpath"
35612
35613  input_path="$input_to_shortpath"
35614  # Check if we need to convert this using DOS-style short mode. If the path
35615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35616  # take no chances and rewrite it.
35617  # Note: m4 eats our [], so we need to use [ and ] instead.
35618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35619  if test "x$has_forbidden_chars" != x; then
35620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35624      # Going to short mode and back again did indeed matter. Since short mode is
35625      # case insensitive, let's make it lowercase to improve readability.
35626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35627      # Now convert it back to Unix-style (cygpath)
35628      input_path=`$CYGPATH -u "$shortmode_path"`
35629      new_path="$input_path"
35630    fi
35631  fi
35632
35633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35634  if test "x$test_cygdrive_prefix" = x; then
35635    # As a simple fix, exclude /usr/bin since it's not a real path.
35636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35638      # a path prefixed by /cygdrive for fixpath to work.
35639      new_path="$CYGWIN_ROOT_PATH$input_path"
35640    fi
35641  fi
35642
35643  # remove trailing .exe if any
35644  new_path="${new_path/%.exe/}"
35645
35646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35647
35648  # First separate the path from the arguments. This will split at the first
35649  # space.
35650  complete="$AS"
35651  path="${complete%% *}"
35652  tmp="$complete EOL"
35653  arguments="${tmp#* }"
35654
35655  # Input might be given as Windows format, start by converting to
35656  # unix format.
35657  new_path="$path"
35658
35659  windows_path="$new_path"
35660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35661    unix_path=`$CYGPATH -u "$windows_path"`
35662    new_path="$unix_path"
35663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35665    new_path="$unix_path"
35666  fi
35667
35668
35669  # Now try to locate executable using which
35670  new_path=`$WHICH "$new_path" 2> /dev/null`
35671
35672  if test "x$new_path" = x; then
35673    # Oops. Which didn't find the executable.
35674    # The splitting of arguments from the executable at a space might have been incorrect,
35675    # since paths with space are more likely in Windows. Give it another try with the whole
35676    # argument.
35677    path="$complete"
35678    arguments="EOL"
35679    new_path="$path"
35680
35681  windows_path="$new_path"
35682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35683    unix_path=`$CYGPATH -u "$windows_path"`
35684    new_path="$unix_path"
35685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35687    new_path="$unix_path"
35688  fi
35689
35690
35691    new_path=`$WHICH "$new_path" 2> /dev/null`
35692    # bat and cmd files are not always considered executable in MSYS causing which
35693    # to not find them
35694    if test "x$new_path" = x \
35695        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35696        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35697      new_path="$path"
35698
35699  windows_path="$new_path"
35700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35701    unix_path=`$CYGPATH -u "$windows_path"`
35702    new_path="$unix_path"
35703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35705    new_path="$unix_path"
35706  fi
35707
35708    fi
35709
35710    if test "x$new_path" = x; then
35711      # It's still not found. Now this is an unrecoverable error.
35712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35713$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35714      has_space=`$ECHO "$complete" | $GREP " "`
35715      if test "x$has_space" != x; then
35716        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35717$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35718      fi
35719      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35720    fi
35721  fi
35722
35723  # Now new_path has a complete unix path to the binary
35724  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35725    # Keep paths in /bin as-is, but remove trailing .exe if any
35726    new_path="${new_path/%.exe/}"
35727    # Do not save /bin paths to all_fixpath_prefixes!
35728  else
35729    # Not in mixed or Windows style, start by that.
35730    new_path=`cmd //c echo $new_path`
35731
35732  input_path="$new_path"
35733  # Check if we need to convert this using DOS-style short mode. If the path
35734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35735  # take no chances and rewrite it.
35736  # Note: m4 eats our [], so we need to use [ and ] instead.
35737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35738  if test "x$has_forbidden_chars" != x; then
35739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35741  fi
35742
35743    # Output is in $new_path
35744
35745  windows_path="$new_path"
35746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35747    unix_path=`$CYGPATH -u "$windows_path"`
35748    new_path="$unix_path"
35749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35751    new_path="$unix_path"
35752  fi
35753
35754    # remove trailing .exe if any
35755    new_path="${new_path/%.exe/}"
35756
35757    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35758    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35759  fi
35760
35761    else
35762      # We're on a unix platform. Hooray! :)
35763      # First separate the path from the arguments. This will split at the first
35764      # space.
35765      complete="$AS"
35766      path="${complete%% *}"
35767      tmp="$complete EOL"
35768      arguments="${tmp#* }"
35769
35770      # Cannot rely on the command "which" here since it doesn't always work.
35771      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35772      if test -z "$is_absolute_path"; then
35773        # Path to executable is not absolute. Find it.
35774        IFS_save="$IFS"
35775        IFS=:
35776        for p in $PATH; do
35777          if test -f "$p/$path" && test -x "$p/$path"; then
35778            new_path="$p/$path"
35779            break
35780          fi
35781        done
35782        IFS="$IFS_save"
35783      else
35784        # This is an absolute path, we can use it without further modifications.
35785        new_path="$path"
35786      fi
35787
35788      if test "x$new_path" = x; then
35789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35790$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35791        has_space=`$ECHO "$complete" | $GREP " "`
35792        if test "x$has_space" != x; then
35793          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35795        fi
35796        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35797      fi
35798    fi
35799
35800    # Now join together the path and the arguments once again
35801    if test "x$arguments" != xEOL; then
35802      new_complete="$new_path ${arguments% *}"
35803    else
35804      new_complete="$new_path"
35805    fi
35806
35807    if test "x$complete" != "x$new_complete"; then
35808      AS="$new_complete"
35809      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35810$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35811    fi
35812  fi
35813
35814  else
35815    # FIXME: is this correct for microsoft?
35816    AS="$CC -c"
35817  fi
35818
35819
35820  #
35821  # Setup the archiver (AR)
35822  #
35823  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35824    # The corresponding ar tool is lib.exe (used to create static libraries)
35825    # Extract the first word of "lib", so it can be a program name with args.
35826set dummy lib; ac_word=$2
35827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35828$as_echo_n "checking for $ac_word... " >&6; }
35829if ${ac_cv_prog_AR+:} false; then :
35830  $as_echo_n "(cached) " >&6
35831else
35832  if test -n "$AR"; then
35833  ac_cv_prog_AR="$AR" # Let the user override the test.
35834else
35835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35836for as_dir in $PATH
35837do
35838  IFS=$as_save_IFS
35839  test -z "$as_dir" && as_dir=.
35840    for ac_exec_ext in '' $ac_executable_extensions; do
35841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35842    ac_cv_prog_AR="lib"
35843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35844    break 2
35845  fi
35846done
35847  done
35848IFS=$as_save_IFS
35849
35850fi
35851fi
35852AR=$ac_cv_prog_AR
35853if test -n "$AR"; then
35854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35855$as_echo "$AR" >&6; }
35856else
35857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35858$as_echo "no" >&6; }
35859fi
35860
35861
35862  else
35863
35864
35865  # Publish this variable in the help.
35866
35867
35868  if [ -z "${AR+x}" ]; then
35869    # The variable is not set by user, try to locate tool using the code snippet
35870    if test -n "$ac_tool_prefix"; then
35871  for ac_prog in ar
35872  do
35873    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35874set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35876$as_echo_n "checking for $ac_word... " >&6; }
35877if ${ac_cv_prog_AR+:} false; then :
35878  $as_echo_n "(cached) " >&6
35879else
35880  if test -n "$AR"; then
35881  ac_cv_prog_AR="$AR" # Let the user override the test.
35882else
35883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35884for as_dir in $PATH
35885do
35886  IFS=$as_save_IFS
35887  test -z "$as_dir" && as_dir=.
35888    for ac_exec_ext in '' $ac_executable_extensions; do
35889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35890    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35892    break 2
35893  fi
35894done
35895  done
35896IFS=$as_save_IFS
35897
35898fi
35899fi
35900AR=$ac_cv_prog_AR
35901if test -n "$AR"; then
35902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35903$as_echo "$AR" >&6; }
35904else
35905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35906$as_echo "no" >&6; }
35907fi
35908
35909
35910    test -n "$AR" && break
35911  done
35912fi
35913if test -z "$AR"; then
35914  ac_ct_AR=$AR
35915  for ac_prog in ar
35916do
35917  # Extract the first word of "$ac_prog", so it can be a program name with args.
35918set dummy $ac_prog; ac_word=$2
35919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35920$as_echo_n "checking for $ac_word... " >&6; }
35921if ${ac_cv_prog_ac_ct_AR+:} false; then :
35922  $as_echo_n "(cached) " >&6
35923else
35924  if test -n "$ac_ct_AR"; then
35925  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35926else
35927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35928for as_dir in $PATH
35929do
35930  IFS=$as_save_IFS
35931  test -z "$as_dir" && as_dir=.
35932    for ac_exec_ext in '' $ac_executable_extensions; do
35933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35934    ac_cv_prog_ac_ct_AR="$ac_prog"
35935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35936    break 2
35937  fi
35938done
35939  done
35940IFS=$as_save_IFS
35941
35942fi
35943fi
35944ac_ct_AR=$ac_cv_prog_ac_ct_AR
35945if test -n "$ac_ct_AR"; then
35946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35947$as_echo "$ac_ct_AR" >&6; }
35948else
35949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35950$as_echo "no" >&6; }
35951fi
35952
35953
35954  test -n "$ac_ct_AR" && break
35955done
35956
35957  if test "x$ac_ct_AR" = x; then
35958    AR=""
35959  else
35960    case $cross_compiling:$ac_tool_warned in
35961yes:)
35962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35964ac_tool_warned=yes ;;
35965esac
35966    AR=$ac_ct_AR
35967  fi
35968fi
35969
35970  else
35971    # The variable is set, but is it from the command line or the environment?
35972
35973    # Try to remove the string !AR! from our list.
35974    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35975    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35976      # If it failed, the variable was not from the command line. Ignore it,
35977      # but warn the user (except for BASH, which is always set by the calling BASH).
35978      if test "xAR" != xBASH; then
35979        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35980$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35981      fi
35982      # Try to locate tool using the code snippet
35983      if test -n "$ac_tool_prefix"; then
35984  for ac_prog in ar
35985  do
35986    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35987set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35989$as_echo_n "checking for $ac_word... " >&6; }
35990if ${ac_cv_prog_AR+:} false; then :
35991  $as_echo_n "(cached) " >&6
35992else
35993  if test -n "$AR"; then
35994  ac_cv_prog_AR="$AR" # Let the user override the test.
35995else
35996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35997for as_dir in $PATH
35998do
35999  IFS=$as_save_IFS
36000  test -z "$as_dir" && as_dir=.
36001    for ac_exec_ext in '' $ac_executable_extensions; do
36002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36003    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36005    break 2
36006  fi
36007done
36008  done
36009IFS=$as_save_IFS
36010
36011fi
36012fi
36013AR=$ac_cv_prog_AR
36014if test -n "$AR"; then
36015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36016$as_echo "$AR" >&6; }
36017else
36018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36019$as_echo "no" >&6; }
36020fi
36021
36022
36023    test -n "$AR" && break
36024  done
36025fi
36026if test -z "$AR"; then
36027  ac_ct_AR=$AR
36028  for ac_prog in ar
36029do
36030  # Extract the first word of "$ac_prog", so it can be a program name with args.
36031set dummy $ac_prog; ac_word=$2
36032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36033$as_echo_n "checking for $ac_word... " >&6; }
36034if ${ac_cv_prog_ac_ct_AR+:} false; then :
36035  $as_echo_n "(cached) " >&6
36036else
36037  if test -n "$ac_ct_AR"; then
36038  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36039else
36040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36041for as_dir in $PATH
36042do
36043  IFS=$as_save_IFS
36044  test -z "$as_dir" && as_dir=.
36045    for ac_exec_ext in '' $ac_executable_extensions; do
36046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36047    ac_cv_prog_ac_ct_AR="$ac_prog"
36048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36049    break 2
36050  fi
36051done
36052  done
36053IFS=$as_save_IFS
36054
36055fi
36056fi
36057ac_ct_AR=$ac_cv_prog_ac_ct_AR
36058if test -n "$ac_ct_AR"; then
36059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36060$as_echo "$ac_ct_AR" >&6; }
36061else
36062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36063$as_echo "no" >&6; }
36064fi
36065
36066
36067  test -n "$ac_ct_AR" && break
36068done
36069
36070  if test "x$ac_ct_AR" = x; then
36071    AR=""
36072  else
36073    case $cross_compiling:$ac_tool_warned in
36074yes:)
36075{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36076$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36077ac_tool_warned=yes ;;
36078esac
36079    AR=$ac_ct_AR
36080  fi
36081fi
36082
36083    else
36084      # If it succeeded, then it was overridden by the user. We will use it
36085      # for the tool.
36086
36087      # First remove it from the list of overridden variables, so we can test
36088      # for unknown variables in the end.
36089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36090
36091      # Check if we try to supply an empty value
36092      if test "x$AR" = x; then
36093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36094$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36096$as_echo_n "checking for AR... " >&6; }
36097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36098$as_echo "disabled" >&6; }
36099      else
36100        # Check if the provided tool contains a complete path.
36101        tool_specified="$AR"
36102        tool_basename="${tool_specified##*/}"
36103        if test "x$tool_basename" = "x$tool_specified"; then
36104          # A command without a complete path is provided, search $PATH.
36105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36106$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36107          # Extract the first word of "$tool_basename", so it can be a program name with args.
36108set dummy $tool_basename; ac_word=$2
36109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36110$as_echo_n "checking for $ac_word... " >&6; }
36111if ${ac_cv_path_AR+:} false; then :
36112  $as_echo_n "(cached) " >&6
36113else
36114  case $AR in
36115  [\\/]* | ?:[\\/]*)
36116  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36117  ;;
36118  *)
36119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36120for as_dir in $PATH
36121do
36122  IFS=$as_save_IFS
36123  test -z "$as_dir" && as_dir=.
36124    for ac_exec_ext in '' $ac_executable_extensions; do
36125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36126    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36128    break 2
36129  fi
36130done
36131  done
36132IFS=$as_save_IFS
36133
36134  ;;
36135esac
36136fi
36137AR=$ac_cv_path_AR
36138if test -n "$AR"; then
36139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36140$as_echo "$AR" >&6; }
36141else
36142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36143$as_echo "no" >&6; }
36144fi
36145
36146
36147          if test "x$AR" = x; then
36148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36149          fi
36150        else
36151          # Otherwise we believe it is a complete path. Use it as it is.
36152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36153$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36155$as_echo_n "checking for AR... " >&6; }
36156          if test ! -x "$tool_specified"; then
36157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36158$as_echo "not found" >&6; }
36159            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36160          fi
36161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36162$as_echo "$tool_specified" >&6; }
36163        fi
36164      fi
36165    fi
36166
36167  fi
36168
36169
36170  fi
36171
36172  # Only process if variable expands to non-empty
36173
36174  if test "x$AR" != x; then
36175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36176
36177  # First separate the path from the arguments. This will split at the first
36178  # space.
36179  complete="$AR"
36180  path="${complete%% *}"
36181  tmp="$complete EOL"
36182  arguments="${tmp#* }"
36183
36184  # Input might be given as Windows format, start by converting to
36185  # unix format.
36186  new_path=`$CYGPATH -u "$path"`
36187
36188  # Now try to locate executable using which
36189  new_path=`$WHICH "$new_path" 2> /dev/null`
36190  # bat and cmd files are not always considered executable in cygwin causing which
36191  # to not find them
36192  if test "x$new_path" = x \
36193      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36194      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36195    new_path=`$CYGPATH -u "$path"`
36196  fi
36197  if test "x$new_path" = x; then
36198    # Oops. Which didn't find the executable.
36199    # The splitting of arguments from the executable at a space might have been incorrect,
36200    # since paths with space are more likely in Windows. Give it another try with the whole
36201    # argument.
36202    path="$complete"
36203    arguments="EOL"
36204    new_path=`$CYGPATH -u "$path"`
36205    new_path=`$WHICH "$new_path" 2> /dev/null`
36206    # bat and cmd files are not always considered executable in cygwin causing which
36207    # to not find them
36208    if test "x$new_path" = x \
36209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36211      new_path=`$CYGPATH -u "$path"`
36212    fi
36213    if test "x$new_path" = x; then
36214      # It's still not found. Now this is an unrecoverable error.
36215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36216$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36217      has_space=`$ECHO "$complete" | $GREP " "`
36218      if test "x$has_space" != x; then
36219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36221      fi
36222      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36223    fi
36224  fi
36225
36226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36229  # "foo.exe" is OK but "foo" is an error.
36230  #
36231  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36232  # It is also a way to make sure we got the proper file name for the real test later on.
36233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36234  if test "x$test_shortpath" = x; then
36235    # Short path failed, file does not exist as specified.
36236    # Try adding .exe or .cmd
36237    if test -f "${new_path}.exe"; then
36238      input_to_shortpath="${new_path}.exe"
36239    elif test -f "${new_path}.cmd"; then
36240      input_to_shortpath="${new_path}.cmd"
36241    else
36242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36243$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36244      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36245$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36246      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36247    fi
36248  else
36249    input_to_shortpath="$new_path"
36250  fi
36251
36252  # Call helper function which possibly converts this using DOS-style short mode.
36253  # If so, the updated path is stored in $new_path.
36254  new_path="$input_to_shortpath"
36255
36256  input_path="$input_to_shortpath"
36257  # Check if we need to convert this using DOS-style short mode. If the path
36258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36259  # take no chances and rewrite it.
36260  # Note: m4 eats our [], so we need to use [ and ] instead.
36261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36262  if test "x$has_forbidden_chars" != x; then
36263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36267      # Going to short mode and back again did indeed matter. Since short mode is
36268      # case insensitive, let's make it lowercase to improve readability.
36269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36270      # Now convert it back to Unix-style (cygpath)
36271      input_path=`$CYGPATH -u "$shortmode_path"`
36272      new_path="$input_path"
36273    fi
36274  fi
36275
36276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36277  if test "x$test_cygdrive_prefix" = x; then
36278    # As a simple fix, exclude /usr/bin since it's not a real path.
36279    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36281      # a path prefixed by /cygdrive for fixpath to work.
36282      new_path="$CYGWIN_ROOT_PATH$input_path"
36283    fi
36284  fi
36285
36286  # remove trailing .exe if any
36287  new_path="${new_path/%.exe/}"
36288
36289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36290
36291  # First separate the path from the arguments. This will split at the first
36292  # space.
36293  complete="$AR"
36294  path="${complete%% *}"
36295  tmp="$complete EOL"
36296  arguments="${tmp#* }"
36297
36298  # Input might be given as Windows format, start by converting to
36299  # unix format.
36300  new_path="$path"
36301
36302  windows_path="$new_path"
36303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36304    unix_path=`$CYGPATH -u "$windows_path"`
36305    new_path="$unix_path"
36306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36308    new_path="$unix_path"
36309  fi
36310
36311
36312  # Now try to locate executable using which
36313  new_path=`$WHICH "$new_path" 2> /dev/null`
36314
36315  if test "x$new_path" = x; then
36316    # Oops. Which didn't find the executable.
36317    # The splitting of arguments from the executable at a space might have been incorrect,
36318    # since paths with space are more likely in Windows. Give it another try with the whole
36319    # argument.
36320    path="$complete"
36321    arguments="EOL"
36322    new_path="$path"
36323
36324  windows_path="$new_path"
36325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36326    unix_path=`$CYGPATH -u "$windows_path"`
36327    new_path="$unix_path"
36328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36330    new_path="$unix_path"
36331  fi
36332
36333
36334    new_path=`$WHICH "$new_path" 2> /dev/null`
36335    # bat and cmd files are not always considered executable in MSYS causing which
36336    # to not find them
36337    if test "x$new_path" = x \
36338        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36339        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36340      new_path="$path"
36341
36342  windows_path="$new_path"
36343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36344    unix_path=`$CYGPATH -u "$windows_path"`
36345    new_path="$unix_path"
36346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36348    new_path="$unix_path"
36349  fi
36350
36351    fi
36352
36353    if test "x$new_path" = x; then
36354      # It's still not found. Now this is an unrecoverable error.
36355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36356$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36357      has_space=`$ECHO "$complete" | $GREP " "`
36358      if test "x$has_space" != x; then
36359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36361      fi
36362      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36363    fi
36364  fi
36365
36366  # Now new_path has a complete unix path to the binary
36367  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36368    # Keep paths in /bin as-is, but remove trailing .exe if any
36369    new_path="${new_path/%.exe/}"
36370    # Do not save /bin paths to all_fixpath_prefixes!
36371  else
36372    # Not in mixed or Windows style, start by that.
36373    new_path=`cmd //c echo $new_path`
36374
36375  input_path="$new_path"
36376  # Check if we need to convert this using DOS-style short mode. If the path
36377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36378  # take no chances and rewrite it.
36379  # Note: m4 eats our [], so we need to use [ and ] instead.
36380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36381  if test "x$has_forbidden_chars" != x; then
36382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36384  fi
36385
36386    # Output is in $new_path
36387
36388  windows_path="$new_path"
36389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36390    unix_path=`$CYGPATH -u "$windows_path"`
36391    new_path="$unix_path"
36392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36394    new_path="$unix_path"
36395  fi
36396
36397    # remove trailing .exe if any
36398    new_path="${new_path/%.exe/}"
36399
36400    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36401    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36402  fi
36403
36404    else
36405      # We're on a unix platform. Hooray! :)
36406      # First separate the path from the arguments. This will split at the first
36407      # space.
36408      complete="$AR"
36409      path="${complete%% *}"
36410      tmp="$complete EOL"
36411      arguments="${tmp#* }"
36412
36413      # Cannot rely on the command "which" here since it doesn't always work.
36414      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36415      if test -z "$is_absolute_path"; then
36416        # Path to executable is not absolute. Find it.
36417        IFS_save="$IFS"
36418        IFS=:
36419        for p in $PATH; do
36420          if test -f "$p/$path" && test -x "$p/$path"; then
36421            new_path="$p/$path"
36422            break
36423          fi
36424        done
36425        IFS="$IFS_save"
36426      else
36427        # This is an absolute path, we can use it without further modifications.
36428        new_path="$path"
36429      fi
36430
36431      if test "x$new_path" = x; then
36432        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36433$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36434        has_space=`$ECHO "$complete" | $GREP " "`
36435        if test "x$has_space" != x; then
36436          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36437$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36438        fi
36439        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36440      fi
36441    fi
36442
36443    # Now join together the path and the arguments once again
36444    if test "x$arguments" != xEOL; then
36445      new_complete="$new_path ${arguments% *}"
36446    else
36447      new_complete="$new_path"
36448    fi
36449
36450    if test "x$complete" != "x$new_complete"; then
36451      AR="$new_complete"
36452      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36453$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36454    fi
36455  fi
36456
36457
36458
36459  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36460
36461
36462  # Publish this variable in the help.
36463
36464
36465  if [ -z "${LIPO+x}" ]; then
36466    # The variable is not set by user, try to locate tool using the code snippet
36467    for ac_prog in lipo
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_path_LIPO+:} false; then :
36474  $as_echo_n "(cached) " >&6
36475else
36476  case $LIPO in
36477  [\\/]* | ?:[\\/]*)
36478  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36479  ;;
36480  *)
36481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36482for as_dir in $PATH
36483do
36484  IFS=$as_save_IFS
36485  test -z "$as_dir" && as_dir=.
36486    for ac_exec_ext in '' $ac_executable_extensions; do
36487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36488    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36490    break 2
36491  fi
36492done
36493  done
36494IFS=$as_save_IFS
36495
36496  ;;
36497esac
36498fi
36499LIPO=$ac_cv_path_LIPO
36500if test -n "$LIPO"; then
36501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36502$as_echo "$LIPO" >&6; }
36503else
36504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36505$as_echo "no" >&6; }
36506fi
36507
36508
36509  test -n "$LIPO" && break
36510done
36511
36512  else
36513    # The variable is set, but is it from the command line or the environment?
36514
36515    # Try to remove the string !LIPO! from our list.
36516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36518      # If it failed, the variable was not from the command line. Ignore it,
36519      # but warn the user (except for BASH, which is always set by the calling BASH).
36520      if test "xLIPO" != xBASH; then
36521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36522$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36523      fi
36524      # Try to locate tool using the code snippet
36525      for ac_prog in lipo
36526do
36527  # Extract the first word of "$ac_prog", so it can be a program name with args.
36528set dummy $ac_prog; ac_word=$2
36529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36530$as_echo_n "checking for $ac_word... " >&6; }
36531if ${ac_cv_path_LIPO+:} false; then :
36532  $as_echo_n "(cached) " >&6
36533else
36534  case $LIPO in
36535  [\\/]* | ?:[\\/]*)
36536  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36537  ;;
36538  *)
36539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36540for as_dir in $PATH
36541do
36542  IFS=$as_save_IFS
36543  test -z "$as_dir" && as_dir=.
36544    for ac_exec_ext in '' $ac_executable_extensions; do
36545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36546    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36548    break 2
36549  fi
36550done
36551  done
36552IFS=$as_save_IFS
36553
36554  ;;
36555esac
36556fi
36557LIPO=$ac_cv_path_LIPO
36558if test -n "$LIPO"; then
36559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36560$as_echo "$LIPO" >&6; }
36561else
36562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36563$as_echo "no" >&6; }
36564fi
36565
36566
36567  test -n "$LIPO" && break
36568done
36569
36570    else
36571      # If it succeeded, then it was overridden by the user. We will use it
36572      # for the tool.
36573
36574      # First remove it from the list of overridden variables, so we can test
36575      # for unknown variables in the end.
36576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36577
36578      # Check if we try to supply an empty value
36579      if test "x$LIPO" = x; then
36580        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36581$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36583$as_echo_n "checking for LIPO... " >&6; }
36584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36585$as_echo "disabled" >&6; }
36586      else
36587        # Check if the provided tool contains a complete path.
36588        tool_specified="$LIPO"
36589        tool_basename="${tool_specified##*/}"
36590        if test "x$tool_basename" = "x$tool_specified"; then
36591          # A command without a complete path is provided, search $PATH.
36592          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36593$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36594          # Extract the first word of "$tool_basename", so it can be a program name with args.
36595set dummy $tool_basename; ac_word=$2
36596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36597$as_echo_n "checking for $ac_word... " >&6; }
36598if ${ac_cv_path_LIPO+:} false; then :
36599  $as_echo_n "(cached) " >&6
36600else
36601  case $LIPO in
36602  [\\/]* | ?:[\\/]*)
36603  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36604  ;;
36605  *)
36606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36607for as_dir in $PATH
36608do
36609  IFS=$as_save_IFS
36610  test -z "$as_dir" && as_dir=.
36611    for ac_exec_ext in '' $ac_executable_extensions; do
36612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36613    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36615    break 2
36616  fi
36617done
36618  done
36619IFS=$as_save_IFS
36620
36621  ;;
36622esac
36623fi
36624LIPO=$ac_cv_path_LIPO
36625if test -n "$LIPO"; then
36626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36627$as_echo "$LIPO" >&6; }
36628else
36629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36630$as_echo "no" >&6; }
36631fi
36632
36633
36634          if test "x$LIPO" = x; then
36635            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36636          fi
36637        else
36638          # Otherwise we believe it is a complete path. Use it as it is.
36639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36640$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36641          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36642$as_echo_n "checking for LIPO... " >&6; }
36643          if test ! -x "$tool_specified"; then
36644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36645$as_echo "not found" >&6; }
36646            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36647          fi
36648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36649$as_echo "$tool_specified" >&6; }
36650        fi
36651      fi
36652    fi
36653
36654  fi
36655
36656
36657
36658  # Only process if variable expands to non-empty
36659
36660  if test "x$LIPO" != x; then
36661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36662
36663  # First separate the path from the arguments. This will split at the first
36664  # space.
36665  complete="$LIPO"
36666  path="${complete%% *}"
36667  tmp="$complete EOL"
36668  arguments="${tmp#* }"
36669
36670  # Input might be given as Windows format, start by converting to
36671  # unix format.
36672  new_path=`$CYGPATH -u "$path"`
36673
36674  # Now try to locate executable using which
36675  new_path=`$WHICH "$new_path" 2> /dev/null`
36676  # bat and cmd files are not always considered executable in cygwin causing which
36677  # to not find them
36678  if test "x$new_path" = x \
36679      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36680      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36681    new_path=`$CYGPATH -u "$path"`
36682  fi
36683  if test "x$new_path" = x; then
36684    # Oops. Which didn't find the executable.
36685    # The splitting of arguments from the executable at a space might have been incorrect,
36686    # since paths with space are more likely in Windows. Give it another try with the whole
36687    # argument.
36688    path="$complete"
36689    arguments="EOL"
36690    new_path=`$CYGPATH -u "$path"`
36691    new_path=`$WHICH "$new_path" 2> /dev/null`
36692    # bat and cmd files are not always considered executable in cygwin causing which
36693    # to not find them
36694    if test "x$new_path" = x \
36695        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36696        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36697      new_path=`$CYGPATH -u "$path"`
36698    fi
36699    if test "x$new_path" = x; then
36700      # It's still not found. Now this is an unrecoverable error.
36701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36702$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36703      has_space=`$ECHO "$complete" | $GREP " "`
36704      if test "x$has_space" != x; then
36705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36707      fi
36708      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36709    fi
36710  fi
36711
36712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36715  # "foo.exe" is OK but "foo" is an error.
36716  #
36717  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36718  # It is also a way to make sure we got the proper file name for the real test later on.
36719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36720  if test "x$test_shortpath" = x; then
36721    # Short path failed, file does not exist as specified.
36722    # Try adding .exe or .cmd
36723    if test -f "${new_path}.exe"; then
36724      input_to_shortpath="${new_path}.exe"
36725    elif test -f "${new_path}.cmd"; then
36726      input_to_shortpath="${new_path}.cmd"
36727    else
36728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36729$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36730      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36731$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36732      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36733    fi
36734  else
36735    input_to_shortpath="$new_path"
36736  fi
36737
36738  # Call helper function which possibly converts this using DOS-style short mode.
36739  # If so, the updated path is stored in $new_path.
36740  new_path="$input_to_shortpath"
36741
36742  input_path="$input_to_shortpath"
36743  # Check if we need to convert this using DOS-style short mode. If the path
36744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36745  # take no chances and rewrite it.
36746  # Note: m4 eats our [], so we need to use [ and ] instead.
36747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36748  if test "x$has_forbidden_chars" != x; then
36749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36753      # Going to short mode and back again did indeed matter. Since short mode is
36754      # case insensitive, let's make it lowercase to improve readability.
36755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36756      # Now convert it back to Unix-style (cygpath)
36757      input_path=`$CYGPATH -u "$shortmode_path"`
36758      new_path="$input_path"
36759    fi
36760  fi
36761
36762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36763  if test "x$test_cygdrive_prefix" = x; then
36764    # As a simple fix, exclude /usr/bin since it's not a real path.
36765    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36767      # a path prefixed by /cygdrive for fixpath to work.
36768      new_path="$CYGWIN_ROOT_PATH$input_path"
36769    fi
36770  fi
36771
36772  # remove trailing .exe if any
36773  new_path="${new_path/%.exe/}"
36774
36775    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36776
36777  # First separate the path from the arguments. This will split at the first
36778  # space.
36779  complete="$LIPO"
36780  path="${complete%% *}"
36781  tmp="$complete EOL"
36782  arguments="${tmp#* }"
36783
36784  # Input might be given as Windows format, start by converting to
36785  # unix format.
36786  new_path="$path"
36787
36788  windows_path="$new_path"
36789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36790    unix_path=`$CYGPATH -u "$windows_path"`
36791    new_path="$unix_path"
36792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36794    new_path="$unix_path"
36795  fi
36796
36797
36798  # Now try to locate executable using which
36799  new_path=`$WHICH "$new_path" 2> /dev/null`
36800
36801  if test "x$new_path" = x; then
36802    # Oops. Which didn't find the executable.
36803    # The splitting of arguments from the executable at a space might have been incorrect,
36804    # since paths with space are more likely in Windows. Give it another try with the whole
36805    # argument.
36806    path="$complete"
36807    arguments="EOL"
36808    new_path="$path"
36809
36810  windows_path="$new_path"
36811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36812    unix_path=`$CYGPATH -u "$windows_path"`
36813    new_path="$unix_path"
36814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36816    new_path="$unix_path"
36817  fi
36818
36819
36820    new_path=`$WHICH "$new_path" 2> /dev/null`
36821    # bat and cmd files are not always considered executable in MSYS causing which
36822    # to not find them
36823    if test "x$new_path" = x \
36824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36826      new_path="$path"
36827
36828  windows_path="$new_path"
36829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36830    unix_path=`$CYGPATH -u "$windows_path"`
36831    new_path="$unix_path"
36832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36834    new_path="$unix_path"
36835  fi
36836
36837    fi
36838
36839    if test "x$new_path" = x; then
36840      # It's still not found. Now this is an unrecoverable error.
36841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36842$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36843      has_space=`$ECHO "$complete" | $GREP " "`
36844      if test "x$has_space" != x; then
36845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36847      fi
36848      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36849    fi
36850  fi
36851
36852  # Now new_path has a complete unix path to the binary
36853  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36854    # Keep paths in /bin as-is, but remove trailing .exe if any
36855    new_path="${new_path/%.exe/}"
36856    # Do not save /bin paths to all_fixpath_prefixes!
36857  else
36858    # Not in mixed or Windows style, start by that.
36859    new_path=`cmd //c echo $new_path`
36860
36861  input_path="$new_path"
36862  # Check if we need to convert this using DOS-style short mode. If the path
36863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36864  # take no chances and rewrite it.
36865  # Note: m4 eats our [], so we need to use [ and ] instead.
36866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36867  if test "x$has_forbidden_chars" != x; then
36868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36870  fi
36871
36872    # Output is in $new_path
36873
36874  windows_path="$new_path"
36875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36876    unix_path=`$CYGPATH -u "$windows_path"`
36877    new_path="$unix_path"
36878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36880    new_path="$unix_path"
36881  fi
36882
36883    # remove trailing .exe if any
36884    new_path="${new_path/%.exe/}"
36885
36886    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36887    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36888  fi
36889
36890    else
36891      # We're on a unix platform. Hooray! :)
36892      # First separate the path from the arguments. This will split at the first
36893      # space.
36894      complete="$LIPO"
36895      path="${complete%% *}"
36896      tmp="$complete EOL"
36897      arguments="${tmp#* }"
36898
36899      # Cannot rely on the command "which" here since it doesn't always work.
36900      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36901      if test -z "$is_absolute_path"; then
36902        # Path to executable is not absolute. Find it.
36903        IFS_save="$IFS"
36904        IFS=:
36905        for p in $PATH; do
36906          if test -f "$p/$path" && test -x "$p/$path"; then
36907            new_path="$p/$path"
36908            break
36909          fi
36910        done
36911        IFS="$IFS_save"
36912      else
36913        # This is an absolute path, we can use it without further modifications.
36914        new_path="$path"
36915      fi
36916
36917      if test "x$new_path" = x; then
36918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36919$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36920        has_space=`$ECHO "$complete" | $GREP " "`
36921        if test "x$has_space" != x; then
36922          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36923$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36924        fi
36925        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36926      fi
36927    fi
36928
36929    # Now join together the path and the arguments once again
36930    if test "x$arguments" != xEOL; then
36931      new_complete="$new_path ${arguments% *}"
36932    else
36933      new_complete="$new_path"
36934    fi
36935
36936    if test "x$complete" != "x$new_complete"; then
36937      LIPO="$new_complete"
36938      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
36939$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
36940    fi
36941  fi
36942
36943  fi
36944
36945  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36946    # Extract the first word of "mt", so it can be a program name with args.
36947set dummy mt; ac_word=$2
36948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36949$as_echo_n "checking for $ac_word... " >&6; }
36950if ${ac_cv_prog_MT+:} false; then :
36951  $as_echo_n "(cached) " >&6
36952else
36953  if test -n "$MT"; then
36954  ac_cv_prog_MT="$MT" # Let the user override the test.
36955else
36956  ac_prog_rejected=no
36957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36958for as_dir in $PATH
36959do
36960  IFS=$as_save_IFS
36961  test -z "$as_dir" && as_dir=.
36962    for ac_exec_ext in '' $ac_executable_extensions; do
36963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36964    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
36965       ac_prog_rejected=yes
36966       continue
36967     fi
36968    ac_cv_prog_MT="mt"
36969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36970    break 2
36971  fi
36972done
36973  done
36974IFS=$as_save_IFS
36975
36976if test $ac_prog_rejected = yes; then
36977  # We found a bogon in the path, so make sure we never use it.
36978  set dummy $ac_cv_prog_MT
36979  shift
36980  if test $# != 0; then
36981    # We chose a different compiler from the bogus one.
36982    # However, it has the same basename, so the bogon will be chosen
36983    # first if we set MT to just the basename; use the full file name.
36984    shift
36985    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
36986  fi
36987fi
36988fi
36989fi
36990MT=$ac_cv_prog_MT
36991if test -n "$MT"; then
36992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
36993$as_echo "$MT" >&6; }
36994else
36995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36996$as_echo "no" >&6; }
36997fi
36998
36999
37000
37001  # Only process if variable expands to non-empty
37002
37003  if test "x$MT" != x; then
37004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37005
37006  # First separate the path from the arguments. This will split at the first
37007  # space.
37008  complete="$MT"
37009  path="${complete%% *}"
37010  tmp="$complete EOL"
37011  arguments="${tmp#* }"
37012
37013  # Input might be given as Windows format, start by converting to
37014  # unix format.
37015  new_path=`$CYGPATH -u "$path"`
37016
37017  # Now try to locate executable using which
37018  new_path=`$WHICH "$new_path" 2> /dev/null`
37019  # bat and cmd files are not always considered executable in cygwin causing which
37020  # to not find them
37021  if test "x$new_path" = x \
37022      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37023      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37024    new_path=`$CYGPATH -u "$path"`
37025  fi
37026  if test "x$new_path" = x; then
37027    # Oops. Which didn't find the executable.
37028    # The splitting of arguments from the executable at a space might have been incorrect,
37029    # since paths with space are more likely in Windows. Give it another try with the whole
37030    # argument.
37031    path="$complete"
37032    arguments="EOL"
37033    new_path=`$CYGPATH -u "$path"`
37034    new_path=`$WHICH "$new_path" 2> /dev/null`
37035    # bat and cmd files are not always considered executable in cygwin causing which
37036    # to not find them
37037    if test "x$new_path" = x \
37038        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37039        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37040      new_path=`$CYGPATH -u "$path"`
37041    fi
37042    if test "x$new_path" = x; then
37043      # It's still not found. Now this is an unrecoverable error.
37044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37045$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37046      has_space=`$ECHO "$complete" | $GREP " "`
37047      if test "x$has_space" != x; then
37048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37050      fi
37051      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37052    fi
37053  fi
37054
37055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37058  # "foo.exe" is OK but "foo" is an error.
37059  #
37060  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37061  # It is also a way to make sure we got the proper file name for the real test later on.
37062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37063  if test "x$test_shortpath" = x; then
37064    # Short path failed, file does not exist as specified.
37065    # Try adding .exe or .cmd
37066    if test -f "${new_path}.exe"; then
37067      input_to_shortpath="${new_path}.exe"
37068    elif test -f "${new_path}.cmd"; then
37069      input_to_shortpath="${new_path}.cmd"
37070    else
37071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37072$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37073      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37074$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37075      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37076    fi
37077  else
37078    input_to_shortpath="$new_path"
37079  fi
37080
37081  # Call helper function which possibly converts this using DOS-style short mode.
37082  # If so, the updated path is stored in $new_path.
37083  new_path="$input_to_shortpath"
37084
37085  input_path="$input_to_shortpath"
37086  # Check if we need to convert this using DOS-style short mode. If the path
37087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37088  # take no chances and rewrite it.
37089  # Note: m4 eats our [], so we need to use [ and ] instead.
37090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37091  if test "x$has_forbidden_chars" != x; then
37092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37096      # Going to short mode and back again did indeed matter. Since short mode is
37097      # case insensitive, let's make it lowercase to improve readability.
37098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37099      # Now convert it back to Unix-style (cygpath)
37100      input_path=`$CYGPATH -u "$shortmode_path"`
37101      new_path="$input_path"
37102    fi
37103  fi
37104
37105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37106  if test "x$test_cygdrive_prefix" = x; then
37107    # As a simple fix, exclude /usr/bin since it's not a real path.
37108    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37110      # a path prefixed by /cygdrive for fixpath to work.
37111      new_path="$CYGWIN_ROOT_PATH$input_path"
37112    fi
37113  fi
37114
37115  # remove trailing .exe if any
37116  new_path="${new_path/%.exe/}"
37117
37118    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37119
37120  # First separate the path from the arguments. This will split at the first
37121  # space.
37122  complete="$MT"
37123  path="${complete%% *}"
37124  tmp="$complete EOL"
37125  arguments="${tmp#* }"
37126
37127  # Input might be given as Windows format, start by converting to
37128  # unix format.
37129  new_path="$path"
37130
37131  windows_path="$new_path"
37132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37133    unix_path=`$CYGPATH -u "$windows_path"`
37134    new_path="$unix_path"
37135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37137    new_path="$unix_path"
37138  fi
37139
37140
37141  # Now try to locate executable using which
37142  new_path=`$WHICH "$new_path" 2> /dev/null`
37143
37144  if test "x$new_path" = x; then
37145    # Oops. Which didn't find the executable.
37146    # The splitting of arguments from the executable at a space might have been incorrect,
37147    # since paths with space are more likely in Windows. Give it another try with the whole
37148    # argument.
37149    path="$complete"
37150    arguments="EOL"
37151    new_path="$path"
37152
37153  windows_path="$new_path"
37154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37155    unix_path=`$CYGPATH -u "$windows_path"`
37156    new_path="$unix_path"
37157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37159    new_path="$unix_path"
37160  fi
37161
37162
37163    new_path=`$WHICH "$new_path" 2> /dev/null`
37164    # bat and cmd files are not always considered executable in MSYS causing which
37165    # to not find them
37166    if test "x$new_path" = x \
37167        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37168        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37169      new_path="$path"
37170
37171  windows_path="$new_path"
37172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37173    unix_path=`$CYGPATH -u "$windows_path"`
37174    new_path="$unix_path"
37175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37177    new_path="$unix_path"
37178  fi
37179
37180    fi
37181
37182    if test "x$new_path" = x; then
37183      # It's still not found. Now this is an unrecoverable error.
37184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37185$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37186      has_space=`$ECHO "$complete" | $GREP " "`
37187      if test "x$has_space" != x; then
37188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37190      fi
37191      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37192    fi
37193  fi
37194
37195  # Now new_path has a complete unix path to the binary
37196  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37197    # Keep paths in /bin as-is, but remove trailing .exe if any
37198    new_path="${new_path/%.exe/}"
37199    # Do not save /bin paths to all_fixpath_prefixes!
37200  else
37201    # Not in mixed or Windows style, start by that.
37202    new_path=`cmd //c echo $new_path`
37203
37204  input_path="$new_path"
37205  # Check if we need to convert this using DOS-style short mode. If the path
37206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37207  # take no chances and rewrite it.
37208  # Note: m4 eats our [], so we need to use [ and ] instead.
37209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37210  if test "x$has_forbidden_chars" != x; then
37211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37213  fi
37214
37215    # Output is in $new_path
37216
37217  windows_path="$new_path"
37218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37219    unix_path=`$CYGPATH -u "$windows_path"`
37220    new_path="$unix_path"
37221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37223    new_path="$unix_path"
37224  fi
37225
37226    # remove trailing .exe if any
37227    new_path="${new_path/%.exe/}"
37228
37229    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37230    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37231  fi
37232
37233    else
37234      # We're on a unix platform. Hooray! :)
37235      # First separate the path from the arguments. This will split at the first
37236      # space.
37237      complete="$MT"
37238      path="${complete%% *}"
37239      tmp="$complete EOL"
37240      arguments="${tmp#* }"
37241
37242      # Cannot rely on the command "which" here since it doesn't always work.
37243      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37244      if test -z "$is_absolute_path"; then
37245        # Path to executable is not absolute. Find it.
37246        IFS_save="$IFS"
37247        IFS=:
37248        for p in $PATH; do
37249          if test -f "$p/$path" && test -x "$p/$path"; then
37250            new_path="$p/$path"
37251            break
37252          fi
37253        done
37254        IFS="$IFS_save"
37255      else
37256        # This is an absolute path, we can use it without further modifications.
37257        new_path="$path"
37258      fi
37259
37260      if test "x$new_path" = x; then
37261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37262$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37263        has_space=`$ECHO "$complete" | $GREP " "`
37264        if test "x$has_space" != x; then
37265          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37266$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37267        fi
37268        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37269      fi
37270    fi
37271
37272    # Now join together the path and the arguments once again
37273    if test "x$arguments" != xEOL; then
37274      new_complete="$new_path ${arguments% *}"
37275    else
37276      new_complete="$new_path"
37277    fi
37278
37279    if test "x$complete" != "x$new_complete"; then
37280      MT="$new_complete"
37281      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37282$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37283    fi
37284  fi
37285
37286    # Setup the resource compiler (RC)
37287    # Extract the first word of "rc", so it can be a program name with args.
37288set dummy rc; ac_word=$2
37289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37290$as_echo_n "checking for $ac_word... " >&6; }
37291if ${ac_cv_prog_RC+:} false; then :
37292  $as_echo_n "(cached) " >&6
37293else
37294  if test -n "$RC"; then
37295  ac_cv_prog_RC="$RC" # Let the user override the test.
37296else
37297  ac_prog_rejected=no
37298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37299for as_dir in $PATH
37300do
37301  IFS=$as_save_IFS
37302  test -z "$as_dir" && as_dir=.
37303    for ac_exec_ext in '' $ac_executable_extensions; do
37304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37305    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37306       ac_prog_rejected=yes
37307       continue
37308     fi
37309    ac_cv_prog_RC="rc"
37310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37311    break 2
37312  fi
37313done
37314  done
37315IFS=$as_save_IFS
37316
37317if test $ac_prog_rejected = yes; then
37318  # We found a bogon in the path, so make sure we never use it.
37319  set dummy $ac_cv_prog_RC
37320  shift
37321  if test $# != 0; then
37322    # We chose a different compiler from the bogus one.
37323    # However, it has the same basename, so the bogon will be chosen
37324    # first if we set RC to just the basename; use the full file name.
37325    shift
37326    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37327  fi
37328fi
37329fi
37330fi
37331RC=$ac_cv_prog_RC
37332if test -n "$RC"; then
37333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37334$as_echo "$RC" >&6; }
37335else
37336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37337$as_echo "no" >&6; }
37338fi
37339
37340
37341
37342  # Only process if variable expands to non-empty
37343
37344  if test "x$RC" != x; then
37345    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37346
37347  # First separate the path from the arguments. This will split at the first
37348  # space.
37349  complete="$RC"
37350  path="${complete%% *}"
37351  tmp="$complete EOL"
37352  arguments="${tmp#* }"
37353
37354  # Input might be given as Windows format, start by converting to
37355  # unix format.
37356  new_path=`$CYGPATH -u "$path"`
37357
37358  # Now try to locate executable using which
37359  new_path=`$WHICH "$new_path" 2> /dev/null`
37360  # bat and cmd files are not always considered executable in cygwin causing which
37361  # to not find them
37362  if test "x$new_path" = x \
37363      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37364      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37365    new_path=`$CYGPATH -u "$path"`
37366  fi
37367  if test "x$new_path" = x; then
37368    # Oops. Which didn't find the executable.
37369    # The splitting of arguments from the executable at a space might have been incorrect,
37370    # since paths with space are more likely in Windows. Give it another try with the whole
37371    # argument.
37372    path="$complete"
37373    arguments="EOL"
37374    new_path=`$CYGPATH -u "$path"`
37375    new_path=`$WHICH "$new_path" 2> /dev/null`
37376    # bat and cmd files are not always considered executable in cygwin causing which
37377    # to not find them
37378    if test "x$new_path" = x \
37379        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37380        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37381      new_path=`$CYGPATH -u "$path"`
37382    fi
37383    if test "x$new_path" = x; then
37384      # It's still not found. Now this is an unrecoverable error.
37385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37386$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37387      has_space=`$ECHO "$complete" | $GREP " "`
37388      if test "x$has_space" != x; then
37389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37391      fi
37392      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37393    fi
37394  fi
37395
37396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37399  # "foo.exe" is OK but "foo" is an error.
37400  #
37401  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37402  # It is also a way to make sure we got the proper file name for the real test later on.
37403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37404  if test "x$test_shortpath" = x; then
37405    # Short path failed, file does not exist as specified.
37406    # Try adding .exe or .cmd
37407    if test -f "${new_path}.exe"; then
37408      input_to_shortpath="${new_path}.exe"
37409    elif test -f "${new_path}.cmd"; then
37410      input_to_shortpath="${new_path}.cmd"
37411    else
37412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37413$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37414      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37415$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37416      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37417    fi
37418  else
37419    input_to_shortpath="$new_path"
37420  fi
37421
37422  # Call helper function which possibly converts this using DOS-style short mode.
37423  # If so, the updated path is stored in $new_path.
37424  new_path="$input_to_shortpath"
37425
37426  input_path="$input_to_shortpath"
37427  # Check if we need to convert this using DOS-style short mode. If the path
37428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37429  # take no chances and rewrite it.
37430  # Note: m4 eats our [], so we need to use [ and ] instead.
37431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37432  if test "x$has_forbidden_chars" != x; then
37433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37437      # Going to short mode and back again did indeed matter. Since short mode is
37438      # case insensitive, let's make it lowercase to improve readability.
37439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37440      # Now convert it back to Unix-style (cygpath)
37441      input_path=`$CYGPATH -u "$shortmode_path"`
37442      new_path="$input_path"
37443    fi
37444  fi
37445
37446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37447  if test "x$test_cygdrive_prefix" = x; then
37448    # As a simple fix, exclude /usr/bin since it's not a real path.
37449    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37451      # a path prefixed by /cygdrive for fixpath to work.
37452      new_path="$CYGWIN_ROOT_PATH$input_path"
37453    fi
37454  fi
37455
37456  # remove trailing .exe if any
37457  new_path="${new_path/%.exe/}"
37458
37459    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37460
37461  # First separate the path from the arguments. This will split at the first
37462  # space.
37463  complete="$RC"
37464  path="${complete%% *}"
37465  tmp="$complete EOL"
37466  arguments="${tmp#* }"
37467
37468  # Input might be given as Windows format, start by converting to
37469  # unix format.
37470  new_path="$path"
37471
37472  windows_path="$new_path"
37473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37474    unix_path=`$CYGPATH -u "$windows_path"`
37475    new_path="$unix_path"
37476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37478    new_path="$unix_path"
37479  fi
37480
37481
37482  # Now try to locate executable using which
37483  new_path=`$WHICH "$new_path" 2> /dev/null`
37484
37485  if test "x$new_path" = x; then
37486    # Oops. Which didn't find the executable.
37487    # The splitting of arguments from the executable at a space might have been incorrect,
37488    # since paths with space are more likely in Windows. Give it another try with the whole
37489    # argument.
37490    path="$complete"
37491    arguments="EOL"
37492    new_path="$path"
37493
37494  windows_path="$new_path"
37495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37496    unix_path=`$CYGPATH -u "$windows_path"`
37497    new_path="$unix_path"
37498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37500    new_path="$unix_path"
37501  fi
37502
37503
37504    new_path=`$WHICH "$new_path" 2> /dev/null`
37505    # bat and cmd files are not always considered executable in MSYS causing which
37506    # to not find them
37507    if test "x$new_path" = x \
37508        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37509        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37510      new_path="$path"
37511
37512  windows_path="$new_path"
37513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37514    unix_path=`$CYGPATH -u "$windows_path"`
37515    new_path="$unix_path"
37516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37518    new_path="$unix_path"
37519  fi
37520
37521    fi
37522
37523    if test "x$new_path" = x; then
37524      # It's still not found. Now this is an unrecoverable error.
37525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37526$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37527      has_space=`$ECHO "$complete" | $GREP " "`
37528      if test "x$has_space" != x; then
37529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37531      fi
37532      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37533    fi
37534  fi
37535
37536  # Now new_path has a complete unix path to the binary
37537  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37538    # Keep paths in /bin as-is, but remove trailing .exe if any
37539    new_path="${new_path/%.exe/}"
37540    # Do not save /bin paths to all_fixpath_prefixes!
37541  else
37542    # Not in mixed or Windows style, start by that.
37543    new_path=`cmd //c echo $new_path`
37544
37545  input_path="$new_path"
37546  # Check if we need to convert this using DOS-style short mode. If the path
37547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37548  # take no chances and rewrite it.
37549  # Note: m4 eats our [], so we need to use [ and ] instead.
37550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37551  if test "x$has_forbidden_chars" != x; then
37552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37554  fi
37555
37556    # Output is in $new_path
37557
37558  windows_path="$new_path"
37559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37560    unix_path=`$CYGPATH -u "$windows_path"`
37561    new_path="$unix_path"
37562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37564    new_path="$unix_path"
37565  fi
37566
37567    # remove trailing .exe if any
37568    new_path="${new_path/%.exe/}"
37569
37570    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37571    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37572  fi
37573
37574    else
37575      # We're on a unix platform. Hooray! :)
37576      # First separate the path from the arguments. This will split at the first
37577      # space.
37578      complete="$RC"
37579      path="${complete%% *}"
37580      tmp="$complete EOL"
37581      arguments="${tmp#* }"
37582
37583      # Cannot rely on the command "which" here since it doesn't always work.
37584      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37585      if test -z "$is_absolute_path"; then
37586        # Path to executable is not absolute. Find it.
37587        IFS_save="$IFS"
37588        IFS=:
37589        for p in $PATH; do
37590          if test -f "$p/$path" && test -x "$p/$path"; then
37591            new_path="$p/$path"
37592            break
37593          fi
37594        done
37595        IFS="$IFS_save"
37596      else
37597        # This is an absolute path, we can use it without further modifications.
37598        new_path="$path"
37599      fi
37600
37601      if test "x$new_path" = x; then
37602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37603$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37604        has_space=`$ECHO "$complete" | $GREP " "`
37605        if test "x$has_space" != x; then
37606          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37607$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37608        fi
37609        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37610      fi
37611    fi
37612
37613    # Now join together the path and the arguments once again
37614    if test "x$arguments" != xEOL; then
37615      new_complete="$new_path ${arguments% *}"
37616    else
37617      new_complete="$new_path"
37618    fi
37619
37620    if test "x$complete" != "x$new_complete"; then
37621      RC="$new_complete"
37622      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37623$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37624    fi
37625  fi
37626
37627    # Extract the first word of "dumpbin", so it can be a program name with args.
37628set dummy dumpbin; ac_word=$2
37629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37630$as_echo_n "checking for $ac_word... " >&6; }
37631if ${ac_cv_prog_DUMPBIN+:} false; then :
37632  $as_echo_n "(cached) " >&6
37633else
37634  if test -n "$DUMPBIN"; then
37635  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37636else
37637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37638for as_dir in $PATH
37639do
37640  IFS=$as_save_IFS
37641  test -z "$as_dir" && as_dir=.
37642    for ac_exec_ext in '' $ac_executable_extensions; do
37643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37644    ac_cv_prog_DUMPBIN="dumpbin"
37645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37646    break 2
37647  fi
37648done
37649  done
37650IFS=$as_save_IFS
37651
37652fi
37653fi
37654DUMPBIN=$ac_cv_prog_DUMPBIN
37655if test -n "$DUMPBIN"; then
37656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37657$as_echo "$DUMPBIN" >&6; }
37658else
37659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37660$as_echo "no" >&6; }
37661fi
37662
37663
37664
37665  # Only process if variable expands to non-empty
37666
37667  if test "x$DUMPBIN" != x; then
37668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37669
37670  # First separate the path from the arguments. This will split at the first
37671  # space.
37672  complete="$DUMPBIN"
37673  path="${complete%% *}"
37674  tmp="$complete EOL"
37675  arguments="${tmp#* }"
37676
37677  # Input might be given as Windows format, start by converting to
37678  # unix format.
37679  new_path=`$CYGPATH -u "$path"`
37680
37681  # Now try to locate executable using which
37682  new_path=`$WHICH "$new_path" 2> /dev/null`
37683  # bat and cmd files are not always considered executable in cygwin causing which
37684  # to not find them
37685  if test "x$new_path" = x \
37686      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37687      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37688    new_path=`$CYGPATH -u "$path"`
37689  fi
37690  if test "x$new_path" = x; then
37691    # Oops. Which didn't find the executable.
37692    # The splitting of arguments from the executable at a space might have been incorrect,
37693    # since paths with space are more likely in Windows. Give it another try with the whole
37694    # argument.
37695    path="$complete"
37696    arguments="EOL"
37697    new_path=`$CYGPATH -u "$path"`
37698    new_path=`$WHICH "$new_path" 2> /dev/null`
37699    # bat and cmd files are not always considered executable in cygwin causing which
37700    # to not find them
37701    if test "x$new_path" = x \
37702        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37703        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37704      new_path=`$CYGPATH -u "$path"`
37705    fi
37706    if test "x$new_path" = x; then
37707      # It's still not found. Now this is an unrecoverable error.
37708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37709$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37710      has_space=`$ECHO "$complete" | $GREP " "`
37711      if test "x$has_space" != x; then
37712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37714      fi
37715      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37716    fi
37717  fi
37718
37719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37722  # "foo.exe" is OK but "foo" is an error.
37723  #
37724  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37725  # It is also a way to make sure we got the proper file name for the real test later on.
37726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37727  if test "x$test_shortpath" = x; then
37728    # Short path failed, file does not exist as specified.
37729    # Try adding .exe or .cmd
37730    if test -f "${new_path}.exe"; then
37731      input_to_shortpath="${new_path}.exe"
37732    elif test -f "${new_path}.cmd"; then
37733      input_to_shortpath="${new_path}.cmd"
37734    else
37735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37736$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37737      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37738$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37739      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37740    fi
37741  else
37742    input_to_shortpath="$new_path"
37743  fi
37744
37745  # Call helper function which possibly converts this using DOS-style short mode.
37746  # If so, the updated path is stored in $new_path.
37747  new_path="$input_to_shortpath"
37748
37749  input_path="$input_to_shortpath"
37750  # Check if we need to convert this using DOS-style short mode. If the path
37751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37752  # take no chances and rewrite it.
37753  # Note: m4 eats our [], so we need to use [ and ] instead.
37754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37755  if test "x$has_forbidden_chars" != x; then
37756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37760      # Going to short mode and back again did indeed matter. Since short mode is
37761      # case insensitive, let's make it lowercase to improve readability.
37762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37763      # Now convert it back to Unix-style (cygpath)
37764      input_path=`$CYGPATH -u "$shortmode_path"`
37765      new_path="$input_path"
37766    fi
37767  fi
37768
37769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37770  if test "x$test_cygdrive_prefix" = x; then
37771    # As a simple fix, exclude /usr/bin since it's not a real path.
37772    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37774      # a path prefixed by /cygdrive for fixpath to work.
37775      new_path="$CYGWIN_ROOT_PATH$input_path"
37776    fi
37777  fi
37778
37779  # remove trailing .exe if any
37780  new_path="${new_path/%.exe/}"
37781
37782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37783
37784  # First separate the path from the arguments. This will split at the first
37785  # space.
37786  complete="$DUMPBIN"
37787  path="${complete%% *}"
37788  tmp="$complete EOL"
37789  arguments="${tmp#* }"
37790
37791  # Input might be given as Windows format, start by converting to
37792  # unix format.
37793  new_path="$path"
37794
37795  windows_path="$new_path"
37796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37797    unix_path=`$CYGPATH -u "$windows_path"`
37798    new_path="$unix_path"
37799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37801    new_path="$unix_path"
37802  fi
37803
37804
37805  # Now try to locate executable using which
37806  new_path=`$WHICH "$new_path" 2> /dev/null`
37807
37808  if test "x$new_path" = x; then
37809    # Oops. Which didn't find the executable.
37810    # The splitting of arguments from the executable at a space might have been incorrect,
37811    # since paths with space are more likely in Windows. Give it another try with the whole
37812    # argument.
37813    path="$complete"
37814    arguments="EOL"
37815    new_path="$path"
37816
37817  windows_path="$new_path"
37818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37819    unix_path=`$CYGPATH -u "$windows_path"`
37820    new_path="$unix_path"
37821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37823    new_path="$unix_path"
37824  fi
37825
37826
37827    new_path=`$WHICH "$new_path" 2> /dev/null`
37828    # bat and cmd files are not always considered executable in MSYS causing which
37829    # to not find them
37830    if test "x$new_path" = x \
37831        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37832        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37833      new_path="$path"
37834
37835  windows_path="$new_path"
37836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37837    unix_path=`$CYGPATH -u "$windows_path"`
37838    new_path="$unix_path"
37839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37841    new_path="$unix_path"
37842  fi
37843
37844    fi
37845
37846    if test "x$new_path" = x; then
37847      # It's still not found. Now this is an unrecoverable error.
37848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37849$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37850      has_space=`$ECHO "$complete" | $GREP " "`
37851      if test "x$has_space" != x; then
37852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37854      fi
37855      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37856    fi
37857  fi
37858
37859  # Now new_path has a complete unix path to the binary
37860  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37861    # Keep paths in /bin as-is, but remove trailing .exe if any
37862    new_path="${new_path/%.exe/}"
37863    # Do not save /bin paths to all_fixpath_prefixes!
37864  else
37865    # Not in mixed or Windows style, start by that.
37866    new_path=`cmd //c echo $new_path`
37867
37868  input_path="$new_path"
37869  # Check if we need to convert this using DOS-style short mode. If the path
37870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37871  # take no chances and rewrite it.
37872  # Note: m4 eats our [], so we need to use [ and ] instead.
37873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37874  if test "x$has_forbidden_chars" != x; then
37875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37877  fi
37878
37879    # Output is in $new_path
37880
37881  windows_path="$new_path"
37882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37883    unix_path=`$CYGPATH -u "$windows_path"`
37884    new_path="$unix_path"
37885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37887    new_path="$unix_path"
37888  fi
37889
37890    # remove trailing .exe if any
37891    new_path="${new_path/%.exe/}"
37892
37893    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37894    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37895  fi
37896
37897    else
37898      # We're on a unix platform. Hooray! :)
37899      # First separate the path from the arguments. This will split at the first
37900      # space.
37901      complete="$DUMPBIN"
37902      path="${complete%% *}"
37903      tmp="$complete EOL"
37904      arguments="${tmp#* }"
37905
37906      # Cannot rely on the command "which" here since it doesn't always work.
37907      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37908      if test -z "$is_absolute_path"; then
37909        # Path to executable is not absolute. Find it.
37910        IFS_save="$IFS"
37911        IFS=:
37912        for p in $PATH; do
37913          if test -f "$p/$path" && test -x "$p/$path"; then
37914            new_path="$p/$path"
37915            break
37916          fi
37917        done
37918        IFS="$IFS_save"
37919      else
37920        # This is an absolute path, we can use it without further modifications.
37921        new_path="$path"
37922      fi
37923
37924      if test "x$new_path" = x; then
37925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37926$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37927        has_space=`$ECHO "$complete" | $GREP " "`
37928        if test "x$has_space" != x; then
37929          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37930$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37931        fi
37932        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37933      fi
37934    fi
37935
37936    # Now join together the path and the arguments once again
37937    if test "x$arguments" != xEOL; then
37938      new_complete="$new_path ${arguments% *}"
37939    else
37940      new_complete="$new_path"
37941    fi
37942
37943    if test "x$complete" != "x$new_complete"; then
37944      DUMPBIN="$new_complete"
37945      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
37946$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
37947    fi
37948  fi
37949
37950    # We need to check for 'msbuild.exe' because at the place where we expect to
37951    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
37952    # won't find the 'msbuild.exe' executable in that case (and the
37953    # 'ac_executable_extensions' is unusable due to performance reasons).
37954    # Notice that we intentionally don't fix up the path to MSBUILD because we
37955    # will call it in a DOS shell during freetype detection on Windows (see
37956    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
37957    # Extract the first word of "msbuild.exe", so it can be a program name with args.
37958set dummy msbuild.exe; ac_word=$2
37959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37960$as_echo_n "checking for $ac_word... " >&6; }
37961if ${ac_cv_prog_MSBUILD+:} false; then :
37962  $as_echo_n "(cached) " >&6
37963else
37964  if test -n "$MSBUILD"; then
37965  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
37966else
37967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37968for as_dir in $PATH
37969do
37970  IFS=$as_save_IFS
37971  test -z "$as_dir" && as_dir=.
37972    for ac_exec_ext in '' $ac_executable_extensions; do
37973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37974    ac_cv_prog_MSBUILD="msbuild.exe"
37975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37976    break 2
37977  fi
37978done
37979  done
37980IFS=$as_save_IFS
37981
37982fi
37983fi
37984MSBUILD=$ac_cv_prog_MSBUILD
37985if test -n "$MSBUILD"; then
37986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
37987$as_echo "$MSBUILD" >&6; }
37988else
37989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37990$as_echo "no" >&6; }
37991fi
37992
37993
37994  fi
37995
37996  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37997
37998
37999  # Publish this variable in the help.
38000
38001
38002  if [ -z "${STRIP+x}" ]; then
38003    # The variable is not set by user, try to locate tool using the code snippet
38004    for ac_prog in strip
38005do
38006  # Extract the first word of "$ac_prog", so it can be a program name with args.
38007set dummy $ac_prog; ac_word=$2
38008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38009$as_echo_n "checking for $ac_word... " >&6; }
38010if ${ac_cv_path_STRIP+:} false; then :
38011  $as_echo_n "(cached) " >&6
38012else
38013  case $STRIP in
38014  [\\/]* | ?:[\\/]*)
38015  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38016  ;;
38017  *)
38018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38019for as_dir in $PATH
38020do
38021  IFS=$as_save_IFS
38022  test -z "$as_dir" && as_dir=.
38023    for ac_exec_ext in '' $ac_executable_extensions; do
38024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38025    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38027    break 2
38028  fi
38029done
38030  done
38031IFS=$as_save_IFS
38032
38033  ;;
38034esac
38035fi
38036STRIP=$ac_cv_path_STRIP
38037if test -n "$STRIP"; then
38038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38039$as_echo "$STRIP" >&6; }
38040else
38041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38042$as_echo "no" >&6; }
38043fi
38044
38045
38046  test -n "$STRIP" && break
38047done
38048
38049  else
38050    # The variable is set, but is it from the command line or the environment?
38051
38052    # Try to remove the string !STRIP! from our list.
38053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38055      # If it failed, the variable was not from the command line. Ignore it,
38056      # but warn the user (except for BASH, which is always set by the calling BASH).
38057      if test "xSTRIP" != xBASH; then
38058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38059$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38060      fi
38061      # Try to locate tool using the code snippet
38062      for ac_prog in strip
38063do
38064  # Extract the first word of "$ac_prog", so it can be a program name with args.
38065set dummy $ac_prog; ac_word=$2
38066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38067$as_echo_n "checking for $ac_word... " >&6; }
38068if ${ac_cv_path_STRIP+:} false; then :
38069  $as_echo_n "(cached) " >&6
38070else
38071  case $STRIP in
38072  [\\/]* | ?:[\\/]*)
38073  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38074  ;;
38075  *)
38076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38077for as_dir in $PATH
38078do
38079  IFS=$as_save_IFS
38080  test -z "$as_dir" && as_dir=.
38081    for ac_exec_ext in '' $ac_executable_extensions; do
38082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38083    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38085    break 2
38086  fi
38087done
38088  done
38089IFS=$as_save_IFS
38090
38091  ;;
38092esac
38093fi
38094STRIP=$ac_cv_path_STRIP
38095if test -n "$STRIP"; then
38096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38097$as_echo "$STRIP" >&6; }
38098else
38099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38100$as_echo "no" >&6; }
38101fi
38102
38103
38104  test -n "$STRIP" && break
38105done
38106
38107    else
38108      # If it succeeded, then it was overridden by the user. We will use it
38109      # for the tool.
38110
38111      # First remove it from the list of overridden variables, so we can test
38112      # for unknown variables in the end.
38113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38114
38115      # Check if we try to supply an empty value
38116      if test "x$STRIP" = x; then
38117        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38118$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38120$as_echo_n "checking for STRIP... " >&6; }
38121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38122$as_echo "disabled" >&6; }
38123      else
38124        # Check if the provided tool contains a complete path.
38125        tool_specified="$STRIP"
38126        tool_basename="${tool_specified##*/}"
38127        if test "x$tool_basename" = "x$tool_specified"; then
38128          # A command without a complete path is provided, search $PATH.
38129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38130$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38131          # Extract the first word of "$tool_basename", so it can be a program name with args.
38132set dummy $tool_basename; ac_word=$2
38133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38134$as_echo_n "checking for $ac_word... " >&6; }
38135if ${ac_cv_path_STRIP+:} false; then :
38136  $as_echo_n "(cached) " >&6
38137else
38138  case $STRIP in
38139  [\\/]* | ?:[\\/]*)
38140  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38141  ;;
38142  *)
38143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38144for as_dir in $PATH
38145do
38146  IFS=$as_save_IFS
38147  test -z "$as_dir" && as_dir=.
38148    for ac_exec_ext in '' $ac_executable_extensions; do
38149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38150    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38152    break 2
38153  fi
38154done
38155  done
38156IFS=$as_save_IFS
38157
38158  ;;
38159esac
38160fi
38161STRIP=$ac_cv_path_STRIP
38162if test -n "$STRIP"; then
38163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38164$as_echo "$STRIP" >&6; }
38165else
38166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38167$as_echo "no" >&6; }
38168fi
38169
38170
38171          if test "x$STRIP" = x; then
38172            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38173          fi
38174        else
38175          # Otherwise we believe it is a complete path. Use it as it is.
38176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38177$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38178          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38179$as_echo_n "checking for STRIP... " >&6; }
38180          if test ! -x "$tool_specified"; then
38181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38182$as_echo "not found" >&6; }
38183            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38184          fi
38185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38186$as_echo "$tool_specified" >&6; }
38187        fi
38188      fi
38189    fi
38190
38191  fi
38192
38193
38194
38195  # Only process if variable expands to non-empty
38196
38197  if test "x$STRIP" != x; then
38198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38199
38200  # First separate the path from the arguments. This will split at the first
38201  # space.
38202  complete="$STRIP"
38203  path="${complete%% *}"
38204  tmp="$complete EOL"
38205  arguments="${tmp#* }"
38206
38207  # Input might be given as Windows format, start by converting to
38208  # unix format.
38209  new_path=`$CYGPATH -u "$path"`
38210
38211  # Now try to locate executable using which
38212  new_path=`$WHICH "$new_path" 2> /dev/null`
38213  # bat and cmd files are not always considered executable in cygwin causing which
38214  # to not find them
38215  if test "x$new_path" = x \
38216      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38217      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38218    new_path=`$CYGPATH -u "$path"`
38219  fi
38220  if test "x$new_path" = x; then
38221    # Oops. Which didn't find the executable.
38222    # The splitting of arguments from the executable at a space might have been incorrect,
38223    # since paths with space are more likely in Windows. Give it another try with the whole
38224    # argument.
38225    path="$complete"
38226    arguments="EOL"
38227    new_path=`$CYGPATH -u "$path"`
38228    new_path=`$WHICH "$new_path" 2> /dev/null`
38229    # bat and cmd files are not always considered executable in cygwin causing which
38230    # to not find them
38231    if test "x$new_path" = x \
38232        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38233        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38234      new_path=`$CYGPATH -u "$path"`
38235    fi
38236    if test "x$new_path" = x; then
38237      # It's still not found. Now this is an unrecoverable error.
38238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38239$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38240      has_space=`$ECHO "$complete" | $GREP " "`
38241      if test "x$has_space" != x; then
38242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38244      fi
38245      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38246    fi
38247  fi
38248
38249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38252  # "foo.exe" is OK but "foo" is an error.
38253  #
38254  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38255  # It is also a way to make sure we got the proper file name for the real test later on.
38256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38257  if test "x$test_shortpath" = x; then
38258    # Short path failed, file does not exist as specified.
38259    # Try adding .exe or .cmd
38260    if test -f "${new_path}.exe"; then
38261      input_to_shortpath="${new_path}.exe"
38262    elif test -f "${new_path}.cmd"; then
38263      input_to_shortpath="${new_path}.cmd"
38264    else
38265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38266$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38267      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38268$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38269      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38270    fi
38271  else
38272    input_to_shortpath="$new_path"
38273  fi
38274
38275  # Call helper function which possibly converts this using DOS-style short mode.
38276  # If so, the updated path is stored in $new_path.
38277  new_path="$input_to_shortpath"
38278
38279  input_path="$input_to_shortpath"
38280  # Check if we need to convert this using DOS-style short mode. If the path
38281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38282  # take no chances and rewrite it.
38283  # Note: m4 eats our [], so we need to use [ and ] instead.
38284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38285  if test "x$has_forbidden_chars" != x; then
38286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38290      # Going to short mode and back again did indeed matter. Since short mode is
38291      # case insensitive, let's make it lowercase to improve readability.
38292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38293      # Now convert it back to Unix-style (cygpath)
38294      input_path=`$CYGPATH -u "$shortmode_path"`
38295      new_path="$input_path"
38296    fi
38297  fi
38298
38299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38300  if test "x$test_cygdrive_prefix" = x; then
38301    # As a simple fix, exclude /usr/bin since it's not a real path.
38302    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38304      # a path prefixed by /cygdrive for fixpath to work.
38305      new_path="$CYGWIN_ROOT_PATH$input_path"
38306    fi
38307  fi
38308
38309  # remove trailing .exe if any
38310  new_path="${new_path/%.exe/}"
38311
38312    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38313
38314  # First separate the path from the arguments. This will split at the first
38315  # space.
38316  complete="$STRIP"
38317  path="${complete%% *}"
38318  tmp="$complete EOL"
38319  arguments="${tmp#* }"
38320
38321  # Input might be given as Windows format, start by converting to
38322  # unix format.
38323  new_path="$path"
38324
38325  windows_path="$new_path"
38326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38327    unix_path=`$CYGPATH -u "$windows_path"`
38328    new_path="$unix_path"
38329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38331    new_path="$unix_path"
38332  fi
38333
38334
38335  # Now try to locate executable using which
38336  new_path=`$WHICH "$new_path" 2> /dev/null`
38337
38338  if test "x$new_path" = x; then
38339    # Oops. Which didn't find the executable.
38340    # The splitting of arguments from the executable at a space might have been incorrect,
38341    # since paths with space are more likely in Windows. Give it another try with the whole
38342    # argument.
38343    path="$complete"
38344    arguments="EOL"
38345    new_path="$path"
38346
38347  windows_path="$new_path"
38348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38349    unix_path=`$CYGPATH -u "$windows_path"`
38350    new_path="$unix_path"
38351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38353    new_path="$unix_path"
38354  fi
38355
38356
38357    new_path=`$WHICH "$new_path" 2> /dev/null`
38358    # bat and cmd files are not always considered executable in MSYS causing which
38359    # to not find them
38360    if test "x$new_path" = x \
38361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38363      new_path="$path"
38364
38365  windows_path="$new_path"
38366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38367    unix_path=`$CYGPATH -u "$windows_path"`
38368    new_path="$unix_path"
38369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38371    new_path="$unix_path"
38372  fi
38373
38374    fi
38375
38376    if test "x$new_path" = x; then
38377      # It's still not found. Now this is an unrecoverable error.
38378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38379$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38380      has_space=`$ECHO "$complete" | $GREP " "`
38381      if test "x$has_space" != x; then
38382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38384      fi
38385      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38386    fi
38387  fi
38388
38389  # Now new_path has a complete unix path to the binary
38390  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38391    # Keep paths in /bin as-is, but remove trailing .exe if any
38392    new_path="${new_path/%.exe/}"
38393    # Do not save /bin paths to all_fixpath_prefixes!
38394  else
38395    # Not in mixed or Windows style, start by that.
38396    new_path=`cmd //c echo $new_path`
38397
38398  input_path="$new_path"
38399  # Check if we need to convert this using DOS-style short mode. If the path
38400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38401  # take no chances and rewrite it.
38402  # Note: m4 eats our [], so we need to use [ and ] instead.
38403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38404  if test "x$has_forbidden_chars" != x; then
38405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38407  fi
38408
38409    # Output is in $new_path
38410
38411  windows_path="$new_path"
38412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38413    unix_path=`$CYGPATH -u "$windows_path"`
38414    new_path="$unix_path"
38415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38417    new_path="$unix_path"
38418  fi
38419
38420    # remove trailing .exe if any
38421    new_path="${new_path/%.exe/}"
38422
38423    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38424    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38425  fi
38426
38427    else
38428      # We're on a unix platform. Hooray! :)
38429      # First separate the path from the arguments. This will split at the first
38430      # space.
38431      complete="$STRIP"
38432      path="${complete%% *}"
38433      tmp="$complete EOL"
38434      arguments="${tmp#* }"
38435
38436      # Cannot rely on the command "which" here since it doesn't always work.
38437      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38438      if test -z "$is_absolute_path"; then
38439        # Path to executable is not absolute. Find it.
38440        IFS_save="$IFS"
38441        IFS=:
38442        for p in $PATH; do
38443          if test -f "$p/$path" && test -x "$p/$path"; then
38444            new_path="$p/$path"
38445            break
38446          fi
38447        done
38448        IFS="$IFS_save"
38449      else
38450        # This is an absolute path, we can use it without further modifications.
38451        new_path="$path"
38452      fi
38453
38454      if test "x$new_path" = x; then
38455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38456$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38457        has_space=`$ECHO "$complete" | $GREP " "`
38458        if test "x$has_space" != x; then
38459          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38460$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38461        fi
38462        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38463      fi
38464    fi
38465
38466    # Now join together the path and the arguments once again
38467    if test "x$arguments" != xEOL; then
38468      new_complete="$new_path ${arguments% *}"
38469    else
38470      new_complete="$new_path"
38471    fi
38472
38473    if test "x$complete" != "x$new_complete"; then
38474      STRIP="$new_complete"
38475      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38476$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38477    fi
38478  fi
38479
38480
38481
38482  # Publish this variable in the help.
38483
38484
38485  if [ -z "${NM+x}" ]; then
38486    # The variable is not set by user, try to locate tool using the code snippet
38487    for ac_prog in nm
38488do
38489  # Extract the first word of "$ac_prog", so it can be a program name with args.
38490set dummy $ac_prog; ac_word=$2
38491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38492$as_echo_n "checking for $ac_word... " >&6; }
38493if ${ac_cv_path_NM+:} false; then :
38494  $as_echo_n "(cached) " >&6
38495else
38496  case $NM in
38497  [\\/]* | ?:[\\/]*)
38498  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38499  ;;
38500  *)
38501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38502for as_dir in $PATH
38503do
38504  IFS=$as_save_IFS
38505  test -z "$as_dir" && as_dir=.
38506    for ac_exec_ext in '' $ac_executable_extensions; do
38507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38508    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38510    break 2
38511  fi
38512done
38513  done
38514IFS=$as_save_IFS
38515
38516  ;;
38517esac
38518fi
38519NM=$ac_cv_path_NM
38520if test -n "$NM"; then
38521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38522$as_echo "$NM" >&6; }
38523else
38524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38525$as_echo "no" >&6; }
38526fi
38527
38528
38529  test -n "$NM" && break
38530done
38531
38532  else
38533    # The variable is set, but is it from the command line or the environment?
38534
38535    # Try to remove the string !NM! from our list.
38536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38538      # If it failed, the variable was not from the command line. Ignore it,
38539      # but warn the user (except for BASH, which is always set by the calling BASH).
38540      if test "xNM" != xBASH; then
38541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38542$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38543      fi
38544      # Try to locate tool using the code snippet
38545      for ac_prog in nm
38546do
38547  # Extract the first word of "$ac_prog", so it can be a program name with args.
38548set dummy $ac_prog; ac_word=$2
38549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38550$as_echo_n "checking for $ac_word... " >&6; }
38551if ${ac_cv_path_NM+:} false; then :
38552  $as_echo_n "(cached) " >&6
38553else
38554  case $NM in
38555  [\\/]* | ?:[\\/]*)
38556  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38557  ;;
38558  *)
38559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38560for as_dir in $PATH
38561do
38562  IFS=$as_save_IFS
38563  test -z "$as_dir" && as_dir=.
38564    for ac_exec_ext in '' $ac_executable_extensions; do
38565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38566    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38568    break 2
38569  fi
38570done
38571  done
38572IFS=$as_save_IFS
38573
38574  ;;
38575esac
38576fi
38577NM=$ac_cv_path_NM
38578if test -n "$NM"; then
38579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38580$as_echo "$NM" >&6; }
38581else
38582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38583$as_echo "no" >&6; }
38584fi
38585
38586
38587  test -n "$NM" && break
38588done
38589
38590    else
38591      # If it succeeded, then it was overridden by the user. We will use it
38592      # for the tool.
38593
38594      # First remove it from the list of overridden variables, so we can test
38595      # for unknown variables in the end.
38596      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38597
38598      # Check if we try to supply an empty value
38599      if test "x$NM" = x; then
38600        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38601$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38603$as_echo_n "checking for NM... " >&6; }
38604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38605$as_echo "disabled" >&6; }
38606      else
38607        # Check if the provided tool contains a complete path.
38608        tool_specified="$NM"
38609        tool_basename="${tool_specified##*/}"
38610        if test "x$tool_basename" = "x$tool_specified"; then
38611          # A command without a complete path is provided, search $PATH.
38612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38613$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38614          # Extract the first word of "$tool_basename", so it can be a program name with args.
38615set dummy $tool_basename; ac_word=$2
38616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38617$as_echo_n "checking for $ac_word... " >&6; }
38618if ${ac_cv_path_NM+:} false; then :
38619  $as_echo_n "(cached) " >&6
38620else
38621  case $NM in
38622  [\\/]* | ?:[\\/]*)
38623  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38624  ;;
38625  *)
38626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38627for as_dir in $PATH
38628do
38629  IFS=$as_save_IFS
38630  test -z "$as_dir" && as_dir=.
38631    for ac_exec_ext in '' $ac_executable_extensions; do
38632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38633    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38635    break 2
38636  fi
38637done
38638  done
38639IFS=$as_save_IFS
38640
38641  ;;
38642esac
38643fi
38644NM=$ac_cv_path_NM
38645if test -n "$NM"; then
38646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38647$as_echo "$NM" >&6; }
38648else
38649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38650$as_echo "no" >&6; }
38651fi
38652
38653
38654          if test "x$NM" = x; then
38655            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38656          fi
38657        else
38658          # Otherwise we believe it is a complete path. Use it as it is.
38659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38660$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38661          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38662$as_echo_n "checking for NM... " >&6; }
38663          if test ! -x "$tool_specified"; then
38664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38665$as_echo "not found" >&6; }
38666            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38667          fi
38668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38669$as_echo "$tool_specified" >&6; }
38670        fi
38671      fi
38672    fi
38673
38674  fi
38675
38676
38677
38678  # Only process if variable expands to non-empty
38679
38680  if test "x$NM" != x; then
38681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38682
38683  # First separate the path from the arguments. This will split at the first
38684  # space.
38685  complete="$NM"
38686  path="${complete%% *}"
38687  tmp="$complete EOL"
38688  arguments="${tmp#* }"
38689
38690  # Input might be given as Windows format, start by converting to
38691  # unix format.
38692  new_path=`$CYGPATH -u "$path"`
38693
38694  # Now try to locate executable using which
38695  new_path=`$WHICH "$new_path" 2> /dev/null`
38696  # bat and cmd files are not always considered executable in cygwin causing which
38697  # to not find them
38698  if test "x$new_path" = x \
38699      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38700      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38701    new_path=`$CYGPATH -u "$path"`
38702  fi
38703  if test "x$new_path" = x; then
38704    # Oops. Which didn't find the executable.
38705    # The splitting of arguments from the executable at a space might have been incorrect,
38706    # since paths with space are more likely in Windows. Give it another try with the whole
38707    # argument.
38708    path="$complete"
38709    arguments="EOL"
38710    new_path=`$CYGPATH -u "$path"`
38711    new_path=`$WHICH "$new_path" 2> /dev/null`
38712    # bat and cmd files are not always considered executable in cygwin causing which
38713    # to not find them
38714    if test "x$new_path" = x \
38715        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38716        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38717      new_path=`$CYGPATH -u "$path"`
38718    fi
38719    if test "x$new_path" = x; then
38720      # It's still not found. Now this is an unrecoverable error.
38721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38722$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38723      has_space=`$ECHO "$complete" | $GREP " "`
38724      if test "x$has_space" != x; then
38725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38727      fi
38728      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38729    fi
38730  fi
38731
38732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38735  # "foo.exe" is OK but "foo" is an error.
38736  #
38737  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38738  # It is also a way to make sure we got the proper file name for the real test later on.
38739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38740  if test "x$test_shortpath" = x; then
38741    # Short path failed, file does not exist as specified.
38742    # Try adding .exe or .cmd
38743    if test -f "${new_path}.exe"; then
38744      input_to_shortpath="${new_path}.exe"
38745    elif test -f "${new_path}.cmd"; then
38746      input_to_shortpath="${new_path}.cmd"
38747    else
38748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38749$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38750      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38751$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38752      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38753    fi
38754  else
38755    input_to_shortpath="$new_path"
38756  fi
38757
38758  # Call helper function which possibly converts this using DOS-style short mode.
38759  # If so, the updated path is stored in $new_path.
38760  new_path="$input_to_shortpath"
38761
38762  input_path="$input_to_shortpath"
38763  # Check if we need to convert this using DOS-style short mode. If the path
38764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38765  # take no chances and rewrite it.
38766  # Note: m4 eats our [], so we need to use [ and ] instead.
38767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38768  if test "x$has_forbidden_chars" != x; then
38769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38773      # Going to short mode and back again did indeed matter. Since short mode is
38774      # case insensitive, let's make it lowercase to improve readability.
38775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38776      # Now convert it back to Unix-style (cygpath)
38777      input_path=`$CYGPATH -u "$shortmode_path"`
38778      new_path="$input_path"
38779    fi
38780  fi
38781
38782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38783  if test "x$test_cygdrive_prefix" = x; then
38784    # As a simple fix, exclude /usr/bin since it's not a real path.
38785    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38787      # a path prefixed by /cygdrive for fixpath to work.
38788      new_path="$CYGWIN_ROOT_PATH$input_path"
38789    fi
38790  fi
38791
38792  # remove trailing .exe if any
38793  new_path="${new_path/%.exe/}"
38794
38795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38796
38797  # First separate the path from the arguments. This will split at the first
38798  # space.
38799  complete="$NM"
38800  path="${complete%% *}"
38801  tmp="$complete EOL"
38802  arguments="${tmp#* }"
38803
38804  # Input might be given as Windows format, start by converting to
38805  # unix format.
38806  new_path="$path"
38807
38808  windows_path="$new_path"
38809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38810    unix_path=`$CYGPATH -u "$windows_path"`
38811    new_path="$unix_path"
38812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38814    new_path="$unix_path"
38815  fi
38816
38817
38818  # Now try to locate executable using which
38819  new_path=`$WHICH "$new_path" 2> /dev/null`
38820
38821  if test "x$new_path" = x; then
38822    # Oops. Which didn't find the executable.
38823    # The splitting of arguments from the executable at a space might have been incorrect,
38824    # since paths with space are more likely in Windows. Give it another try with the whole
38825    # argument.
38826    path="$complete"
38827    arguments="EOL"
38828    new_path="$path"
38829
38830  windows_path="$new_path"
38831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38832    unix_path=`$CYGPATH -u "$windows_path"`
38833    new_path="$unix_path"
38834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38836    new_path="$unix_path"
38837  fi
38838
38839
38840    new_path=`$WHICH "$new_path" 2> /dev/null`
38841    # bat and cmd files are not always considered executable in MSYS causing which
38842    # to not find them
38843    if test "x$new_path" = x \
38844        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38845        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38846      new_path="$path"
38847
38848  windows_path="$new_path"
38849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38850    unix_path=`$CYGPATH -u "$windows_path"`
38851    new_path="$unix_path"
38852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38854    new_path="$unix_path"
38855  fi
38856
38857    fi
38858
38859    if test "x$new_path" = x; then
38860      # It's still not found. Now this is an unrecoverable error.
38861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38862$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38863      has_space=`$ECHO "$complete" | $GREP " "`
38864      if test "x$has_space" != x; then
38865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38867      fi
38868      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38869    fi
38870  fi
38871
38872  # Now new_path has a complete unix path to the binary
38873  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38874    # Keep paths in /bin as-is, but remove trailing .exe if any
38875    new_path="${new_path/%.exe/}"
38876    # Do not save /bin paths to all_fixpath_prefixes!
38877  else
38878    # Not in mixed or Windows style, start by that.
38879    new_path=`cmd //c echo $new_path`
38880
38881  input_path="$new_path"
38882  # Check if we need to convert this using DOS-style short mode. If the path
38883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38884  # take no chances and rewrite it.
38885  # Note: m4 eats our [], so we need to use [ and ] instead.
38886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38887  if test "x$has_forbidden_chars" != x; then
38888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38890  fi
38891
38892    # Output is in $new_path
38893
38894  windows_path="$new_path"
38895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38896    unix_path=`$CYGPATH -u "$windows_path"`
38897    new_path="$unix_path"
38898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38900    new_path="$unix_path"
38901  fi
38902
38903    # remove trailing .exe if any
38904    new_path="${new_path/%.exe/}"
38905
38906    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38907    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38908  fi
38909
38910    else
38911      # We're on a unix platform. Hooray! :)
38912      # First separate the path from the arguments. This will split at the first
38913      # space.
38914      complete="$NM"
38915      path="${complete%% *}"
38916      tmp="$complete EOL"
38917      arguments="${tmp#* }"
38918
38919      # Cannot rely on the command "which" here since it doesn't always work.
38920      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38921      if test -z "$is_absolute_path"; then
38922        # Path to executable is not absolute. Find it.
38923        IFS_save="$IFS"
38924        IFS=:
38925        for p in $PATH; do
38926          if test -f "$p/$path" && test -x "$p/$path"; then
38927            new_path="$p/$path"
38928            break
38929          fi
38930        done
38931        IFS="$IFS_save"
38932      else
38933        # This is an absolute path, we can use it without further modifications.
38934        new_path="$path"
38935      fi
38936
38937      if test "x$new_path" = x; then
38938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38939$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38940        has_space=`$ECHO "$complete" | $GREP " "`
38941        if test "x$has_space" != x; then
38942          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38943$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38944        fi
38945        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38946      fi
38947    fi
38948
38949    # Now join together the path and the arguments once again
38950    if test "x$arguments" != xEOL; then
38951      new_complete="$new_path ${arguments% *}"
38952    else
38953      new_complete="$new_path"
38954    fi
38955
38956    if test "x$complete" != "x$new_complete"; then
38957      NM="$new_complete"
38958      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38959$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38960    fi
38961  fi
38962
38963
38964
38965  # Publish this variable in the help.
38966
38967
38968  if [ -z "${GNM+x}" ]; then
38969    # The variable is not set by user, try to locate tool using the code snippet
38970    for ac_prog in gnm
38971do
38972  # Extract the first word of "$ac_prog", so it can be a program name with args.
38973set dummy $ac_prog; ac_word=$2
38974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38975$as_echo_n "checking for $ac_word... " >&6; }
38976if ${ac_cv_path_GNM+:} false; then :
38977  $as_echo_n "(cached) " >&6
38978else
38979  case $GNM in
38980  [\\/]* | ?:[\\/]*)
38981  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38982  ;;
38983  *)
38984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38985for as_dir in $PATH
38986do
38987  IFS=$as_save_IFS
38988  test -z "$as_dir" && as_dir=.
38989    for ac_exec_ext in '' $ac_executable_extensions; do
38990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38991    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38993    break 2
38994  fi
38995done
38996  done
38997IFS=$as_save_IFS
38998
38999  ;;
39000esac
39001fi
39002GNM=$ac_cv_path_GNM
39003if test -n "$GNM"; then
39004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39005$as_echo "$GNM" >&6; }
39006else
39007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39008$as_echo "no" >&6; }
39009fi
39010
39011
39012  test -n "$GNM" && break
39013done
39014
39015  else
39016    # The variable is set, but is it from the command line or the environment?
39017
39018    # Try to remove the string !GNM! from our list.
39019    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39020    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39021      # If it failed, the variable was not from the command line. Ignore it,
39022      # but warn the user (except for BASH, which is always set by the calling BASH).
39023      if test "xGNM" != xBASH; then
39024        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39025$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39026      fi
39027      # Try to locate tool using the code snippet
39028      for ac_prog in gnm
39029do
39030  # Extract the first word of "$ac_prog", so it can be a program name with args.
39031set dummy $ac_prog; ac_word=$2
39032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39033$as_echo_n "checking for $ac_word... " >&6; }
39034if ${ac_cv_path_GNM+:} false; then :
39035  $as_echo_n "(cached) " >&6
39036else
39037  case $GNM in
39038  [\\/]* | ?:[\\/]*)
39039  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39040  ;;
39041  *)
39042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39043for as_dir in $PATH
39044do
39045  IFS=$as_save_IFS
39046  test -z "$as_dir" && as_dir=.
39047    for ac_exec_ext in '' $ac_executable_extensions; do
39048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39049    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39051    break 2
39052  fi
39053done
39054  done
39055IFS=$as_save_IFS
39056
39057  ;;
39058esac
39059fi
39060GNM=$ac_cv_path_GNM
39061if test -n "$GNM"; then
39062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39063$as_echo "$GNM" >&6; }
39064else
39065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39066$as_echo "no" >&6; }
39067fi
39068
39069
39070  test -n "$GNM" && break
39071done
39072
39073    else
39074      # If it succeeded, then it was overridden by the user. We will use it
39075      # for the tool.
39076
39077      # First remove it from the list of overridden variables, so we can test
39078      # for unknown variables in the end.
39079      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39080
39081      # Check if we try to supply an empty value
39082      if test "x$GNM" = x; then
39083        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39084$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39085        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39086$as_echo_n "checking for GNM... " >&6; }
39087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39088$as_echo "disabled" >&6; }
39089      else
39090        # Check if the provided tool contains a complete path.
39091        tool_specified="$GNM"
39092        tool_basename="${tool_specified##*/}"
39093        if test "x$tool_basename" = "x$tool_specified"; then
39094          # A command without a complete path is provided, search $PATH.
39095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39096$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39097          # Extract the first word of "$tool_basename", so it can be a program name with args.
39098set dummy $tool_basename; ac_word=$2
39099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39100$as_echo_n "checking for $ac_word... " >&6; }
39101if ${ac_cv_path_GNM+:} false; then :
39102  $as_echo_n "(cached) " >&6
39103else
39104  case $GNM in
39105  [\\/]* | ?:[\\/]*)
39106  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39107  ;;
39108  *)
39109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39110for as_dir in $PATH
39111do
39112  IFS=$as_save_IFS
39113  test -z "$as_dir" && as_dir=.
39114    for ac_exec_ext in '' $ac_executable_extensions; do
39115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39116    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39118    break 2
39119  fi
39120done
39121  done
39122IFS=$as_save_IFS
39123
39124  ;;
39125esac
39126fi
39127GNM=$ac_cv_path_GNM
39128if test -n "$GNM"; then
39129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39130$as_echo "$GNM" >&6; }
39131else
39132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39133$as_echo "no" >&6; }
39134fi
39135
39136
39137          if test "x$GNM" = x; then
39138            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39139          fi
39140        else
39141          # Otherwise we believe it is a complete path. Use it as it is.
39142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39143$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39144          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39145$as_echo_n "checking for GNM... " >&6; }
39146          if test ! -x "$tool_specified"; then
39147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39148$as_echo "not found" >&6; }
39149            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39150          fi
39151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39152$as_echo "$tool_specified" >&6; }
39153        fi
39154      fi
39155    fi
39156
39157  fi
39158
39159
39160
39161  # Only process if variable expands to non-empty
39162
39163  if test "x$GNM" != x; then
39164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39165
39166  # First separate the path from the arguments. This will split at the first
39167  # space.
39168  complete="$GNM"
39169  path="${complete%% *}"
39170  tmp="$complete EOL"
39171  arguments="${tmp#* }"
39172
39173  # Input might be given as Windows format, start by converting to
39174  # unix format.
39175  new_path=`$CYGPATH -u "$path"`
39176
39177  # Now try to locate executable using which
39178  new_path=`$WHICH "$new_path" 2> /dev/null`
39179  # bat and cmd files are not always considered executable in cygwin causing which
39180  # to not find them
39181  if test "x$new_path" = x \
39182      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39183      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39184    new_path=`$CYGPATH -u "$path"`
39185  fi
39186  if test "x$new_path" = x; then
39187    # Oops. Which didn't find the executable.
39188    # The splitting of arguments from the executable at a space might have been incorrect,
39189    # since paths with space are more likely in Windows. Give it another try with the whole
39190    # argument.
39191    path="$complete"
39192    arguments="EOL"
39193    new_path=`$CYGPATH -u "$path"`
39194    new_path=`$WHICH "$new_path" 2> /dev/null`
39195    # bat and cmd files are not always considered executable in cygwin causing which
39196    # to not find them
39197    if test "x$new_path" = x \
39198        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39199        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39200      new_path=`$CYGPATH -u "$path"`
39201    fi
39202    if test "x$new_path" = x; then
39203      # It's still not found. Now this is an unrecoverable error.
39204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39205$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39206      has_space=`$ECHO "$complete" | $GREP " "`
39207      if test "x$has_space" != x; then
39208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39210      fi
39211      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39212    fi
39213  fi
39214
39215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39218  # "foo.exe" is OK but "foo" is an error.
39219  #
39220  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39221  # It is also a way to make sure we got the proper file name for the real test later on.
39222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39223  if test "x$test_shortpath" = x; then
39224    # Short path failed, file does not exist as specified.
39225    # Try adding .exe or .cmd
39226    if test -f "${new_path}.exe"; then
39227      input_to_shortpath="${new_path}.exe"
39228    elif test -f "${new_path}.cmd"; then
39229      input_to_shortpath="${new_path}.cmd"
39230    else
39231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39232$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39233      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39234$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39235      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39236    fi
39237  else
39238    input_to_shortpath="$new_path"
39239  fi
39240
39241  # Call helper function which possibly converts this using DOS-style short mode.
39242  # If so, the updated path is stored in $new_path.
39243  new_path="$input_to_shortpath"
39244
39245  input_path="$input_to_shortpath"
39246  # Check if we need to convert this using DOS-style short mode. If the path
39247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39248  # take no chances and rewrite it.
39249  # Note: m4 eats our [], so we need to use [ and ] instead.
39250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39251  if test "x$has_forbidden_chars" != x; then
39252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39256      # Going to short mode and back again did indeed matter. Since short mode is
39257      # case insensitive, let's make it lowercase to improve readability.
39258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39259      # Now convert it back to Unix-style (cygpath)
39260      input_path=`$CYGPATH -u "$shortmode_path"`
39261      new_path="$input_path"
39262    fi
39263  fi
39264
39265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39266  if test "x$test_cygdrive_prefix" = x; then
39267    # As a simple fix, exclude /usr/bin since it's not a real path.
39268    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39270      # a path prefixed by /cygdrive for fixpath to work.
39271      new_path="$CYGWIN_ROOT_PATH$input_path"
39272    fi
39273  fi
39274
39275  # remove trailing .exe if any
39276  new_path="${new_path/%.exe/}"
39277
39278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39279
39280  # First separate the path from the arguments. This will split at the first
39281  # space.
39282  complete="$GNM"
39283  path="${complete%% *}"
39284  tmp="$complete EOL"
39285  arguments="${tmp#* }"
39286
39287  # Input might be given as Windows format, start by converting to
39288  # unix format.
39289  new_path="$path"
39290
39291  windows_path="$new_path"
39292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39293    unix_path=`$CYGPATH -u "$windows_path"`
39294    new_path="$unix_path"
39295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39297    new_path="$unix_path"
39298  fi
39299
39300
39301  # Now try to locate executable using which
39302  new_path=`$WHICH "$new_path" 2> /dev/null`
39303
39304  if test "x$new_path" = x; then
39305    # Oops. Which didn't find the executable.
39306    # The splitting of arguments from the executable at a space might have been incorrect,
39307    # since paths with space are more likely in Windows. Give it another try with the whole
39308    # argument.
39309    path="$complete"
39310    arguments="EOL"
39311    new_path="$path"
39312
39313  windows_path="$new_path"
39314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39315    unix_path=`$CYGPATH -u "$windows_path"`
39316    new_path="$unix_path"
39317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39319    new_path="$unix_path"
39320  fi
39321
39322
39323    new_path=`$WHICH "$new_path" 2> /dev/null`
39324    # bat and cmd files are not always considered executable in MSYS causing which
39325    # to not find them
39326    if test "x$new_path" = x \
39327        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39328        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39329      new_path="$path"
39330
39331  windows_path="$new_path"
39332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39333    unix_path=`$CYGPATH -u "$windows_path"`
39334    new_path="$unix_path"
39335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39337    new_path="$unix_path"
39338  fi
39339
39340    fi
39341
39342    if test "x$new_path" = x; then
39343      # It's still not found. Now this is an unrecoverable error.
39344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39345$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39346      has_space=`$ECHO "$complete" | $GREP " "`
39347      if test "x$has_space" != x; then
39348        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39349$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39350      fi
39351      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39352    fi
39353  fi
39354
39355  # Now new_path has a complete unix path to the binary
39356  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39357    # Keep paths in /bin as-is, but remove trailing .exe if any
39358    new_path="${new_path/%.exe/}"
39359    # Do not save /bin paths to all_fixpath_prefixes!
39360  else
39361    # Not in mixed or Windows style, start by that.
39362    new_path=`cmd //c echo $new_path`
39363
39364  input_path="$new_path"
39365  # Check if we need to convert this using DOS-style short mode. If the path
39366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39367  # take no chances and rewrite it.
39368  # Note: m4 eats our [], so we need to use [ and ] instead.
39369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39370  if test "x$has_forbidden_chars" != x; then
39371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39373  fi
39374
39375    # Output is in $new_path
39376
39377  windows_path="$new_path"
39378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39379    unix_path=`$CYGPATH -u "$windows_path"`
39380    new_path="$unix_path"
39381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39383    new_path="$unix_path"
39384  fi
39385
39386    # remove trailing .exe if any
39387    new_path="${new_path/%.exe/}"
39388
39389    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39390    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39391  fi
39392
39393    else
39394      # We're on a unix platform. Hooray! :)
39395      # First separate the path from the arguments. This will split at the first
39396      # space.
39397      complete="$GNM"
39398      path="${complete%% *}"
39399      tmp="$complete EOL"
39400      arguments="${tmp#* }"
39401
39402      # Cannot rely on the command "which" here since it doesn't always work.
39403      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39404      if test -z "$is_absolute_path"; then
39405        # Path to executable is not absolute. Find it.
39406        IFS_save="$IFS"
39407        IFS=:
39408        for p in $PATH; do
39409          if test -f "$p/$path" && test -x "$p/$path"; then
39410            new_path="$p/$path"
39411            break
39412          fi
39413        done
39414        IFS="$IFS_save"
39415      else
39416        # This is an absolute path, we can use it without further modifications.
39417        new_path="$path"
39418      fi
39419
39420      if test "x$new_path" = x; then
39421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39422$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39423        has_space=`$ECHO "$complete" | $GREP " "`
39424        if test "x$has_space" != x; then
39425          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39426$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39427        fi
39428        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39429      fi
39430    fi
39431
39432    # Now join together the path and the arguments once again
39433    if test "x$arguments" != xEOL; then
39434      new_complete="$new_path ${arguments% *}"
39435    else
39436      new_complete="$new_path"
39437    fi
39438
39439    if test "x$complete" != "x$new_complete"; then
39440      GNM="$new_complete"
39441      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39442$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39443    fi
39444  fi
39445
39446  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39447    # FIXME: we should unify this with the solaris case above.
39448
39449
39450  # Publish this variable in the help.
39451
39452
39453  if [ -z "${STRIP+x}" ]; then
39454    # The variable is not set by user, try to locate tool using the code snippet
39455    if test -n "$ac_tool_prefix"; then
39456  for ac_prog in strip
39457  do
39458    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39459set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39461$as_echo_n "checking for $ac_word... " >&6; }
39462if ${ac_cv_prog_STRIP+:} false; then :
39463  $as_echo_n "(cached) " >&6
39464else
39465  if test -n "$STRIP"; then
39466  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39467else
39468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39469for as_dir in $PATH
39470do
39471  IFS=$as_save_IFS
39472  test -z "$as_dir" && as_dir=.
39473    for ac_exec_ext in '' $ac_executable_extensions; do
39474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39475    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39477    break 2
39478  fi
39479done
39480  done
39481IFS=$as_save_IFS
39482
39483fi
39484fi
39485STRIP=$ac_cv_prog_STRIP
39486if test -n "$STRIP"; then
39487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39488$as_echo "$STRIP" >&6; }
39489else
39490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39491$as_echo "no" >&6; }
39492fi
39493
39494
39495    test -n "$STRIP" && break
39496  done
39497fi
39498if test -z "$STRIP"; then
39499  ac_ct_STRIP=$STRIP
39500  for ac_prog in strip
39501do
39502  # Extract the first word of "$ac_prog", so it can be a program name with args.
39503set dummy $ac_prog; ac_word=$2
39504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39505$as_echo_n "checking for $ac_word... " >&6; }
39506if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39507  $as_echo_n "(cached) " >&6
39508else
39509  if test -n "$ac_ct_STRIP"; then
39510  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39511else
39512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39513for as_dir in $PATH
39514do
39515  IFS=$as_save_IFS
39516  test -z "$as_dir" && as_dir=.
39517    for ac_exec_ext in '' $ac_executable_extensions; do
39518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39519    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39521    break 2
39522  fi
39523done
39524  done
39525IFS=$as_save_IFS
39526
39527fi
39528fi
39529ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39530if test -n "$ac_ct_STRIP"; then
39531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39532$as_echo "$ac_ct_STRIP" >&6; }
39533else
39534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39535$as_echo "no" >&6; }
39536fi
39537
39538
39539  test -n "$ac_ct_STRIP" && break
39540done
39541
39542  if test "x$ac_ct_STRIP" = x; then
39543    STRIP=""
39544  else
39545    case $cross_compiling:$ac_tool_warned in
39546yes:)
39547{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39548$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39549ac_tool_warned=yes ;;
39550esac
39551    STRIP=$ac_ct_STRIP
39552  fi
39553fi
39554
39555  else
39556    # The variable is set, but is it from the command line or the environment?
39557
39558    # Try to remove the string !STRIP! from our list.
39559    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39560    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39561      # If it failed, the variable was not from the command line. Ignore it,
39562      # but warn the user (except for BASH, which is always set by the calling BASH).
39563      if test "xSTRIP" != xBASH; then
39564        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39565$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39566      fi
39567      # Try to locate tool using the code snippet
39568      if test -n "$ac_tool_prefix"; then
39569  for ac_prog in strip
39570  do
39571    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39572set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39574$as_echo_n "checking for $ac_word... " >&6; }
39575if ${ac_cv_prog_STRIP+:} false; then :
39576  $as_echo_n "(cached) " >&6
39577else
39578  if test -n "$STRIP"; then
39579  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39580else
39581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39582for as_dir in $PATH
39583do
39584  IFS=$as_save_IFS
39585  test -z "$as_dir" && as_dir=.
39586    for ac_exec_ext in '' $ac_executable_extensions; do
39587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39588    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39590    break 2
39591  fi
39592done
39593  done
39594IFS=$as_save_IFS
39595
39596fi
39597fi
39598STRIP=$ac_cv_prog_STRIP
39599if test -n "$STRIP"; then
39600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39601$as_echo "$STRIP" >&6; }
39602else
39603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39604$as_echo "no" >&6; }
39605fi
39606
39607
39608    test -n "$STRIP" && break
39609  done
39610fi
39611if test -z "$STRIP"; then
39612  ac_ct_STRIP=$STRIP
39613  for ac_prog in strip
39614do
39615  # Extract the first word of "$ac_prog", so it can be a program name with args.
39616set dummy $ac_prog; ac_word=$2
39617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39618$as_echo_n "checking for $ac_word... " >&6; }
39619if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39620  $as_echo_n "(cached) " >&6
39621else
39622  if test -n "$ac_ct_STRIP"; then
39623  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39624else
39625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39626for as_dir in $PATH
39627do
39628  IFS=$as_save_IFS
39629  test -z "$as_dir" && as_dir=.
39630    for ac_exec_ext in '' $ac_executable_extensions; do
39631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39632    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39634    break 2
39635  fi
39636done
39637  done
39638IFS=$as_save_IFS
39639
39640fi
39641fi
39642ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39643if test -n "$ac_ct_STRIP"; then
39644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39645$as_echo "$ac_ct_STRIP" >&6; }
39646else
39647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39648$as_echo "no" >&6; }
39649fi
39650
39651
39652  test -n "$ac_ct_STRIP" && break
39653done
39654
39655  if test "x$ac_ct_STRIP" = x; then
39656    STRIP=""
39657  else
39658    case $cross_compiling:$ac_tool_warned in
39659yes:)
39660{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39661$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39662ac_tool_warned=yes ;;
39663esac
39664    STRIP=$ac_ct_STRIP
39665  fi
39666fi
39667
39668    else
39669      # If it succeeded, then it was overridden by the user. We will use it
39670      # for the tool.
39671
39672      # First remove it from the list of overridden variables, so we can test
39673      # for unknown variables in the end.
39674      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39675
39676      # Check if we try to supply an empty value
39677      if test "x$STRIP" = x; then
39678        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39679$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39681$as_echo_n "checking for STRIP... " >&6; }
39682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39683$as_echo "disabled" >&6; }
39684      else
39685        # Check if the provided tool contains a complete path.
39686        tool_specified="$STRIP"
39687        tool_basename="${tool_specified##*/}"
39688        if test "x$tool_basename" = "x$tool_specified"; then
39689          # A command without a complete path is provided, search $PATH.
39690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39691$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39692          # Extract the first word of "$tool_basename", so it can be a program name with args.
39693set dummy $tool_basename; ac_word=$2
39694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39695$as_echo_n "checking for $ac_word... " >&6; }
39696if ${ac_cv_path_STRIP+:} false; then :
39697  $as_echo_n "(cached) " >&6
39698else
39699  case $STRIP in
39700  [\\/]* | ?:[\\/]*)
39701  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39702  ;;
39703  *)
39704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39705for as_dir in $PATH
39706do
39707  IFS=$as_save_IFS
39708  test -z "$as_dir" && as_dir=.
39709    for ac_exec_ext in '' $ac_executable_extensions; do
39710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39711    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39713    break 2
39714  fi
39715done
39716  done
39717IFS=$as_save_IFS
39718
39719  ;;
39720esac
39721fi
39722STRIP=$ac_cv_path_STRIP
39723if test -n "$STRIP"; then
39724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39725$as_echo "$STRIP" >&6; }
39726else
39727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39728$as_echo "no" >&6; }
39729fi
39730
39731
39732          if test "x$STRIP" = x; then
39733            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39734          fi
39735        else
39736          # Otherwise we believe it is a complete path. Use it as it is.
39737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39738$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39739          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39740$as_echo_n "checking for STRIP... " >&6; }
39741          if test ! -x "$tool_specified"; then
39742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39743$as_echo "not found" >&6; }
39744            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39745          fi
39746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39747$as_echo "$tool_specified" >&6; }
39748        fi
39749      fi
39750    fi
39751
39752  fi
39753
39754
39755
39756  # Only process if variable expands to non-empty
39757
39758  if test "x$STRIP" != x; then
39759    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39760
39761  # First separate the path from the arguments. This will split at the first
39762  # space.
39763  complete="$STRIP"
39764  path="${complete%% *}"
39765  tmp="$complete EOL"
39766  arguments="${tmp#* }"
39767
39768  # Input might be given as Windows format, start by converting to
39769  # unix format.
39770  new_path=`$CYGPATH -u "$path"`
39771
39772  # Now try to locate executable using which
39773  new_path=`$WHICH "$new_path" 2> /dev/null`
39774  # bat and cmd files are not always considered executable in cygwin causing which
39775  # to not find them
39776  if test "x$new_path" = x \
39777      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39778      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39779    new_path=`$CYGPATH -u "$path"`
39780  fi
39781  if test "x$new_path" = x; then
39782    # Oops. Which didn't find the executable.
39783    # The splitting of arguments from the executable at a space might have been incorrect,
39784    # since paths with space are more likely in Windows. Give it another try with the whole
39785    # argument.
39786    path="$complete"
39787    arguments="EOL"
39788    new_path=`$CYGPATH -u "$path"`
39789    new_path=`$WHICH "$new_path" 2> /dev/null`
39790    # bat and cmd files are not always considered executable in cygwin causing which
39791    # to not find them
39792    if test "x$new_path" = x \
39793        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39794        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39795      new_path=`$CYGPATH -u "$path"`
39796    fi
39797    if test "x$new_path" = x; then
39798      # It's still not found. Now this is an unrecoverable error.
39799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39800$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39801      has_space=`$ECHO "$complete" | $GREP " "`
39802      if test "x$has_space" != x; then
39803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39805      fi
39806      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39807    fi
39808  fi
39809
39810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39813  # "foo.exe" is OK but "foo" is an error.
39814  #
39815  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39816  # It is also a way to make sure we got the proper file name for the real test later on.
39817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39818  if test "x$test_shortpath" = x; then
39819    # Short path failed, file does not exist as specified.
39820    # Try adding .exe or .cmd
39821    if test -f "${new_path}.exe"; then
39822      input_to_shortpath="${new_path}.exe"
39823    elif test -f "${new_path}.cmd"; then
39824      input_to_shortpath="${new_path}.cmd"
39825    else
39826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39827$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39828      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39829$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39830      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39831    fi
39832  else
39833    input_to_shortpath="$new_path"
39834  fi
39835
39836  # Call helper function which possibly converts this using DOS-style short mode.
39837  # If so, the updated path is stored in $new_path.
39838  new_path="$input_to_shortpath"
39839
39840  input_path="$input_to_shortpath"
39841  # Check if we need to convert this using DOS-style short mode. If the path
39842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39843  # take no chances and rewrite it.
39844  # Note: m4 eats our [], so we need to use [ and ] instead.
39845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39846  if test "x$has_forbidden_chars" != x; then
39847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39851      # Going to short mode and back again did indeed matter. Since short mode is
39852      # case insensitive, let's make it lowercase to improve readability.
39853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39854      # Now convert it back to Unix-style (cygpath)
39855      input_path=`$CYGPATH -u "$shortmode_path"`
39856      new_path="$input_path"
39857    fi
39858  fi
39859
39860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39861  if test "x$test_cygdrive_prefix" = x; then
39862    # As a simple fix, exclude /usr/bin since it's not a real path.
39863    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39865      # a path prefixed by /cygdrive for fixpath to work.
39866      new_path="$CYGWIN_ROOT_PATH$input_path"
39867    fi
39868  fi
39869
39870  # remove trailing .exe if any
39871  new_path="${new_path/%.exe/}"
39872
39873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39874
39875  # First separate the path from the arguments. This will split at the first
39876  # space.
39877  complete="$STRIP"
39878  path="${complete%% *}"
39879  tmp="$complete EOL"
39880  arguments="${tmp#* }"
39881
39882  # Input might be given as Windows format, start by converting to
39883  # unix format.
39884  new_path="$path"
39885
39886  windows_path="$new_path"
39887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39888    unix_path=`$CYGPATH -u "$windows_path"`
39889    new_path="$unix_path"
39890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39892    new_path="$unix_path"
39893  fi
39894
39895
39896  # Now try to locate executable using which
39897  new_path=`$WHICH "$new_path" 2> /dev/null`
39898
39899  if test "x$new_path" = x; then
39900    # Oops. Which didn't find the executable.
39901    # The splitting of arguments from the executable at a space might have been incorrect,
39902    # since paths with space are more likely in Windows. Give it another try with the whole
39903    # argument.
39904    path="$complete"
39905    arguments="EOL"
39906    new_path="$path"
39907
39908  windows_path="$new_path"
39909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39910    unix_path=`$CYGPATH -u "$windows_path"`
39911    new_path="$unix_path"
39912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39914    new_path="$unix_path"
39915  fi
39916
39917
39918    new_path=`$WHICH "$new_path" 2> /dev/null`
39919    # bat and cmd files are not always considered executable in MSYS causing which
39920    # to not find them
39921    if test "x$new_path" = x \
39922        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39923        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39924      new_path="$path"
39925
39926  windows_path="$new_path"
39927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39928    unix_path=`$CYGPATH -u "$windows_path"`
39929    new_path="$unix_path"
39930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39932    new_path="$unix_path"
39933  fi
39934
39935    fi
39936
39937    if test "x$new_path" = x; then
39938      # It's still not found. Now this is an unrecoverable error.
39939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39940$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39941      has_space=`$ECHO "$complete" | $GREP " "`
39942      if test "x$has_space" != x; then
39943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39945      fi
39946      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39947    fi
39948  fi
39949
39950  # Now new_path has a complete unix path to the binary
39951  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39952    # Keep paths in /bin as-is, but remove trailing .exe if any
39953    new_path="${new_path/%.exe/}"
39954    # Do not save /bin paths to all_fixpath_prefixes!
39955  else
39956    # Not in mixed or Windows style, start by that.
39957    new_path=`cmd //c echo $new_path`
39958
39959  input_path="$new_path"
39960  # Check if we need to convert this using DOS-style short mode. If the path
39961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39962  # take no chances and rewrite it.
39963  # Note: m4 eats our [], so we need to use [ and ] instead.
39964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39965  if test "x$has_forbidden_chars" != x; then
39966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39968  fi
39969
39970    # Output is in $new_path
39971
39972  windows_path="$new_path"
39973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39974    unix_path=`$CYGPATH -u "$windows_path"`
39975    new_path="$unix_path"
39976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39978    new_path="$unix_path"
39979  fi
39980
39981    # remove trailing .exe if any
39982    new_path="${new_path/%.exe/}"
39983
39984    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39985    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39986  fi
39987
39988    else
39989      # We're on a unix platform. Hooray! :)
39990      # First separate the path from the arguments. This will split at the first
39991      # space.
39992      complete="$STRIP"
39993      path="${complete%% *}"
39994      tmp="$complete EOL"
39995      arguments="${tmp#* }"
39996
39997      # Cannot rely on the command "which" here since it doesn't always work.
39998      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39999      if test -z "$is_absolute_path"; then
40000        # Path to executable is not absolute. Find it.
40001        IFS_save="$IFS"
40002        IFS=:
40003        for p in $PATH; do
40004          if test -f "$p/$path" && test -x "$p/$path"; then
40005            new_path="$p/$path"
40006            break
40007          fi
40008        done
40009        IFS="$IFS_save"
40010      else
40011        # This is an absolute path, we can use it without further modifications.
40012        new_path="$path"
40013      fi
40014
40015      if test "x$new_path" = x; then
40016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40017$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40018        has_space=`$ECHO "$complete" | $GREP " "`
40019        if test "x$has_space" != x; then
40020          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40021$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40022        fi
40023        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40024      fi
40025    fi
40026
40027    # Now join together the path and the arguments once again
40028    if test "x$arguments" != xEOL; then
40029      new_complete="$new_path ${arguments% *}"
40030    else
40031      new_complete="$new_path"
40032    fi
40033
40034    if test "x$complete" != "x$new_complete"; then
40035      STRIP="$new_complete"
40036      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40037$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40038    fi
40039  fi
40040
40041
40042
40043  # Publish this variable in the help.
40044
40045
40046  if [ -z "${NM+x}" ]; then
40047    # The variable is not set by user, try to locate tool using the code snippet
40048    if test -n "$ac_tool_prefix"; then
40049  for ac_prog in nm
40050  do
40051    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40052set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40054$as_echo_n "checking for $ac_word... " >&6; }
40055if ${ac_cv_prog_NM+:} false; then :
40056  $as_echo_n "(cached) " >&6
40057else
40058  if test -n "$NM"; then
40059  ac_cv_prog_NM="$NM" # Let the user override the test.
40060else
40061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40062for as_dir in $PATH
40063do
40064  IFS=$as_save_IFS
40065  test -z "$as_dir" && as_dir=.
40066    for ac_exec_ext in '' $ac_executable_extensions; do
40067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40068    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40070    break 2
40071  fi
40072done
40073  done
40074IFS=$as_save_IFS
40075
40076fi
40077fi
40078NM=$ac_cv_prog_NM
40079if test -n "$NM"; then
40080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40081$as_echo "$NM" >&6; }
40082else
40083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40084$as_echo "no" >&6; }
40085fi
40086
40087
40088    test -n "$NM" && break
40089  done
40090fi
40091if test -z "$NM"; then
40092  ac_ct_NM=$NM
40093  for ac_prog in nm
40094do
40095  # Extract the first word of "$ac_prog", so it can be a program name with args.
40096set dummy $ac_prog; ac_word=$2
40097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40098$as_echo_n "checking for $ac_word... " >&6; }
40099if ${ac_cv_prog_ac_ct_NM+:} false; then :
40100  $as_echo_n "(cached) " >&6
40101else
40102  if test -n "$ac_ct_NM"; then
40103  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40104else
40105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40106for as_dir in $PATH
40107do
40108  IFS=$as_save_IFS
40109  test -z "$as_dir" && as_dir=.
40110    for ac_exec_ext in '' $ac_executable_extensions; do
40111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40112    ac_cv_prog_ac_ct_NM="$ac_prog"
40113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40114    break 2
40115  fi
40116done
40117  done
40118IFS=$as_save_IFS
40119
40120fi
40121fi
40122ac_ct_NM=$ac_cv_prog_ac_ct_NM
40123if test -n "$ac_ct_NM"; then
40124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40125$as_echo "$ac_ct_NM" >&6; }
40126else
40127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40128$as_echo "no" >&6; }
40129fi
40130
40131
40132  test -n "$ac_ct_NM" && break
40133done
40134
40135  if test "x$ac_ct_NM" = x; then
40136    NM=""
40137  else
40138    case $cross_compiling:$ac_tool_warned in
40139yes:)
40140{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40141$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40142ac_tool_warned=yes ;;
40143esac
40144    NM=$ac_ct_NM
40145  fi
40146fi
40147
40148  else
40149    # The variable is set, but is it from the command line or the environment?
40150
40151    # Try to remove the string !NM! from our list.
40152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40154      # If it failed, the variable was not from the command line. Ignore it,
40155      # but warn the user (except for BASH, which is always set by the calling BASH).
40156      if test "xNM" != xBASH; then
40157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40158$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40159      fi
40160      # Try to locate tool using the code snippet
40161      if test -n "$ac_tool_prefix"; then
40162  for ac_prog in nm
40163  do
40164    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40165set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40167$as_echo_n "checking for $ac_word... " >&6; }
40168if ${ac_cv_prog_NM+:} false; then :
40169  $as_echo_n "(cached) " >&6
40170else
40171  if test -n "$NM"; then
40172  ac_cv_prog_NM="$NM" # Let the user override the test.
40173else
40174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40175for as_dir in $PATH
40176do
40177  IFS=$as_save_IFS
40178  test -z "$as_dir" && as_dir=.
40179    for ac_exec_ext in '' $ac_executable_extensions; do
40180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40181    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40183    break 2
40184  fi
40185done
40186  done
40187IFS=$as_save_IFS
40188
40189fi
40190fi
40191NM=$ac_cv_prog_NM
40192if test -n "$NM"; then
40193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40194$as_echo "$NM" >&6; }
40195else
40196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40197$as_echo "no" >&6; }
40198fi
40199
40200
40201    test -n "$NM" && break
40202  done
40203fi
40204if test -z "$NM"; then
40205  ac_ct_NM=$NM
40206  for ac_prog in nm
40207do
40208  # Extract the first word of "$ac_prog", so it can be a program name with args.
40209set dummy $ac_prog; ac_word=$2
40210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40211$as_echo_n "checking for $ac_word... " >&6; }
40212if ${ac_cv_prog_ac_ct_NM+:} false; then :
40213  $as_echo_n "(cached) " >&6
40214else
40215  if test -n "$ac_ct_NM"; then
40216  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40217else
40218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40219for as_dir in $PATH
40220do
40221  IFS=$as_save_IFS
40222  test -z "$as_dir" && as_dir=.
40223    for ac_exec_ext in '' $ac_executable_extensions; do
40224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40225    ac_cv_prog_ac_ct_NM="$ac_prog"
40226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40227    break 2
40228  fi
40229done
40230  done
40231IFS=$as_save_IFS
40232
40233fi
40234fi
40235ac_ct_NM=$ac_cv_prog_ac_ct_NM
40236if test -n "$ac_ct_NM"; then
40237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40238$as_echo "$ac_ct_NM" >&6; }
40239else
40240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40241$as_echo "no" >&6; }
40242fi
40243
40244
40245  test -n "$ac_ct_NM" && break
40246done
40247
40248  if test "x$ac_ct_NM" = x; then
40249    NM=""
40250  else
40251    case $cross_compiling:$ac_tool_warned in
40252yes:)
40253{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40254$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40255ac_tool_warned=yes ;;
40256esac
40257    NM=$ac_ct_NM
40258  fi
40259fi
40260
40261    else
40262      # If it succeeded, then it was overridden by the user. We will use it
40263      # for the tool.
40264
40265      # First remove it from the list of overridden variables, so we can test
40266      # for unknown variables in the end.
40267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40268
40269      # Check if we try to supply an empty value
40270      if test "x$NM" = x; then
40271        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40272$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40273        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40274$as_echo_n "checking for NM... " >&6; }
40275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40276$as_echo "disabled" >&6; }
40277      else
40278        # Check if the provided tool contains a complete path.
40279        tool_specified="$NM"
40280        tool_basename="${tool_specified##*/}"
40281        if test "x$tool_basename" = "x$tool_specified"; then
40282          # A command without a complete path is provided, search $PATH.
40283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40284$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40285          # Extract the first word of "$tool_basename", so it can be a program name with args.
40286set dummy $tool_basename; ac_word=$2
40287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40288$as_echo_n "checking for $ac_word... " >&6; }
40289if ${ac_cv_path_NM+:} false; then :
40290  $as_echo_n "(cached) " >&6
40291else
40292  case $NM in
40293  [\\/]* | ?:[\\/]*)
40294  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40295  ;;
40296  *)
40297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40298for as_dir in $PATH
40299do
40300  IFS=$as_save_IFS
40301  test -z "$as_dir" && as_dir=.
40302    for ac_exec_ext in '' $ac_executable_extensions; do
40303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40304    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40306    break 2
40307  fi
40308done
40309  done
40310IFS=$as_save_IFS
40311
40312  ;;
40313esac
40314fi
40315NM=$ac_cv_path_NM
40316if test -n "$NM"; then
40317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40318$as_echo "$NM" >&6; }
40319else
40320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40321$as_echo "no" >&6; }
40322fi
40323
40324
40325          if test "x$NM" = x; then
40326            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40327          fi
40328        else
40329          # Otherwise we believe it is a complete path. Use it as it is.
40330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40331$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40332          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40333$as_echo_n "checking for NM... " >&6; }
40334          if test ! -x "$tool_specified"; then
40335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40336$as_echo "not found" >&6; }
40337            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40338          fi
40339          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40340$as_echo "$tool_specified" >&6; }
40341        fi
40342      fi
40343    fi
40344
40345  fi
40346
40347
40348
40349  # Only process if variable expands to non-empty
40350
40351  if test "x$NM" != x; then
40352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40353
40354  # First separate the path from the arguments. This will split at the first
40355  # space.
40356  complete="$NM"
40357  path="${complete%% *}"
40358  tmp="$complete EOL"
40359  arguments="${tmp#* }"
40360
40361  # Input might be given as Windows format, start by converting to
40362  # unix format.
40363  new_path=`$CYGPATH -u "$path"`
40364
40365  # Now try to locate executable using which
40366  new_path=`$WHICH "$new_path" 2> /dev/null`
40367  # bat and cmd files are not always considered executable in cygwin causing which
40368  # to not find them
40369  if test "x$new_path" = x \
40370      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40371      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40372    new_path=`$CYGPATH -u "$path"`
40373  fi
40374  if test "x$new_path" = x; then
40375    # Oops. Which didn't find the executable.
40376    # The splitting of arguments from the executable at a space might have been incorrect,
40377    # since paths with space are more likely in Windows. Give it another try with the whole
40378    # argument.
40379    path="$complete"
40380    arguments="EOL"
40381    new_path=`$CYGPATH -u "$path"`
40382    new_path=`$WHICH "$new_path" 2> /dev/null`
40383    # bat and cmd files are not always considered executable in cygwin causing which
40384    # to not find them
40385    if test "x$new_path" = x \
40386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40388      new_path=`$CYGPATH -u "$path"`
40389    fi
40390    if test "x$new_path" = x; then
40391      # It's still not found. Now this is an unrecoverable error.
40392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40393$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40394      has_space=`$ECHO "$complete" | $GREP " "`
40395      if test "x$has_space" != x; then
40396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40398      fi
40399      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40400    fi
40401  fi
40402
40403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40406  # "foo.exe" is OK but "foo" is an error.
40407  #
40408  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40409  # It is also a way to make sure we got the proper file name for the real test later on.
40410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40411  if test "x$test_shortpath" = x; then
40412    # Short path failed, file does not exist as specified.
40413    # Try adding .exe or .cmd
40414    if test -f "${new_path}.exe"; then
40415      input_to_shortpath="${new_path}.exe"
40416    elif test -f "${new_path}.cmd"; then
40417      input_to_shortpath="${new_path}.cmd"
40418    else
40419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40420$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40423      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40424    fi
40425  else
40426    input_to_shortpath="$new_path"
40427  fi
40428
40429  # Call helper function which possibly converts this using DOS-style short mode.
40430  # If so, the updated path is stored in $new_path.
40431  new_path="$input_to_shortpath"
40432
40433  input_path="$input_to_shortpath"
40434  # Check if we need to convert this using DOS-style short mode. If the path
40435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40436  # take no chances and rewrite it.
40437  # Note: m4 eats our [], so we need to use [ and ] instead.
40438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40439  if test "x$has_forbidden_chars" != x; then
40440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40444      # Going to short mode and back again did indeed matter. Since short mode is
40445      # case insensitive, let's make it lowercase to improve readability.
40446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40447      # Now convert it back to Unix-style (cygpath)
40448      input_path=`$CYGPATH -u "$shortmode_path"`
40449      new_path="$input_path"
40450    fi
40451  fi
40452
40453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40454  if test "x$test_cygdrive_prefix" = x; then
40455    # As a simple fix, exclude /usr/bin since it's not a real path.
40456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40458      # a path prefixed by /cygdrive for fixpath to work.
40459      new_path="$CYGWIN_ROOT_PATH$input_path"
40460    fi
40461  fi
40462
40463  # remove trailing .exe if any
40464  new_path="${new_path/%.exe/}"
40465
40466    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40467
40468  # First separate the path from the arguments. This will split at the first
40469  # space.
40470  complete="$NM"
40471  path="${complete%% *}"
40472  tmp="$complete EOL"
40473  arguments="${tmp#* }"
40474
40475  # Input might be given as Windows format, start by converting to
40476  # unix format.
40477  new_path="$path"
40478
40479  windows_path="$new_path"
40480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40481    unix_path=`$CYGPATH -u "$windows_path"`
40482    new_path="$unix_path"
40483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40485    new_path="$unix_path"
40486  fi
40487
40488
40489  # Now try to locate executable using which
40490  new_path=`$WHICH "$new_path" 2> /dev/null`
40491
40492  if test "x$new_path" = x; then
40493    # Oops. Which didn't find the executable.
40494    # The splitting of arguments from the executable at a space might have been incorrect,
40495    # since paths with space are more likely in Windows. Give it another try with the whole
40496    # argument.
40497    path="$complete"
40498    arguments="EOL"
40499    new_path="$path"
40500
40501  windows_path="$new_path"
40502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40503    unix_path=`$CYGPATH -u "$windows_path"`
40504    new_path="$unix_path"
40505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40507    new_path="$unix_path"
40508  fi
40509
40510
40511    new_path=`$WHICH "$new_path" 2> /dev/null`
40512    # bat and cmd files are not always considered executable in MSYS causing which
40513    # to not find them
40514    if test "x$new_path" = x \
40515        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40516        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40517      new_path="$path"
40518
40519  windows_path="$new_path"
40520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40521    unix_path=`$CYGPATH -u "$windows_path"`
40522    new_path="$unix_path"
40523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40525    new_path="$unix_path"
40526  fi
40527
40528    fi
40529
40530    if test "x$new_path" = x; then
40531      # It's still not found. Now this is an unrecoverable error.
40532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40533$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40534      has_space=`$ECHO "$complete" | $GREP " "`
40535      if test "x$has_space" != x; then
40536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40538      fi
40539      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40540    fi
40541  fi
40542
40543  # Now new_path has a complete unix path to the binary
40544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40545    # Keep paths in /bin as-is, but remove trailing .exe if any
40546    new_path="${new_path/%.exe/}"
40547    # Do not save /bin paths to all_fixpath_prefixes!
40548  else
40549    # Not in mixed or Windows style, start by that.
40550    new_path=`cmd //c echo $new_path`
40551
40552  input_path="$new_path"
40553  # Check if we need to convert this using DOS-style short mode. If the path
40554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40555  # take no chances and rewrite it.
40556  # Note: m4 eats our [], so we need to use [ and ] instead.
40557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40558  if test "x$has_forbidden_chars" != x; then
40559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40561  fi
40562
40563    # Output is in $new_path
40564
40565  windows_path="$new_path"
40566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40567    unix_path=`$CYGPATH -u "$windows_path"`
40568    new_path="$unix_path"
40569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40571    new_path="$unix_path"
40572  fi
40573
40574    # remove trailing .exe if any
40575    new_path="${new_path/%.exe/}"
40576
40577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40579  fi
40580
40581    else
40582      # We're on a unix platform. Hooray! :)
40583      # First separate the path from the arguments. This will split at the first
40584      # space.
40585      complete="$NM"
40586      path="${complete%% *}"
40587      tmp="$complete EOL"
40588      arguments="${tmp#* }"
40589
40590      # Cannot rely on the command "which" here since it doesn't always work.
40591      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40592      if test -z "$is_absolute_path"; then
40593        # Path to executable is not absolute. Find it.
40594        IFS_save="$IFS"
40595        IFS=:
40596        for p in $PATH; do
40597          if test -f "$p/$path" && test -x "$p/$path"; then
40598            new_path="$p/$path"
40599            break
40600          fi
40601        done
40602        IFS="$IFS_save"
40603      else
40604        # This is an absolute path, we can use it without further modifications.
40605        new_path="$path"
40606      fi
40607
40608      if test "x$new_path" = x; then
40609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40610$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40611        has_space=`$ECHO "$complete" | $GREP " "`
40612        if test "x$has_space" != x; then
40613          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40615        fi
40616        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40617      fi
40618    fi
40619
40620    # Now join together the path and the arguments once again
40621    if test "x$arguments" != xEOL; then
40622      new_complete="$new_path ${arguments% *}"
40623    else
40624      new_complete="$new_path"
40625    fi
40626
40627    if test "x$complete" != "x$new_complete"; then
40628      NM="$new_complete"
40629      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40630$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40631    fi
40632  fi
40633
40634    GNM="$NM"
40635
40636  fi
40637
40638  # objcopy is used for moving debug symbols to separate files when
40639  # full debug symbols are enabled.
40640  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40641
40642
40643  # Publish this variable in the help.
40644
40645
40646  if [ -z "${OBJCOPY+x}" ]; then
40647    # The variable is not set by user, try to locate tool using the code snippet
40648    if test -n "$ac_tool_prefix"; then
40649  for ac_prog in gobjcopy objcopy
40650  do
40651    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40652set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40654$as_echo_n "checking for $ac_word... " >&6; }
40655if ${ac_cv_prog_OBJCOPY+:} false; then :
40656  $as_echo_n "(cached) " >&6
40657else
40658  if test -n "$OBJCOPY"; then
40659  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40660else
40661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40662for as_dir in $PATH
40663do
40664  IFS=$as_save_IFS
40665  test -z "$as_dir" && as_dir=.
40666    for ac_exec_ext in '' $ac_executable_extensions; do
40667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40668    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40670    break 2
40671  fi
40672done
40673  done
40674IFS=$as_save_IFS
40675
40676fi
40677fi
40678OBJCOPY=$ac_cv_prog_OBJCOPY
40679if test -n "$OBJCOPY"; then
40680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40681$as_echo "$OBJCOPY" >&6; }
40682else
40683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40684$as_echo "no" >&6; }
40685fi
40686
40687
40688    test -n "$OBJCOPY" && break
40689  done
40690fi
40691if test -z "$OBJCOPY"; then
40692  ac_ct_OBJCOPY=$OBJCOPY
40693  for ac_prog in gobjcopy objcopy
40694do
40695  # Extract the first word of "$ac_prog", so it can be a program name with args.
40696set dummy $ac_prog; ac_word=$2
40697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40698$as_echo_n "checking for $ac_word... " >&6; }
40699if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40700  $as_echo_n "(cached) " >&6
40701else
40702  if test -n "$ac_ct_OBJCOPY"; then
40703  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40704else
40705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40706for as_dir in $PATH
40707do
40708  IFS=$as_save_IFS
40709  test -z "$as_dir" && as_dir=.
40710    for ac_exec_ext in '' $ac_executable_extensions; do
40711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40712    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40714    break 2
40715  fi
40716done
40717  done
40718IFS=$as_save_IFS
40719
40720fi
40721fi
40722ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40723if test -n "$ac_ct_OBJCOPY"; then
40724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40725$as_echo "$ac_ct_OBJCOPY" >&6; }
40726else
40727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40728$as_echo "no" >&6; }
40729fi
40730
40731
40732  test -n "$ac_ct_OBJCOPY" && break
40733done
40734
40735  if test "x$ac_ct_OBJCOPY" = x; then
40736    OBJCOPY=""
40737  else
40738    case $cross_compiling:$ac_tool_warned in
40739yes:)
40740{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40741$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40742ac_tool_warned=yes ;;
40743esac
40744    OBJCOPY=$ac_ct_OBJCOPY
40745  fi
40746fi
40747
40748  else
40749    # The variable is set, but is it from the command line or the environment?
40750
40751    # Try to remove the string !OBJCOPY! from our list.
40752    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
40753    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40754      # If it failed, the variable was not from the command line. Ignore it,
40755      # but warn the user (except for BASH, which is always set by the calling BASH).
40756      if test "xOBJCOPY" != xBASH; then
40757        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
40758$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
40759      fi
40760      # Try to locate tool using the code snippet
40761      if test -n "$ac_tool_prefix"; then
40762  for ac_prog in gobjcopy objcopy
40763  do
40764    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40765set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40767$as_echo_n "checking for $ac_word... " >&6; }
40768if ${ac_cv_prog_OBJCOPY+:} false; then :
40769  $as_echo_n "(cached) " >&6
40770else
40771  if test -n "$OBJCOPY"; then
40772  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40773else
40774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40775for as_dir in $PATH
40776do
40777  IFS=$as_save_IFS
40778  test -z "$as_dir" && as_dir=.
40779    for ac_exec_ext in '' $ac_executable_extensions; do
40780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40781    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40783    break 2
40784  fi
40785done
40786  done
40787IFS=$as_save_IFS
40788
40789fi
40790fi
40791OBJCOPY=$ac_cv_prog_OBJCOPY
40792if test -n "$OBJCOPY"; then
40793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40794$as_echo "$OBJCOPY" >&6; }
40795else
40796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40797$as_echo "no" >&6; }
40798fi
40799
40800
40801    test -n "$OBJCOPY" && break
40802  done
40803fi
40804if test -z "$OBJCOPY"; then
40805  ac_ct_OBJCOPY=$OBJCOPY
40806  for ac_prog in gobjcopy objcopy
40807do
40808  # Extract the first word of "$ac_prog", so it can be a program name with args.
40809set dummy $ac_prog; ac_word=$2
40810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40811$as_echo_n "checking for $ac_word... " >&6; }
40812if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40813  $as_echo_n "(cached) " >&6
40814else
40815  if test -n "$ac_ct_OBJCOPY"; then
40816  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40817else
40818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40819for as_dir in $PATH
40820do
40821  IFS=$as_save_IFS
40822  test -z "$as_dir" && as_dir=.
40823    for ac_exec_ext in '' $ac_executable_extensions; do
40824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40825    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40827    break 2
40828  fi
40829done
40830  done
40831IFS=$as_save_IFS
40832
40833fi
40834fi
40835ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40836if test -n "$ac_ct_OBJCOPY"; then
40837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40838$as_echo "$ac_ct_OBJCOPY" >&6; }
40839else
40840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40841$as_echo "no" >&6; }
40842fi
40843
40844
40845  test -n "$ac_ct_OBJCOPY" && break
40846done
40847
40848  if test "x$ac_ct_OBJCOPY" = x; then
40849    OBJCOPY=""
40850  else
40851    case $cross_compiling:$ac_tool_warned in
40852yes:)
40853{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40854$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40855ac_tool_warned=yes ;;
40856esac
40857    OBJCOPY=$ac_ct_OBJCOPY
40858  fi
40859fi
40860
40861    else
40862      # If it succeeded, then it was overridden by the user. We will use it
40863      # for the tool.
40864
40865      # First remove it from the list of overridden variables, so we can test
40866      # for unknown variables in the end.
40867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40868
40869      # Check if we try to supply an empty value
40870      if test "x$OBJCOPY" = x; then
40871        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
40872$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
40873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40874$as_echo_n "checking for OBJCOPY... " >&6; }
40875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40876$as_echo "disabled" >&6; }
40877      else
40878        # Check if the provided tool contains a complete path.
40879        tool_specified="$OBJCOPY"
40880        tool_basename="${tool_specified##*/}"
40881        if test "x$tool_basename" = "x$tool_specified"; then
40882          # A command without a complete path is provided, search $PATH.
40883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
40884$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
40885          # Extract the first word of "$tool_basename", so it can be a program name with args.
40886set dummy $tool_basename; ac_word=$2
40887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40888$as_echo_n "checking for $ac_word... " >&6; }
40889if ${ac_cv_path_OBJCOPY+:} false; then :
40890  $as_echo_n "(cached) " >&6
40891else
40892  case $OBJCOPY in
40893  [\\/]* | ?:[\\/]*)
40894  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
40895  ;;
40896  *)
40897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40898for as_dir in $PATH
40899do
40900  IFS=$as_save_IFS
40901  test -z "$as_dir" && as_dir=.
40902    for ac_exec_ext in '' $ac_executable_extensions; do
40903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40904    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
40905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40906    break 2
40907  fi
40908done
40909  done
40910IFS=$as_save_IFS
40911
40912  ;;
40913esac
40914fi
40915OBJCOPY=$ac_cv_path_OBJCOPY
40916if test -n "$OBJCOPY"; then
40917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40918$as_echo "$OBJCOPY" >&6; }
40919else
40920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40921$as_echo "no" >&6; }
40922fi
40923
40924
40925          if test "x$OBJCOPY" = x; then
40926            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40927          fi
40928        else
40929          # Otherwise we believe it is a complete path. Use it as it is.
40930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
40931$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
40932          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40933$as_echo_n "checking for OBJCOPY... " >&6; }
40934          if test ! -x "$tool_specified"; then
40935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40936$as_echo "not found" >&6; }
40937            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
40938          fi
40939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40940$as_echo "$tool_specified" >&6; }
40941        fi
40942      fi
40943    fi
40944
40945  fi
40946
40947
40948    # Only call fixup if objcopy was found.
40949    if test -n "$OBJCOPY"; then
40950
40951  # Only process if variable expands to non-empty
40952
40953  if test "x$OBJCOPY" != x; then
40954    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40955
40956  # First separate the path from the arguments. This will split at the first
40957  # space.
40958  complete="$OBJCOPY"
40959  path="${complete%% *}"
40960  tmp="$complete EOL"
40961  arguments="${tmp#* }"
40962
40963  # Input might be given as Windows format, start by converting to
40964  # unix format.
40965  new_path=`$CYGPATH -u "$path"`
40966
40967  # Now try to locate executable using which
40968  new_path=`$WHICH "$new_path" 2> /dev/null`
40969  # bat and cmd files are not always considered executable in cygwin causing which
40970  # to not find them
40971  if test "x$new_path" = x \
40972      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40973      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40974    new_path=`$CYGPATH -u "$path"`
40975  fi
40976  if test "x$new_path" = x; then
40977    # Oops. Which didn't find the executable.
40978    # The splitting of arguments from the executable at a space might have been incorrect,
40979    # since paths with space are more likely in Windows. Give it another try with the whole
40980    # argument.
40981    path="$complete"
40982    arguments="EOL"
40983    new_path=`$CYGPATH -u "$path"`
40984    new_path=`$WHICH "$new_path" 2> /dev/null`
40985    # bat and cmd files are not always considered executable in cygwin causing which
40986    # to not find them
40987    if test "x$new_path" = x \
40988        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40989        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40990      new_path=`$CYGPATH -u "$path"`
40991    fi
40992    if test "x$new_path" = x; then
40993      # It's still not found. Now this is an unrecoverable error.
40994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
40995$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
40996      has_space=`$ECHO "$complete" | $GREP " "`
40997      if test "x$has_space" != x; then
40998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41000      fi
41001      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41002    fi
41003  fi
41004
41005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41008  # "foo.exe" is OK but "foo" is an error.
41009  #
41010  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41011  # It is also a way to make sure we got the proper file name for the real test later on.
41012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41013  if test "x$test_shortpath" = x; then
41014    # Short path failed, file does not exist as specified.
41015    # Try adding .exe or .cmd
41016    if test -f "${new_path}.exe"; then
41017      input_to_shortpath="${new_path}.exe"
41018    elif test -f "${new_path}.cmd"; then
41019      input_to_shortpath="${new_path}.cmd"
41020    else
41021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41022$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41023      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41024$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41025      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41026    fi
41027  else
41028    input_to_shortpath="$new_path"
41029  fi
41030
41031  # Call helper function which possibly converts this using DOS-style short mode.
41032  # If so, the updated path is stored in $new_path.
41033  new_path="$input_to_shortpath"
41034
41035  input_path="$input_to_shortpath"
41036  # Check if we need to convert this using DOS-style short mode. If the path
41037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41038  # take no chances and rewrite it.
41039  # Note: m4 eats our [], so we need to use [ and ] instead.
41040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41041  if test "x$has_forbidden_chars" != x; then
41042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41046      # Going to short mode and back again did indeed matter. Since short mode is
41047      # case insensitive, let's make it lowercase to improve readability.
41048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41049      # Now convert it back to Unix-style (cygpath)
41050      input_path=`$CYGPATH -u "$shortmode_path"`
41051      new_path="$input_path"
41052    fi
41053  fi
41054
41055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41056  if test "x$test_cygdrive_prefix" = x; then
41057    # As a simple fix, exclude /usr/bin since it's not a real path.
41058    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41060      # a path prefixed by /cygdrive for fixpath to work.
41061      new_path="$CYGWIN_ROOT_PATH$input_path"
41062    fi
41063  fi
41064
41065  # remove trailing .exe if any
41066  new_path="${new_path/%.exe/}"
41067
41068    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41069
41070  # First separate the path from the arguments. This will split at the first
41071  # space.
41072  complete="$OBJCOPY"
41073  path="${complete%% *}"
41074  tmp="$complete EOL"
41075  arguments="${tmp#* }"
41076
41077  # Input might be given as Windows format, start by converting to
41078  # unix format.
41079  new_path="$path"
41080
41081  windows_path="$new_path"
41082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41083    unix_path=`$CYGPATH -u "$windows_path"`
41084    new_path="$unix_path"
41085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41087    new_path="$unix_path"
41088  fi
41089
41090
41091  # Now try to locate executable using which
41092  new_path=`$WHICH "$new_path" 2> /dev/null`
41093
41094  if test "x$new_path" = x; then
41095    # Oops. Which didn't find the executable.
41096    # The splitting of arguments from the executable at a space might have been incorrect,
41097    # since paths with space are more likely in Windows. Give it another try with the whole
41098    # argument.
41099    path="$complete"
41100    arguments="EOL"
41101    new_path="$path"
41102
41103  windows_path="$new_path"
41104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41105    unix_path=`$CYGPATH -u "$windows_path"`
41106    new_path="$unix_path"
41107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41109    new_path="$unix_path"
41110  fi
41111
41112
41113    new_path=`$WHICH "$new_path" 2> /dev/null`
41114    # bat and cmd files are not always considered executable in MSYS causing which
41115    # to not find them
41116    if test "x$new_path" = x \
41117        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41118        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41119      new_path="$path"
41120
41121  windows_path="$new_path"
41122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41123    unix_path=`$CYGPATH -u "$windows_path"`
41124    new_path="$unix_path"
41125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41127    new_path="$unix_path"
41128  fi
41129
41130    fi
41131
41132    if test "x$new_path" = x; then
41133      # It's still not found. Now this is an unrecoverable error.
41134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41135$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41136      has_space=`$ECHO "$complete" | $GREP " "`
41137      if test "x$has_space" != x; then
41138        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41139$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41140      fi
41141      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41142    fi
41143  fi
41144
41145  # Now new_path has a complete unix path to the binary
41146  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41147    # Keep paths in /bin as-is, but remove trailing .exe if any
41148    new_path="${new_path/%.exe/}"
41149    # Do not save /bin paths to all_fixpath_prefixes!
41150  else
41151    # Not in mixed or Windows style, start by that.
41152    new_path=`cmd //c echo $new_path`
41153
41154  input_path="$new_path"
41155  # Check if we need to convert this using DOS-style short mode. If the path
41156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41157  # take no chances and rewrite it.
41158  # Note: m4 eats our [], so we need to use [ and ] instead.
41159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41160  if test "x$has_forbidden_chars" != x; then
41161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41163  fi
41164
41165    # Output is in $new_path
41166
41167  windows_path="$new_path"
41168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41169    unix_path=`$CYGPATH -u "$windows_path"`
41170    new_path="$unix_path"
41171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41173    new_path="$unix_path"
41174  fi
41175
41176    # remove trailing .exe if any
41177    new_path="${new_path/%.exe/}"
41178
41179    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41180    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41181  fi
41182
41183    else
41184      # We're on a unix platform. Hooray! :)
41185      # First separate the path from the arguments. This will split at the first
41186      # space.
41187      complete="$OBJCOPY"
41188      path="${complete%% *}"
41189      tmp="$complete EOL"
41190      arguments="${tmp#* }"
41191
41192      # Cannot rely on the command "which" here since it doesn't always work.
41193      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41194      if test -z "$is_absolute_path"; then
41195        # Path to executable is not absolute. Find it.
41196        IFS_save="$IFS"
41197        IFS=:
41198        for p in $PATH; do
41199          if test -f "$p/$path" && test -x "$p/$path"; then
41200            new_path="$p/$path"
41201            break
41202          fi
41203        done
41204        IFS="$IFS_save"
41205      else
41206        # This is an absolute path, we can use it without further modifications.
41207        new_path="$path"
41208      fi
41209
41210      if test "x$new_path" = x; then
41211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41212$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41213        has_space=`$ECHO "$complete" | $GREP " "`
41214        if test "x$has_space" != x; then
41215          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41216$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41217        fi
41218        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41219      fi
41220    fi
41221
41222    # Now join together the path and the arguments once again
41223    if test "x$arguments" != xEOL; then
41224      new_complete="$new_path ${arguments% *}"
41225    else
41226      new_complete="$new_path"
41227    fi
41228
41229    if test "x$complete" != "x$new_complete"; then
41230      OBJCOPY="$new_complete"
41231      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41232$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41233    fi
41234  fi
41235
41236      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41237        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41238        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41239        # - version number is last blank separate word on first line
41240        # - version number formats that have been seen:
41241        #   - <major>.<minor>
41242        #   - <major>.<minor>.<micro>
41243        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41244        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41245         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41246              -e 's/.* //' \
41247              -e '/^[01]\./b bad' \
41248              -e '/^2\./{' \
41249              -e '  s/^2\.//' \
41250              -e '  /^[0-9]$/b bad' \
41251              -e '  /^[0-9]\./b bad' \
41252              -e '  /^1[0-9]$/b bad' \
41253              -e '  /^1[0-9]\./b bad' \
41254              -e '  /^20\./b bad' \
41255              -e '  /^21\.0$/b bad' \
41256              -e '  /^21\.0\./b bad' \
41257              -e '}' \
41258              -e ':good' \
41259              -e 's/.*/VALID_VERSION/p' \
41260              -e 'q' \
41261              -e ':bad' \
41262              -e 's/.*/BAD_VERSION/p' \
41263              -e 'q'`
41264        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41265          OBJCOPY=
41266          { $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
41267$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41268          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41269$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41270          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41271$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41272          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41273$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41274          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41275$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41276        fi
41277      fi
41278    fi
41279  fi
41280
41281
41282
41283  # Publish this variable in the help.
41284
41285
41286  if [ -z "${OBJDUMP+x}" ]; then
41287    # The variable is not set by user, try to locate tool using the code snippet
41288    if test -n "$ac_tool_prefix"; then
41289  for ac_prog in gobjdump objdump
41290  do
41291    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41292set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41294$as_echo_n "checking for $ac_word... " >&6; }
41295if ${ac_cv_prog_OBJDUMP+:} false; then :
41296  $as_echo_n "(cached) " >&6
41297else
41298  if test -n "$OBJDUMP"; then
41299  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41300else
41301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41302for as_dir in $PATH
41303do
41304  IFS=$as_save_IFS
41305  test -z "$as_dir" && as_dir=.
41306    for ac_exec_ext in '' $ac_executable_extensions; do
41307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41308    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41310    break 2
41311  fi
41312done
41313  done
41314IFS=$as_save_IFS
41315
41316fi
41317fi
41318OBJDUMP=$ac_cv_prog_OBJDUMP
41319if test -n "$OBJDUMP"; then
41320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41321$as_echo "$OBJDUMP" >&6; }
41322else
41323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41324$as_echo "no" >&6; }
41325fi
41326
41327
41328    test -n "$OBJDUMP" && break
41329  done
41330fi
41331if test -z "$OBJDUMP"; then
41332  ac_ct_OBJDUMP=$OBJDUMP
41333  for ac_prog in gobjdump objdump
41334do
41335  # Extract the first word of "$ac_prog", so it can be a program name with args.
41336set dummy $ac_prog; ac_word=$2
41337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41338$as_echo_n "checking for $ac_word... " >&6; }
41339if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41340  $as_echo_n "(cached) " >&6
41341else
41342  if test -n "$ac_ct_OBJDUMP"; then
41343  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41344else
41345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41346for as_dir in $PATH
41347do
41348  IFS=$as_save_IFS
41349  test -z "$as_dir" && as_dir=.
41350    for ac_exec_ext in '' $ac_executable_extensions; do
41351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41352    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41354    break 2
41355  fi
41356done
41357  done
41358IFS=$as_save_IFS
41359
41360fi
41361fi
41362ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41363if test -n "$ac_ct_OBJDUMP"; then
41364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41365$as_echo "$ac_ct_OBJDUMP" >&6; }
41366else
41367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41368$as_echo "no" >&6; }
41369fi
41370
41371
41372  test -n "$ac_ct_OBJDUMP" && break
41373done
41374
41375  if test "x$ac_ct_OBJDUMP" = x; then
41376    OBJDUMP=""
41377  else
41378    case $cross_compiling:$ac_tool_warned in
41379yes:)
41380{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41381$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41382ac_tool_warned=yes ;;
41383esac
41384    OBJDUMP=$ac_ct_OBJDUMP
41385  fi
41386fi
41387
41388  else
41389    # The variable is set, but is it from the command line or the environment?
41390
41391    # Try to remove the string !OBJDUMP! from our list.
41392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41394      # If it failed, the variable was not from the command line. Ignore it,
41395      # but warn the user (except for BASH, which is always set by the calling BASH).
41396      if test "xOBJDUMP" != xBASH; then
41397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41398$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41399      fi
41400      # Try to locate tool using the code snippet
41401      if test -n "$ac_tool_prefix"; then
41402  for ac_prog in gobjdump objdump
41403  do
41404    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41405set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41407$as_echo_n "checking for $ac_word... " >&6; }
41408if ${ac_cv_prog_OBJDUMP+:} false; then :
41409  $as_echo_n "(cached) " >&6
41410else
41411  if test -n "$OBJDUMP"; then
41412  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41413else
41414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41415for as_dir in $PATH
41416do
41417  IFS=$as_save_IFS
41418  test -z "$as_dir" && as_dir=.
41419    for ac_exec_ext in '' $ac_executable_extensions; do
41420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41421    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41423    break 2
41424  fi
41425done
41426  done
41427IFS=$as_save_IFS
41428
41429fi
41430fi
41431OBJDUMP=$ac_cv_prog_OBJDUMP
41432if test -n "$OBJDUMP"; then
41433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41434$as_echo "$OBJDUMP" >&6; }
41435else
41436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41437$as_echo "no" >&6; }
41438fi
41439
41440
41441    test -n "$OBJDUMP" && break
41442  done
41443fi
41444if test -z "$OBJDUMP"; then
41445  ac_ct_OBJDUMP=$OBJDUMP
41446  for ac_prog in gobjdump objdump
41447do
41448  # Extract the first word of "$ac_prog", so it can be a program name with args.
41449set dummy $ac_prog; ac_word=$2
41450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41451$as_echo_n "checking for $ac_word... " >&6; }
41452if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41453  $as_echo_n "(cached) " >&6
41454else
41455  if test -n "$ac_ct_OBJDUMP"; then
41456  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41457else
41458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41459for as_dir in $PATH
41460do
41461  IFS=$as_save_IFS
41462  test -z "$as_dir" && as_dir=.
41463    for ac_exec_ext in '' $ac_executable_extensions; do
41464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41465    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41467    break 2
41468  fi
41469done
41470  done
41471IFS=$as_save_IFS
41472
41473fi
41474fi
41475ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41476if test -n "$ac_ct_OBJDUMP"; then
41477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41478$as_echo "$ac_ct_OBJDUMP" >&6; }
41479else
41480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41481$as_echo "no" >&6; }
41482fi
41483
41484
41485  test -n "$ac_ct_OBJDUMP" && break
41486done
41487
41488  if test "x$ac_ct_OBJDUMP" = x; then
41489    OBJDUMP=""
41490  else
41491    case $cross_compiling:$ac_tool_warned in
41492yes:)
41493{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41494$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41495ac_tool_warned=yes ;;
41496esac
41497    OBJDUMP=$ac_ct_OBJDUMP
41498  fi
41499fi
41500
41501    else
41502      # If it succeeded, then it was overridden by the user. We will use it
41503      # for the tool.
41504
41505      # First remove it from the list of overridden variables, so we can test
41506      # for unknown variables in the end.
41507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41508
41509      # Check if we try to supply an empty value
41510      if test "x$OBJDUMP" = x; then
41511        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41512$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41514$as_echo_n "checking for OBJDUMP... " >&6; }
41515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41516$as_echo "disabled" >&6; }
41517      else
41518        # Check if the provided tool contains a complete path.
41519        tool_specified="$OBJDUMP"
41520        tool_basename="${tool_specified##*/}"
41521        if test "x$tool_basename" = "x$tool_specified"; then
41522          # A command without a complete path is provided, search $PATH.
41523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41524$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41525          # Extract the first word of "$tool_basename", so it can be a program name with args.
41526set dummy $tool_basename; ac_word=$2
41527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41528$as_echo_n "checking for $ac_word... " >&6; }
41529if ${ac_cv_path_OBJDUMP+:} false; then :
41530  $as_echo_n "(cached) " >&6
41531else
41532  case $OBJDUMP in
41533  [\\/]* | ?:[\\/]*)
41534  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41535  ;;
41536  *)
41537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41538for as_dir in $PATH
41539do
41540  IFS=$as_save_IFS
41541  test -z "$as_dir" && as_dir=.
41542    for ac_exec_ext in '' $ac_executable_extensions; do
41543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41544    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41546    break 2
41547  fi
41548done
41549  done
41550IFS=$as_save_IFS
41551
41552  ;;
41553esac
41554fi
41555OBJDUMP=$ac_cv_path_OBJDUMP
41556if test -n "$OBJDUMP"; then
41557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41558$as_echo "$OBJDUMP" >&6; }
41559else
41560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41561$as_echo "no" >&6; }
41562fi
41563
41564
41565          if test "x$OBJDUMP" = x; then
41566            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41567          fi
41568        else
41569          # Otherwise we believe it is a complete path. Use it as it is.
41570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41571$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41572          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41573$as_echo_n "checking for OBJDUMP... " >&6; }
41574          if test ! -x "$tool_specified"; then
41575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41576$as_echo "not found" >&6; }
41577            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41578          fi
41579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41580$as_echo "$tool_specified" >&6; }
41581        fi
41582      fi
41583    fi
41584
41585  fi
41586
41587
41588  if test "x$OBJDUMP" != x; then
41589    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41590    # bails if argument is missing.
41591
41592  # Only process if variable expands to non-empty
41593
41594  if test "x$OBJDUMP" != x; then
41595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41596
41597  # First separate the path from the arguments. This will split at the first
41598  # space.
41599  complete="$OBJDUMP"
41600  path="${complete%% *}"
41601  tmp="$complete EOL"
41602  arguments="${tmp#* }"
41603
41604  # Input might be given as Windows format, start by converting to
41605  # unix format.
41606  new_path=`$CYGPATH -u "$path"`
41607
41608  # Now try to locate executable using which
41609  new_path=`$WHICH "$new_path" 2> /dev/null`
41610  # bat and cmd files are not always considered executable in cygwin causing which
41611  # to not find them
41612  if test "x$new_path" = x \
41613      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41614      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41615    new_path=`$CYGPATH -u "$path"`
41616  fi
41617  if test "x$new_path" = x; then
41618    # Oops. Which didn't find the executable.
41619    # The splitting of arguments from the executable at a space might have been incorrect,
41620    # since paths with space are more likely in Windows. Give it another try with the whole
41621    # argument.
41622    path="$complete"
41623    arguments="EOL"
41624    new_path=`$CYGPATH -u "$path"`
41625    new_path=`$WHICH "$new_path" 2> /dev/null`
41626    # bat and cmd files are not always considered executable in cygwin causing which
41627    # to not find them
41628    if test "x$new_path" = x \
41629        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41630        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41631      new_path=`$CYGPATH -u "$path"`
41632    fi
41633    if test "x$new_path" = x; then
41634      # It's still not found. Now this is an unrecoverable error.
41635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41636$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41637      has_space=`$ECHO "$complete" | $GREP " "`
41638      if test "x$has_space" != x; then
41639        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41640$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41641      fi
41642      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41643    fi
41644  fi
41645
41646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41649  # "foo.exe" is OK but "foo" is an error.
41650  #
41651  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41652  # It is also a way to make sure we got the proper file name for the real test later on.
41653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41654  if test "x$test_shortpath" = x; then
41655    # Short path failed, file does not exist as specified.
41656    # Try adding .exe or .cmd
41657    if test -f "${new_path}.exe"; then
41658      input_to_shortpath="${new_path}.exe"
41659    elif test -f "${new_path}.cmd"; then
41660      input_to_shortpath="${new_path}.cmd"
41661    else
41662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
41663$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
41664      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41665$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41666      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41667    fi
41668  else
41669    input_to_shortpath="$new_path"
41670  fi
41671
41672  # Call helper function which possibly converts this using DOS-style short mode.
41673  # If so, the updated path is stored in $new_path.
41674  new_path="$input_to_shortpath"
41675
41676  input_path="$input_to_shortpath"
41677  # Check if we need to convert this using DOS-style short mode. If the path
41678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41679  # take no chances and rewrite it.
41680  # Note: m4 eats our [], so we need to use [ and ] instead.
41681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41682  if test "x$has_forbidden_chars" != x; then
41683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41687      # Going to short mode and back again did indeed matter. Since short mode is
41688      # case insensitive, let's make it lowercase to improve readability.
41689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41690      # Now convert it back to Unix-style (cygpath)
41691      input_path=`$CYGPATH -u "$shortmode_path"`
41692      new_path="$input_path"
41693    fi
41694  fi
41695
41696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41697  if test "x$test_cygdrive_prefix" = x; then
41698    # As a simple fix, exclude /usr/bin since it's not a real path.
41699    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41701      # a path prefixed by /cygdrive for fixpath to work.
41702      new_path="$CYGWIN_ROOT_PATH$input_path"
41703    fi
41704  fi
41705
41706  # remove trailing .exe if any
41707  new_path="${new_path/%.exe/}"
41708
41709    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41710
41711  # First separate the path from the arguments. This will split at the first
41712  # space.
41713  complete="$OBJDUMP"
41714  path="${complete%% *}"
41715  tmp="$complete EOL"
41716  arguments="${tmp#* }"
41717
41718  # Input might be given as Windows format, start by converting to
41719  # unix format.
41720  new_path="$path"
41721
41722  windows_path="$new_path"
41723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41724    unix_path=`$CYGPATH -u "$windows_path"`
41725    new_path="$unix_path"
41726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41728    new_path="$unix_path"
41729  fi
41730
41731
41732  # Now try to locate executable using which
41733  new_path=`$WHICH "$new_path" 2> /dev/null`
41734
41735  if test "x$new_path" = x; then
41736    # Oops. Which didn't find the executable.
41737    # The splitting of arguments from the executable at a space might have been incorrect,
41738    # since paths with space are more likely in Windows. Give it another try with the whole
41739    # argument.
41740    path="$complete"
41741    arguments="EOL"
41742    new_path="$path"
41743
41744  windows_path="$new_path"
41745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41746    unix_path=`$CYGPATH -u "$windows_path"`
41747    new_path="$unix_path"
41748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41750    new_path="$unix_path"
41751  fi
41752
41753
41754    new_path=`$WHICH "$new_path" 2> /dev/null`
41755    # bat and cmd files are not always considered executable in MSYS causing which
41756    # to not find them
41757    if test "x$new_path" = x \
41758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41760      new_path="$path"
41761
41762  windows_path="$new_path"
41763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41764    unix_path=`$CYGPATH -u "$windows_path"`
41765    new_path="$unix_path"
41766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41768    new_path="$unix_path"
41769  fi
41770
41771    fi
41772
41773    if test "x$new_path" = x; then
41774      # It's still not found. Now this is an unrecoverable error.
41775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41776$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41777      has_space=`$ECHO "$complete" | $GREP " "`
41778      if test "x$has_space" != x; then
41779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41781      fi
41782      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41783    fi
41784  fi
41785
41786  # Now new_path has a complete unix path to the binary
41787  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41788    # Keep paths in /bin as-is, but remove trailing .exe if any
41789    new_path="${new_path/%.exe/}"
41790    # Do not save /bin paths to all_fixpath_prefixes!
41791  else
41792    # Not in mixed or Windows style, start by that.
41793    new_path=`cmd //c echo $new_path`
41794
41795  input_path="$new_path"
41796  # Check if we need to convert this using DOS-style short mode. If the path
41797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41798  # take no chances and rewrite it.
41799  # Note: m4 eats our [], so we need to use [ and ] instead.
41800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41801  if test "x$has_forbidden_chars" != x; then
41802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41804  fi
41805
41806    # Output is in $new_path
41807
41808  windows_path="$new_path"
41809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41810    unix_path=`$CYGPATH -u "$windows_path"`
41811    new_path="$unix_path"
41812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41814    new_path="$unix_path"
41815  fi
41816
41817    # remove trailing .exe if any
41818    new_path="${new_path/%.exe/}"
41819
41820    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41821    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41822  fi
41823
41824    else
41825      # We're on a unix platform. Hooray! :)
41826      # First separate the path from the arguments. This will split at the first
41827      # space.
41828      complete="$OBJDUMP"
41829      path="${complete%% *}"
41830      tmp="$complete EOL"
41831      arguments="${tmp#* }"
41832
41833      # Cannot rely on the command "which" here since it doesn't always work.
41834      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41835      if test -z "$is_absolute_path"; then
41836        # Path to executable is not absolute. Find it.
41837        IFS_save="$IFS"
41838        IFS=:
41839        for p in $PATH; do
41840          if test -f "$p/$path" && test -x "$p/$path"; then
41841            new_path="$p/$path"
41842            break
41843          fi
41844        done
41845        IFS="$IFS_save"
41846      else
41847        # This is an absolute path, we can use it without further modifications.
41848        new_path="$path"
41849      fi
41850
41851      if test "x$new_path" = x; then
41852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41853$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41854        has_space=`$ECHO "$complete" | $GREP " "`
41855        if test "x$has_space" != x; then
41856          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41857$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41858        fi
41859        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41860      fi
41861    fi
41862
41863    # Now join together the path and the arguments once again
41864    if test "x$arguments" != xEOL; then
41865      new_complete="$new_path ${arguments% *}"
41866    else
41867      new_complete="$new_path"
41868    fi
41869
41870    if test "x$complete" != "x$new_complete"; then
41871      OBJDUMP="$new_complete"
41872      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
41873$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
41874    fi
41875  fi
41876
41877  fi
41878
41879
41880  # Restore old path.
41881  PATH="$OLD_PATH"
41882
41883  # Restore the flags to the user specified values.
41884  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
41885  CFLAGS="$ORG_CFLAGS"
41886  CXXFLAGS="$ORG_CXXFLAGS"
41887
41888
41889# Finally do some processing after the detection phase
41890
41891  if test "x$COMPILE_TYPE" = "xcross"; then
41892    # Now we need to find a C/C++ compiler that can build executables for the
41893    # build platform. We can't use the AC_PROG_CC macro, since it can only be
41894    # used once. Also, we need to do this without adding a tools dir to the
41895    # path, otherwise we might pick up cross-compilers which don't use standard
41896    # naming.
41897
41898    OLDPATH="$PATH"
41899
41900
41901# Check whether --with-build-devkit was given.
41902if test "${with_build_devkit+set}" = set; then :
41903  withval=$with_build_devkit;
41904fi
41905
41906    if test "x$with_build_devkit" = "xyes"; then
41907      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
41908    elif test -n "$with_build_devkit"; then
41909      if test ! -d "$with_build_devkit"; then
41910        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
41911      else
41912
41913  # Only process if variable expands to non-empty
41914
41915  if test "x$with_build_devkit" != x; then
41916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41917
41918  # Input might be given as Windows format, start by converting to
41919  # unix format.
41920  path="$with_build_devkit"
41921  new_path=`$CYGPATH -u "$path"`
41922
41923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41926  # "foo.exe" is OK but "foo" is an error.
41927  #
41928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41929  # It is also a way to make sure we got the proper file name for the real test later on.
41930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41931  if test "x$test_shortpath" = x; then
41932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
41933$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
41934    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
41935  fi
41936
41937  # Call helper function which possibly converts this using DOS-style short mode.
41938  # If so, the updated path is stored in $new_path.
41939
41940  input_path="$new_path"
41941  # Check if we need to convert this using DOS-style short mode. If the path
41942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41943  # take no chances and rewrite it.
41944  # Note: m4 eats our [], so we need to use [ and ] instead.
41945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41946  if test "x$has_forbidden_chars" != x; then
41947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41951      # Going to short mode and back again did indeed matter. Since short mode is
41952      # case insensitive, let's make it lowercase to improve readability.
41953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41954      # Now convert it back to Unix-style (cygpath)
41955      input_path=`$CYGPATH -u "$shortmode_path"`
41956      new_path="$input_path"
41957    fi
41958  fi
41959
41960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41961  if test "x$test_cygdrive_prefix" = x; then
41962    # As a simple fix, exclude /usr/bin since it's not a real path.
41963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41965      # a path prefixed by /cygdrive for fixpath to work.
41966      new_path="$CYGWIN_ROOT_PATH$input_path"
41967    fi
41968  fi
41969
41970
41971  if test "x$path" != "x$new_path"; then
41972    with_build_devkit="$new_path"
41973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
41974$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
41975  fi
41976
41977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41978
41979  path="$with_build_devkit"
41980  has_colon=`$ECHO $path | $GREP ^.:`
41981  new_path="$path"
41982  if test "x$has_colon" = x; then
41983    # Not in mixed or Windows style, start by that.
41984    new_path=`cmd //c echo $path`
41985  fi
41986
41987
41988  input_path="$new_path"
41989  # Check if we need to convert this using DOS-style short mode. If the path
41990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41991  # take no chances and rewrite it.
41992  # Note: m4 eats our [], so we need to use [ and ] instead.
41993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41994  if test "x$has_forbidden_chars" != x; then
41995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41997  fi
41998
41999
42000  windows_path="$new_path"
42001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42002    unix_path=`$CYGPATH -u "$windows_path"`
42003    new_path="$unix_path"
42004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42006    new_path="$unix_path"
42007  fi
42008
42009  if test "x$path" != "x$new_path"; then
42010    with_build_devkit="$new_path"
42011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42012$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42013  fi
42014
42015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42017
42018    else
42019      # We're on a unix platform. Hooray! :)
42020      path="$with_build_devkit"
42021      has_space=`$ECHO "$path" | $GREP " "`
42022      if test "x$has_space" != x; then
42023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42024$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42025        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42026      fi
42027
42028      # Use eval to expand a potential ~
42029      eval path="$path"
42030      if test ! -f "$path" && test ! -d "$path"; then
42031        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42032      fi
42033
42034      with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42035    fi
42036  fi
42037
42038        BUILD_DEVKIT_ROOT="$with_build_devkit"
42039        # Check for a meta data info file in the root of the devkit
42040        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42041          # Process devkit.info so that existing devkit variables are not
42042          # modified by this
42043          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42044              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42045              -e "s/\$host/\$build/g" \
42046              $BUILD_DEVKIT_ROOT/devkit.info \
42047              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42048          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42049          # This potentially sets the following:
42050          # A descriptive name of the devkit
42051
42052  if test "x$BUILD_DEVKIT_NAME" = x; then
42053    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42054  fi
42055
42056          # Corresponds to --with-extra-path
42057
42058  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42059    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42060  fi
42061
42062          # Corresponds to --with-toolchain-path
42063
42064  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42065    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42066  fi
42067
42068          # Corresponds to --with-sysroot
42069
42070  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42071    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42072  fi
42073
42074          # Skip the Window specific parts
42075        fi
42076
42077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42078$as_echo_n "checking for build platform devkit... " >&6; }
42079        if test "x$BUILD_DEVKIT_NAME" != x; then
42080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42081$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42082        else
42083          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42084$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42085        fi
42086
42087        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42088
42089  if test "x$BUILD_SYSROOT" != "x"; then
42090    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42091      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42092        # Solaris Studio does not have a concept of sysroot. Instead we must
42093        # make sure the default include and lib dirs are appended to each
42094        # compile and link command line.
42095        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42096        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42097            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42098            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42099      fi
42100    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42101      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42102      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42103    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42104      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42105      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42106    fi
42107    # Propagate the sysroot args to hotspot
42108    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42109    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42110    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42111    # The global CFLAGS and LDFLAGS variables need these for configure to function
42112    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42113    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42114    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42115    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42116  fi
42117
42118  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42119    # We also need -iframework<path>/System/Library/Frameworks
42120    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42121    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42122    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42123    # set this here so it doesn't have to be peppered throughout the forest
42124    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42125    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42126  fi
42127
42128
42129
42130
42131
42132         # Fallback default of just /bin if DEVKIT_PATH is not defined
42133        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42134          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42135        fi
42136        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42137      fi
42138    fi
42139
42140    # FIXME: we should list the discovered compilers as an exclude pattern!
42141    # If we do that, we can do this detection before POST_DETECTION, and still
42142    # find the build compilers in the tools dir, if needed.
42143
42144
42145
42146  # Publish this variable in the help.
42147
42148
42149  if [ -z "${BUILD_CC+x}" ]; then
42150    # The variable is not set by user, try to locate tool using the code snippet
42151    for ac_prog in cl cc gcc
42152do
42153  # Extract the first word of "$ac_prog", so it can be a program name with args.
42154set dummy $ac_prog; ac_word=$2
42155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42156$as_echo_n "checking for $ac_word... " >&6; }
42157if ${ac_cv_path_BUILD_CC+:} false; then :
42158  $as_echo_n "(cached) " >&6
42159else
42160  case $BUILD_CC in
42161  [\\/]* | ?:[\\/]*)
42162  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42163  ;;
42164  *)
42165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42166for as_dir in $PATH
42167do
42168  IFS=$as_save_IFS
42169  test -z "$as_dir" && as_dir=.
42170    for ac_exec_ext in '' $ac_executable_extensions; do
42171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42172    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42174    break 2
42175  fi
42176done
42177  done
42178IFS=$as_save_IFS
42179
42180  ;;
42181esac
42182fi
42183BUILD_CC=$ac_cv_path_BUILD_CC
42184if test -n "$BUILD_CC"; then
42185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42186$as_echo "$BUILD_CC" >&6; }
42187else
42188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42189$as_echo "no" >&6; }
42190fi
42191
42192
42193  test -n "$BUILD_CC" && break
42194done
42195
42196  else
42197    # The variable is set, but is it from the command line or the environment?
42198
42199    # Try to remove the string !BUILD_CC! from our list.
42200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42201    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42202      # If it failed, the variable was not from the command line. Ignore it,
42203      # but warn the user (except for BASH, which is always set by the calling BASH).
42204      if test "xBUILD_CC" != xBASH; then
42205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42206$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42207      fi
42208      # Try to locate tool using the code snippet
42209      for ac_prog in cl cc gcc
42210do
42211  # Extract the first word of "$ac_prog", so it can be a program name with args.
42212set dummy $ac_prog; ac_word=$2
42213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42214$as_echo_n "checking for $ac_word... " >&6; }
42215if ${ac_cv_path_BUILD_CC+:} false; then :
42216  $as_echo_n "(cached) " >&6
42217else
42218  case $BUILD_CC in
42219  [\\/]* | ?:[\\/]*)
42220  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42221  ;;
42222  *)
42223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42224for as_dir in $PATH
42225do
42226  IFS=$as_save_IFS
42227  test -z "$as_dir" && as_dir=.
42228    for ac_exec_ext in '' $ac_executable_extensions; do
42229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42230    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42232    break 2
42233  fi
42234done
42235  done
42236IFS=$as_save_IFS
42237
42238  ;;
42239esac
42240fi
42241BUILD_CC=$ac_cv_path_BUILD_CC
42242if test -n "$BUILD_CC"; then
42243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42244$as_echo "$BUILD_CC" >&6; }
42245else
42246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42247$as_echo "no" >&6; }
42248fi
42249
42250
42251  test -n "$BUILD_CC" && break
42252done
42253
42254    else
42255      # If it succeeded, then it was overridden by the user. We will use it
42256      # for the tool.
42257
42258      # First remove it from the list of overridden variables, so we can test
42259      # for unknown variables in the end.
42260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42261
42262      # Check if we try to supply an empty value
42263      if test "x$BUILD_CC" = x; then
42264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42265$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42267$as_echo_n "checking for BUILD_CC... " >&6; }
42268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42269$as_echo "disabled" >&6; }
42270      else
42271        # Check if the provided tool contains a complete path.
42272        tool_specified="$BUILD_CC"
42273        tool_basename="${tool_specified##*/}"
42274        if test "x$tool_basename" = "x$tool_specified"; then
42275          # A command without a complete path is provided, search $PATH.
42276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42277$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42278          # Extract the first word of "$tool_basename", so it can be a program name with args.
42279set dummy $tool_basename; ac_word=$2
42280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42281$as_echo_n "checking for $ac_word... " >&6; }
42282if ${ac_cv_path_BUILD_CC+:} false; then :
42283  $as_echo_n "(cached) " >&6
42284else
42285  case $BUILD_CC in
42286  [\\/]* | ?:[\\/]*)
42287  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42288  ;;
42289  *)
42290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42291for as_dir in $PATH
42292do
42293  IFS=$as_save_IFS
42294  test -z "$as_dir" && as_dir=.
42295    for ac_exec_ext in '' $ac_executable_extensions; do
42296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42297    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42299    break 2
42300  fi
42301done
42302  done
42303IFS=$as_save_IFS
42304
42305  ;;
42306esac
42307fi
42308BUILD_CC=$ac_cv_path_BUILD_CC
42309if test -n "$BUILD_CC"; then
42310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42311$as_echo "$BUILD_CC" >&6; }
42312else
42313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42314$as_echo "no" >&6; }
42315fi
42316
42317
42318          if test "x$BUILD_CC" = x; then
42319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42320          fi
42321        else
42322          # Otherwise we believe it is a complete path. Use it as it is.
42323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42324$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42326$as_echo_n "checking for BUILD_CC... " >&6; }
42327          if test ! -x "$tool_specified"; then
42328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42329$as_echo "not found" >&6; }
42330            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42331          fi
42332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42333$as_echo "$tool_specified" >&6; }
42334        fi
42335      fi
42336    fi
42337
42338  fi
42339
42340
42341
42342  if test "x$BUILD_CC" = x; then
42343    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42344  fi
42345
42346
42347
42348  # Only process if variable expands to non-empty
42349
42350  if test "x$BUILD_CC" != x; then
42351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42352
42353  # First separate the path from the arguments. This will split at the first
42354  # space.
42355  complete="$BUILD_CC"
42356  path="${complete%% *}"
42357  tmp="$complete EOL"
42358  arguments="${tmp#* }"
42359
42360  # Input might be given as Windows format, start by converting to
42361  # unix format.
42362  new_path=`$CYGPATH -u "$path"`
42363
42364  # Now try to locate executable using which
42365  new_path=`$WHICH "$new_path" 2> /dev/null`
42366  # bat and cmd files are not always considered executable in cygwin causing which
42367  # to not find them
42368  if test "x$new_path" = x \
42369      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42370      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42371    new_path=`$CYGPATH -u "$path"`
42372  fi
42373  if test "x$new_path" = x; then
42374    # Oops. Which didn't find the executable.
42375    # The splitting of arguments from the executable at a space might have been incorrect,
42376    # since paths with space are more likely in Windows. Give it another try with the whole
42377    # argument.
42378    path="$complete"
42379    arguments="EOL"
42380    new_path=`$CYGPATH -u "$path"`
42381    new_path=`$WHICH "$new_path" 2> /dev/null`
42382    # bat and cmd files are not always considered executable in cygwin causing which
42383    # to not find them
42384    if test "x$new_path" = x \
42385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42387      new_path=`$CYGPATH -u "$path"`
42388    fi
42389    if test "x$new_path" = x; then
42390      # It's still not found. Now this is an unrecoverable error.
42391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42392$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42393      has_space=`$ECHO "$complete" | $GREP " "`
42394      if test "x$has_space" != x; then
42395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42397      fi
42398      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42399    fi
42400  fi
42401
42402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42405  # "foo.exe" is OK but "foo" is an error.
42406  #
42407  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42408  # It is also a way to make sure we got the proper file name for the real test later on.
42409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42410  if test "x$test_shortpath" = x; then
42411    # Short path failed, file does not exist as specified.
42412    # Try adding .exe or .cmd
42413    if test -f "${new_path}.exe"; then
42414      input_to_shortpath="${new_path}.exe"
42415    elif test -f "${new_path}.cmd"; then
42416      input_to_shortpath="${new_path}.cmd"
42417    else
42418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42419$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42422      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42423    fi
42424  else
42425    input_to_shortpath="$new_path"
42426  fi
42427
42428  # Call helper function which possibly converts this using DOS-style short mode.
42429  # If so, the updated path is stored in $new_path.
42430  new_path="$input_to_shortpath"
42431
42432  input_path="$input_to_shortpath"
42433  # Check if we need to convert this using DOS-style short mode. If the path
42434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42435  # take no chances and rewrite it.
42436  # Note: m4 eats our [], so we need to use [ and ] instead.
42437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42438  if test "x$has_forbidden_chars" != x; then
42439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42443      # Going to short mode and back again did indeed matter. Since short mode is
42444      # case insensitive, let's make it lowercase to improve readability.
42445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42446      # Now convert it back to Unix-style (cygpath)
42447      input_path=`$CYGPATH -u "$shortmode_path"`
42448      new_path="$input_path"
42449    fi
42450  fi
42451
42452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42453  if test "x$test_cygdrive_prefix" = x; then
42454    # As a simple fix, exclude /usr/bin since it's not a real path.
42455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42457      # a path prefixed by /cygdrive for fixpath to work.
42458      new_path="$CYGWIN_ROOT_PATH$input_path"
42459    fi
42460  fi
42461
42462  # remove trailing .exe if any
42463  new_path="${new_path/%.exe/}"
42464
42465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42466
42467  # First separate the path from the arguments. This will split at the first
42468  # space.
42469  complete="$BUILD_CC"
42470  path="${complete%% *}"
42471  tmp="$complete EOL"
42472  arguments="${tmp#* }"
42473
42474  # Input might be given as Windows format, start by converting to
42475  # unix format.
42476  new_path="$path"
42477
42478  windows_path="$new_path"
42479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42480    unix_path=`$CYGPATH -u "$windows_path"`
42481    new_path="$unix_path"
42482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42484    new_path="$unix_path"
42485  fi
42486
42487
42488  # Now try to locate executable using which
42489  new_path=`$WHICH "$new_path" 2> /dev/null`
42490
42491  if test "x$new_path" = x; then
42492    # Oops. Which didn't find the executable.
42493    # The splitting of arguments from the executable at a space might have been incorrect,
42494    # since paths with space are more likely in Windows. Give it another try with the whole
42495    # argument.
42496    path="$complete"
42497    arguments="EOL"
42498    new_path="$path"
42499
42500  windows_path="$new_path"
42501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42502    unix_path=`$CYGPATH -u "$windows_path"`
42503    new_path="$unix_path"
42504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42506    new_path="$unix_path"
42507  fi
42508
42509
42510    new_path=`$WHICH "$new_path" 2> /dev/null`
42511    # bat and cmd files are not always considered executable in MSYS causing which
42512    # to not find them
42513    if test "x$new_path" = x \
42514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42516      new_path="$path"
42517
42518  windows_path="$new_path"
42519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42520    unix_path=`$CYGPATH -u "$windows_path"`
42521    new_path="$unix_path"
42522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42524    new_path="$unix_path"
42525  fi
42526
42527    fi
42528
42529    if test "x$new_path" = x; then
42530      # It's still not found. Now this is an unrecoverable error.
42531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42532$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42533      has_space=`$ECHO "$complete" | $GREP " "`
42534      if test "x$has_space" != x; then
42535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42537      fi
42538      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42539    fi
42540  fi
42541
42542  # Now new_path has a complete unix path to the binary
42543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42544    # Keep paths in /bin as-is, but remove trailing .exe if any
42545    new_path="${new_path/%.exe/}"
42546    # Do not save /bin paths to all_fixpath_prefixes!
42547  else
42548    # Not in mixed or Windows style, start by that.
42549    new_path=`cmd //c echo $new_path`
42550
42551  input_path="$new_path"
42552  # Check if we need to convert this using DOS-style short mode. If the path
42553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42554  # take no chances and rewrite it.
42555  # Note: m4 eats our [], so we need to use [ and ] instead.
42556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42557  if test "x$has_forbidden_chars" != x; then
42558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42560  fi
42561
42562    # Output is in $new_path
42563
42564  windows_path="$new_path"
42565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42566    unix_path=`$CYGPATH -u "$windows_path"`
42567    new_path="$unix_path"
42568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42570    new_path="$unix_path"
42571  fi
42572
42573    # remove trailing .exe if any
42574    new_path="${new_path/%.exe/}"
42575
42576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42578  fi
42579
42580    else
42581      # We're on a unix platform. Hooray! :)
42582      # First separate the path from the arguments. This will split at the first
42583      # space.
42584      complete="$BUILD_CC"
42585      path="${complete%% *}"
42586      tmp="$complete EOL"
42587      arguments="${tmp#* }"
42588
42589      # Cannot rely on the command "which" here since it doesn't always work.
42590      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42591      if test -z "$is_absolute_path"; then
42592        # Path to executable is not absolute. Find it.
42593        IFS_save="$IFS"
42594        IFS=:
42595        for p in $PATH; do
42596          if test -f "$p/$path" && test -x "$p/$path"; then
42597            new_path="$p/$path"
42598            break
42599          fi
42600        done
42601        IFS="$IFS_save"
42602      else
42603        # This is an absolute path, we can use it without further modifications.
42604        new_path="$path"
42605      fi
42606
42607      if test "x$new_path" = x; then
42608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42609$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42610        has_space=`$ECHO "$complete" | $GREP " "`
42611        if test "x$has_space" != x; then
42612          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42614        fi
42615        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42616      fi
42617    fi
42618
42619    # Now join together the path and the arguments once again
42620    if test "x$arguments" != xEOL; then
42621      new_complete="$new_path ${arguments% *}"
42622    else
42623      new_complete="$new_path"
42624    fi
42625
42626    if test "x$complete" != "x$new_complete"; then
42627      BUILD_CC="$new_complete"
42628      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42629$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42630    fi
42631  fi
42632
42633
42634
42635
42636  # Publish this variable in the help.
42637
42638
42639  if [ -z "${BUILD_CXX+x}" ]; then
42640    # The variable is not set by user, try to locate tool using the code snippet
42641    for ac_prog in cl CC g++
42642do
42643  # Extract the first word of "$ac_prog", so it can be a program name with args.
42644set dummy $ac_prog; ac_word=$2
42645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42646$as_echo_n "checking for $ac_word... " >&6; }
42647if ${ac_cv_path_BUILD_CXX+:} false; then :
42648  $as_echo_n "(cached) " >&6
42649else
42650  case $BUILD_CXX in
42651  [\\/]* | ?:[\\/]*)
42652  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42653  ;;
42654  *)
42655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42656for as_dir in $PATH
42657do
42658  IFS=$as_save_IFS
42659  test -z "$as_dir" && as_dir=.
42660    for ac_exec_ext in '' $ac_executable_extensions; do
42661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42662    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42664    break 2
42665  fi
42666done
42667  done
42668IFS=$as_save_IFS
42669
42670  ;;
42671esac
42672fi
42673BUILD_CXX=$ac_cv_path_BUILD_CXX
42674if test -n "$BUILD_CXX"; then
42675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42676$as_echo "$BUILD_CXX" >&6; }
42677else
42678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42679$as_echo "no" >&6; }
42680fi
42681
42682
42683  test -n "$BUILD_CXX" && break
42684done
42685
42686  else
42687    # The variable is set, but is it from the command line or the environment?
42688
42689    # Try to remove the string !BUILD_CXX! from our list.
42690    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
42691    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42692      # If it failed, the variable was not from the command line. Ignore it,
42693      # but warn the user (except for BASH, which is always set by the calling BASH).
42694      if test "xBUILD_CXX" != xBASH; then
42695        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
42696$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
42697      fi
42698      # Try to locate tool using the code snippet
42699      for ac_prog in cl CC g++
42700do
42701  # Extract the first word of "$ac_prog", so it can be a program name with args.
42702set dummy $ac_prog; ac_word=$2
42703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42704$as_echo_n "checking for $ac_word... " >&6; }
42705if ${ac_cv_path_BUILD_CXX+:} false; then :
42706  $as_echo_n "(cached) " >&6
42707else
42708  case $BUILD_CXX in
42709  [\\/]* | ?:[\\/]*)
42710  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42711  ;;
42712  *)
42713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42714for as_dir in $PATH
42715do
42716  IFS=$as_save_IFS
42717  test -z "$as_dir" && as_dir=.
42718    for ac_exec_ext in '' $ac_executable_extensions; do
42719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42720    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42722    break 2
42723  fi
42724done
42725  done
42726IFS=$as_save_IFS
42727
42728  ;;
42729esac
42730fi
42731BUILD_CXX=$ac_cv_path_BUILD_CXX
42732if test -n "$BUILD_CXX"; then
42733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42734$as_echo "$BUILD_CXX" >&6; }
42735else
42736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42737$as_echo "no" >&6; }
42738fi
42739
42740
42741  test -n "$BUILD_CXX" && break
42742done
42743
42744    else
42745      # If it succeeded, then it was overridden by the user. We will use it
42746      # for the tool.
42747
42748      # First remove it from the list of overridden variables, so we can test
42749      # for unknown variables in the end.
42750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42751
42752      # Check if we try to supply an empty value
42753      if test "x$BUILD_CXX" = x; then
42754        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
42755$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
42756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42757$as_echo_n "checking for BUILD_CXX... " >&6; }
42758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42759$as_echo "disabled" >&6; }
42760      else
42761        # Check if the provided tool contains a complete path.
42762        tool_specified="$BUILD_CXX"
42763        tool_basename="${tool_specified##*/}"
42764        if test "x$tool_basename" = "x$tool_specified"; then
42765          # A command without a complete path is provided, search $PATH.
42766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
42767$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
42768          # Extract the first word of "$tool_basename", so it can be a program name with args.
42769set dummy $tool_basename; ac_word=$2
42770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42771$as_echo_n "checking for $ac_word... " >&6; }
42772if ${ac_cv_path_BUILD_CXX+:} false; then :
42773  $as_echo_n "(cached) " >&6
42774else
42775  case $BUILD_CXX in
42776  [\\/]* | ?:[\\/]*)
42777  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42778  ;;
42779  *)
42780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42781for as_dir in $PATH
42782do
42783  IFS=$as_save_IFS
42784  test -z "$as_dir" && as_dir=.
42785    for ac_exec_ext in '' $ac_executable_extensions; do
42786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42787    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42789    break 2
42790  fi
42791done
42792  done
42793IFS=$as_save_IFS
42794
42795  ;;
42796esac
42797fi
42798BUILD_CXX=$ac_cv_path_BUILD_CXX
42799if test -n "$BUILD_CXX"; then
42800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42801$as_echo "$BUILD_CXX" >&6; }
42802else
42803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42804$as_echo "no" >&6; }
42805fi
42806
42807
42808          if test "x$BUILD_CXX" = x; then
42809            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42810          fi
42811        else
42812          # Otherwise we believe it is a complete path. Use it as it is.
42813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
42814$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
42815          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42816$as_echo_n "checking for BUILD_CXX... " >&6; }
42817          if test ! -x "$tool_specified"; then
42818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42819$as_echo "not found" >&6; }
42820            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
42821          fi
42822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42823$as_echo "$tool_specified" >&6; }
42824        fi
42825      fi
42826    fi
42827
42828  fi
42829
42830
42831
42832  if test "x$BUILD_CXX" = x; then
42833    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
42834  fi
42835
42836
42837
42838  # Only process if variable expands to non-empty
42839
42840  if test "x$BUILD_CXX" != x; then
42841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42842
42843  # First separate the path from the arguments. This will split at the first
42844  # space.
42845  complete="$BUILD_CXX"
42846  path="${complete%% *}"
42847  tmp="$complete EOL"
42848  arguments="${tmp#* }"
42849
42850  # Input might be given as Windows format, start by converting to
42851  # unix format.
42852  new_path=`$CYGPATH -u "$path"`
42853
42854  # Now try to locate executable using which
42855  new_path=`$WHICH "$new_path" 2> /dev/null`
42856  # bat and cmd files are not always considered executable in cygwin causing which
42857  # to not find them
42858  if test "x$new_path" = x \
42859      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42860      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42861    new_path=`$CYGPATH -u "$path"`
42862  fi
42863  if test "x$new_path" = x; then
42864    # Oops. Which didn't find the executable.
42865    # The splitting of arguments from the executable at a space might have been incorrect,
42866    # since paths with space are more likely in Windows. Give it another try with the whole
42867    # argument.
42868    path="$complete"
42869    arguments="EOL"
42870    new_path=`$CYGPATH -u "$path"`
42871    new_path=`$WHICH "$new_path" 2> /dev/null`
42872    # bat and cmd files are not always considered executable in cygwin causing which
42873    # to not find them
42874    if test "x$new_path" = x \
42875        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42876        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42877      new_path=`$CYGPATH -u "$path"`
42878    fi
42879    if test "x$new_path" = x; then
42880      # It's still not found. Now this is an unrecoverable error.
42881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42882$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42883      has_space=`$ECHO "$complete" | $GREP " "`
42884      if test "x$has_space" != x; then
42885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42887      fi
42888      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42889    fi
42890  fi
42891
42892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42895  # "foo.exe" is OK but "foo" is an error.
42896  #
42897  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42898  # It is also a way to make sure we got the proper file name for the real test later on.
42899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42900  if test "x$test_shortpath" = x; then
42901    # Short path failed, file does not exist as specified.
42902    # Try adding .exe or .cmd
42903    if test -f "${new_path}.exe"; then
42904      input_to_shortpath="${new_path}.exe"
42905    elif test -f "${new_path}.cmd"; then
42906      input_to_shortpath="${new_path}.cmd"
42907    else
42908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
42909$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
42910      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42911$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42912      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42913    fi
42914  else
42915    input_to_shortpath="$new_path"
42916  fi
42917
42918  # Call helper function which possibly converts this using DOS-style short mode.
42919  # If so, the updated path is stored in $new_path.
42920  new_path="$input_to_shortpath"
42921
42922  input_path="$input_to_shortpath"
42923  # Check if we need to convert this using DOS-style short mode. If the path
42924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42925  # take no chances and rewrite it.
42926  # Note: m4 eats our [], so we need to use [ and ] instead.
42927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42928  if test "x$has_forbidden_chars" != x; then
42929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42933      # Going to short mode and back again did indeed matter. Since short mode is
42934      # case insensitive, let's make it lowercase to improve readability.
42935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42936      # Now convert it back to Unix-style (cygpath)
42937      input_path=`$CYGPATH -u "$shortmode_path"`
42938      new_path="$input_path"
42939    fi
42940  fi
42941
42942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42943  if test "x$test_cygdrive_prefix" = x; then
42944    # As a simple fix, exclude /usr/bin since it's not a real path.
42945    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42947      # a path prefixed by /cygdrive for fixpath to work.
42948      new_path="$CYGWIN_ROOT_PATH$input_path"
42949    fi
42950  fi
42951
42952  # remove trailing .exe if any
42953  new_path="${new_path/%.exe/}"
42954
42955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42956
42957  # First separate the path from the arguments. This will split at the first
42958  # space.
42959  complete="$BUILD_CXX"
42960  path="${complete%% *}"
42961  tmp="$complete EOL"
42962  arguments="${tmp#* }"
42963
42964  # Input might be given as Windows format, start by converting to
42965  # unix format.
42966  new_path="$path"
42967
42968  windows_path="$new_path"
42969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42970    unix_path=`$CYGPATH -u "$windows_path"`
42971    new_path="$unix_path"
42972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42974    new_path="$unix_path"
42975  fi
42976
42977
42978  # Now try to locate executable using which
42979  new_path=`$WHICH "$new_path" 2> /dev/null`
42980
42981  if test "x$new_path" = x; then
42982    # Oops. Which didn't find the executable.
42983    # The splitting of arguments from the executable at a space might have been incorrect,
42984    # since paths with space are more likely in Windows. Give it another try with the whole
42985    # argument.
42986    path="$complete"
42987    arguments="EOL"
42988    new_path="$path"
42989
42990  windows_path="$new_path"
42991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42992    unix_path=`$CYGPATH -u "$windows_path"`
42993    new_path="$unix_path"
42994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42996    new_path="$unix_path"
42997  fi
42998
42999
43000    new_path=`$WHICH "$new_path" 2> /dev/null`
43001    # bat and cmd files are not always considered executable in MSYS causing which
43002    # to not find them
43003    if test "x$new_path" = x \
43004        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43005        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43006      new_path="$path"
43007
43008  windows_path="$new_path"
43009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43010    unix_path=`$CYGPATH -u "$windows_path"`
43011    new_path="$unix_path"
43012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43014    new_path="$unix_path"
43015  fi
43016
43017    fi
43018
43019    if test "x$new_path" = x; then
43020      # It's still not found. Now this is an unrecoverable error.
43021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43022$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43023      has_space=`$ECHO "$complete" | $GREP " "`
43024      if test "x$has_space" != x; then
43025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43027      fi
43028      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43029    fi
43030  fi
43031
43032  # Now new_path has a complete unix path to the binary
43033  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43034    # Keep paths in /bin as-is, but remove trailing .exe if any
43035    new_path="${new_path/%.exe/}"
43036    # Do not save /bin paths to all_fixpath_prefixes!
43037  else
43038    # Not in mixed or Windows style, start by that.
43039    new_path=`cmd //c echo $new_path`
43040
43041  input_path="$new_path"
43042  # Check if we need to convert this using DOS-style short mode. If the path
43043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43044  # take no chances and rewrite it.
43045  # Note: m4 eats our [], so we need to use [ and ] instead.
43046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43047  if test "x$has_forbidden_chars" != x; then
43048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43050  fi
43051
43052    # Output is in $new_path
43053
43054  windows_path="$new_path"
43055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43056    unix_path=`$CYGPATH -u "$windows_path"`
43057    new_path="$unix_path"
43058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43060    new_path="$unix_path"
43061  fi
43062
43063    # remove trailing .exe if any
43064    new_path="${new_path/%.exe/}"
43065
43066    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43067    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43068  fi
43069
43070    else
43071      # We're on a unix platform. Hooray! :)
43072      # First separate the path from the arguments. This will split at the first
43073      # space.
43074      complete="$BUILD_CXX"
43075      path="${complete%% *}"
43076      tmp="$complete EOL"
43077      arguments="${tmp#* }"
43078
43079      # Cannot rely on the command "which" here since it doesn't always work.
43080      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43081      if test -z "$is_absolute_path"; then
43082        # Path to executable is not absolute. Find it.
43083        IFS_save="$IFS"
43084        IFS=:
43085        for p in $PATH; do
43086          if test -f "$p/$path" && test -x "$p/$path"; then
43087            new_path="$p/$path"
43088            break
43089          fi
43090        done
43091        IFS="$IFS_save"
43092      else
43093        # This is an absolute path, we can use it without further modifications.
43094        new_path="$path"
43095      fi
43096
43097      if test "x$new_path" = x; then
43098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43099$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43100        has_space=`$ECHO "$complete" | $GREP " "`
43101        if test "x$has_space" != x; then
43102          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43103$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43104        fi
43105        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43106      fi
43107    fi
43108
43109    # Now join together the path and the arguments once again
43110    if test "x$arguments" != xEOL; then
43111      new_complete="$new_path ${arguments% *}"
43112    else
43113      new_complete="$new_path"
43114    fi
43115
43116    if test "x$complete" != "x$new_complete"; then
43117      BUILD_CXX="$new_complete"
43118      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43119$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43120    fi
43121  fi
43122
43123    BUILD_LD="$BUILD_CC"
43124
43125    PATH="$OLDPATH"
43126  else
43127    # If we are not cross compiling, use the normal target compilers for
43128    # building the build platform executables.
43129    BUILD_CC="$CC"
43130    BUILD_CXX="$CXX"
43131    BUILD_LD="$LD"
43132    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
43133    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
43134  fi
43135
43136
43137
43138
43139
43140
43141
43142
43143  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43144    # For hotspot, we need these in Windows mixed path,
43145    # so rewrite them all. Need added .exe suffix.
43146    HOTSPOT_CXX="$CXX.exe"
43147    HOTSPOT_LD="$LD.exe"
43148    HOTSPOT_MT="$MT.exe"
43149    HOTSPOT_RC="$RC.exe"
43150
43151  unix_path="$HOTSPOT_CXX"
43152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43153    windows_path=`$CYGPATH -m "$unix_path"`
43154    HOTSPOT_CXX="$windows_path"
43155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43156    windows_path=`cmd //c echo $unix_path`
43157    HOTSPOT_CXX="$windows_path"
43158  fi
43159
43160
43161  unix_path="$HOTSPOT_LD"
43162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43163    windows_path=`$CYGPATH -m "$unix_path"`
43164    HOTSPOT_LD="$windows_path"
43165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43166    windows_path=`cmd //c echo $unix_path`
43167    HOTSPOT_LD="$windows_path"
43168  fi
43169
43170
43171  unix_path="$HOTSPOT_MT"
43172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43173    windows_path=`$CYGPATH -m "$unix_path"`
43174    HOTSPOT_MT="$windows_path"
43175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43176    windows_path=`cmd //c echo $unix_path`
43177    HOTSPOT_MT="$windows_path"
43178  fi
43179
43180
43181  unix_path="$HOTSPOT_RC"
43182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43183    windows_path=`$CYGPATH -m "$unix_path"`
43184    HOTSPOT_RC="$windows_path"
43185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43186    windows_path=`cmd //c echo $unix_path`
43187    HOTSPOT_RC="$windows_path"
43188  fi
43189
43190
43191
43192  else
43193    HOTSPOT_CXX="$CXX"
43194    HOTSPOT_LD="$LD"
43195  fi
43196
43197
43198
43199  if test  "x$TOOLCHAIN_TYPE" = xclang; then
43200    USE_CLANG=true
43201  fi
43202
43203
43204
43205
43206
43207  # The package path is used only on macosx?
43208  # FIXME: clean this up, and/or move it elsewhere.
43209  PACKAGE_PATH=/opt/local
43210
43211
43212  # Check for extra potential brokenness.
43213  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43214    # On Windows, double-check that we got the right compiler.
43215    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
43216    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
43217    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
43218      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
43219        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
43220      fi
43221    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
43222      if test "x$COMPILER_CPU_TEST" != "xx64"; then
43223        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
43224      fi
43225    fi
43226  fi
43227
43228  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43229    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43230    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
43231    # This is later checked when setting flags.
43232
43233    # "-Og" suppported for GCC 4.8 and later
43234    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
43235
43236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
43237$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
43238  supports=yes
43239
43240  saved_cflags="$CFLAGS"
43241  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
43242  ac_ext=c
43243ac_cpp='$CPP $CPPFLAGS'
43244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43246ac_compiler_gnu=$ac_cv_c_compiler_gnu
43247
43248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43249/* end confdefs.h.  */
43250int i;
43251_ACEOF
43252if ac_fn_c_try_compile "$LINENO"; then :
43253
43254else
43255  supports=no
43256fi
43257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43258  ac_ext=cpp
43259ac_cpp='$CXXCPP $CPPFLAGS'
43260ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43261ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43262ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43263
43264  CFLAGS="$saved_cflags"
43265
43266  saved_cxxflags="$CXXFLAGS"
43267  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
43268  ac_ext=cpp
43269ac_cpp='$CXXCPP $CPPFLAGS'
43270ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43271ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43272ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43273
43274  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43275/* end confdefs.h.  */
43276int i;
43277_ACEOF
43278if ac_fn_cxx_try_compile "$LINENO"; then :
43279
43280else
43281  supports=no
43282fi
43283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43284  ac_ext=cpp
43285ac_cpp='$CXXCPP $CPPFLAGS'
43286ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43287ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43288ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43289
43290  CXXFLAGS="$saved_cxxflags"
43291
43292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43293$as_echo "$supports" >&6; }
43294  if test "x$supports" = "xyes" ; then
43295    HAS_CFLAG_OPTIMIZE_DEBUG=true
43296  else
43297    HAS_CFLAG_OPTIMIZE_DEBUG=false
43298  fi
43299
43300
43301    # "-z relro" supported in GNU binutils 2.17 and later
43302    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
43303
43304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
43305$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
43306  supports=yes
43307
43308  saved_ldflags="$LDFLAGS"
43309  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
43310  ac_ext=c
43311ac_cpp='$CPP $CPPFLAGS'
43312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43314ac_compiler_gnu=$ac_cv_c_compiler_gnu
43315
43316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43317/* end confdefs.h.  */
43318
43319int
43320main ()
43321{
43322
43323  ;
43324  return 0;
43325}
43326_ACEOF
43327if ac_fn_c_try_link "$LINENO"; then :
43328
43329else
43330  supports=no
43331fi
43332rm -f core conftest.err conftest.$ac_objext \
43333    conftest$ac_exeext conftest.$ac_ext
43334  ac_ext=cpp
43335ac_cpp='$CXXCPP $CPPFLAGS'
43336ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43337ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43338ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43339
43340  LDFLAGS="$saved_ldflags"
43341
43342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43343$as_echo "$supports" >&6; }
43344  if test "x$supports" = "xyes" ; then
43345    HAS_LINKER_RELRO=true
43346  else
43347    HAS_LINKER_RELRO=false
43348  fi
43349
43350
43351    # "-z now" supported in GNU binutils 2.11 and later
43352    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
43353
43354  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
43355$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
43356  supports=yes
43357
43358  saved_ldflags="$LDFLAGS"
43359  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
43360  ac_ext=c
43361ac_cpp='$CPP $CPPFLAGS'
43362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43364ac_compiler_gnu=$ac_cv_c_compiler_gnu
43365
43366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43367/* end confdefs.h.  */
43368
43369int
43370main ()
43371{
43372
43373  ;
43374  return 0;
43375}
43376_ACEOF
43377if ac_fn_c_try_link "$LINENO"; then :
43378
43379else
43380  supports=no
43381fi
43382rm -f core conftest.err conftest.$ac_objext \
43383    conftest$ac_exeext conftest.$ac_ext
43384  ac_ext=cpp
43385ac_cpp='$CXXCPP $CPPFLAGS'
43386ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43387ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43388ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43389
43390  LDFLAGS="$saved_ldflags"
43391
43392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43393$as_echo "$supports" >&6; }
43394  if test "x$supports" = "xyes" ; then
43395    HAS_LINKER_NOW=true
43396  else
43397    HAS_LINKER_NOW=false
43398  fi
43399
43400  fi
43401
43402  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
43403  # in executable.'
43404  USING_BROKEN_SUSE_LD=no
43405  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
43406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
43407$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
43408    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
43409    $ECHO "int main() { }" > main.c
43410    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
43411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43412$as_echo "no" >&6; }
43413      USING_BROKEN_SUSE_LD=no
43414    else
43415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43416$as_echo "yes" >&6; }
43417      USING_BROKEN_SUSE_LD=yes
43418    fi
43419    rm -rf version-script.map main.c a.out
43420  fi
43421
43422
43423
43424# Setup the JTReg Regression Test Harness.
43425
43426
43427# Check whether --with-jtreg was given.
43428if test "${with_jtreg+set}" = set; then :
43429  withval=$with_jtreg;
43430else
43431  with_jtreg=no
43432fi
43433
43434
43435  if test "x$with_jtreg" = xno; then
43436    # jtreg disabled
43437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43438$as_echo_n "checking for jtreg... " >&6; }
43439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43440$as_echo "no" >&6; }
43441  else
43442    if test "x$with_jtreg" != xyes; then
43443      # with path specified.
43444      JT_HOME="$with_jtreg"
43445    fi
43446
43447    if test "x$JT_HOME" != x; then
43448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43449$as_echo_n "checking for jtreg... " >&6; }
43450
43451      # use JT_HOME enviroment var.
43452
43453  # Only process if variable expands to non-empty
43454
43455  if test "x$JT_HOME" != x; then
43456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43457
43458  # Input might be given as Windows format, start by converting to
43459  # unix format.
43460  path="$JT_HOME"
43461  new_path=`$CYGPATH -u "$path"`
43462
43463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43466  # "foo.exe" is OK but "foo" is an error.
43467  #
43468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43469  # It is also a way to make sure we got the proper file name for the real test later on.
43470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43471  if test "x$test_shortpath" = x; then
43472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43473$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43474    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
43475  fi
43476
43477  # Call helper function which possibly converts this using DOS-style short mode.
43478  # If so, the updated path is stored in $new_path.
43479
43480  input_path="$new_path"
43481  # Check if we need to convert this using DOS-style short mode. If the path
43482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43483  # take no chances and rewrite it.
43484  # Note: m4 eats our [], so we need to use [ and ] instead.
43485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43486  if test "x$has_forbidden_chars" != x; then
43487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43491      # Going to short mode and back again did indeed matter. Since short mode is
43492      # case insensitive, let's make it lowercase to improve readability.
43493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43494      # Now convert it back to Unix-style (cygpath)
43495      input_path=`$CYGPATH -u "$shortmode_path"`
43496      new_path="$input_path"
43497    fi
43498  fi
43499
43500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43501  if test "x$test_cygdrive_prefix" = x; then
43502    # As a simple fix, exclude /usr/bin since it's not a real path.
43503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43505      # a path prefixed by /cygdrive for fixpath to work.
43506      new_path="$CYGWIN_ROOT_PATH$input_path"
43507    fi
43508  fi
43509
43510
43511  if test "x$path" != "x$new_path"; then
43512    JT_HOME="$new_path"
43513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43514$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43515  fi
43516
43517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43518
43519  path="$JT_HOME"
43520  has_colon=`$ECHO $path | $GREP ^.:`
43521  new_path="$path"
43522  if test "x$has_colon" = x; then
43523    # Not in mixed or Windows style, start by that.
43524    new_path=`cmd //c echo $path`
43525  fi
43526
43527
43528  input_path="$new_path"
43529  # Check if we need to convert this using DOS-style short mode. If the path
43530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43531  # take no chances and rewrite it.
43532  # Note: m4 eats our [], so we need to use [ and ] instead.
43533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43534  if test "x$has_forbidden_chars" != x; then
43535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43537  fi
43538
43539
43540  windows_path="$new_path"
43541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43542    unix_path=`$CYGPATH -u "$windows_path"`
43543    new_path="$unix_path"
43544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43546    new_path="$unix_path"
43547  fi
43548
43549  if test "x$path" != "x$new_path"; then
43550    JT_HOME="$new_path"
43551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43552$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43553  fi
43554
43555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43557
43558    else
43559      # We're on a unix platform. Hooray! :)
43560      path="$JT_HOME"
43561      has_space=`$ECHO "$path" | $GREP " "`
43562      if test "x$has_space" != x; then
43563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43564$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43565        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43566      fi
43567
43568      # Use eval to expand a potential ~
43569      eval path="$path"
43570      if test ! -f "$path" && test ! -d "$path"; then
43571        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
43572      fi
43573
43574      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
43575    fi
43576  fi
43577
43578
43579      # jtreg win32 script works for everybody
43580      JTREGEXE="$JT_HOME/bin/jtreg"
43581
43582      if test ! -f "$JTREGEXE"; then
43583        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
43584      fi
43585
43586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43587$as_echo "$JTREGEXE" >&6; }
43588    else
43589      # try to find jtreg on path
43590
43591
43592
43593  # Publish this variable in the help.
43594
43595
43596  if [ -z "${JTREGEXE+x}" ]; then
43597    # The variable is not set by user, try to locate tool using the code snippet
43598    for ac_prog in jtreg
43599do
43600  # Extract the first word of "$ac_prog", so it can be a program name with args.
43601set dummy $ac_prog; ac_word=$2
43602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43603$as_echo_n "checking for $ac_word... " >&6; }
43604if ${ac_cv_path_JTREGEXE+:} false; then :
43605  $as_echo_n "(cached) " >&6
43606else
43607  case $JTREGEXE in
43608  [\\/]* | ?:[\\/]*)
43609  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43610  ;;
43611  *)
43612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43613for as_dir in $PATH
43614do
43615  IFS=$as_save_IFS
43616  test -z "$as_dir" && as_dir=.
43617    for ac_exec_ext in '' $ac_executable_extensions; do
43618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43619    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43621    break 2
43622  fi
43623done
43624  done
43625IFS=$as_save_IFS
43626
43627  ;;
43628esac
43629fi
43630JTREGEXE=$ac_cv_path_JTREGEXE
43631if test -n "$JTREGEXE"; then
43632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43633$as_echo "$JTREGEXE" >&6; }
43634else
43635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43636$as_echo "no" >&6; }
43637fi
43638
43639
43640  test -n "$JTREGEXE" && break
43641done
43642
43643  else
43644    # The variable is set, but is it from the command line or the environment?
43645
43646    # Try to remove the string !JTREGEXE! from our list.
43647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
43648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43649      # If it failed, the variable was not from the command line. Ignore it,
43650      # but warn the user (except for BASH, which is always set by the calling BASH).
43651      if test "xJTREGEXE" != xBASH; then
43652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
43653$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
43654      fi
43655      # Try to locate tool using the code snippet
43656      for ac_prog in jtreg
43657do
43658  # Extract the first word of "$ac_prog", so it can be a program name with args.
43659set dummy $ac_prog; ac_word=$2
43660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43661$as_echo_n "checking for $ac_word... " >&6; }
43662if ${ac_cv_path_JTREGEXE+:} false; then :
43663  $as_echo_n "(cached) " >&6
43664else
43665  case $JTREGEXE in
43666  [\\/]* | ?:[\\/]*)
43667  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43668  ;;
43669  *)
43670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43671for as_dir in $PATH
43672do
43673  IFS=$as_save_IFS
43674  test -z "$as_dir" && as_dir=.
43675    for ac_exec_ext in '' $ac_executable_extensions; do
43676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43677    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43679    break 2
43680  fi
43681done
43682  done
43683IFS=$as_save_IFS
43684
43685  ;;
43686esac
43687fi
43688JTREGEXE=$ac_cv_path_JTREGEXE
43689if test -n "$JTREGEXE"; then
43690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43691$as_echo "$JTREGEXE" >&6; }
43692else
43693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43694$as_echo "no" >&6; }
43695fi
43696
43697
43698  test -n "$JTREGEXE" && break
43699done
43700
43701    else
43702      # If it succeeded, then it was overridden by the user. We will use it
43703      # for the tool.
43704
43705      # First remove it from the list of overridden variables, so we can test
43706      # for unknown variables in the end.
43707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43708
43709      # Check if we try to supply an empty value
43710      if test "x$JTREGEXE" = x; then
43711        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
43712$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
43713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43714$as_echo_n "checking for JTREGEXE... " >&6; }
43715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43716$as_echo "disabled" >&6; }
43717      else
43718        # Check if the provided tool contains a complete path.
43719        tool_specified="$JTREGEXE"
43720        tool_basename="${tool_specified##*/}"
43721        if test "x$tool_basename" = "x$tool_specified"; then
43722          # A command without a complete path is provided, search $PATH.
43723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
43724$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
43725          # Extract the first word of "$tool_basename", so it can be a program name with args.
43726set dummy $tool_basename; ac_word=$2
43727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43728$as_echo_n "checking for $ac_word... " >&6; }
43729if ${ac_cv_path_JTREGEXE+:} false; then :
43730  $as_echo_n "(cached) " >&6
43731else
43732  case $JTREGEXE in
43733  [\\/]* | ?:[\\/]*)
43734  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43735  ;;
43736  *)
43737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43738for as_dir in $PATH
43739do
43740  IFS=$as_save_IFS
43741  test -z "$as_dir" && as_dir=.
43742    for ac_exec_ext in '' $ac_executable_extensions; do
43743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43744    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43746    break 2
43747  fi
43748done
43749  done
43750IFS=$as_save_IFS
43751
43752  ;;
43753esac
43754fi
43755JTREGEXE=$ac_cv_path_JTREGEXE
43756if test -n "$JTREGEXE"; then
43757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43758$as_echo "$JTREGEXE" >&6; }
43759else
43760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43761$as_echo "no" >&6; }
43762fi
43763
43764
43765          if test "x$JTREGEXE" = x; then
43766            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43767          fi
43768        else
43769          # Otherwise we believe it is a complete path. Use it as it is.
43770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
43771$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
43772          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43773$as_echo_n "checking for JTREGEXE... " >&6; }
43774          if test ! -x "$tool_specified"; then
43775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43776$as_echo "not found" >&6; }
43777            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
43778          fi
43779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43780$as_echo "$tool_specified" >&6; }
43781        fi
43782      fi
43783    fi
43784
43785  fi
43786
43787
43788
43789  if test "x$JTREGEXE" = x; then
43790    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
43791  fi
43792
43793
43794      JT_HOME="`$DIRNAME $JTREGEXE`"
43795    fi
43796  fi
43797
43798
43799
43800
43801
43802
43803  # Option used to tell the compiler whether to create 32- or 64-bit executables
43804  if test "x$TOOLCHAIN_TYPE" = xxlc; then
43805    COMPILER_TARGET_BITS_FLAG="-q"
43806  else
43807    COMPILER_TARGET_BITS_FLAG="-m"
43808  fi
43809
43810
43811  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
43812  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43813    ARFLAGS="-r"
43814  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43815    ARFLAGS="-X64"
43816  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
43817    # lib.exe is used as AR to create static libraries.
43818    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
43819  else
43820    ARFLAGS=""
43821  fi
43822
43823
43824  ## Setup strip.
43825  # FIXME: should this really be per platform, or should it be per toolchain type?
43826  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
43827  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
43828  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43829    STRIPFLAGS="-g"
43830  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
43831    STRIPFLAGS="-x"
43832  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
43833    STRIPFLAGS="-S"
43834  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43835    STRIPFLAGS="-X32_64"
43836  fi
43837
43838
43839
43840  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43841    CC_OUT_OPTION=-Fo
43842    EXE_OUT_OPTION=-out:
43843    LD_OUT_OPTION=-out:
43844    AR_OUT_OPTION=-out:
43845  else
43846    # The option used to specify the target .o,.a or .so file.
43847    # When compiling, how to specify the to be created object file.
43848    CC_OUT_OPTION='-o$(SPACE)'
43849    # When linking, how to specify the to be created executable.
43850    EXE_OUT_OPTION='-o$(SPACE)'
43851    # When linking, how to specify the to be created dynamically linkable library.
43852    LD_OUT_OPTION='-o$(SPACE)'
43853    # When archiving, how to specify the to be create static archive for object files.
43854    AR_OUT_OPTION='rcs$(SPACE)'
43855  fi
43856
43857
43858
43859
43860
43861  # On Windows, we need to set RC flags.
43862  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43863    RC_FLAGS="-nologo -l0x409"
43864    if test "x$VARIANT" = xOPT; then
43865      RC_FLAGS="$RC_FLAGS -DNDEBUG"
43866    fi
43867
43868    # The version variables used to create RC_FLAGS may be overridden
43869    # in a custom configure script, or possibly the command line.
43870    # Let those variables be expanded at make time in spec.gmk.
43871    # The \$ are escaped to the shell, and the $(...) variables
43872    # are evaluated by make.
43873    RC_FLAGS="$RC_FLAGS \
43874        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
43875        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
43876        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
43877        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
43878        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
43879        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
43880        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
43881  fi
43882
43883
43884  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43885    # silence copyright notice and other headers.
43886    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
43887  fi
43888
43889
43890# FIXME: Currently we must test this after toolchain but before flags. Fix!
43891
43892# Now we can test some aspects on the target using configure macros.
43893
43894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
43895$as_echo_n "checking for ANSI C header files... " >&6; }
43896if ${ac_cv_header_stdc+:} false; then :
43897  $as_echo_n "(cached) " >&6
43898else
43899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43900/* end confdefs.h.  */
43901#include <stdlib.h>
43902#include <stdarg.h>
43903#include <string.h>
43904#include <float.h>
43905
43906int
43907main ()
43908{
43909
43910  ;
43911  return 0;
43912}
43913_ACEOF
43914if ac_fn_cxx_try_compile "$LINENO"; then :
43915  ac_cv_header_stdc=yes
43916else
43917  ac_cv_header_stdc=no
43918fi
43919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43920
43921if test $ac_cv_header_stdc = yes; then
43922  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
43923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43924/* end confdefs.h.  */
43925#include <string.h>
43926
43927_ACEOF
43928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43929  $EGREP "memchr" >/dev/null 2>&1; then :
43930
43931else
43932  ac_cv_header_stdc=no
43933fi
43934rm -f conftest*
43935
43936fi
43937
43938if test $ac_cv_header_stdc = yes; then
43939  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
43940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43941/* end confdefs.h.  */
43942#include <stdlib.h>
43943
43944_ACEOF
43945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43946  $EGREP "free" >/dev/null 2>&1; then :
43947
43948else
43949  ac_cv_header_stdc=no
43950fi
43951rm -f conftest*
43952
43953fi
43954
43955if test $ac_cv_header_stdc = yes; then
43956  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
43957  if test "$cross_compiling" = yes; then :
43958  :
43959else
43960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43961/* end confdefs.h.  */
43962#include <ctype.h>
43963#include <stdlib.h>
43964#if ((' ' & 0x0FF) == 0x020)
43965# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
43966# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
43967#else
43968# define ISLOWER(c) \
43969		   (('a' <= (c) && (c) <= 'i') \
43970		     || ('j' <= (c) && (c) <= 'r') \
43971		     || ('s' <= (c) && (c) <= 'z'))
43972# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
43973#endif
43974
43975#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
43976int
43977main ()
43978{
43979  int i;
43980  for (i = 0; i < 256; i++)
43981    if (XOR (islower (i), ISLOWER (i))
43982	|| toupper (i) != TOUPPER (i))
43983      return 2;
43984  return 0;
43985}
43986_ACEOF
43987if ac_fn_cxx_try_run "$LINENO"; then :
43988
43989else
43990  ac_cv_header_stdc=no
43991fi
43992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43993  conftest.$ac_objext conftest.beam conftest.$ac_ext
43994fi
43995
43996fi
43997fi
43998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
43999$as_echo "$ac_cv_header_stdc" >&6; }
44000if test $ac_cv_header_stdc = yes; then
44001
44002$as_echo "#define STDC_HEADERS 1" >>confdefs.h
44003
44004fi
44005
44006# On IRIX 5.3, sys/types and inttypes.h are conflicting.
44007for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
44008		  inttypes.h stdint.h unistd.h
44009do :
44010  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44011ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
44012"
44013if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44014  cat >>confdefs.h <<_ACEOF
44015#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44016_ACEOF
44017
44018fi
44019
44020done
44021
44022
44023
44024  ###############################################################################
44025  #
44026  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
44027  # (The JVM can use 32 or 64 bit Java pointers but that decision
44028  # is made at runtime.)
44029  #
44030
44031  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
44032    # Always specify -m flag on Solaris
44033    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
44034
44035  # When we add flags to the "official" CFLAGS etc, we need to
44036  # keep track of these additions in ADDED_CFLAGS etc. These
44037  # will later be checked to make sure only controlled additions
44038  # have been made to CFLAGS etc.
44039  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44040  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44041  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44042
44043  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44044  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44045  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44046
44047  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44048  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44049  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44050
44051  elif test "x$COMPILE_TYPE" = xreduced; then
44052    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
44053      # Specify -m if running reduced on unix platforms
44054
44055  # When we add flags to the "official" CFLAGS etc, we need to
44056  # keep track of these additions in ADDED_CFLAGS etc. These
44057  # will later be checked to make sure only controlled additions
44058  # have been made to CFLAGS etc.
44059  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44060  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44061  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44062
44063  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44064  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44065  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44066
44067  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44068  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44069  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44070
44071    fi
44072  fi
44073
44074  # Make compilation sanity check
44075  for ac_header in stdio.h
44076do :
44077  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
44078if test "x$ac_cv_header_stdio_h" = xyes; then :
44079  cat >>confdefs.h <<_ACEOF
44080#define HAVE_STDIO_H 1
44081_ACEOF
44082
44083else
44084
44085    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
44086$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
44087    if test "x$COMPILE_TYPE" = xreduced; then
44088
44089  # Print a helpful message on how to acquire the necessary build dependency.
44090  # reduced is the help tag: freetype, cups, alsa etc
44091  MISSING_DEPENDENCY=reduced
44092
44093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44094    cygwin_help $MISSING_DEPENDENCY
44095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44096    msys_help $MISSING_DEPENDENCY
44097  else
44098    PKGHANDLER_COMMAND=
44099
44100    case $PKGHANDLER in
44101      apt-get)
44102        apt_help     $MISSING_DEPENDENCY ;;
44103      yum)
44104        yum_help     $MISSING_DEPENDENCY ;;
44105      port)
44106        port_help    $MISSING_DEPENDENCY ;;
44107      pkgutil)
44108        pkgutil_help $MISSING_DEPENDENCY ;;
44109      pkgadd)
44110        pkgadd_help  $MISSING_DEPENDENCY ;;
44111    esac
44112
44113    if test "x$PKGHANDLER_COMMAND" != x; then
44114      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44115    fi
44116  fi
44117
44118      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44119$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44120    elif test "x$COMPILE_TYPE" = xcross; then
44121      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44122$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44123    fi
44124    as_fn_error $? "Cannot continue." "$LINENO" 5
44125
44126fi
44127
44128done
44129
44130
44131  # The cast to long int works around a bug in the HP C Compiler
44132# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44133# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44134# This bug is HP SR number 8606223364.
44135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44136$as_echo_n "checking size of int *... " >&6; }
44137if ${ac_cv_sizeof_int_p+:} false; then :
44138  $as_echo_n "(cached) " >&6
44139else
44140  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44141
44142else
44143  if test "$ac_cv_type_int_p" = yes; then
44144     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44146as_fn_error 77 "cannot compute sizeof (int *)
44147See \`config.log' for more details" "$LINENO" 5; }
44148   else
44149     ac_cv_sizeof_int_p=0
44150   fi
44151fi
44152
44153fi
44154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44155$as_echo "$ac_cv_sizeof_int_p" >&6; }
44156
44157
44158
44159cat >>confdefs.h <<_ACEOF
44160#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44161_ACEOF
44162
44163
44164
44165  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
44166  if test "x$ac_cv_sizeof_int_p" = x; then
44167    # The test failed, lets stick to the assumed value.
44168    { $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
44169$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
44170  else
44171    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44172
44173    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44174      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
44175      # Let's try to implicitely set the compilers target architecture and retry the test
44176      { $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
44177$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;}
44178      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
44179$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
44180
44181  # When we add flags to the "official" CFLAGS etc, we need to
44182  # keep track of these additions in ADDED_CFLAGS etc. These
44183  # will later be checked to make sure only controlled additions
44184  # have been made to CFLAGS etc.
44185  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44186  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44187  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44188
44189  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44190  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44191  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44192
44193  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44194  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44195  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44196
44197
44198      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
44199      unset ac_cv_sizeof_int_p
44200      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
44201      cat >>confdefs.h <<_ACEOF
44202#undef SIZEOF_INT_P
44203_ACEOF
44204
44205      # The cast to long int works around a bug in the HP C Compiler
44206# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44207# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44208# This bug is HP SR number 8606223364.
44209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44210$as_echo_n "checking size of int *... " >&6; }
44211if ${ac_cv_sizeof_int_p+:} false; then :
44212  $as_echo_n "(cached) " >&6
44213else
44214  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44215
44216else
44217  if test "$ac_cv_type_int_p" = yes; then
44218     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44220as_fn_error 77 "cannot compute sizeof (int *)
44221See \`config.log' for more details" "$LINENO" 5; }
44222   else
44223     ac_cv_sizeof_int_p=0
44224   fi
44225fi
44226
44227fi
44228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44229$as_echo "$ac_cv_sizeof_int_p" >&6; }
44230
44231
44232
44233cat >>confdefs.h <<_ACEOF
44234#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44235_ACEOF
44236
44237
44238
44239      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44240
44241      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44242        { $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
44243$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;}
44244        if test "x$COMPILE_TYPE" = xreduced; then
44245
44246  # Print a helpful message on how to acquire the necessary build dependency.
44247  # reduced is the help tag: freetype, cups, alsa etc
44248  MISSING_DEPENDENCY=reduced
44249
44250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44251    cygwin_help $MISSING_DEPENDENCY
44252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44253    msys_help $MISSING_DEPENDENCY
44254  else
44255    PKGHANDLER_COMMAND=
44256
44257    case $PKGHANDLER in
44258      apt-get)
44259        apt_help     $MISSING_DEPENDENCY ;;
44260      yum)
44261        yum_help     $MISSING_DEPENDENCY ;;
44262      port)
44263        port_help    $MISSING_DEPENDENCY ;;
44264      pkgutil)
44265        pkgutil_help $MISSING_DEPENDENCY ;;
44266      pkgadd)
44267        pkgadd_help  $MISSING_DEPENDENCY ;;
44268    esac
44269
44270    if test "x$PKGHANDLER_COMMAND" != x; then
44271      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44272    fi
44273  fi
44274
44275          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44276$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44277        elif test "x$COMPILE_TYPE" = xcross; then
44278          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44279$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44280        fi
44281        as_fn_error $? "Cannot continue." "$LINENO" 5
44282      fi
44283    fi
44284  fi
44285
44286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
44287$as_echo_n "checking for target address size... " >&6; }
44288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
44289$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
44290
44291
44292  ###############################################################################
44293  #
44294  # Is the target little of big endian?
44295  #
44296   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
44297$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
44298if ${ac_cv_c_bigendian+:} false; then :
44299  $as_echo_n "(cached) " >&6
44300else
44301  ac_cv_c_bigendian=unknown
44302    # See if we're dealing with a universal compiler.
44303    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44304/* end confdefs.h.  */
44305#ifndef __APPLE_CC__
44306	       not a universal capable compiler
44307	     #endif
44308	     typedef int dummy;
44309
44310_ACEOF
44311if ac_fn_cxx_try_compile "$LINENO"; then :
44312
44313	# Check for potential -arch flags.  It is not universal unless
44314	# there are at least two -arch flags with different values.
44315	ac_arch=
44316	ac_prev=
44317	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
44318	 if test -n "$ac_prev"; then
44319	   case $ac_word in
44320	     i?86 | x86_64 | ppc | ppc64)
44321	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
44322		 ac_arch=$ac_word
44323	       else
44324		 ac_cv_c_bigendian=universal
44325		 break
44326	       fi
44327	       ;;
44328	   esac
44329	   ac_prev=
44330	 elif test "x$ac_word" = "x-arch"; then
44331	   ac_prev=arch
44332	 fi
44333       done
44334fi
44335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44336    if test $ac_cv_c_bigendian = unknown; then
44337      # See if sys/param.h defines the BYTE_ORDER macro.
44338      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44339/* end confdefs.h.  */
44340#include <sys/types.h>
44341	     #include <sys/param.h>
44342
44343int
44344main ()
44345{
44346#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
44347		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
44348		     && LITTLE_ENDIAN)
44349	      bogus endian macros
44350	     #endif
44351
44352  ;
44353  return 0;
44354}
44355_ACEOF
44356if ac_fn_cxx_try_compile "$LINENO"; then :
44357  # It does; now see whether it defined to BIG_ENDIAN or not.
44358	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44359/* end confdefs.h.  */
44360#include <sys/types.h>
44361		#include <sys/param.h>
44362
44363int
44364main ()
44365{
44366#if BYTE_ORDER != BIG_ENDIAN
44367		 not big endian
44368		#endif
44369
44370  ;
44371  return 0;
44372}
44373_ACEOF
44374if ac_fn_cxx_try_compile "$LINENO"; then :
44375  ac_cv_c_bigendian=yes
44376else
44377  ac_cv_c_bigendian=no
44378fi
44379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44380fi
44381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44382    fi
44383    if test $ac_cv_c_bigendian = unknown; then
44384      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
44385      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44386/* end confdefs.h.  */
44387#include <limits.h>
44388
44389int
44390main ()
44391{
44392#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
44393	      bogus endian macros
44394	     #endif
44395
44396  ;
44397  return 0;
44398}
44399_ACEOF
44400if ac_fn_cxx_try_compile "$LINENO"; then :
44401  # It does; now see whether it defined to _BIG_ENDIAN or not.
44402	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44403/* end confdefs.h.  */
44404#include <limits.h>
44405
44406int
44407main ()
44408{
44409#ifndef _BIG_ENDIAN
44410		 not big endian
44411		#endif
44412
44413  ;
44414  return 0;
44415}
44416_ACEOF
44417if ac_fn_cxx_try_compile "$LINENO"; then :
44418  ac_cv_c_bigendian=yes
44419else
44420  ac_cv_c_bigendian=no
44421fi
44422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44423fi
44424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44425    fi
44426    if test $ac_cv_c_bigendian = unknown; then
44427      # Compile a test program.
44428      if test "$cross_compiling" = yes; then :
44429  # Try to guess by grepping values from an object file.
44430	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44431/* end confdefs.h.  */
44432short int ascii_mm[] =
44433		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
44434		short int ascii_ii[] =
44435		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
44436		int use_ascii (int i) {
44437		  return ascii_mm[i] + ascii_ii[i];
44438		}
44439		short int ebcdic_ii[] =
44440		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
44441		short int ebcdic_mm[] =
44442		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
44443		int use_ebcdic (int i) {
44444		  return ebcdic_mm[i] + ebcdic_ii[i];
44445		}
44446		extern int foo;
44447
44448int
44449main ()
44450{
44451return use_ascii (foo) == use_ebcdic (foo);
44452  ;
44453  return 0;
44454}
44455_ACEOF
44456if ac_fn_cxx_try_compile "$LINENO"; then :
44457  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
44458	      ac_cv_c_bigendian=yes
44459	    fi
44460	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
44461	      if test "$ac_cv_c_bigendian" = unknown; then
44462		ac_cv_c_bigendian=no
44463	      else
44464		# finding both strings is unlikely to happen, but who knows?
44465		ac_cv_c_bigendian=unknown
44466	      fi
44467	    fi
44468fi
44469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44470else
44471  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44472/* end confdefs.h.  */
44473$ac_includes_default
44474int
44475main ()
44476{
44477
44478	     /* Are we little or big endian?  From Harbison&Steele.  */
44479	     union
44480	     {
44481	       long int l;
44482	       char c[sizeof (long int)];
44483	     } u;
44484	     u.l = 1;
44485	     return u.c[sizeof (long int) - 1] == 1;
44486
44487  ;
44488  return 0;
44489}
44490_ACEOF
44491if ac_fn_cxx_try_run "$LINENO"; then :
44492  ac_cv_c_bigendian=no
44493else
44494  ac_cv_c_bigendian=yes
44495fi
44496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44497  conftest.$ac_objext conftest.beam conftest.$ac_ext
44498fi
44499
44500    fi
44501fi
44502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
44503$as_echo "$ac_cv_c_bigendian" >&6; }
44504 case $ac_cv_c_bigendian in #(
44505   yes)
44506     ENDIAN="big";; #(
44507   no)
44508     ENDIAN="little" ;; #(
44509   universal)
44510     ENDIAN="universal_endianness"
44511     ;; #(
44512   *)
44513     ENDIAN="unknown" ;;
44514 esac
44515
44516
44517  if test "x$ENDIAN" = xuniversal_endianness; then
44518    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
44519  fi
44520  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
44521    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
44522  fi
44523
44524
44525# Configure flags for the tools
44526
44527  ###############################################################################
44528  #
44529  # How to compile shared libraries.
44530  #
44531
44532  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44533    PICFLAG="-fPIC"
44534    C_FLAG_REORDER=''
44535    CXX_FLAG_REORDER=''
44536
44537    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44538      # Linking is different on MacOSX
44539      if test "x$STATIC_BUILD" = xtrue; then
44540        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
44541      else
44542        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44543      fi
44544      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44545      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44546      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44547      SET_SHARED_LIBRARY_MAPFILE=''
44548    else
44549      # Default works for linux, might work on other platforms as well.
44550      SHARED_LIBRARY_FLAGS='-shared'
44551      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44552      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44553      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44554      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44555    fi
44556  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44557    PICFLAG=''
44558    C_FLAG_REORDER=''
44559    CXX_FLAG_REORDER=''
44560
44561    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44562      # Linking is different on MacOSX
44563      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44564      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44565      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44566      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44567      SET_SHARED_LIBRARY_MAPFILE=''
44568    else
44569      # Default works for linux, might work on other platforms as well.
44570      SHARED_LIBRARY_FLAGS='-shared'
44571      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44572      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44573      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44574      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44575    fi
44576  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44577    PICFLAG="-KPIC"
44578    C_FLAG_REORDER='-xF'
44579    CXX_FLAG_REORDER='-xF'
44580    SHARED_LIBRARY_FLAGS="-G"
44581    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
44582    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44583    SET_SHARED_LIBRARY_NAME=''
44584    SET_SHARED_LIBRARY_MAPFILE='-M$1'
44585  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44586    PICFLAG="-qpic=large"
44587    C_FLAG_REORDER=''
44588    CXX_FLAG_REORDER=''
44589    SHARED_LIBRARY_FLAGS="-qmkshrobj"
44590    SET_EXECUTABLE_ORIGIN=""
44591    SET_SHARED_LIBRARY_ORIGIN=''
44592    SET_SHARED_LIBRARY_NAME=''
44593    SET_SHARED_LIBRARY_MAPFILE=''
44594  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44595    PICFLAG=""
44596    C_FLAG_REORDER=''
44597    CXX_FLAG_REORDER=''
44598    SHARED_LIBRARY_FLAGS="-LD"
44599    SET_EXECUTABLE_ORIGIN=''
44600    SET_SHARED_LIBRARY_ORIGIN=''
44601    SET_SHARED_LIBRARY_NAME=''
44602    SET_SHARED_LIBRARY_MAPFILE=''
44603  fi
44604
44605
44606
44607
44608
44609
44610
44611
44612  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44613    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
44614    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
44615    CFLAGS_JDKLIB_EXTRA='-xstrconst'
44616  fi
44617  # The (cross) compiler is now configured, we can now test capabilities
44618  # of the target platform.
44619
44620
44621
44622  ###############################################################################
44623  #
44624  # Setup the opt flags for different compilers
44625  # and different operating systems.
44626  #
44627
44628  # FIXME: this was indirectly the old default, but just inherited.
44629  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44630  #   C_FLAG_DEPS="-MMD -MF"
44631  # fi
44632
44633  # Generate make dependency files
44634  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44635    C_FLAG_DEPS="-MMD -MF"
44636  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44637    C_FLAG_DEPS="-MMD -MF"
44638  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44639    C_FLAG_DEPS="-xMMD -xMF"
44640  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44641    C_FLAG_DEPS="-qmakedep=gcc -MF"
44642  fi
44643  CXX_FLAG_DEPS="$C_FLAG_DEPS"
44644
44645
44646
44647  # Debug symbols
44648  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44649    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
44650      # reduce from default "-g2" option to save space
44651      CFLAGS_DEBUG_SYMBOLS="-g1"
44652      CXXFLAGS_DEBUG_SYMBOLS="-g1"
44653    else
44654      CFLAGS_DEBUG_SYMBOLS="-g"
44655      CXXFLAGS_DEBUG_SYMBOLS="-g"
44656    fi
44657  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44658    CFLAGS_DEBUG_SYMBOLS="-g"
44659    CXXFLAGS_DEBUG_SYMBOLS="-g"
44660  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44661    CFLAGS_DEBUG_SYMBOLS="-g -xs"
44662    # FIXME: likely a bug, this disables debug symbols rather than enables them
44663    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
44664  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44665    CFLAGS_DEBUG_SYMBOLS="-g"
44666    CXXFLAGS_DEBUG_SYMBOLS="-g"
44667  fi
44668
44669
44670
44671  # bounds, memory and behavior checking options
44672  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44673    case $DEBUG_LEVEL in
44674    release )
44675      # no adjustment
44676      ;;
44677    fastdebug )
44678      # no adjustment
44679      ;;
44680    slowdebug )
44681      # Add runtime stack smashing and undefined behavior checks.
44682      # Not all versions of gcc support -fstack-protector
44683      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
44684
44685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
44686$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
44687  supports=yes
44688
44689  saved_cflags="$CFLAGS"
44690  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
44691  ac_ext=c
44692ac_cpp='$CPP $CPPFLAGS'
44693ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44694ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44695ac_compiler_gnu=$ac_cv_c_compiler_gnu
44696
44697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44698/* end confdefs.h.  */
44699int i;
44700_ACEOF
44701if ac_fn_c_try_compile "$LINENO"; then :
44702
44703else
44704  supports=no
44705fi
44706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44707  ac_ext=cpp
44708ac_cpp='$CXXCPP $CPPFLAGS'
44709ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44710ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44711ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44712
44713  CFLAGS="$saved_cflags"
44714
44715  saved_cxxflags="$CXXFLAGS"
44716  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
44717  ac_ext=cpp
44718ac_cpp='$CXXCPP $CPPFLAGS'
44719ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44720ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44721ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44722
44723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44724/* end confdefs.h.  */
44725int i;
44726_ACEOF
44727if ac_fn_cxx_try_compile "$LINENO"; then :
44728
44729else
44730  supports=no
44731fi
44732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44733  ac_ext=cpp
44734ac_cpp='$CXXCPP $CPPFLAGS'
44735ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44736ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44737ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44738
44739  CXXFLAGS="$saved_cxxflags"
44740
44741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44742$as_echo "$supports" >&6; }
44743  if test "x$supports" = "xyes" ; then
44744    :
44745  else
44746    STACK_PROTECTOR_CFLAG=""
44747  fi
44748
44749
44750      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44751      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44752      ;;
44753    esac
44754  fi
44755
44756  # Optimization levels
44757  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44758    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
44759
44760    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
44761      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
44762      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
44763      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
44764      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
44765      C_O_FLAG_DEBUG="-xregs=no%frameptr"
44766      C_O_FLAG_NONE="-xregs=no%frameptr"
44767      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
44768      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
44769      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
44770      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
44771      CXX_O_FLAG_NONE="-xregs=no%frameptr"
44772      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
44773        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
44774        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
44775      fi
44776    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44777      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
44778      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44779      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44780      C_O_FLAG_DEBUG=""
44781      C_O_FLAG_NONE=""
44782      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
44783      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44784      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44785      C_O_FLAG_DEBUG=""
44786      CXX_O_FLAG_NONE=""
44787    fi
44788  else
44789    # The remaining toolchains share opt flags between CC and CXX;
44790    # setup for C and duplicate afterwards.
44791    if test "x$TOOLCHAIN_TYPE" = xgcc; then
44792      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44793        # On MacOSX we optimize for size, something
44794        # we should do for all platforms?
44795        C_O_FLAG_HIGHEST="-Os"
44796        C_O_FLAG_HI="-Os"
44797        C_O_FLAG_NORM="-Os"
44798      else
44799        C_O_FLAG_HIGHEST="-O3"
44800        C_O_FLAG_HI="-O3"
44801        C_O_FLAG_NORM="-O2"
44802      fi
44803      C_O_FLAG_DEBUG="-O0"
44804      C_O_FLAG_NONE="-O0"
44805    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44806      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44807        # On MacOSX we optimize for size, something
44808        # we should do for all platforms?
44809        C_O_FLAG_HIGHEST="-Os"
44810        C_O_FLAG_HI="-Os"
44811        C_O_FLAG_NORM="-Os"
44812      else
44813        C_O_FLAG_HIGHEST="-O3"
44814        C_O_FLAG_HI="-O3"
44815        C_O_FLAG_NORM="-O2"
44816      fi
44817      C_O_FLAG_DEBUG="-O0"
44818      C_O_FLAG_NONE="-O0"
44819    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44820      C_O_FLAG_HIGHEST="-O3"
44821      C_O_FLAG_HI="-O3 -qstrict"
44822      C_O_FLAG_NORM="-O2"
44823      C_O_FLAG_DEBUG="-qnoopt"
44824      C_O_FLAG_NONE="-qnoop"
44825    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44826      C_O_FLAG_HIGHEST="-O2"
44827      C_O_FLAG_HI="-O1"
44828      C_O_FLAG_NORM="-O1"
44829      C_O_FLAG_DEBUG="-Od"
44830      C_O_FLAG_NONE="-Od"
44831    fi
44832    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
44833    CXX_O_FLAG_HI="$C_O_FLAG_HI"
44834    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
44835    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
44836    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
44837  fi
44838
44839  # Adjust optimization flags according to debug level.
44840  case $DEBUG_LEVEL in
44841    release )
44842      # no adjustment
44843      ;;
44844    fastdebug )
44845      # Not quite so much optimization
44846      C_O_FLAG_HI="$C_O_FLAG_NORM"
44847      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
44848      ;;
44849    slowdebug )
44850      # Disable optimization
44851      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
44852      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
44853      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
44854      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
44855      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
44856      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
44857      ;;
44858  esac
44859
44860
44861
44862
44863
44864
44865
44866
44867
44868
44869
44870
44871
44872  # Special extras...
44873  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44874    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44875      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44876      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44877    fi
44878    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44879    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44880  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44881    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44882    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44883  fi
44884
44885  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
44886  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
44887  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
44888
44889  ###############################################################################
44890  #
44891  # Now setup the CFLAGS and LDFLAGS for the JDK build.
44892  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
44893  #
44894
44895  # Setup compiler/platform specific flags into
44896  #    CFLAGS_JDK    - C Compiler flags
44897  #    CXXFLAGS_JDK  - C++ Compiler flags
44898  #    COMMON_CCXXFLAGS_JDK - common to C and C++
44899  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44900    if test "x$OPENJDK_TARGET_CPU" = xx86; then
44901      # Force compatibility with i586 on 32 bit intel platforms.
44902      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
44903    fi
44904    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
44905        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
44906    case $OPENJDK_TARGET_CPU_ARCH in
44907      arm )
44908        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44909        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44910        ;;
44911      ppc )
44912        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44913        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44914        ;;
44915      * )
44916        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
44917        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44918        ;;
44919    esac
44920  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44921    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
44922    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
44923      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
44924    fi
44925
44926    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
44927    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
44928  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44929    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44930    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44931  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44932    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
44933        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
44934        -DWIN32_LEAN_AND_MEAN \
44935        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
44936        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
44937        -DWIN32 -DIAL"
44938    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44939      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
44940    else
44941      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
44942    fi
44943    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
44944    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
44945    # studio.
44946    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
44947      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
44948          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
44949    fi
44950  fi
44951
44952  ###############################################################################
44953
44954  # Adjust flags according to debug level.
44955  case $DEBUG_LEVEL in
44956    fastdebug | slowdebug )
44957      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
44958      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
44959      JAVAC_FLAGS="$JAVAC_FLAGS -g"
44960      ;;
44961    release )
44962      ;;
44963    * )
44964      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
44965      ;;
44966  esac
44967
44968  # Setup LP64
44969  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
44970
44971  # Set some common defines. These works for all compilers, but assume
44972  # -D is universally accepted.
44973
44974  # Setup endianness
44975  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
44976    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
44977    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
44978    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
44979    #   Note: -Dmacro         is the same as    #define macro 1
44980    #         -Dmacro=        is the same as    #define macro
44981    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44982      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
44983    else
44984      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
44985    fi
44986  else
44987    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
44988    # are defined in the system?
44989    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44990      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
44991    else
44992      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
44993    fi
44994  fi
44995
44996  # Setup target OS define. Use OS target name but in upper case.
44997  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
44998  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
44999
45000  # Setup target CPU
45001  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
45002
45003  # Setup debug/release defines
45004  if test "x$DEBUG_LEVEL" = xrelease; then
45005    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
45006    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45007      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
45008    fi
45009  else
45010    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
45011  fi
45012
45013  # Setup release name
45014  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
45015
45016
45017  # Set some additional per-OS defines.
45018  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45019    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
45020  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45021    # FIXME: PPC64 should not be here.
45022    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
45023  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
45024    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
45025  fi
45026
45027  # Additional macosx handling
45028  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45029    # Setting these parameters makes it an error to link to macosx APIs that are
45030    # newer than the given OS version and makes the linked binaries compatible
45031    # even if built on a newer version of the OS.
45032    # The expected format is X.Y.Z
45033    MACOSX_VERSION_MIN=10.7.0
45034
45035
45036    # The macro takes the version with no dots, ex: 1070
45037    # Let the flags variables get resolved in make for easier override on make
45038    # command line.
45039    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
45040    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
45041  fi
45042
45043  # Setup some hard coded includes
45044  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
45045      -I${JDK_TOPDIR}/src/java.base/share/native/include \
45046      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
45047      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
45048      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
45049      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
45050
45051  # The shared libraries are compiled using the picflag.
45052  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
45053  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
45054
45055  # Executable flags
45056  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
45057  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
45058
45059
45060
45061
45062
45063
45064  # Flags for compiling test libraries
45065  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
45066  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
45067
45068  # Flags for compiling test executables
45069  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
45070  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
45071
45072
45073
45074
45075
45076
45077  # Setup LDFLAGS et al.
45078  #
45079
45080  # Now this is odd. The JDK native libraries have to link against libjvm.so
45081  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
45082  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
45083  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
45084  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
45085  # libraries will link to whatever is in memory. Yuck.
45086  #
45087  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
45088  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45089    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
45090    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
45091      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
45092    fi
45093    # TODO: make -debug optional "--disable-full-debug-symbols"
45094    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
45095  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
45096    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45097    # We have previously set HAS_GNU_HASH if this is the case
45098    if test -n "$HAS_GNU_HASH"; then
45099      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
45100    fi
45101    if test "x$OPENJDK_TARGET_OS" = xlinux; then
45102      # And since we now know that the linker is gnu, then add -z defs, to forbid
45103      # undefined symbols in object files.
45104      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
45105      case $DEBUG_LEVEL in
45106        release )
45107          # tell linker to optimize libraries.
45108          # Should this be supplied to the OSS linker as well?
45109          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
45110          ;;
45111        slowdebug )
45112          if test "x$HAS_LINKER_NOW" = "xtrue"; then
45113            # do relocations at load
45114            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
45115            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
45116          fi
45117          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
45118            # mark relocations read only
45119            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
45120            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
45121          fi
45122          ;;
45123        fastdebug )
45124          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
45125            # mark relocations read only
45126            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
45127            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
45128          fi
45129          ;;
45130        * )
45131          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
45132          ;;
45133        esac
45134    fi
45135  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45136    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
45137    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
45138  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45139    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
45140  fi
45141
45142  # Customize LDFLAGS for executables
45143
45144  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
45145
45146  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45147    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
45148      LDFLAGS_STACK_SIZE=1048576
45149    else
45150      LDFLAGS_STACK_SIZE=327680
45151    fi
45152    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
45153  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
45154    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
45155  fi
45156
45157  # Customize LDFLAGS for libs
45158  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
45159
45160  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45161    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
45162    JDKLIB_LIBS=""
45163  else
45164    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
45165        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
45166
45167    # On some platforms (mac) the linker warns about non existing -L dirs.
45168    # Add server first if available. Linking aginst client does not always produce the same results.
45169    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
45170    # Default to server for other variants.
45171    if test "x$JVM_VARIANT_SERVER" = xtrue; then
45172      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45173    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
45174      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
45175    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
45176      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
45177    else
45178      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45179    fi
45180
45181    JDKLIB_LIBS="-ljava -ljvm"
45182    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45183      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
45184    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45185      JDKLIB_LIBS="$JDKLIB_LIBS -liconv"
45186    fi
45187  fi
45188
45189
45190
45191
45192
45193
45194
45195  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
45196  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
45197
45198
45199
45200
45201
45202  # Some Zero and Shark settings.
45203  # ZERO_ARCHFLAG tells the compiler which mode to build for
45204  case "${OPENJDK_TARGET_CPU}" in
45205    s390)
45206      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
45207      ;;
45208    *)
45209      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45210  esac
45211
45212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
45213$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
45214  supports=yes
45215
45216  saved_cflags="$CFLAGS"
45217  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
45218  ac_ext=c
45219ac_cpp='$CPP $CPPFLAGS'
45220ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45221ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45222ac_compiler_gnu=$ac_cv_c_compiler_gnu
45223
45224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45225/* end confdefs.h.  */
45226int i;
45227_ACEOF
45228if ac_fn_c_try_compile "$LINENO"; then :
45229
45230else
45231  supports=no
45232fi
45233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45234  ac_ext=cpp
45235ac_cpp='$CXXCPP $CPPFLAGS'
45236ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45237ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45238ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45239
45240  CFLAGS="$saved_cflags"
45241
45242  saved_cxxflags="$CXXFLAGS"
45243  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
45244  ac_ext=cpp
45245ac_cpp='$CXXCPP $CPPFLAGS'
45246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45249
45250  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45251/* end confdefs.h.  */
45252int i;
45253_ACEOF
45254if ac_fn_cxx_try_compile "$LINENO"; then :
45255
45256else
45257  supports=no
45258fi
45259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45260  ac_ext=cpp
45261ac_cpp='$CXXCPP $CPPFLAGS'
45262ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45263ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45264ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45265
45266  CXXFLAGS="$saved_cxxflags"
45267
45268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45269$as_echo "$supports" >&6; }
45270  if test "x$supports" = "xyes" ; then
45271    :
45272  else
45273    ZERO_ARCHFLAG=""
45274  fi
45275
45276
45277
45278  # Check that the compiler supports -mX (or -qX on AIX) flags
45279  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
45280
45281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
45282$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
45283  supports=yes
45284
45285  saved_cflags="$CFLAGS"
45286  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45287  ac_ext=c
45288ac_cpp='$CPP $CPPFLAGS'
45289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45291ac_compiler_gnu=$ac_cv_c_compiler_gnu
45292
45293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45294/* end confdefs.h.  */
45295int i;
45296_ACEOF
45297if ac_fn_c_try_compile "$LINENO"; then :
45298
45299else
45300  supports=no
45301fi
45302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45303  ac_ext=cpp
45304ac_cpp='$CXXCPP $CPPFLAGS'
45305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45308
45309  CFLAGS="$saved_cflags"
45310
45311  saved_cxxflags="$CXXFLAGS"
45312  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45313  ac_ext=cpp
45314ac_cpp='$CXXCPP $CPPFLAGS'
45315ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45316ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45317ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45318
45319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45320/* end confdefs.h.  */
45321int i;
45322_ACEOF
45323if ac_fn_cxx_try_compile "$LINENO"; then :
45324
45325else
45326  supports=no
45327fi
45328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45329  ac_ext=cpp
45330ac_cpp='$CXXCPP $CPPFLAGS'
45331ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45332ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45333ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45334
45335  CXXFLAGS="$saved_cxxflags"
45336
45337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45338$as_echo "$supports" >&6; }
45339  if test "x$supports" = "xyes" ; then
45340    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
45341  else
45342    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
45343  fi
45344
45345
45346
45347  # Check whether --enable-warnings-as-errors was given.
45348if test "${enable_warnings_as_errors+set}" = set; then :
45349  enableval=$enable_warnings_as_errors;
45350fi
45351
45352
45353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
45354$as_echo_n "checking if native warnings are errors... " >&6; }
45355  if test "x$enable_warnings_as_errors" = "xyes"; then
45356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
45357$as_echo "yes (explicitely set)" >&6; }
45358    WARNINGS_AS_ERRORS=true
45359  elif test "x$enable_warnings_as_errors" = "xno"; then
45360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45361$as_echo "no" >&6; }
45362    WARNINGS_AS_ERRORS=false
45363  elif test "x$enable_warnings_as_errors" = "x"; then
45364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
45365$as_echo "yes (default)" >&6; }
45366    WARNINGS_AS_ERRORS=true
45367  else
45368    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
45369  fi
45370
45371
45372  case "${TOOLCHAIN_TYPE}" in
45373    microsoft)
45374      DISABLE_WARNING_PREFIX="-wd"
45375      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
45376      ;;
45377    solstudio)
45378      DISABLE_WARNING_PREFIX="-erroff="
45379      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
45380      ;;
45381    gcc)
45382      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
45383
45384  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
45385$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
45386  supports=yes
45387
45388  saved_cflags="$CFLAGS"
45389  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
45390  ac_ext=c
45391ac_cpp='$CPP $CPPFLAGS'
45392ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45393ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45394ac_compiler_gnu=$ac_cv_c_compiler_gnu
45395
45396  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45397/* end confdefs.h.  */
45398int i;
45399_ACEOF
45400if ac_fn_c_try_compile "$LINENO"; then :
45401
45402else
45403  supports=no
45404fi
45405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45406  ac_ext=cpp
45407ac_cpp='$CXXCPP $CPPFLAGS'
45408ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45409ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45410ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45411
45412  CFLAGS="$saved_cflags"
45413
45414  saved_cxxflags="$CXXFLAGS"
45415  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
45416  ac_ext=cpp
45417ac_cpp='$CXXCPP $CPPFLAGS'
45418ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45419ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45420ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45421
45422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45423/* end confdefs.h.  */
45424int i;
45425_ACEOF
45426if ac_fn_cxx_try_compile "$LINENO"; then :
45427
45428else
45429  supports=no
45430fi
45431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45432  ac_ext=cpp
45433ac_cpp='$CXXCPP $CPPFLAGS'
45434ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45435ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45436ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45437
45438  CXXFLAGS="$saved_cxxflags"
45439
45440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45441$as_echo "$supports" >&6; }
45442  if test "x$supports" = "xyes" ; then
45443    GCC_CAN_DISABLE_WARNINGS=true
45444  else
45445    GCC_CAN_DISABLE_WARNINGS=false
45446
45447  fi
45448
45449      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
45450        DISABLE_WARNING_PREFIX="-Wno-"
45451      else
45452        DISABLE_WARNING_PREFIX=
45453      fi
45454      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45455      ;;
45456    clang)
45457      DISABLE_WARNING_PREFIX="-Wno-"
45458      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45459      ;;
45460  esac
45461
45462
45463
45464
45465# Setup debug symbols (need objcopy from the toolchain for that)
45466
45467  #
45468  # ENABLE_DEBUG_SYMBOLS
45469  # This must be done after the toolchain is setup, since we're looking at objcopy.
45470  #
45471  # Check whether --enable-debug-symbols was given.
45472if test "${enable_debug_symbols+set}" = set; then :
45473  enableval=$enable_debug_symbols;
45474fi
45475
45476
45477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
45478$as_echo_n "checking if we should generate debug symbols... " >&6; }
45479
45480  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
45481    # explicit enabling of enable-debug-symbols and can't find objcopy
45482    #   this is an error
45483    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
45484  fi
45485
45486  if test "x$enable_debug_symbols" = "xyes"; then
45487    ENABLE_DEBUG_SYMBOLS=true
45488  elif test "x$enable_debug_symbols" = "xno"; then
45489    ENABLE_DEBUG_SYMBOLS=false
45490  else
45491    # Default is on if objcopy is found
45492    if test "x$OBJCOPY" != x; then
45493      ENABLE_DEBUG_SYMBOLS=true
45494    # MacOS X and Windows don't use objcopy but default is on for those OSes
45495    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
45496      ENABLE_DEBUG_SYMBOLS=true
45497    else
45498      ENABLE_DEBUG_SYMBOLS=false
45499    fi
45500  fi
45501
45502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
45503$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
45504
45505  #
45506  # ZIP_DEBUGINFO_FILES
45507  #
45508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
45509$as_echo_n "checking if we should zip debug-info files... " >&6; }
45510  # Check whether --enable-zip-debug-info was given.
45511if test "${enable_zip_debug_info+set}" = set; then :
45512  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
45513else
45514  enable_zip_debug_info="yes"
45515fi
45516
45517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
45518$as_echo "${enable_zip_debug_info}" >&6; }
45519
45520  if test "x${enable_zip_debug_info}" = "xno"; then
45521    ZIP_DEBUGINFO_FILES=false
45522  else
45523    ZIP_DEBUGINFO_FILES=true
45524  fi
45525
45526
45527
45528
45529
45530  # Check whether --enable-native-coverage was given.
45531if test "${enable_native_coverage+set}" = set; then :
45532  enableval=$enable_native_coverage;
45533fi
45534
45535  GCOV_ENABLED="false"
45536  if test "x$enable_native_coverage" = "xyes"; then
45537    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
45538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45539$as_echo_n "checking if native coverage is enabled... " >&6; }
45540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45541$as_echo "yes" >&6; }
45542      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
45543      GCOV_LDFLAGS="-fprofile-arcs"
45544      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
45545      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
45546      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
45547      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
45548      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
45549      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
45550      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
45551      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
45552      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
45553      GCOV_ENABLED="true"
45554    else
45555      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
45556    fi
45557  elif test "x$enable_native_coverage" = "xno"; then
45558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45559$as_echo_n "checking if native coverage is enabled... " >&6; }
45560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45561$as_echo "no" >&6; }
45562  elif test "x$enable_native_coverage" != "x"; then
45563    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
45564  fi
45565
45566
45567
45568
45569###############################################################################
45570#
45571# Check dependencies for external and internal libraries.
45572#
45573###############################################################################
45574
45575# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
45576
45577  # When using cygwin or msys, we need a wrapper binary that renames
45578  # /cygdrive/c/ arguments into c:/ arguments and peeks into
45579  # @files and rewrites these too! This wrapper binary is
45580  # called fixpath.
45581  FIXPATH=
45582  if test "x$OPENJDK_BUILD_OS" = xwindows; then
45583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
45584$as_echo_n "checking if fixpath can be created... " >&6; }
45585    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
45586    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
45587    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
45588    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
45589      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
45590      FIXPATH="$FIXPATH_BIN -c"
45591    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
45592      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
45593      # @ was chosen as separator to minimize risk of other tools messing around with it
45594      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
45595          | tr ' ' '\n' | grep '^/./' | sort | uniq`
45596      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
45597      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
45598    fi
45599    FIXPATH_SRC_W="$FIXPATH_SRC"
45600    FIXPATH_BIN_W="$FIXPATH_BIN"
45601
45602  unix_path="$FIXPATH_SRC_W"
45603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45604    windows_path=`$CYGPATH -m "$unix_path"`
45605    FIXPATH_SRC_W="$windows_path"
45606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45607    windows_path=`cmd //c echo $unix_path`
45608    FIXPATH_SRC_W="$windows_path"
45609  fi
45610
45611
45612  unix_path="$FIXPATH_BIN_W"
45613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45614    windows_path=`$CYGPATH -m "$unix_path"`
45615    FIXPATH_BIN_W="$windows_path"
45616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45617    windows_path=`cmd //c echo $unix_path`
45618    FIXPATH_BIN_W="$windows_path"
45619  fi
45620
45621    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
45622    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
45623    cd $FIXPATH_DIR
45624    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
45625    cd $CURDIR
45626
45627    if test ! -x $FIXPATH_BIN; then
45628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45629$as_echo "no" >&6; }
45630      cat $FIXPATH_DIR/fixpath1.log
45631      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
45632    fi
45633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45634$as_echo "yes" >&6; }
45635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
45636$as_echo_n "checking if fixpath.exe works... " >&6; }
45637    cd $FIXPATH_DIR
45638    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
45639        > $FIXPATH_DIR/fixpath2.log 2>&1
45640    cd $CURDIR
45641    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
45642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45643$as_echo "no" >&6; }
45644      cat $FIXPATH_DIR/fixpath2.log
45645      as_fn_error $? "fixpath did not work!" "$LINENO" 5
45646    fi
45647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45648$as_echo "yes" >&6; }
45649  fi
45650
45651
45652
45653
45654
45655  # Check if X11 is needed
45656  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
45657    # No X11 support on windows or macosx
45658    NEEDS_LIB_X11=false
45659  else
45660    if test "x$SUPPORT_HEADFUL" = xno; then
45661      # No X11 support if building headless-only
45662      NEEDS_LIB_X11=false
45663    else
45664      # All other instances need X11
45665      NEEDS_LIB_X11=true
45666    fi
45667  fi
45668
45669  # Check if cups is needed
45670  if test "x$OPENJDK_TARGET_OS" = xwindows; then
45671    # Windows have a separate print system
45672    NEEDS_LIB_CUPS=false
45673  else
45674    NEEDS_LIB_CUPS=true
45675  fi
45676
45677  # Check if freetype is needed
45678  if test "x$OPENJDK" = "xtrue"; then
45679    NEEDS_LIB_FREETYPE=true
45680  else
45681    NEEDS_LIB_FREETYPE=false
45682  fi
45683
45684  # Check if alsa is needed
45685  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45686    NEEDS_LIB_ALSA=true
45687  else
45688    NEEDS_LIB_ALSA=false
45689  fi
45690
45691  # Check if ffi is needed
45692  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45693    NEEDS_LIB_FFI=true
45694  else
45695    NEEDS_LIB_FFI=false
45696  fi
45697
45698
45699  # statically link libstdc++ before C++ ABI is stablized on Linux unless
45700  # dynamic build is configured on command line.
45701
45702# Check whether --with-stdc++lib was given.
45703if test "${with_stdc__lib+set}" = set; then :
45704  withval=$with_stdc__lib;
45705        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
45706                && test "x$with_stdc__lib" != xdefault; then
45707          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
45708        fi
45709
45710else
45711  with_stdc__lib=default
45712
45713fi
45714
45715
45716  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45717    # Test if -lstdc++ works.
45718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
45719$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
45720    ac_ext=cpp
45721ac_cpp='$CXXCPP $CPPFLAGS'
45722ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45723ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45724ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45725
45726    OLD_CXXFLAGS="$CXXFLAGS"
45727    CXXFLAGS="$CXXFLAGS -lstdc++"
45728    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45729/* end confdefs.h.  */
45730
45731int
45732main ()
45733{
45734return 0;
45735  ;
45736  return 0;
45737}
45738_ACEOF
45739if ac_fn_cxx_try_link "$LINENO"; then :
45740  has_dynamic_libstdcxx=yes
45741else
45742  has_dynamic_libstdcxx=no
45743fi
45744rm -f core conftest.err conftest.$ac_objext \
45745    conftest$ac_exeext conftest.$ac_ext
45746    CXXFLAGS="$OLD_CXXFLAGS"
45747    ac_ext=cpp
45748ac_cpp='$CXXCPP $CPPFLAGS'
45749ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45750ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45751ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45752
45753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
45754$as_echo "$has_dynamic_libstdcxx" >&6; }
45755
45756    # Test if stdc++ can be linked statically.
45757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
45758$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
45759    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
45760    ac_ext=cpp
45761ac_cpp='$CXXCPP $CPPFLAGS'
45762ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45763ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45764ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45765
45766    OLD_LIBS="$LIBS"
45767    OLD_CXX="$CXX"
45768    LIBS="$STATIC_STDCXX_FLAGS"
45769    CXX="$CC"
45770    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45771/* end confdefs.h.  */
45772
45773int
45774main ()
45775{
45776return 0;
45777  ;
45778  return 0;
45779}
45780_ACEOF
45781if ac_fn_cxx_try_link "$LINENO"; then :
45782  has_static_libstdcxx=yes
45783else
45784  has_static_libstdcxx=no
45785fi
45786rm -f core conftest.err conftest.$ac_objext \
45787    conftest$ac_exeext conftest.$ac_ext
45788    LIBS="$OLD_LIBS"
45789    CXX="$OLD_CXX"
45790    ac_ext=cpp
45791ac_cpp='$CXXCPP $CPPFLAGS'
45792ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45793ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45794ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45795
45796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
45797$as_echo "$has_static_libstdcxx" >&6; }
45798
45799    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
45800      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
45801    fi
45802
45803    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
45804      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
45805    fi
45806
45807    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
45808      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
45809    fi
45810
45811    # If dynamic was requested, it's available since it would fail above otherwise.
45812    # If dynamic wasn't requested, go with static unless it isn't available.
45813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
45814$as_echo_n "checking how to link with libstdc++... " >&6; }
45815    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45816      LIBCXX="$LIBCXX -lstdc++"
45817      LDCXX="$CXX"
45818      STATIC_CXX_SETTING="STATIC_CXX=false"
45819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
45820$as_echo "dynamic" >&6; }
45821    else
45822      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
45823      LDCXX="$CC"
45824      STATIC_CXX_SETTING="STATIC_CXX=true"
45825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
45826$as_echo "static" >&6; }
45827    fi
45828  fi
45829
45830
45831  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
45832  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
45833    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
45834  fi
45835
45836  # TODO better (platform agnostic) test
45837  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
45838    LIBCXX="-lstdc++"
45839  fi
45840
45841
45842  # Setup Windows runtime dlls
45843  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
45844
45845
45846# Check whether --with-msvcr-dll was given.
45847if test "${with_msvcr_dll+set}" = set; then :
45848  withval=$with_msvcr_dll;
45849fi
45850
45851
45852  if test "x$with_msvcr_dll" != x; then
45853    # If given explicitely by user, do not probe. If not present, fail directly.
45854
45855  DLL_NAME="$MSVCR_NAME"
45856  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
45857  METHOD="--with-msvcr-dll"
45858  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45859    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45860$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45861
45862    # Need to check if the found msvcr is correct architecture
45863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45864$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45865    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45867      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45868      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45869      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45870        CORRECT_MSVCR_ARCH="PE32 executable"
45871      else
45872        CORRECT_MSVCR_ARCH="PE32+ executable"
45873      fi
45874    else
45875      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45876        CORRECT_MSVCR_ARCH=386
45877      else
45878        CORRECT_MSVCR_ARCH=x86-64
45879      fi
45880    fi
45881    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45883$as_echo "ok" >&6; }
45884      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45885
45886  # Only process if variable expands to non-empty
45887
45888  if test "x$MSVC_DLL" != x; then
45889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45890
45891  # Input might be given as Windows format, start by converting to
45892  # unix format.
45893  path="$MSVC_DLL"
45894  new_path=`$CYGPATH -u "$path"`
45895
45896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45899  # "foo.exe" is OK but "foo" is an error.
45900  #
45901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45902  # It is also a way to make sure we got the proper file name for the real test later on.
45903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45904  if test "x$test_shortpath" = x; then
45905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45906$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45907    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45908  fi
45909
45910  # Call helper function which possibly converts this using DOS-style short mode.
45911  # If so, the updated path is stored in $new_path.
45912
45913  input_path="$new_path"
45914  # Check if we need to convert this using DOS-style short mode. If the path
45915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45916  # take no chances and rewrite it.
45917  # Note: m4 eats our [], so we need to use [ and ] instead.
45918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45919  if test "x$has_forbidden_chars" != x; then
45920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45924      # Going to short mode and back again did indeed matter. Since short mode is
45925      # case insensitive, let's make it lowercase to improve readability.
45926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45927      # Now convert it back to Unix-style (cygpath)
45928      input_path=`$CYGPATH -u "$shortmode_path"`
45929      new_path="$input_path"
45930    fi
45931  fi
45932
45933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45934  if test "x$test_cygdrive_prefix" = x; then
45935    # As a simple fix, exclude /usr/bin since it's not a real path.
45936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45938      # a path prefixed by /cygdrive for fixpath to work.
45939      new_path="$CYGWIN_ROOT_PATH$input_path"
45940    fi
45941  fi
45942
45943
45944  if test "x$path" != "x$new_path"; then
45945    MSVC_DLL="$new_path"
45946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45947$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45948  fi
45949
45950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45951
45952  path="$MSVC_DLL"
45953  has_colon=`$ECHO $path | $GREP ^.:`
45954  new_path="$path"
45955  if test "x$has_colon" = x; then
45956    # Not in mixed or Windows style, start by that.
45957    new_path=`cmd //c echo $path`
45958  fi
45959
45960
45961  input_path="$new_path"
45962  # Check if we need to convert this using DOS-style short mode. If the path
45963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45964  # take no chances and rewrite it.
45965  # Note: m4 eats our [], so we need to use [ and ] instead.
45966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45967  if test "x$has_forbidden_chars" != x; then
45968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45970  fi
45971
45972
45973  windows_path="$new_path"
45974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45975    unix_path=`$CYGPATH -u "$windows_path"`
45976    new_path="$unix_path"
45977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45979    new_path="$unix_path"
45980  fi
45981
45982  if test "x$path" != "x$new_path"; then
45983    MSVC_DLL="$new_path"
45984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45985$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45986  fi
45987
45988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45990
45991    else
45992      # We're on a unix platform. Hooray! :)
45993      path="$MSVC_DLL"
45994      has_space=`$ECHO "$path" | $GREP " "`
45995      if test "x$has_space" != x; then
45996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45997$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45998        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45999      fi
46000
46001      # Use eval to expand a potential ~
46002      eval path="$path"
46003      if test ! -f "$path" && test ! -d "$path"; then
46004        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46005      fi
46006
46007      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46008    fi
46009  fi
46010
46011      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46012$as_echo_n "checking for $DLL_NAME... " >&6; }
46013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46014$as_echo "$MSVC_DLL" >&6; }
46015    else
46016      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46017$as_echo "incorrect, ignoring" >&6; }
46018      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46019$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46020    fi
46021  fi
46022
46023    if test "x$MSVC_DLL" = x; then
46024      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
46025    fi
46026    MSVCR_DLL="$MSVC_DLL"
46027  elif test "x$DEVKIT_MSVCR_DLL" != x; then
46028
46029  DLL_NAME="$MSVCR_NAME"
46030  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
46031  METHOD="devkit"
46032  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46033    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46034$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46035
46036    # Need to check if the found msvcr is correct architecture
46037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46038$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46039    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46040    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46041      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46042      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46043      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46044        CORRECT_MSVCR_ARCH="PE32 executable"
46045      else
46046        CORRECT_MSVCR_ARCH="PE32+ executable"
46047      fi
46048    else
46049      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46050        CORRECT_MSVCR_ARCH=386
46051      else
46052        CORRECT_MSVCR_ARCH=x86-64
46053      fi
46054    fi
46055    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46057$as_echo "ok" >&6; }
46058      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46059
46060  # Only process if variable expands to non-empty
46061
46062  if test "x$MSVC_DLL" != x; then
46063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46064
46065  # Input might be given as Windows format, start by converting to
46066  # unix format.
46067  path="$MSVC_DLL"
46068  new_path=`$CYGPATH -u "$path"`
46069
46070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46073  # "foo.exe" is OK but "foo" is an error.
46074  #
46075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46076  # It is also a way to make sure we got the proper file name for the real test later on.
46077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46078  if test "x$test_shortpath" = x; then
46079    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46080$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46081    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46082  fi
46083
46084  # Call helper function which possibly converts this using DOS-style short mode.
46085  # If so, the updated path is stored in $new_path.
46086
46087  input_path="$new_path"
46088  # Check if we need to convert this using DOS-style short mode. If the path
46089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46090  # take no chances and rewrite it.
46091  # Note: m4 eats our [], so we need to use [ and ] instead.
46092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46093  if test "x$has_forbidden_chars" != x; then
46094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46098      # Going to short mode and back again did indeed matter. Since short mode is
46099      # case insensitive, let's make it lowercase to improve readability.
46100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46101      # Now convert it back to Unix-style (cygpath)
46102      input_path=`$CYGPATH -u "$shortmode_path"`
46103      new_path="$input_path"
46104    fi
46105  fi
46106
46107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46108  if test "x$test_cygdrive_prefix" = x; then
46109    # As a simple fix, exclude /usr/bin since it's not a real path.
46110    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46112      # a path prefixed by /cygdrive for fixpath to work.
46113      new_path="$CYGWIN_ROOT_PATH$input_path"
46114    fi
46115  fi
46116
46117
46118  if test "x$path" != "x$new_path"; then
46119    MSVC_DLL="$new_path"
46120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46121$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46122  fi
46123
46124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46125
46126  path="$MSVC_DLL"
46127  has_colon=`$ECHO $path | $GREP ^.:`
46128  new_path="$path"
46129  if test "x$has_colon" = x; then
46130    # Not in mixed or Windows style, start by that.
46131    new_path=`cmd //c echo $path`
46132  fi
46133
46134
46135  input_path="$new_path"
46136  # Check if we need to convert this using DOS-style short mode. If the path
46137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46138  # take no chances and rewrite it.
46139  # Note: m4 eats our [], so we need to use [ and ] instead.
46140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46141  if test "x$has_forbidden_chars" != x; then
46142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46144  fi
46145
46146
46147  windows_path="$new_path"
46148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46149    unix_path=`$CYGPATH -u "$windows_path"`
46150    new_path="$unix_path"
46151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46153    new_path="$unix_path"
46154  fi
46155
46156  if test "x$path" != "x$new_path"; then
46157    MSVC_DLL="$new_path"
46158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46159$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46160  fi
46161
46162  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46163  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46164
46165    else
46166      # We're on a unix platform. Hooray! :)
46167      path="$MSVC_DLL"
46168      has_space=`$ECHO "$path" | $GREP " "`
46169      if test "x$has_space" != x; then
46170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46171$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46172        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46173      fi
46174
46175      # Use eval to expand a potential ~
46176      eval path="$path"
46177      if test ! -f "$path" && test ! -d "$path"; then
46178        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46179      fi
46180
46181      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46182    fi
46183  fi
46184
46185      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46186$as_echo_n "checking for $DLL_NAME... " >&6; }
46187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46188$as_echo "$MSVC_DLL" >&6; }
46189    else
46190      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46191$as_echo "incorrect, ignoring" >&6; }
46192      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46193$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46194    fi
46195  fi
46196
46197    if test "x$MSVC_DLL" = x; then
46198      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
46199    fi
46200    MSVCR_DLL="$MSVC_DLL"
46201  else
46202
46203  DLL_NAME="${MSVCR_NAME}"
46204  MSVC_DLL=
46205
46206  if test "x$MSVC_DLL" = x; then
46207    # Probe: Using well-known location from Visual Studio 10.0
46208    if test "x$VCINSTALLDIR" != x; then
46209      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
46210
46211  windows_path="$CYGWIN_VC_INSTALL_DIR"
46212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46213    unix_path=`$CYGPATH -u "$windows_path"`
46214    CYGWIN_VC_INSTALL_DIR="$unix_path"
46215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46217    CYGWIN_VC_INSTALL_DIR="$unix_path"
46218  fi
46219
46220      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46221        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46222      else
46223        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46224      fi
46225      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
46226
46227  DLL_NAME="$DLL_NAME"
46228  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46229  METHOD="well-known location in VCINSTALLDIR"
46230  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46231    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46232$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46233
46234    # Need to check if the found msvcr is correct architecture
46235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46236$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46237    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46239      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46240      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46241      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46242        CORRECT_MSVCR_ARCH="PE32 executable"
46243      else
46244        CORRECT_MSVCR_ARCH="PE32+ executable"
46245      fi
46246    else
46247      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46248        CORRECT_MSVCR_ARCH=386
46249      else
46250        CORRECT_MSVCR_ARCH=x86-64
46251      fi
46252    fi
46253    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46254      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46255$as_echo "ok" >&6; }
46256      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46257
46258  # Only process if variable expands to non-empty
46259
46260  if test "x$MSVC_DLL" != x; then
46261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46262
46263  # Input might be given as Windows format, start by converting to
46264  # unix format.
46265  path="$MSVC_DLL"
46266  new_path=`$CYGPATH -u "$path"`
46267
46268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46271  # "foo.exe" is OK but "foo" is an error.
46272  #
46273  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46274  # It is also a way to make sure we got the proper file name for the real test later on.
46275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46276  if test "x$test_shortpath" = x; then
46277    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46278$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46279    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46280  fi
46281
46282  # Call helper function which possibly converts this using DOS-style short mode.
46283  # If so, the updated path is stored in $new_path.
46284
46285  input_path="$new_path"
46286  # Check if we need to convert this using DOS-style short mode. If the path
46287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46288  # take no chances and rewrite it.
46289  # Note: m4 eats our [], so we need to use [ and ] instead.
46290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46291  if test "x$has_forbidden_chars" != x; then
46292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46296      # Going to short mode and back again did indeed matter. Since short mode is
46297      # case insensitive, let's make it lowercase to improve readability.
46298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46299      # Now convert it back to Unix-style (cygpath)
46300      input_path=`$CYGPATH -u "$shortmode_path"`
46301      new_path="$input_path"
46302    fi
46303  fi
46304
46305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46306  if test "x$test_cygdrive_prefix" = x; then
46307    # As a simple fix, exclude /usr/bin since it's not a real path.
46308    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46310      # a path prefixed by /cygdrive for fixpath to work.
46311      new_path="$CYGWIN_ROOT_PATH$input_path"
46312    fi
46313  fi
46314
46315
46316  if test "x$path" != "x$new_path"; then
46317    MSVC_DLL="$new_path"
46318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46319$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46320  fi
46321
46322    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46323
46324  path="$MSVC_DLL"
46325  has_colon=`$ECHO $path | $GREP ^.:`
46326  new_path="$path"
46327  if test "x$has_colon" = x; then
46328    # Not in mixed or Windows style, start by that.
46329    new_path=`cmd //c echo $path`
46330  fi
46331
46332
46333  input_path="$new_path"
46334  # Check if we need to convert this using DOS-style short mode. If the path
46335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46336  # take no chances and rewrite it.
46337  # Note: m4 eats our [], so we need to use [ and ] instead.
46338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46339  if test "x$has_forbidden_chars" != x; then
46340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46342  fi
46343
46344
46345  windows_path="$new_path"
46346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46347    unix_path=`$CYGPATH -u "$windows_path"`
46348    new_path="$unix_path"
46349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46351    new_path="$unix_path"
46352  fi
46353
46354  if test "x$path" != "x$new_path"; then
46355    MSVC_DLL="$new_path"
46356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46357$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46358  fi
46359
46360  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46361  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46362
46363    else
46364      # We're on a unix platform. Hooray! :)
46365      path="$MSVC_DLL"
46366      has_space=`$ECHO "$path" | $GREP " "`
46367      if test "x$has_space" != x; then
46368        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46369$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46370        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46371      fi
46372
46373      # Use eval to expand a potential ~
46374      eval path="$path"
46375      if test ! -f "$path" && test ! -d "$path"; then
46376        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46377      fi
46378
46379      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46380    fi
46381  fi
46382
46383      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46384$as_echo_n "checking for $DLL_NAME... " >&6; }
46385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46386$as_echo "$MSVC_DLL" >&6; }
46387    else
46388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46389$as_echo "incorrect, ignoring" >&6; }
46390      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46391$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46392    fi
46393  fi
46394
46395    fi
46396  fi
46397
46398  if test "x$MSVC_DLL" = x; then
46399    # Probe: Check in the Boot JDK directory.
46400    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
46401
46402  DLL_NAME="$DLL_NAME"
46403  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46404  METHOD="well-known location in Boot JDK"
46405  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46406    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46407$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46408
46409    # Need to check if the found msvcr is correct architecture
46410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46411$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46412    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46414      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46415      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46416      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46417        CORRECT_MSVCR_ARCH="PE32 executable"
46418      else
46419        CORRECT_MSVCR_ARCH="PE32+ executable"
46420      fi
46421    else
46422      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46423        CORRECT_MSVCR_ARCH=386
46424      else
46425        CORRECT_MSVCR_ARCH=x86-64
46426      fi
46427    fi
46428    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46430$as_echo "ok" >&6; }
46431      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46432
46433  # Only process if variable expands to non-empty
46434
46435  if test "x$MSVC_DLL" != x; then
46436    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46437
46438  # Input might be given as Windows format, start by converting to
46439  # unix format.
46440  path="$MSVC_DLL"
46441  new_path=`$CYGPATH -u "$path"`
46442
46443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46446  # "foo.exe" is OK but "foo" is an error.
46447  #
46448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46449  # It is also a way to make sure we got the proper file name for the real test later on.
46450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46451  if test "x$test_shortpath" = x; then
46452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46453$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46454    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46455  fi
46456
46457  # Call helper function which possibly converts this using DOS-style short mode.
46458  # If so, the updated path is stored in $new_path.
46459
46460  input_path="$new_path"
46461  # Check if we need to convert this using DOS-style short mode. If the path
46462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46463  # take no chances and rewrite it.
46464  # Note: m4 eats our [], so we need to use [ and ] instead.
46465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46466  if test "x$has_forbidden_chars" != x; then
46467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46471      # Going to short mode and back again did indeed matter. Since short mode is
46472      # case insensitive, let's make it lowercase to improve readability.
46473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46474      # Now convert it back to Unix-style (cygpath)
46475      input_path=`$CYGPATH -u "$shortmode_path"`
46476      new_path="$input_path"
46477    fi
46478  fi
46479
46480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46481  if test "x$test_cygdrive_prefix" = x; then
46482    # As a simple fix, exclude /usr/bin since it's not a real path.
46483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46485      # a path prefixed by /cygdrive for fixpath to work.
46486      new_path="$CYGWIN_ROOT_PATH$input_path"
46487    fi
46488  fi
46489
46490
46491  if test "x$path" != "x$new_path"; then
46492    MSVC_DLL="$new_path"
46493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46494$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46495  fi
46496
46497    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46498
46499  path="$MSVC_DLL"
46500  has_colon=`$ECHO $path | $GREP ^.:`
46501  new_path="$path"
46502  if test "x$has_colon" = x; then
46503    # Not in mixed or Windows style, start by that.
46504    new_path=`cmd //c echo $path`
46505  fi
46506
46507
46508  input_path="$new_path"
46509  # Check if we need to convert this using DOS-style short mode. If the path
46510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46511  # take no chances and rewrite it.
46512  # Note: m4 eats our [], so we need to use [ and ] instead.
46513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46514  if test "x$has_forbidden_chars" != x; then
46515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46517  fi
46518
46519
46520  windows_path="$new_path"
46521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46522    unix_path=`$CYGPATH -u "$windows_path"`
46523    new_path="$unix_path"
46524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46526    new_path="$unix_path"
46527  fi
46528
46529  if test "x$path" != "x$new_path"; then
46530    MSVC_DLL="$new_path"
46531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46532$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46533  fi
46534
46535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46537
46538    else
46539      # We're on a unix platform. Hooray! :)
46540      path="$MSVC_DLL"
46541      has_space=`$ECHO "$path" | $GREP " "`
46542      if test "x$has_space" != x; then
46543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46544$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46545        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46546      fi
46547
46548      # Use eval to expand a potential ~
46549      eval path="$path"
46550      if test ! -f "$path" && test ! -d "$path"; then
46551        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46552      fi
46553
46554      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46555    fi
46556  fi
46557
46558      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46559$as_echo_n "checking for $DLL_NAME... " >&6; }
46560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46561$as_echo "$MSVC_DLL" >&6; }
46562    else
46563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46564$as_echo "incorrect, ignoring" >&6; }
46565      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46566$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46567    fi
46568  fi
46569
46570  fi
46571
46572  if test "x$MSVC_DLL" = x; then
46573    # Probe: Look in the Windows system32 directory
46574    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46575
46576  windows_path="$CYGWIN_SYSTEMROOT"
46577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46578    unix_path=`$CYGPATH -u "$windows_path"`
46579    CYGWIN_SYSTEMROOT="$unix_path"
46580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46582    CYGWIN_SYSTEMROOT="$unix_path"
46583  fi
46584
46585    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46586
46587  DLL_NAME="$DLL_NAME"
46588  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46589  METHOD="well-known location in SYSTEMROOT"
46590  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46591    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46592$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46593
46594    # Need to check if the found msvcr is correct architecture
46595    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46596$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46597    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46598    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46599      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46600      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46601      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46602        CORRECT_MSVCR_ARCH="PE32 executable"
46603      else
46604        CORRECT_MSVCR_ARCH="PE32+ executable"
46605      fi
46606    else
46607      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46608        CORRECT_MSVCR_ARCH=386
46609      else
46610        CORRECT_MSVCR_ARCH=x86-64
46611      fi
46612    fi
46613    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46615$as_echo "ok" >&6; }
46616      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46617
46618  # Only process if variable expands to non-empty
46619
46620  if test "x$MSVC_DLL" != x; then
46621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46622
46623  # Input might be given as Windows format, start by converting to
46624  # unix format.
46625  path="$MSVC_DLL"
46626  new_path=`$CYGPATH -u "$path"`
46627
46628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46631  # "foo.exe" is OK but "foo" is an error.
46632  #
46633  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46634  # It is also a way to make sure we got the proper file name for the real test later on.
46635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46636  if test "x$test_shortpath" = x; then
46637    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46638$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46639    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46640  fi
46641
46642  # Call helper function which possibly converts this using DOS-style short mode.
46643  # If so, the updated path is stored in $new_path.
46644
46645  input_path="$new_path"
46646  # Check if we need to convert this using DOS-style short mode. If the path
46647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46648  # take no chances and rewrite it.
46649  # Note: m4 eats our [], so we need to use [ and ] instead.
46650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46651  if test "x$has_forbidden_chars" != x; then
46652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46656      # Going to short mode and back again did indeed matter. Since short mode is
46657      # case insensitive, let's make it lowercase to improve readability.
46658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46659      # Now convert it back to Unix-style (cygpath)
46660      input_path=`$CYGPATH -u "$shortmode_path"`
46661      new_path="$input_path"
46662    fi
46663  fi
46664
46665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46666  if test "x$test_cygdrive_prefix" = x; then
46667    # As a simple fix, exclude /usr/bin since it's not a real path.
46668    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46670      # a path prefixed by /cygdrive for fixpath to work.
46671      new_path="$CYGWIN_ROOT_PATH$input_path"
46672    fi
46673  fi
46674
46675
46676  if test "x$path" != "x$new_path"; then
46677    MSVC_DLL="$new_path"
46678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46679$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46680  fi
46681
46682    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46683
46684  path="$MSVC_DLL"
46685  has_colon=`$ECHO $path | $GREP ^.:`
46686  new_path="$path"
46687  if test "x$has_colon" = x; then
46688    # Not in mixed or Windows style, start by that.
46689    new_path=`cmd //c echo $path`
46690  fi
46691
46692
46693  input_path="$new_path"
46694  # Check if we need to convert this using DOS-style short mode. If the path
46695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46696  # take no chances and rewrite it.
46697  # Note: m4 eats our [], so we need to use [ and ] instead.
46698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46699  if test "x$has_forbidden_chars" != x; then
46700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46701    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46702  fi
46703
46704
46705  windows_path="$new_path"
46706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46707    unix_path=`$CYGPATH -u "$windows_path"`
46708    new_path="$unix_path"
46709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46711    new_path="$unix_path"
46712  fi
46713
46714  if test "x$path" != "x$new_path"; then
46715    MSVC_DLL="$new_path"
46716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46717$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46718  fi
46719
46720  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46721  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46722
46723    else
46724      # We're on a unix platform. Hooray! :)
46725      path="$MSVC_DLL"
46726      has_space=`$ECHO "$path" | $GREP " "`
46727      if test "x$has_space" != x; then
46728        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46729$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46730        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46731      fi
46732
46733      # Use eval to expand a potential ~
46734      eval path="$path"
46735      if test ! -f "$path" && test ! -d "$path"; then
46736        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46737      fi
46738
46739      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46740    fi
46741  fi
46742
46743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46744$as_echo_n "checking for $DLL_NAME... " >&6; }
46745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46746$as_echo "$MSVC_DLL" >&6; }
46747    else
46748      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46749$as_echo "incorrect, ignoring" >&6; }
46750      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46751$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46752    fi
46753  fi
46754
46755  fi
46756
46757  if test "x$MSVC_DLL" = x; then
46758    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
46759    if test "x$VS100COMNTOOLS" != x; then
46760      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
46761
46762  windows_path="$CYGWIN_VS_TOOLS_DIR"
46763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46764    unix_path=`$CYGPATH -u "$windows_path"`
46765    CYGWIN_VS_TOOLS_DIR="$unix_path"
46766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46768    CYGWIN_VS_TOOLS_DIR="$unix_path"
46769  fi
46770
46771      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46772        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46773	    | $GREP -i /x64/ | $HEAD --lines 1`
46774      else
46775        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46776	    | $GREP -i /x86/ | $HEAD --lines 1`
46777      fi
46778
46779  DLL_NAME="$DLL_NAME"
46780  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46781  METHOD="search of VS100COMNTOOLS"
46782  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46783    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46784$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46785
46786    # Need to check if the found msvcr is correct architecture
46787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46788$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46789    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46791      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46792      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46793      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46794        CORRECT_MSVCR_ARCH="PE32 executable"
46795      else
46796        CORRECT_MSVCR_ARCH="PE32+ executable"
46797      fi
46798    else
46799      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46800        CORRECT_MSVCR_ARCH=386
46801      else
46802        CORRECT_MSVCR_ARCH=x86-64
46803      fi
46804    fi
46805    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46807$as_echo "ok" >&6; }
46808      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46809
46810  # Only process if variable expands to non-empty
46811
46812  if test "x$MSVC_DLL" != x; then
46813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46814
46815  # Input might be given as Windows format, start by converting to
46816  # unix format.
46817  path="$MSVC_DLL"
46818  new_path=`$CYGPATH -u "$path"`
46819
46820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46823  # "foo.exe" is OK but "foo" is an error.
46824  #
46825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46826  # It is also a way to make sure we got the proper file name for the real test later on.
46827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46828  if test "x$test_shortpath" = x; then
46829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46830$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46831    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46832  fi
46833
46834  # Call helper function which possibly converts this using DOS-style short mode.
46835  # If so, the updated path is stored in $new_path.
46836
46837  input_path="$new_path"
46838  # Check if we need to convert this using DOS-style short mode. If the path
46839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46840  # take no chances and rewrite it.
46841  # Note: m4 eats our [], so we need to use [ and ] instead.
46842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46843  if test "x$has_forbidden_chars" != x; then
46844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46848      # Going to short mode and back again did indeed matter. Since short mode is
46849      # case insensitive, let's make it lowercase to improve readability.
46850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46851      # Now convert it back to Unix-style (cygpath)
46852      input_path=`$CYGPATH -u "$shortmode_path"`
46853      new_path="$input_path"
46854    fi
46855  fi
46856
46857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46858  if test "x$test_cygdrive_prefix" = x; then
46859    # As a simple fix, exclude /usr/bin since it's not a real path.
46860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46862      # a path prefixed by /cygdrive for fixpath to work.
46863      new_path="$CYGWIN_ROOT_PATH$input_path"
46864    fi
46865  fi
46866
46867
46868  if test "x$path" != "x$new_path"; then
46869    MSVC_DLL="$new_path"
46870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46871$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46872  fi
46873
46874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46875
46876  path="$MSVC_DLL"
46877  has_colon=`$ECHO $path | $GREP ^.:`
46878  new_path="$path"
46879  if test "x$has_colon" = x; then
46880    # Not in mixed or Windows style, start by that.
46881    new_path=`cmd //c echo $path`
46882  fi
46883
46884
46885  input_path="$new_path"
46886  # Check if we need to convert this using DOS-style short mode. If the path
46887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46888  # take no chances and rewrite it.
46889  # Note: m4 eats our [], so we need to use [ and ] instead.
46890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46891  if test "x$has_forbidden_chars" != x; then
46892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46894  fi
46895
46896
46897  windows_path="$new_path"
46898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46899    unix_path=`$CYGPATH -u "$windows_path"`
46900    new_path="$unix_path"
46901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46903    new_path="$unix_path"
46904  fi
46905
46906  if test "x$path" != "x$new_path"; then
46907    MSVC_DLL="$new_path"
46908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46909$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46910  fi
46911
46912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46914
46915    else
46916      # We're on a unix platform. Hooray! :)
46917      path="$MSVC_DLL"
46918      has_space=`$ECHO "$path" | $GREP " "`
46919      if test "x$has_space" != x; then
46920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46921$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46923      fi
46924
46925      # Use eval to expand a potential ~
46926      eval path="$path"
46927      if test ! -f "$path" && test ! -d "$path"; then
46928        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46929      fi
46930
46931      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46932    fi
46933  fi
46934
46935      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46936$as_echo_n "checking for $DLL_NAME... " >&6; }
46937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46938$as_echo "$MSVC_DLL" >&6; }
46939    else
46940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46941$as_echo "incorrect, ignoring" >&6; }
46942      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46943$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46944    fi
46945  fi
46946
46947    fi
46948  fi
46949
46950  if test "x$MSVC_DLL" = x; then
46951    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
46952    # (This was the original behaviour; kept since it might turn something up)
46953    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
46954      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46955        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46956	    | $GREP x64 | $HEAD --lines 1`
46957      else
46958        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46959	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
46960        if test "x$POSSIBLE_MSVC_DLL" = x; then
46961          # We're grasping at straws now...
46962          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46963	      | $HEAD --lines 1`
46964        fi
46965      fi
46966
46967
46968  DLL_NAME="$DLL_NAME"
46969  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46970  METHOD="search of VCINSTALLDIR"
46971  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46972    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46973$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46974
46975    # Need to check if the found msvcr is correct architecture
46976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46977$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46978    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46980      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46981      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46982      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46983        CORRECT_MSVCR_ARCH="PE32 executable"
46984      else
46985        CORRECT_MSVCR_ARCH="PE32+ executable"
46986      fi
46987    else
46988      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46989        CORRECT_MSVCR_ARCH=386
46990      else
46991        CORRECT_MSVCR_ARCH=x86-64
46992      fi
46993    fi
46994    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46995      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46996$as_echo "ok" >&6; }
46997      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46998
46999  # Only process if variable expands to non-empty
47000
47001  if test "x$MSVC_DLL" != x; then
47002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47003
47004  # Input might be given as Windows format, start by converting to
47005  # unix format.
47006  path="$MSVC_DLL"
47007  new_path=`$CYGPATH -u "$path"`
47008
47009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47012  # "foo.exe" is OK but "foo" is an error.
47013  #
47014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47015  # It is also a way to make sure we got the proper file name for the real test later on.
47016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47017  if test "x$test_shortpath" = x; then
47018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47019$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47020    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47021  fi
47022
47023  # Call helper function which possibly converts this using DOS-style short mode.
47024  # If so, the updated path is stored in $new_path.
47025
47026  input_path="$new_path"
47027  # Check if we need to convert this using DOS-style short mode. If the path
47028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47029  # take no chances and rewrite it.
47030  # Note: m4 eats our [], so we need to use [ and ] instead.
47031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47032  if test "x$has_forbidden_chars" != x; then
47033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47037      # Going to short mode and back again did indeed matter. Since short mode is
47038      # case insensitive, let's make it lowercase to improve readability.
47039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47040      # Now convert it back to Unix-style (cygpath)
47041      input_path=`$CYGPATH -u "$shortmode_path"`
47042      new_path="$input_path"
47043    fi
47044  fi
47045
47046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47047  if test "x$test_cygdrive_prefix" = x; then
47048    # As a simple fix, exclude /usr/bin since it's not a real path.
47049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47051      # a path prefixed by /cygdrive for fixpath to work.
47052      new_path="$CYGWIN_ROOT_PATH$input_path"
47053    fi
47054  fi
47055
47056
47057  if test "x$path" != "x$new_path"; then
47058    MSVC_DLL="$new_path"
47059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47060$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47061  fi
47062
47063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47064
47065  path="$MSVC_DLL"
47066  has_colon=`$ECHO $path | $GREP ^.:`
47067  new_path="$path"
47068  if test "x$has_colon" = x; then
47069    # Not in mixed or Windows style, start by that.
47070    new_path=`cmd //c echo $path`
47071  fi
47072
47073
47074  input_path="$new_path"
47075  # Check if we need to convert this using DOS-style short mode. If the path
47076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47077  # take no chances and rewrite it.
47078  # Note: m4 eats our [], so we need to use [ and ] instead.
47079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47080  if test "x$has_forbidden_chars" != x; then
47081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47083  fi
47084
47085
47086  windows_path="$new_path"
47087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47088    unix_path=`$CYGPATH -u "$windows_path"`
47089    new_path="$unix_path"
47090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47092    new_path="$unix_path"
47093  fi
47094
47095  if test "x$path" != "x$new_path"; then
47096    MSVC_DLL="$new_path"
47097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47098$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47099  fi
47100
47101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47103
47104    else
47105      # We're on a unix platform. Hooray! :)
47106      path="$MSVC_DLL"
47107      has_space=`$ECHO "$path" | $GREP " "`
47108      if test "x$has_space" != x; then
47109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47110$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47111        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47112      fi
47113
47114      # Use eval to expand a potential ~
47115      eval path="$path"
47116      if test ! -f "$path" && test ! -d "$path"; then
47117        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47118      fi
47119
47120      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47121    fi
47122  fi
47123
47124      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47125$as_echo_n "checking for $DLL_NAME... " >&6; }
47126      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47127$as_echo "$MSVC_DLL" >&6; }
47128    else
47129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47130$as_echo "incorrect, ignoring" >&6; }
47131      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47132$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47133    fi
47134  fi
47135
47136    fi
47137  fi
47138
47139  if test "x$MSVC_DLL" = x; then
47140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47141$as_echo_n "checking for $DLL_NAME... " >&6; }
47142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47143$as_echo "no" >&6; }
47144    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
47145  fi
47146
47147    MSVCR_DLL="$MSVC_DLL"
47148  fi
47149
47150
47151
47152# Check whether --with-msvcp-dll was given.
47153if test "${with_msvcp_dll+set}" = set; then :
47154  withval=$with_msvcp_dll;
47155fi
47156
47157
47158  if test "x$MSVCP_NAME" != "x"; then
47159    if test "x$with_msvcp_dll" != x; then
47160      # If given explicitely by user, do not probe. If not present, fail directly.
47161
47162  DLL_NAME="$MSVCP_NAME"
47163  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
47164  METHOD="--with-msvcp-dll"
47165  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47166    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47167$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47168
47169    # Need to check if the found msvcr is correct architecture
47170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47171$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47172    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47174      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47175      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47176      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47177        CORRECT_MSVCR_ARCH="PE32 executable"
47178      else
47179        CORRECT_MSVCR_ARCH="PE32+ executable"
47180      fi
47181    else
47182      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47183        CORRECT_MSVCR_ARCH=386
47184      else
47185        CORRECT_MSVCR_ARCH=x86-64
47186      fi
47187    fi
47188    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47190$as_echo "ok" >&6; }
47191      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47192
47193  # Only process if variable expands to non-empty
47194
47195  if test "x$MSVC_DLL" != x; then
47196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47197
47198  # Input might be given as Windows format, start by converting to
47199  # unix format.
47200  path="$MSVC_DLL"
47201  new_path=`$CYGPATH -u "$path"`
47202
47203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47206  # "foo.exe" is OK but "foo" is an error.
47207  #
47208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47209  # It is also a way to make sure we got the proper file name for the real test later on.
47210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47211  if test "x$test_shortpath" = x; then
47212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47213$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47214    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47215  fi
47216
47217  # Call helper function which possibly converts this using DOS-style short mode.
47218  # If so, the updated path is stored in $new_path.
47219
47220  input_path="$new_path"
47221  # Check if we need to convert this using DOS-style short mode. If the path
47222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47223  # take no chances and rewrite it.
47224  # Note: m4 eats our [], so we need to use [ and ] instead.
47225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47226  if test "x$has_forbidden_chars" != x; then
47227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47231      # Going to short mode and back again did indeed matter. Since short mode is
47232      # case insensitive, let's make it lowercase to improve readability.
47233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47234      # Now convert it back to Unix-style (cygpath)
47235      input_path=`$CYGPATH -u "$shortmode_path"`
47236      new_path="$input_path"
47237    fi
47238  fi
47239
47240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47241  if test "x$test_cygdrive_prefix" = x; then
47242    # As a simple fix, exclude /usr/bin since it's not a real path.
47243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47245      # a path prefixed by /cygdrive for fixpath to work.
47246      new_path="$CYGWIN_ROOT_PATH$input_path"
47247    fi
47248  fi
47249
47250
47251  if test "x$path" != "x$new_path"; then
47252    MSVC_DLL="$new_path"
47253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47254$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47255  fi
47256
47257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47258
47259  path="$MSVC_DLL"
47260  has_colon=`$ECHO $path | $GREP ^.:`
47261  new_path="$path"
47262  if test "x$has_colon" = x; then
47263    # Not in mixed or Windows style, start by that.
47264    new_path=`cmd //c echo $path`
47265  fi
47266
47267
47268  input_path="$new_path"
47269  # Check if we need to convert this using DOS-style short mode. If the path
47270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47271  # take no chances and rewrite it.
47272  # Note: m4 eats our [], so we need to use [ and ] instead.
47273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47274  if test "x$has_forbidden_chars" != x; then
47275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47277  fi
47278
47279
47280  windows_path="$new_path"
47281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47282    unix_path=`$CYGPATH -u "$windows_path"`
47283    new_path="$unix_path"
47284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47286    new_path="$unix_path"
47287  fi
47288
47289  if test "x$path" != "x$new_path"; then
47290    MSVC_DLL="$new_path"
47291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47292$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47293  fi
47294
47295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47297
47298    else
47299      # We're on a unix platform. Hooray! :)
47300      path="$MSVC_DLL"
47301      has_space=`$ECHO "$path" | $GREP " "`
47302      if test "x$has_space" != x; then
47303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47304$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47306      fi
47307
47308      # Use eval to expand a potential ~
47309      eval path="$path"
47310      if test ! -f "$path" && test ! -d "$path"; then
47311        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47312      fi
47313
47314      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47315    fi
47316  fi
47317
47318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47319$as_echo_n "checking for $DLL_NAME... " >&6; }
47320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47321$as_echo "$MSVC_DLL" >&6; }
47322    else
47323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47324$as_echo "incorrect, ignoring" >&6; }
47325      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47326$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47327    fi
47328  fi
47329
47330      if test "x$MSVC_DLL" = x; then
47331        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
47332      fi
47333      MSVCP_DLL="$MSVC_DLL"
47334    elif test "x$DEVKIT_MSVCP_DLL" != x; then
47335
47336  DLL_NAME="$MSVCP_NAME"
47337  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
47338  METHOD="devkit"
47339  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47340    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47341$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47342
47343    # Need to check if the found msvcr is correct architecture
47344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47345$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47346    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47348      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47349      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47350      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47351        CORRECT_MSVCR_ARCH="PE32 executable"
47352      else
47353        CORRECT_MSVCR_ARCH="PE32+ executable"
47354      fi
47355    else
47356      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47357        CORRECT_MSVCR_ARCH=386
47358      else
47359        CORRECT_MSVCR_ARCH=x86-64
47360      fi
47361    fi
47362    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47364$as_echo "ok" >&6; }
47365      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47366
47367  # Only process if variable expands to non-empty
47368
47369  if test "x$MSVC_DLL" != x; then
47370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47371
47372  # Input might be given as Windows format, start by converting to
47373  # unix format.
47374  path="$MSVC_DLL"
47375  new_path=`$CYGPATH -u "$path"`
47376
47377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47380  # "foo.exe" is OK but "foo" is an error.
47381  #
47382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47383  # It is also a way to make sure we got the proper file name for the real test later on.
47384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47385  if test "x$test_shortpath" = x; then
47386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47387$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47388    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47389  fi
47390
47391  # Call helper function which possibly converts this using DOS-style short mode.
47392  # If so, the updated path is stored in $new_path.
47393
47394  input_path="$new_path"
47395  # Check if we need to convert this using DOS-style short mode. If the path
47396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47397  # take no chances and rewrite it.
47398  # Note: m4 eats our [], so we need to use [ and ] instead.
47399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47400  if test "x$has_forbidden_chars" != x; then
47401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47405      # Going to short mode and back again did indeed matter. Since short mode is
47406      # case insensitive, let's make it lowercase to improve readability.
47407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47408      # Now convert it back to Unix-style (cygpath)
47409      input_path=`$CYGPATH -u "$shortmode_path"`
47410      new_path="$input_path"
47411    fi
47412  fi
47413
47414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47415  if test "x$test_cygdrive_prefix" = x; then
47416    # As a simple fix, exclude /usr/bin since it's not a real path.
47417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47419      # a path prefixed by /cygdrive for fixpath to work.
47420      new_path="$CYGWIN_ROOT_PATH$input_path"
47421    fi
47422  fi
47423
47424
47425  if test "x$path" != "x$new_path"; then
47426    MSVC_DLL="$new_path"
47427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47428$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47429  fi
47430
47431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47432
47433  path="$MSVC_DLL"
47434  has_colon=`$ECHO $path | $GREP ^.:`
47435  new_path="$path"
47436  if test "x$has_colon" = x; then
47437    # Not in mixed or Windows style, start by that.
47438    new_path=`cmd //c echo $path`
47439  fi
47440
47441
47442  input_path="$new_path"
47443  # Check if we need to convert this using DOS-style short mode. If the path
47444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47445  # take no chances and rewrite it.
47446  # Note: m4 eats our [], so we need to use [ and ] instead.
47447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47448  if test "x$has_forbidden_chars" != x; then
47449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47451  fi
47452
47453
47454  windows_path="$new_path"
47455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47456    unix_path=`$CYGPATH -u "$windows_path"`
47457    new_path="$unix_path"
47458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47460    new_path="$unix_path"
47461  fi
47462
47463  if test "x$path" != "x$new_path"; then
47464    MSVC_DLL="$new_path"
47465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47466$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47467  fi
47468
47469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47471
47472    else
47473      # We're on a unix platform. Hooray! :)
47474      path="$MSVC_DLL"
47475      has_space=`$ECHO "$path" | $GREP " "`
47476      if test "x$has_space" != x; then
47477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47478$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47480      fi
47481
47482      # Use eval to expand a potential ~
47483      eval path="$path"
47484      if test ! -f "$path" && test ! -d "$path"; then
47485        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47486      fi
47487
47488      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47489    fi
47490  fi
47491
47492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47493$as_echo_n "checking for $DLL_NAME... " >&6; }
47494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47495$as_echo "$MSVC_DLL" >&6; }
47496    else
47497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47498$as_echo "incorrect, ignoring" >&6; }
47499      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47500$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47501    fi
47502  fi
47503
47504      if test "x$MSVC_DLL" = x; then
47505        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
47506      fi
47507      MSVCP_DLL="$MSVC_DLL"
47508    else
47509
47510  DLL_NAME="${MSVCP_NAME}"
47511  MSVC_DLL=
47512
47513  if test "x$MSVC_DLL" = x; then
47514    # Probe: Using well-known location from Visual Studio 10.0
47515    if test "x$VCINSTALLDIR" != x; then
47516      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47517
47518  windows_path="$CYGWIN_VC_INSTALL_DIR"
47519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47520    unix_path=`$CYGPATH -u "$windows_path"`
47521    CYGWIN_VC_INSTALL_DIR="$unix_path"
47522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47524    CYGWIN_VC_INSTALL_DIR="$unix_path"
47525  fi
47526
47527      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47528        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47529      else
47530        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47531      fi
47532      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47533
47534  DLL_NAME="$DLL_NAME"
47535  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47536  METHOD="well-known location in VCINSTALLDIR"
47537  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47538    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47539$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47540
47541    # Need to check if the found msvcr is correct architecture
47542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47543$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47544    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47546      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47547      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47548      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47549        CORRECT_MSVCR_ARCH="PE32 executable"
47550      else
47551        CORRECT_MSVCR_ARCH="PE32+ executable"
47552      fi
47553    else
47554      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47555        CORRECT_MSVCR_ARCH=386
47556      else
47557        CORRECT_MSVCR_ARCH=x86-64
47558      fi
47559    fi
47560    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47562$as_echo "ok" >&6; }
47563      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47564
47565  # Only process if variable expands to non-empty
47566
47567  if test "x$MSVC_DLL" != x; then
47568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47569
47570  # Input might be given as Windows format, start by converting to
47571  # unix format.
47572  path="$MSVC_DLL"
47573  new_path=`$CYGPATH -u "$path"`
47574
47575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47578  # "foo.exe" is OK but "foo" is an error.
47579  #
47580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47581  # It is also a way to make sure we got the proper file name for the real test later on.
47582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47583  if test "x$test_shortpath" = x; then
47584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47585$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47586    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47587  fi
47588
47589  # Call helper function which possibly converts this using DOS-style short mode.
47590  # If so, the updated path is stored in $new_path.
47591
47592  input_path="$new_path"
47593  # Check if we need to convert this using DOS-style short mode. If the path
47594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47595  # take no chances and rewrite it.
47596  # Note: m4 eats our [], so we need to use [ and ] instead.
47597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47598  if test "x$has_forbidden_chars" != x; then
47599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47603      # Going to short mode and back again did indeed matter. Since short mode is
47604      # case insensitive, let's make it lowercase to improve readability.
47605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47606      # Now convert it back to Unix-style (cygpath)
47607      input_path=`$CYGPATH -u "$shortmode_path"`
47608      new_path="$input_path"
47609    fi
47610  fi
47611
47612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47613  if test "x$test_cygdrive_prefix" = x; then
47614    # As a simple fix, exclude /usr/bin since it's not a real path.
47615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47617      # a path prefixed by /cygdrive for fixpath to work.
47618      new_path="$CYGWIN_ROOT_PATH$input_path"
47619    fi
47620  fi
47621
47622
47623  if test "x$path" != "x$new_path"; then
47624    MSVC_DLL="$new_path"
47625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47626$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47627  fi
47628
47629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47630
47631  path="$MSVC_DLL"
47632  has_colon=`$ECHO $path | $GREP ^.:`
47633  new_path="$path"
47634  if test "x$has_colon" = x; then
47635    # Not in mixed or Windows style, start by that.
47636    new_path=`cmd //c echo $path`
47637  fi
47638
47639
47640  input_path="$new_path"
47641  # Check if we need to convert this using DOS-style short mode. If the path
47642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47643  # take no chances and rewrite it.
47644  # Note: m4 eats our [], so we need to use [ and ] instead.
47645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47646  if test "x$has_forbidden_chars" != x; then
47647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47649  fi
47650
47651
47652  windows_path="$new_path"
47653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47654    unix_path=`$CYGPATH -u "$windows_path"`
47655    new_path="$unix_path"
47656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47658    new_path="$unix_path"
47659  fi
47660
47661  if test "x$path" != "x$new_path"; then
47662    MSVC_DLL="$new_path"
47663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47664$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47665  fi
47666
47667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47669
47670    else
47671      # We're on a unix platform. Hooray! :)
47672      path="$MSVC_DLL"
47673      has_space=`$ECHO "$path" | $GREP " "`
47674      if test "x$has_space" != x; then
47675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47676$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47677        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47678      fi
47679
47680      # Use eval to expand a potential ~
47681      eval path="$path"
47682      if test ! -f "$path" && test ! -d "$path"; then
47683        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47684      fi
47685
47686      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47687    fi
47688  fi
47689
47690      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47691$as_echo_n "checking for $DLL_NAME... " >&6; }
47692      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47693$as_echo "$MSVC_DLL" >&6; }
47694    else
47695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47696$as_echo "incorrect, ignoring" >&6; }
47697      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47698$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47699    fi
47700  fi
47701
47702    fi
47703  fi
47704
47705  if test "x$MSVC_DLL" = x; then
47706    # Probe: Check in the Boot JDK directory.
47707    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
47708
47709  DLL_NAME="$DLL_NAME"
47710  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47711  METHOD="well-known location in Boot JDK"
47712  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47713    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47714$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47715
47716    # Need to check if the found msvcr is correct architecture
47717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47718$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47719    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47721      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47722      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47723      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47724        CORRECT_MSVCR_ARCH="PE32 executable"
47725      else
47726        CORRECT_MSVCR_ARCH="PE32+ executable"
47727      fi
47728    else
47729      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47730        CORRECT_MSVCR_ARCH=386
47731      else
47732        CORRECT_MSVCR_ARCH=x86-64
47733      fi
47734    fi
47735    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47737$as_echo "ok" >&6; }
47738      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47739
47740  # Only process if variable expands to non-empty
47741
47742  if test "x$MSVC_DLL" != x; then
47743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47744
47745  # Input might be given as Windows format, start by converting to
47746  # unix format.
47747  path="$MSVC_DLL"
47748  new_path=`$CYGPATH -u "$path"`
47749
47750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47753  # "foo.exe" is OK but "foo" is an error.
47754  #
47755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47756  # It is also a way to make sure we got the proper file name for the real test later on.
47757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47758  if test "x$test_shortpath" = x; then
47759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47760$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47761    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47762  fi
47763
47764  # Call helper function which possibly converts this using DOS-style short mode.
47765  # If so, the updated path is stored in $new_path.
47766
47767  input_path="$new_path"
47768  # Check if we need to convert this using DOS-style short mode. If the path
47769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47770  # take no chances and rewrite it.
47771  # Note: m4 eats our [], so we need to use [ and ] instead.
47772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47773  if test "x$has_forbidden_chars" != x; then
47774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47778      # Going to short mode and back again did indeed matter. Since short mode is
47779      # case insensitive, let's make it lowercase to improve readability.
47780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47781      # Now convert it back to Unix-style (cygpath)
47782      input_path=`$CYGPATH -u "$shortmode_path"`
47783      new_path="$input_path"
47784    fi
47785  fi
47786
47787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47788  if test "x$test_cygdrive_prefix" = x; then
47789    # As a simple fix, exclude /usr/bin since it's not a real path.
47790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47792      # a path prefixed by /cygdrive for fixpath to work.
47793      new_path="$CYGWIN_ROOT_PATH$input_path"
47794    fi
47795  fi
47796
47797
47798  if test "x$path" != "x$new_path"; then
47799    MSVC_DLL="$new_path"
47800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47801$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47802  fi
47803
47804    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47805
47806  path="$MSVC_DLL"
47807  has_colon=`$ECHO $path | $GREP ^.:`
47808  new_path="$path"
47809  if test "x$has_colon" = x; then
47810    # Not in mixed or Windows style, start by that.
47811    new_path=`cmd //c echo $path`
47812  fi
47813
47814
47815  input_path="$new_path"
47816  # Check if we need to convert this using DOS-style short mode. If the path
47817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47818  # take no chances and rewrite it.
47819  # Note: m4 eats our [], so we need to use [ and ] instead.
47820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47821  if test "x$has_forbidden_chars" != x; then
47822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47824  fi
47825
47826
47827  windows_path="$new_path"
47828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47829    unix_path=`$CYGPATH -u "$windows_path"`
47830    new_path="$unix_path"
47831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47833    new_path="$unix_path"
47834  fi
47835
47836  if test "x$path" != "x$new_path"; then
47837    MSVC_DLL="$new_path"
47838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47839$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47840  fi
47841
47842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47844
47845    else
47846      # We're on a unix platform. Hooray! :)
47847      path="$MSVC_DLL"
47848      has_space=`$ECHO "$path" | $GREP " "`
47849      if test "x$has_space" != x; then
47850        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47851$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47852        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47853      fi
47854
47855      # Use eval to expand a potential ~
47856      eval path="$path"
47857      if test ! -f "$path" && test ! -d "$path"; then
47858        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47859      fi
47860
47861      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47862    fi
47863  fi
47864
47865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47866$as_echo_n "checking for $DLL_NAME... " >&6; }
47867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47868$as_echo "$MSVC_DLL" >&6; }
47869    else
47870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47871$as_echo "incorrect, ignoring" >&6; }
47872      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47873$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47874    fi
47875  fi
47876
47877  fi
47878
47879  if test "x$MSVC_DLL" = x; then
47880    # Probe: Look in the Windows system32 directory
47881    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47882
47883  windows_path="$CYGWIN_SYSTEMROOT"
47884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47885    unix_path=`$CYGPATH -u "$windows_path"`
47886    CYGWIN_SYSTEMROOT="$unix_path"
47887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47889    CYGWIN_SYSTEMROOT="$unix_path"
47890  fi
47891
47892    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
47893
47894  DLL_NAME="$DLL_NAME"
47895  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47896  METHOD="well-known location in SYSTEMROOT"
47897  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47898    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47899$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47900
47901    # Need to check if the found msvcr is correct architecture
47902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47903$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47904    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47906      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47907      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47908      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47909        CORRECT_MSVCR_ARCH="PE32 executable"
47910      else
47911        CORRECT_MSVCR_ARCH="PE32+ executable"
47912      fi
47913    else
47914      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47915        CORRECT_MSVCR_ARCH=386
47916      else
47917        CORRECT_MSVCR_ARCH=x86-64
47918      fi
47919    fi
47920    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47922$as_echo "ok" >&6; }
47923      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47924
47925  # Only process if variable expands to non-empty
47926
47927  if test "x$MSVC_DLL" != x; then
47928    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47929
47930  # Input might be given as Windows format, start by converting to
47931  # unix format.
47932  path="$MSVC_DLL"
47933  new_path=`$CYGPATH -u "$path"`
47934
47935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47938  # "foo.exe" is OK but "foo" is an error.
47939  #
47940  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47941  # It is also a way to make sure we got the proper file name for the real test later on.
47942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47943  if test "x$test_shortpath" = x; then
47944    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47945$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47946    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47947  fi
47948
47949  # Call helper function which possibly converts this using DOS-style short mode.
47950  # If so, the updated path is stored in $new_path.
47951
47952  input_path="$new_path"
47953  # Check if we need to convert this using DOS-style short mode. If the path
47954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47955  # take no chances and rewrite it.
47956  # Note: m4 eats our [], so we need to use [ and ] instead.
47957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47958  if test "x$has_forbidden_chars" != x; then
47959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47963      # Going to short mode and back again did indeed matter. Since short mode is
47964      # case insensitive, let's make it lowercase to improve readability.
47965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47966      # Now convert it back to Unix-style (cygpath)
47967      input_path=`$CYGPATH -u "$shortmode_path"`
47968      new_path="$input_path"
47969    fi
47970  fi
47971
47972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47973  if test "x$test_cygdrive_prefix" = x; then
47974    # As a simple fix, exclude /usr/bin since it's not a real path.
47975    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47977      # a path prefixed by /cygdrive for fixpath to work.
47978      new_path="$CYGWIN_ROOT_PATH$input_path"
47979    fi
47980  fi
47981
47982
47983  if test "x$path" != "x$new_path"; then
47984    MSVC_DLL="$new_path"
47985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47986$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47987  fi
47988
47989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47990
47991  path="$MSVC_DLL"
47992  has_colon=`$ECHO $path | $GREP ^.:`
47993  new_path="$path"
47994  if test "x$has_colon" = x; then
47995    # Not in mixed or Windows style, start by that.
47996    new_path=`cmd //c echo $path`
47997  fi
47998
47999
48000  input_path="$new_path"
48001  # Check if we need to convert this using DOS-style short mode. If the path
48002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48003  # take no chances and rewrite it.
48004  # Note: m4 eats our [], so we need to use [ and ] instead.
48005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48006  if test "x$has_forbidden_chars" != x; then
48007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48009  fi
48010
48011
48012  windows_path="$new_path"
48013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48014    unix_path=`$CYGPATH -u "$windows_path"`
48015    new_path="$unix_path"
48016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48018    new_path="$unix_path"
48019  fi
48020
48021  if test "x$path" != "x$new_path"; then
48022    MSVC_DLL="$new_path"
48023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48024$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48025  fi
48026
48027  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48028  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48029
48030    else
48031      # We're on a unix platform. Hooray! :)
48032      path="$MSVC_DLL"
48033      has_space=`$ECHO "$path" | $GREP " "`
48034      if test "x$has_space" != x; then
48035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48036$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48037        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48038      fi
48039
48040      # Use eval to expand a potential ~
48041      eval path="$path"
48042      if test ! -f "$path" && test ! -d "$path"; then
48043        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48044      fi
48045
48046      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48047    fi
48048  fi
48049
48050      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48051$as_echo_n "checking for $DLL_NAME... " >&6; }
48052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48053$as_echo "$MSVC_DLL" >&6; }
48054    else
48055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48056$as_echo "incorrect, ignoring" >&6; }
48057      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48058$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48059    fi
48060  fi
48061
48062  fi
48063
48064  if test "x$MSVC_DLL" = x; then
48065    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48066    if test "x$VS100COMNTOOLS" != x; then
48067      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48068
48069  windows_path="$CYGWIN_VS_TOOLS_DIR"
48070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48071    unix_path=`$CYGPATH -u "$windows_path"`
48072    CYGWIN_VS_TOOLS_DIR="$unix_path"
48073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48075    CYGWIN_VS_TOOLS_DIR="$unix_path"
48076  fi
48077
48078      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48079        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48080	    | $GREP -i /x64/ | $HEAD --lines 1`
48081      else
48082        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48083	    | $GREP -i /x86/ | $HEAD --lines 1`
48084      fi
48085
48086  DLL_NAME="$DLL_NAME"
48087  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48088  METHOD="search of VS100COMNTOOLS"
48089  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48090    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48091$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48092
48093    # Need to check if the found msvcr is correct architecture
48094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48095$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48096    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48098      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48099      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48100      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48101        CORRECT_MSVCR_ARCH="PE32 executable"
48102      else
48103        CORRECT_MSVCR_ARCH="PE32+ executable"
48104      fi
48105    else
48106      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48107        CORRECT_MSVCR_ARCH=386
48108      else
48109        CORRECT_MSVCR_ARCH=x86-64
48110      fi
48111    fi
48112    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48114$as_echo "ok" >&6; }
48115      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48116
48117  # Only process if variable expands to non-empty
48118
48119  if test "x$MSVC_DLL" != x; then
48120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48121
48122  # Input might be given as Windows format, start by converting to
48123  # unix format.
48124  path="$MSVC_DLL"
48125  new_path=`$CYGPATH -u "$path"`
48126
48127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48130  # "foo.exe" is OK but "foo" is an error.
48131  #
48132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48133  # It is also a way to make sure we got the proper file name for the real test later on.
48134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48135  if test "x$test_shortpath" = x; then
48136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48137$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48138    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48139  fi
48140
48141  # Call helper function which possibly converts this using DOS-style short mode.
48142  # If so, the updated path is stored in $new_path.
48143
48144  input_path="$new_path"
48145  # Check if we need to convert this using DOS-style short mode. If the path
48146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48147  # take no chances and rewrite it.
48148  # Note: m4 eats our [], so we need to use [ and ] instead.
48149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48150  if test "x$has_forbidden_chars" != x; then
48151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48155      # Going to short mode and back again did indeed matter. Since short mode is
48156      # case insensitive, let's make it lowercase to improve readability.
48157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48158      # Now convert it back to Unix-style (cygpath)
48159      input_path=`$CYGPATH -u "$shortmode_path"`
48160      new_path="$input_path"
48161    fi
48162  fi
48163
48164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48165  if test "x$test_cygdrive_prefix" = x; then
48166    # As a simple fix, exclude /usr/bin since it's not a real path.
48167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48169      # a path prefixed by /cygdrive for fixpath to work.
48170      new_path="$CYGWIN_ROOT_PATH$input_path"
48171    fi
48172  fi
48173
48174
48175  if test "x$path" != "x$new_path"; then
48176    MSVC_DLL="$new_path"
48177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48178$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48179  fi
48180
48181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48182
48183  path="$MSVC_DLL"
48184  has_colon=`$ECHO $path | $GREP ^.:`
48185  new_path="$path"
48186  if test "x$has_colon" = x; then
48187    # Not in mixed or Windows style, start by that.
48188    new_path=`cmd //c echo $path`
48189  fi
48190
48191
48192  input_path="$new_path"
48193  # Check if we need to convert this using DOS-style short mode. If the path
48194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48195  # take no chances and rewrite it.
48196  # Note: m4 eats our [], so we need to use [ and ] instead.
48197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48198  if test "x$has_forbidden_chars" != x; then
48199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48201  fi
48202
48203
48204  windows_path="$new_path"
48205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48206    unix_path=`$CYGPATH -u "$windows_path"`
48207    new_path="$unix_path"
48208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48210    new_path="$unix_path"
48211  fi
48212
48213  if test "x$path" != "x$new_path"; then
48214    MSVC_DLL="$new_path"
48215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48216$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48217  fi
48218
48219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48221
48222    else
48223      # We're on a unix platform. Hooray! :)
48224      path="$MSVC_DLL"
48225      has_space=`$ECHO "$path" | $GREP " "`
48226      if test "x$has_space" != x; then
48227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48228$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48230      fi
48231
48232      # Use eval to expand a potential ~
48233      eval path="$path"
48234      if test ! -f "$path" && test ! -d "$path"; then
48235        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48236      fi
48237
48238      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48239    fi
48240  fi
48241
48242      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48243$as_echo_n "checking for $DLL_NAME... " >&6; }
48244      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48245$as_echo "$MSVC_DLL" >&6; }
48246    else
48247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48248$as_echo "incorrect, ignoring" >&6; }
48249      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48250$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48251    fi
48252  fi
48253
48254    fi
48255  fi
48256
48257  if test "x$MSVC_DLL" = x; then
48258    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48259    # (This was the original behaviour; kept since it might turn something up)
48260    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48261      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48262        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48263	    | $GREP x64 | $HEAD --lines 1`
48264      else
48265        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48266	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48267        if test "x$POSSIBLE_MSVC_DLL" = x; then
48268          # We're grasping at straws now...
48269          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48270	      | $HEAD --lines 1`
48271        fi
48272      fi
48273
48274
48275  DLL_NAME="$DLL_NAME"
48276  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48277  METHOD="search of VCINSTALLDIR"
48278  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48279    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48280$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48281
48282    # Need to check if the found msvcr is correct architecture
48283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48284$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48285    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48287      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48288      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48289      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48290        CORRECT_MSVCR_ARCH="PE32 executable"
48291      else
48292        CORRECT_MSVCR_ARCH="PE32+ executable"
48293      fi
48294    else
48295      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48296        CORRECT_MSVCR_ARCH=386
48297      else
48298        CORRECT_MSVCR_ARCH=x86-64
48299      fi
48300    fi
48301    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48303$as_echo "ok" >&6; }
48304      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48305
48306  # Only process if variable expands to non-empty
48307
48308  if test "x$MSVC_DLL" != x; then
48309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48310
48311  # Input might be given as Windows format, start by converting to
48312  # unix format.
48313  path="$MSVC_DLL"
48314  new_path=`$CYGPATH -u "$path"`
48315
48316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48319  # "foo.exe" is OK but "foo" is an error.
48320  #
48321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48322  # It is also a way to make sure we got the proper file name for the real test later on.
48323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48324  if test "x$test_shortpath" = x; then
48325    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48326$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48327    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48328  fi
48329
48330  # Call helper function which possibly converts this using DOS-style short mode.
48331  # If so, the updated path is stored in $new_path.
48332
48333  input_path="$new_path"
48334  # Check if we need to convert this using DOS-style short mode. If the path
48335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48336  # take no chances and rewrite it.
48337  # Note: m4 eats our [], so we need to use [ and ] instead.
48338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48339  if test "x$has_forbidden_chars" != x; then
48340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48344      # Going to short mode and back again did indeed matter. Since short mode is
48345      # case insensitive, let's make it lowercase to improve readability.
48346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48347      # Now convert it back to Unix-style (cygpath)
48348      input_path=`$CYGPATH -u "$shortmode_path"`
48349      new_path="$input_path"
48350    fi
48351  fi
48352
48353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48354  if test "x$test_cygdrive_prefix" = x; then
48355    # As a simple fix, exclude /usr/bin since it's not a real path.
48356    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48358      # a path prefixed by /cygdrive for fixpath to work.
48359      new_path="$CYGWIN_ROOT_PATH$input_path"
48360    fi
48361  fi
48362
48363
48364  if test "x$path" != "x$new_path"; then
48365    MSVC_DLL="$new_path"
48366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48367$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48368  fi
48369
48370    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48371
48372  path="$MSVC_DLL"
48373  has_colon=`$ECHO $path | $GREP ^.:`
48374  new_path="$path"
48375  if test "x$has_colon" = x; then
48376    # Not in mixed or Windows style, start by that.
48377    new_path=`cmd //c echo $path`
48378  fi
48379
48380
48381  input_path="$new_path"
48382  # Check if we need to convert this using DOS-style short mode. If the path
48383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48384  # take no chances and rewrite it.
48385  # Note: m4 eats our [], so we need to use [ and ] instead.
48386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48387  if test "x$has_forbidden_chars" != x; then
48388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48390  fi
48391
48392
48393  windows_path="$new_path"
48394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48395    unix_path=`$CYGPATH -u "$windows_path"`
48396    new_path="$unix_path"
48397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48399    new_path="$unix_path"
48400  fi
48401
48402  if test "x$path" != "x$new_path"; then
48403    MSVC_DLL="$new_path"
48404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48405$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48406  fi
48407
48408  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48409  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48410
48411    else
48412      # We're on a unix platform. Hooray! :)
48413      path="$MSVC_DLL"
48414      has_space=`$ECHO "$path" | $GREP " "`
48415      if test "x$has_space" != x; then
48416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48417$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48418        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48419      fi
48420
48421      # Use eval to expand a potential ~
48422      eval path="$path"
48423      if test ! -f "$path" && test ! -d "$path"; then
48424        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48425      fi
48426
48427      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48428    fi
48429  fi
48430
48431      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48432$as_echo_n "checking for $DLL_NAME... " >&6; }
48433      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48434$as_echo "$MSVC_DLL" >&6; }
48435    else
48436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48437$as_echo "incorrect, ignoring" >&6; }
48438      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48439$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48440    fi
48441  fi
48442
48443    fi
48444  fi
48445
48446  if test "x$MSVC_DLL" = x; then
48447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48448$as_echo_n "checking for $DLL_NAME... " >&6; }
48449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48450$as_echo "no" >&6; }
48451    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48452  fi
48453
48454      MSVCP_DLL="$MSVC_DLL"
48455    fi
48456
48457  fi
48458
48459  fi
48460
48461
48462  if test "x$NEEDS_LIB_X11" = xfalse; then
48463    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
48464      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
48465$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
48466    fi
48467    X_CFLAGS=
48468    X_LIBS=
48469  else
48470
48471    if test "x${with_x}" = xno; then
48472      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
48473    fi
48474
48475    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
48476      # The user has specified a X11 base directory. Use it for includes and
48477      # libraries, unless explicitely overridden.
48478      if test "x$x_includes" = xNONE; then
48479        x_includes="${with_x}/include"
48480      fi
48481      if test "x$x_libraries" = xNONE; then
48482        x_libraries="${with_x}/lib"
48483      fi
48484    else
48485      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
48486      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
48487      # --x-libraries for the sysroot, if that seems to be correct.
48488      if test "x$SYSROOT" != "x"; then
48489        if test "x$x_includes" = xNONE; then
48490          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
48491            x_includes="$SYSROOT/usr/X11R6/include"
48492          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
48493            x_includes="$SYSROOT/usr/include"
48494          fi
48495        fi
48496        if test "x$x_libraries" = xNONE; then
48497          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
48498            x_libraries="$SYSROOT/usr/X11R6/lib"
48499          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48500            x_libraries="$SYSROOT/usr/lib64"
48501          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
48502            x_libraries="$SYSROOT/usr/lib"
48503          fi
48504        fi
48505      fi
48506    fi
48507
48508    # Now let autoconf do it's magic
48509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
48510$as_echo_n "checking for X... " >&6; }
48511
48512
48513# Check whether --with-x was given.
48514if test "${with_x+set}" = set; then :
48515  withval=$with_x;
48516fi
48517
48518# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
48519if test "x$with_x" = xno; then
48520  # The user explicitly disabled X.
48521  have_x=disabled
48522else
48523  case $x_includes,$x_libraries in #(
48524    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
48525    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
48526  $as_echo_n "(cached) " >&6
48527else
48528  # One or both of the vars are not set, and there is no cached value.
48529ac_x_includes=no ac_x_libraries=no
48530rm -f -r conftest.dir
48531if mkdir conftest.dir; then
48532  cd conftest.dir
48533  cat >Imakefile <<'_ACEOF'
48534incroot:
48535	@echo incroot='${INCROOT}'
48536usrlibdir:
48537	@echo usrlibdir='${USRLIBDIR}'
48538libdir:
48539	@echo libdir='${LIBDIR}'
48540_ACEOF
48541  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
48542    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
48543    for ac_var in incroot usrlibdir libdir; do
48544      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
48545    done
48546    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
48547    for ac_extension in a so sl dylib la dll; do
48548      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
48549	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
48550	ac_im_usrlibdir=$ac_im_libdir; break
48551      fi
48552    done
48553    # Screen out bogus values from the imake configuration.  They are
48554    # bogus both because they are the default anyway, and because
48555    # using them would break gcc on systems where it needs fixed includes.
48556    case $ac_im_incroot in
48557	/usr/include) ac_x_includes= ;;
48558	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
48559    esac
48560    case $ac_im_usrlibdir in
48561	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
48562	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
48563    esac
48564  fi
48565  cd ..
48566  rm -f -r conftest.dir
48567fi
48568
48569# Standard set of common directories for X headers.
48570# Check X11 before X11Rn because it is often a symlink to the current release.
48571ac_x_header_dirs='
48572/usr/X11/include
48573/usr/X11R7/include
48574/usr/X11R6/include
48575/usr/X11R5/include
48576/usr/X11R4/include
48577
48578/usr/include/X11
48579/usr/include/X11R7
48580/usr/include/X11R6
48581/usr/include/X11R5
48582/usr/include/X11R4
48583
48584/usr/local/X11/include
48585/usr/local/X11R7/include
48586/usr/local/X11R6/include
48587/usr/local/X11R5/include
48588/usr/local/X11R4/include
48589
48590/usr/local/include/X11
48591/usr/local/include/X11R7
48592/usr/local/include/X11R6
48593/usr/local/include/X11R5
48594/usr/local/include/X11R4
48595
48596/usr/X386/include
48597/usr/x386/include
48598/usr/XFree86/include/X11
48599
48600/usr/include
48601/usr/local/include
48602/usr/unsupported/include
48603/usr/athena/include
48604/usr/local/x11r5/include
48605/usr/lpp/Xamples/include
48606
48607/usr/openwin/include
48608/usr/openwin/share/include'
48609
48610if test "$ac_x_includes" = no; then
48611  # Guess where to find include files, by looking for Xlib.h.
48612  # First, try using that file with no special directory specified.
48613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48614/* end confdefs.h.  */
48615#include <X11/Xlib.h>
48616_ACEOF
48617if ac_fn_cxx_try_cpp "$LINENO"; then :
48618  # We can compile using X headers with no special include directory.
48619ac_x_includes=
48620else
48621  for ac_dir in $ac_x_header_dirs; do
48622  if test -r "$ac_dir/X11/Xlib.h"; then
48623    ac_x_includes=$ac_dir
48624    break
48625  fi
48626done
48627fi
48628rm -f conftest.err conftest.i conftest.$ac_ext
48629fi # $ac_x_includes = no
48630
48631if test "$ac_x_libraries" = no; then
48632  # Check for the libraries.
48633  # See if we find them without any special options.
48634  # Don't add to $LIBS permanently.
48635  ac_save_LIBS=$LIBS
48636  LIBS="-lX11 $LIBS"
48637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48638/* end confdefs.h.  */
48639#include <X11/Xlib.h>
48640int
48641main ()
48642{
48643XrmInitialize ()
48644  ;
48645  return 0;
48646}
48647_ACEOF
48648if ac_fn_cxx_try_link "$LINENO"; then :
48649  LIBS=$ac_save_LIBS
48650# We can link X programs with no special library path.
48651ac_x_libraries=
48652else
48653  LIBS=$ac_save_LIBS
48654for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
48655do
48656  # Don't even attempt the hair of trying to link an X program!
48657  for ac_extension in a so sl dylib la dll; do
48658    if test -r "$ac_dir/libX11.$ac_extension"; then
48659      ac_x_libraries=$ac_dir
48660      break 2
48661    fi
48662  done
48663done
48664fi
48665rm -f core conftest.err conftest.$ac_objext \
48666    conftest$ac_exeext conftest.$ac_ext
48667fi # $ac_x_libraries = no
48668
48669case $ac_x_includes,$ac_x_libraries in #(
48670  no,* | *,no | *\'*)
48671    # Didn't find X, or a directory has "'" in its name.
48672    ac_cv_have_x="have_x=no";; #(
48673  *)
48674    # Record where we found X for the cache.
48675    ac_cv_have_x="have_x=yes\
48676	ac_x_includes='$ac_x_includes'\
48677	ac_x_libraries='$ac_x_libraries'"
48678esac
48679fi
48680;; #(
48681    *) have_x=yes;;
48682  esac
48683  eval "$ac_cv_have_x"
48684fi # $with_x != no
48685
48686if test "$have_x" != yes; then
48687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
48688$as_echo "$have_x" >&6; }
48689  no_x=yes
48690else
48691  # If each of the values was on the command line, it overrides each guess.
48692  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
48693  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
48694  # Update the cache value to reflect the command line values.
48695  ac_cv_have_x="have_x=yes\
48696	ac_x_includes='$x_includes'\
48697	ac_x_libraries='$x_libraries'"
48698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
48699$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
48700fi
48701
48702    if test "$no_x" = yes; then
48703  # Not all programs may use this symbol, but it does not hurt to define it.
48704
48705$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
48706
48707  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
48708else
48709  if test -n "$x_includes"; then
48710    X_CFLAGS="$X_CFLAGS -I$x_includes"
48711  fi
48712
48713  # It would also be nice to do this for all -L options, not just this one.
48714  if test -n "$x_libraries"; then
48715    X_LIBS="$X_LIBS -L$x_libraries"
48716    # For Solaris; some versions of Sun CC require a space after -R and
48717    # others require no space.  Words are not sufficient . . . .
48718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
48719$as_echo_n "checking whether -R must be followed by a space... " >&6; }
48720    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
48721    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
48722    ac_cxx_werror_flag=yes
48723    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48724/* end confdefs.h.  */
48725
48726int
48727main ()
48728{
48729
48730  ;
48731  return 0;
48732}
48733_ACEOF
48734if ac_fn_cxx_try_link "$LINENO"; then :
48735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48736$as_echo "no" >&6; }
48737       X_LIBS="$X_LIBS -R$x_libraries"
48738else
48739  LIBS="$ac_xsave_LIBS -R $x_libraries"
48740       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48741/* end confdefs.h.  */
48742
48743int
48744main ()
48745{
48746
48747  ;
48748  return 0;
48749}
48750_ACEOF
48751if ac_fn_cxx_try_link "$LINENO"; then :
48752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48753$as_echo "yes" >&6; }
48754	  X_LIBS="$X_LIBS -R $x_libraries"
48755else
48756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
48757$as_echo "neither works" >&6; }
48758fi
48759rm -f core conftest.err conftest.$ac_objext \
48760    conftest$ac_exeext conftest.$ac_ext
48761fi
48762rm -f core conftest.err conftest.$ac_objext \
48763    conftest$ac_exeext conftest.$ac_ext
48764    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
48765    LIBS=$ac_xsave_LIBS
48766  fi
48767
48768  # Check for system-dependent libraries X programs must link with.
48769  # Do this before checking for the system-independent R6 libraries
48770  # (-lICE), since we may need -lsocket or whatever for X linking.
48771
48772  if test "$ISC" = yes; then
48773    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
48774  else
48775    # Martyn Johnson says this is needed for Ultrix, if the X
48776    # libraries were built with DECnet support.  And Karl Berry says
48777    # the Alpha needs dnet_stub (dnet does not exist).
48778    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
48779    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48780/* end confdefs.h.  */
48781
48782/* Override any GCC internal prototype to avoid an error.
48783   Use char because int might match the return type of a GCC
48784   builtin and then its argument prototype would still apply.  */
48785#ifdef __cplusplus
48786extern "C"
48787#endif
48788char XOpenDisplay ();
48789int
48790main ()
48791{
48792return XOpenDisplay ();
48793  ;
48794  return 0;
48795}
48796_ACEOF
48797if ac_fn_cxx_try_link "$LINENO"; then :
48798
48799else
48800  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
48801$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
48802if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
48803  $as_echo_n "(cached) " >&6
48804else
48805  ac_check_lib_save_LIBS=$LIBS
48806LIBS="-ldnet  $LIBS"
48807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48808/* end confdefs.h.  */
48809
48810/* Override any GCC internal prototype to avoid an error.
48811   Use char because int might match the return type of a GCC
48812   builtin and then its argument prototype would still apply.  */
48813#ifdef __cplusplus
48814extern "C"
48815#endif
48816char dnet_ntoa ();
48817int
48818main ()
48819{
48820return dnet_ntoa ();
48821  ;
48822  return 0;
48823}
48824_ACEOF
48825if ac_fn_cxx_try_link "$LINENO"; then :
48826  ac_cv_lib_dnet_dnet_ntoa=yes
48827else
48828  ac_cv_lib_dnet_dnet_ntoa=no
48829fi
48830rm -f core conftest.err conftest.$ac_objext \
48831    conftest$ac_exeext conftest.$ac_ext
48832LIBS=$ac_check_lib_save_LIBS
48833fi
48834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
48835$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
48836if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
48837  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
48838fi
48839
48840    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
48841      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
48842$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
48843if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
48844  $as_echo_n "(cached) " >&6
48845else
48846  ac_check_lib_save_LIBS=$LIBS
48847LIBS="-ldnet_stub  $LIBS"
48848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48849/* end confdefs.h.  */
48850
48851/* Override any GCC internal prototype to avoid an error.
48852   Use char because int might match the return type of a GCC
48853   builtin and then its argument prototype would still apply.  */
48854#ifdef __cplusplus
48855extern "C"
48856#endif
48857char dnet_ntoa ();
48858int
48859main ()
48860{
48861return dnet_ntoa ();
48862  ;
48863  return 0;
48864}
48865_ACEOF
48866if ac_fn_cxx_try_link "$LINENO"; then :
48867  ac_cv_lib_dnet_stub_dnet_ntoa=yes
48868else
48869  ac_cv_lib_dnet_stub_dnet_ntoa=no
48870fi
48871rm -f core conftest.err conftest.$ac_objext \
48872    conftest$ac_exeext conftest.$ac_ext
48873LIBS=$ac_check_lib_save_LIBS
48874fi
48875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
48876$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
48877if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
48878  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
48879fi
48880
48881    fi
48882fi
48883rm -f core conftest.err conftest.$ac_objext \
48884    conftest$ac_exeext conftest.$ac_ext
48885    LIBS="$ac_xsave_LIBS"
48886
48887    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
48888    # to get the SysV transport functions.
48889    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
48890    # needs -lnsl.
48891    # The nsl library prevents programs from opening the X display
48892    # on Irix 5.2, according to T.E. Dickey.
48893    # The functions gethostbyname, getservbyname, and inet_addr are
48894    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
48895    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
48896if test "x$ac_cv_func_gethostbyname" = xyes; then :
48897
48898fi
48899
48900    if test $ac_cv_func_gethostbyname = no; then
48901      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
48902$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
48903if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
48904  $as_echo_n "(cached) " >&6
48905else
48906  ac_check_lib_save_LIBS=$LIBS
48907LIBS="-lnsl  $LIBS"
48908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48909/* end confdefs.h.  */
48910
48911/* Override any GCC internal prototype to avoid an error.
48912   Use char because int might match the return type of a GCC
48913   builtin and then its argument prototype would still apply.  */
48914#ifdef __cplusplus
48915extern "C"
48916#endif
48917char gethostbyname ();
48918int
48919main ()
48920{
48921return gethostbyname ();
48922  ;
48923  return 0;
48924}
48925_ACEOF
48926if ac_fn_cxx_try_link "$LINENO"; then :
48927  ac_cv_lib_nsl_gethostbyname=yes
48928else
48929  ac_cv_lib_nsl_gethostbyname=no
48930fi
48931rm -f core conftest.err conftest.$ac_objext \
48932    conftest$ac_exeext conftest.$ac_ext
48933LIBS=$ac_check_lib_save_LIBS
48934fi
48935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
48936$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
48937if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
48938  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
48939fi
48940
48941      if test $ac_cv_lib_nsl_gethostbyname = no; then
48942	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
48943$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
48944if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
48945  $as_echo_n "(cached) " >&6
48946else
48947  ac_check_lib_save_LIBS=$LIBS
48948LIBS="-lbsd  $LIBS"
48949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48950/* end confdefs.h.  */
48951
48952/* Override any GCC internal prototype to avoid an error.
48953   Use char because int might match the return type of a GCC
48954   builtin and then its argument prototype would still apply.  */
48955#ifdef __cplusplus
48956extern "C"
48957#endif
48958char gethostbyname ();
48959int
48960main ()
48961{
48962return gethostbyname ();
48963  ;
48964  return 0;
48965}
48966_ACEOF
48967if ac_fn_cxx_try_link "$LINENO"; then :
48968  ac_cv_lib_bsd_gethostbyname=yes
48969else
48970  ac_cv_lib_bsd_gethostbyname=no
48971fi
48972rm -f core conftest.err conftest.$ac_objext \
48973    conftest$ac_exeext conftest.$ac_ext
48974LIBS=$ac_check_lib_save_LIBS
48975fi
48976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
48977$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
48978if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
48979  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
48980fi
48981
48982      fi
48983    fi
48984
48985    # lieder@skyler.mavd.honeywell.com says without -lsocket,
48986    # socket/setsockopt and other routines are undefined under SCO ODT
48987    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
48988    # on later versions), says Simon Leinen: it contains gethostby*
48989    # variants that don't use the name server (or something).  -lsocket
48990    # must be given before -lnsl if both are needed.  We assume that
48991    # if connect needs -lnsl, so does gethostbyname.
48992    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
48993if test "x$ac_cv_func_connect" = xyes; then :
48994
48995fi
48996
48997    if test $ac_cv_func_connect = no; then
48998      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
48999$as_echo_n "checking for connect in -lsocket... " >&6; }
49000if ${ac_cv_lib_socket_connect+:} false; then :
49001  $as_echo_n "(cached) " >&6
49002else
49003  ac_check_lib_save_LIBS=$LIBS
49004LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
49005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49006/* end confdefs.h.  */
49007
49008/* Override any GCC internal prototype to avoid an error.
49009   Use char because int might match the return type of a GCC
49010   builtin and then its argument prototype would still apply.  */
49011#ifdef __cplusplus
49012extern "C"
49013#endif
49014char connect ();
49015int
49016main ()
49017{
49018return connect ();
49019  ;
49020  return 0;
49021}
49022_ACEOF
49023if ac_fn_cxx_try_link "$LINENO"; then :
49024  ac_cv_lib_socket_connect=yes
49025else
49026  ac_cv_lib_socket_connect=no
49027fi
49028rm -f core conftest.err conftest.$ac_objext \
49029    conftest$ac_exeext conftest.$ac_ext
49030LIBS=$ac_check_lib_save_LIBS
49031fi
49032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
49033$as_echo "$ac_cv_lib_socket_connect" >&6; }
49034if test "x$ac_cv_lib_socket_connect" = xyes; then :
49035  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
49036fi
49037
49038    fi
49039
49040    # Guillermo Gomez says -lposix is necessary on A/UX.
49041    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
49042if test "x$ac_cv_func_remove" = xyes; then :
49043
49044fi
49045
49046    if test $ac_cv_func_remove = no; then
49047      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
49048$as_echo_n "checking for remove in -lposix... " >&6; }
49049if ${ac_cv_lib_posix_remove+:} false; then :
49050  $as_echo_n "(cached) " >&6
49051else
49052  ac_check_lib_save_LIBS=$LIBS
49053LIBS="-lposix  $LIBS"
49054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49055/* end confdefs.h.  */
49056
49057/* Override any GCC internal prototype to avoid an error.
49058   Use char because int might match the return type of a GCC
49059   builtin and then its argument prototype would still apply.  */
49060#ifdef __cplusplus
49061extern "C"
49062#endif
49063char remove ();
49064int
49065main ()
49066{
49067return remove ();
49068  ;
49069  return 0;
49070}
49071_ACEOF
49072if ac_fn_cxx_try_link "$LINENO"; then :
49073  ac_cv_lib_posix_remove=yes
49074else
49075  ac_cv_lib_posix_remove=no
49076fi
49077rm -f core conftest.err conftest.$ac_objext \
49078    conftest$ac_exeext conftest.$ac_ext
49079LIBS=$ac_check_lib_save_LIBS
49080fi
49081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
49082$as_echo "$ac_cv_lib_posix_remove" >&6; }
49083if test "x$ac_cv_lib_posix_remove" = xyes; then :
49084  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
49085fi
49086
49087    fi
49088
49089    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
49090    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
49091if test "x$ac_cv_func_shmat" = xyes; then :
49092
49093fi
49094
49095    if test $ac_cv_func_shmat = no; then
49096      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
49097$as_echo_n "checking for shmat in -lipc... " >&6; }
49098if ${ac_cv_lib_ipc_shmat+:} false; then :
49099  $as_echo_n "(cached) " >&6
49100else
49101  ac_check_lib_save_LIBS=$LIBS
49102LIBS="-lipc  $LIBS"
49103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49104/* end confdefs.h.  */
49105
49106/* Override any GCC internal prototype to avoid an error.
49107   Use char because int might match the return type of a GCC
49108   builtin and then its argument prototype would still apply.  */
49109#ifdef __cplusplus
49110extern "C"
49111#endif
49112char shmat ();
49113int
49114main ()
49115{
49116return shmat ();
49117  ;
49118  return 0;
49119}
49120_ACEOF
49121if ac_fn_cxx_try_link "$LINENO"; then :
49122  ac_cv_lib_ipc_shmat=yes
49123else
49124  ac_cv_lib_ipc_shmat=no
49125fi
49126rm -f core conftest.err conftest.$ac_objext \
49127    conftest$ac_exeext conftest.$ac_ext
49128LIBS=$ac_check_lib_save_LIBS
49129fi
49130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
49131$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
49132if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
49133  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
49134fi
49135
49136    fi
49137  fi
49138
49139  # Check for libraries that X11R6 Xt/Xaw programs need.
49140  ac_save_LDFLAGS=$LDFLAGS
49141  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
49142  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
49143  # check for ICE first), but we must link in the order -lSM -lICE or
49144  # we get undefined symbols.  So assume we have SM if we have ICE.
49145  # These have to be linked with before -lX11, unlike the other
49146  # libraries we check for below, so use a different variable.
49147  # John Interrante, Karl Berry
49148  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
49149$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
49150if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
49151  $as_echo_n "(cached) " >&6
49152else
49153  ac_check_lib_save_LIBS=$LIBS
49154LIBS="-lICE $X_EXTRA_LIBS $LIBS"
49155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49156/* end confdefs.h.  */
49157
49158/* Override any GCC internal prototype to avoid an error.
49159   Use char because int might match the return type of a GCC
49160   builtin and then its argument prototype would still apply.  */
49161#ifdef __cplusplus
49162extern "C"
49163#endif
49164char IceConnectionNumber ();
49165int
49166main ()
49167{
49168return IceConnectionNumber ();
49169  ;
49170  return 0;
49171}
49172_ACEOF
49173if ac_fn_cxx_try_link "$LINENO"; then :
49174  ac_cv_lib_ICE_IceConnectionNumber=yes
49175else
49176  ac_cv_lib_ICE_IceConnectionNumber=no
49177fi
49178rm -f core conftest.err conftest.$ac_objext \
49179    conftest$ac_exeext conftest.$ac_ext
49180LIBS=$ac_check_lib_save_LIBS
49181fi
49182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
49183$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
49184if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
49185  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
49186fi
49187
49188  LDFLAGS=$ac_save_LDFLAGS
49189
49190fi
49191
49192
49193    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
49194    # this doesn't make sense so we remove it.
49195    if test "x$COMPILE_TYPE" = xcross; then
49196      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
49197    fi
49198
49199    if test "x$no_x" = xyes; then
49200
49201  # Print a helpful message on how to acquire the necessary build dependency.
49202  # x11 is the help tag: freetype, cups, alsa etc
49203  MISSING_DEPENDENCY=x11
49204
49205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49206    cygwin_help $MISSING_DEPENDENCY
49207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49208    msys_help $MISSING_DEPENDENCY
49209  else
49210    PKGHANDLER_COMMAND=
49211
49212    case $PKGHANDLER in
49213      apt-get)
49214        apt_help     $MISSING_DEPENDENCY ;;
49215      yum)
49216        yum_help     $MISSING_DEPENDENCY ;;
49217      port)
49218        port_help    $MISSING_DEPENDENCY ;;
49219      pkgutil)
49220        pkgutil_help $MISSING_DEPENDENCY ;;
49221      pkgadd)
49222        pkgadd_help  $MISSING_DEPENDENCY ;;
49223    esac
49224
49225    if test "x$PKGHANDLER_COMMAND" != x; then
49226      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49227    fi
49228  fi
49229
49230      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
49231    fi
49232
49233    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49234      OPENWIN_HOME="/usr/openwin"
49235      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
49236      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49237          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
49238          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49239          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
49240    fi
49241
49242    ac_ext=c
49243ac_cpp='$CPP $CPPFLAGS'
49244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49246ac_compiler_gnu=$ac_cv_c_compiler_gnu
49247
49248    OLD_CFLAGS="$CFLAGS"
49249    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
49250
49251    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
49252    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
49253do :
49254  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49255ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
49256          # include <X11/Xlib.h>
49257          # include <X11/Xutil.h>
49258
49259
49260"
49261if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49262  cat >>confdefs.h <<_ACEOF
49263#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49264_ACEOF
49265 X11_HEADERS_OK=yes
49266else
49267  X11_HEADERS_OK=no; break
49268fi
49269
49270done
49271
49272
49273    if test "x$X11_HEADERS_OK" = xno; then
49274
49275  # Print a helpful message on how to acquire the necessary build dependency.
49276  # x11 is the help tag: freetype, cups, alsa etc
49277  MISSING_DEPENDENCY=x11
49278
49279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49280    cygwin_help $MISSING_DEPENDENCY
49281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49282    msys_help $MISSING_DEPENDENCY
49283  else
49284    PKGHANDLER_COMMAND=
49285
49286    case $PKGHANDLER in
49287      apt-get)
49288        apt_help     $MISSING_DEPENDENCY ;;
49289      yum)
49290        yum_help     $MISSING_DEPENDENCY ;;
49291      port)
49292        port_help    $MISSING_DEPENDENCY ;;
49293      pkgutil)
49294        pkgutil_help $MISSING_DEPENDENCY ;;
49295      pkgadd)
49296        pkgadd_help  $MISSING_DEPENDENCY ;;
49297    esac
49298
49299    if test "x$PKGHANDLER_COMMAND" != x; then
49300      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49301    fi
49302  fi
49303
49304      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
49305    fi
49306
49307    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
49308    # defined in libawt_xawt.
49309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
49310$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
49311    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49312/* end confdefs.h.  */
49313#include <X11/extensions/Xrender.h>
49314int
49315main ()
49316{
49317XLinearGradient x;
49318  ;
49319  return 0;
49320}
49321_ACEOF
49322if ac_fn_c_try_compile "$LINENO"; then :
49323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49324$as_echo "yes" >&6; }
49325else
49326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49327$as_echo "no" >&6; }
49328         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
49329fi
49330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49331
49332    CFLAGS="$OLD_CFLAGS"
49333    ac_ext=cpp
49334ac_cpp='$CXXCPP $CPPFLAGS'
49335ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49336ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49337ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49338
49339  fi # NEEDS_LIB_X11
49340
49341
49342
49343
49344
49345
49346# Check whether --with-cups was given.
49347if test "${with_cups+set}" = set; then :
49348  withval=$with_cups;
49349fi
49350
49351
49352# Check whether --with-cups-include was given.
49353if test "${with_cups_include+set}" = set; then :
49354  withval=$with_cups_include;
49355fi
49356
49357
49358  if test "x$NEEDS_LIB_CUPS" = xfalse; then
49359    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
49360        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
49361      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
49362$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
49363    fi
49364    CUPS_CFLAGS=
49365  else
49366    CUPS_FOUND=no
49367
49368    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
49369      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
49370    fi
49371
49372    if test "x${with_cups}" != x; then
49373      CUPS_CFLAGS="-I${with_cups}/include"
49374      CUPS_FOUND=yes
49375    fi
49376    if test "x${with_cups_include}" != x; then
49377      CUPS_CFLAGS="-I${with_cups_include}"
49378      CUPS_FOUND=yes
49379    fi
49380    if test "x$CUPS_FOUND" = xno; then
49381      # Are the cups headers installed in the default /usr/include location?
49382      for ac_header in cups/cups.h cups/ppd.h
49383do :
49384  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49385ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49386if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49387  cat >>confdefs.h <<_ACEOF
49388#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49389_ACEOF
49390
49391          CUPS_FOUND=yes
49392          CUPS_CFLAGS=
49393          DEFAULT_CUPS=yes
49394
49395fi
49396
49397done
49398
49399    fi
49400    if test "x$CUPS_FOUND" = xno; then
49401      # Getting nervous now? Lets poke around for standard Solaris third-party
49402      # package installation locations.
49403      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
49404$as_echo_n "checking for cups headers... " >&6; }
49405      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
49406        # An SFW package seems to be installed!
49407        CUPS_FOUND=yes
49408        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
49409      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
49410        # A CSW package seems to be installed!
49411        CUPS_FOUND=yes
49412        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
49413      fi
49414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
49415$as_echo "$CUPS_FOUND" >&6; }
49416    fi
49417    if test "x$CUPS_FOUND" = xno; then
49418
49419  # Print a helpful message on how to acquire the necessary build dependency.
49420  # cups is the help tag: freetype, cups, alsa etc
49421  MISSING_DEPENDENCY=cups
49422
49423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49424    cygwin_help $MISSING_DEPENDENCY
49425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49426    msys_help $MISSING_DEPENDENCY
49427  else
49428    PKGHANDLER_COMMAND=
49429
49430    case $PKGHANDLER in
49431      apt-get)
49432        apt_help     $MISSING_DEPENDENCY ;;
49433      yum)
49434        yum_help     $MISSING_DEPENDENCY ;;
49435      port)
49436        port_help    $MISSING_DEPENDENCY ;;
49437      pkgutil)
49438        pkgutil_help $MISSING_DEPENDENCY ;;
49439      pkgadd)
49440        pkgadd_help  $MISSING_DEPENDENCY ;;
49441    esac
49442
49443    if test "x$PKGHANDLER_COMMAND" != x; then
49444      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49445    fi
49446  fi
49447
49448      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
49449    fi
49450  fi
49451
49452
49453
49454
49455
49456# Check whether --with-freetype was given.
49457if test "${with_freetype+set}" = set; then :
49458  withval=$with_freetype;
49459fi
49460
49461
49462# Check whether --with-freetype-include was given.
49463if test "${with_freetype_include+set}" = set; then :
49464  withval=$with_freetype_include;
49465fi
49466
49467
49468# Check whether --with-freetype-lib was given.
49469if test "${with_freetype_lib+set}" = set; then :
49470  withval=$with_freetype_lib;
49471fi
49472
49473
49474# Check whether --with-freetype-src was given.
49475if test "${with_freetype_src+set}" = set; then :
49476  withval=$with_freetype_src;
49477fi
49478
49479  # Check whether --enable-freetype-bundling was given.
49480if test "${enable_freetype_bundling+set}" = set; then :
49481  enableval=$enable_freetype_bundling;
49482fi
49483
49484
49485  # Need to specify explicitly since it needs to be overridden on some versions of macosx
49486  FREETYPE_BASE_NAME=freetype
49487  FREETYPE_CFLAGS=
49488  FREETYPE_LIBS=
49489  FREETYPE_BUNDLE_LIB_PATH=
49490
49491  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
49492    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
49493        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
49494        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
49495        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
49496      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
49497$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
49498    fi
49499    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
49500      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
49501$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
49502    fi
49503  else
49504    # freetype is needed to build; go get it!
49505
49506    BUNDLE_FREETYPE="$enable_freetype_bundling"
49507
49508    if  test "x$with_freetype_src" != x; then
49509      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49510        # Try to build freetype if --with-freetype-src was given on Windows
49511
49512  FREETYPE_SRC_PATH="$with_freetype_src"
49513  BUILD_FREETYPE=yes
49514
49515  # Check if the freetype sources are acessible..
49516  if ! test -d $FREETYPE_SRC_PATH; then
49517    { $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
49518$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
49519    BUILD_FREETYPE=no
49520  fi
49521  # ..and contain a vc2010 project file
49522  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
49523  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
49524    { $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
49525$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
49526    BUILD_FREETYPE=no
49527  fi
49528  # Now check if configure found a version of 'msbuild.exe'
49529  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
49530    { $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
49531$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;}
49532    BUILD_FREETYPE=no
49533  fi
49534
49535  # Ready to go..
49536  if test "x$BUILD_FREETYPE" = xyes; then
49537    # msbuild requires trailing slashes for output directories
49538    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
49539    freetype_lib_path_unix="$freetype_lib_path"
49540    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
49541
49542  unix_path="$vcxproj_path"
49543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49544    windows_path=`$CYGPATH -m "$unix_path"`
49545    vcxproj_path="$windows_path"
49546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49547    windows_path=`cmd //c echo $unix_path`
49548    vcxproj_path="$windows_path"
49549  fi
49550
49551
49552  unix_path="$freetype_lib_path"
49553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49554    windows_path=`$CYGPATH -m "$unix_path"`
49555    freetype_lib_path="$windows_path"
49556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49557    windows_path=`cmd //c echo $unix_path`
49558    freetype_lib_path="$windows_path"
49559  fi
49560
49561
49562  unix_path="$freetype_obj_path"
49563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49564    windows_path=`$CYGPATH -m "$unix_path"`
49565    freetype_obj_path="$windows_path"
49566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49567    windows_path=`cmd //c echo $unix_path`
49568    freetype_obj_path="$windows_path"
49569  fi
49570
49571    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49572      freetype_platform=x64
49573    else
49574      freetype_platform=win32
49575    fi
49576
49577    # The original freetype project file is for VS 2010 (i.e. 'v100'),
49578    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
49579    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
49580    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
49581    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
49582$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
49583
49584    # First we try to build the freetype.dll
49585    $ECHO -e "@echo off\n"\
49586        "$MSBUILD $vcxproj_path "\
49587        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49588        "/p:Configuration=\"Release Multithreaded\" "\
49589        "/p:Platform=$freetype_platform "\
49590        "/p:ConfigurationType=DynamicLibrary "\
49591        "/p:TargetName=freetype "\
49592        "/p:OutDir=\"$freetype_lib_path\" "\
49593        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
49594    cmd /c freetype.bat
49595
49596    if test -s "$freetype_lib_path_unix/freetype.dll"; then
49597      # If that succeeds we also build freetype.lib
49598      $ECHO -e "@echo off\n"\
49599          "$MSBUILD $vcxproj_path "\
49600          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49601          "/p:Configuration=\"Release Multithreaded\" "\
49602          "/p:Platform=$freetype_platform "\
49603          "/p:ConfigurationType=StaticLibrary "\
49604          "/p:TargetName=freetype "\
49605          "/p:OutDir=\"$freetype_lib_path\" "\
49606          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
49607      cmd /c freetype.bat
49608
49609      if test -s "$freetype_lib_path_unix/freetype.lib"; then
49610        # Once we build both, lib and dll, set freetype lib and include path appropriately
49611        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
49612        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
49613        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
49614$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
49615      else
49616        BUILD_FREETYPE=no
49617      fi
49618    else
49619      BUILD_FREETYPE=no
49620    fi
49621  fi
49622
49623        if test "x$BUILD_FREETYPE" = xyes; then
49624          # Okay, we built it. Check that it works.
49625
49626  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49627  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49628  METHOD="--with-freetype-src"
49629
49630  # Let's start with an optimistic view of the world :-)
49631  FOUND_FREETYPE=yes
49632
49633  # First look for the canonical freetype main include file ft2build.h.
49634  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49635    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49636    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49637    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49638      # Fail.
49639      FOUND_FREETYPE=no
49640    fi
49641  fi
49642
49643  if test "x$FOUND_FREETYPE" = xyes; then
49644    # Include file found, let's continue the sanity check.
49645    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49646$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49647
49648    # Reset to default value
49649    FREETYPE_BASE_NAME=freetype
49650    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49651    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49652      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49653          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49654        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49655        # for the .6 version explicitly.
49656        FREETYPE_BASE_NAME=freetype.6
49657        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49658        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49659$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49660      else
49661        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49662$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49663        FOUND_FREETYPE=no
49664      fi
49665    else
49666      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49667        # On Windows, we will need both .lib and .dll file.
49668        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49669          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49670$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49671          FOUND_FREETYPE=no
49672        fi
49673      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49674          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49675        # Found lib in isa dir, use that instead.
49676        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49677        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49678$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49679      fi
49680    fi
49681  fi
49682
49683  if test "x$FOUND_FREETYPE" = xyes; then
49684
49685  # Only process if variable expands to non-empty
49686
49687  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49689
49690  # Input might be given as Windows format, start by converting to
49691  # unix format.
49692  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49693  new_path=`$CYGPATH -u "$path"`
49694
49695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49698  # "foo.exe" is OK but "foo" is an error.
49699  #
49700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49701  # It is also a way to make sure we got the proper file name for the real test later on.
49702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49703  if test "x$test_shortpath" = x; then
49704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49705$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49706    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49707  fi
49708
49709  # Call helper function which possibly converts this using DOS-style short mode.
49710  # If so, the updated path is stored in $new_path.
49711
49712  input_path="$new_path"
49713  # Check if we need to convert this using DOS-style short mode. If the path
49714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49715  # take no chances and rewrite it.
49716  # Note: m4 eats our [], so we need to use [ and ] instead.
49717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49718  if test "x$has_forbidden_chars" != x; then
49719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49723      # Going to short mode and back again did indeed matter. Since short mode is
49724      # case insensitive, let's make it lowercase to improve readability.
49725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49726      # Now convert it back to Unix-style (cygpath)
49727      input_path=`$CYGPATH -u "$shortmode_path"`
49728      new_path="$input_path"
49729    fi
49730  fi
49731
49732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49733  if test "x$test_cygdrive_prefix" = x; then
49734    # As a simple fix, exclude /usr/bin since it's not a real path.
49735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49737      # a path prefixed by /cygdrive for fixpath to work.
49738      new_path="$CYGWIN_ROOT_PATH$input_path"
49739    fi
49740  fi
49741
49742
49743  if test "x$path" != "x$new_path"; then
49744    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49746$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49747  fi
49748
49749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49750
49751  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49752  has_colon=`$ECHO $path | $GREP ^.:`
49753  new_path="$path"
49754  if test "x$has_colon" = x; then
49755    # Not in mixed or Windows style, start by that.
49756    new_path=`cmd //c echo $path`
49757  fi
49758
49759
49760  input_path="$new_path"
49761  # Check if we need to convert this using DOS-style short mode. If the path
49762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49763  # take no chances and rewrite it.
49764  # Note: m4 eats our [], so we need to use [ and ] instead.
49765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49766  if test "x$has_forbidden_chars" != x; then
49767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49769  fi
49770
49771
49772  windows_path="$new_path"
49773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49774    unix_path=`$CYGPATH -u "$windows_path"`
49775    new_path="$unix_path"
49776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49778    new_path="$unix_path"
49779  fi
49780
49781  if test "x$path" != "x$new_path"; then
49782    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49784$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49785  fi
49786
49787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49789
49790    else
49791      # We're on a unix platform. Hooray! :)
49792      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49793      has_space=`$ECHO "$path" | $GREP " "`
49794      if test "x$has_space" != x; then
49795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49796$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49797        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49798      fi
49799
49800      # Use eval to expand a potential ~
49801      eval path="$path"
49802      if test ! -f "$path" && test ! -d "$path"; then
49803        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49804      fi
49805
49806      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49807    fi
49808  fi
49809
49810
49811  # Only process if variable expands to non-empty
49812
49813  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49815
49816  # Input might be given as Windows format, start by converting to
49817  # unix format.
49818  path="$POTENTIAL_FREETYPE_LIB_PATH"
49819  new_path=`$CYGPATH -u "$path"`
49820
49821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49824  # "foo.exe" is OK but "foo" is an error.
49825  #
49826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49827  # It is also a way to make sure we got the proper file name for the real test later on.
49828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49829  if test "x$test_shortpath" = x; then
49830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49832    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49833  fi
49834
49835  # Call helper function which possibly converts this using DOS-style short mode.
49836  # If so, the updated path is stored in $new_path.
49837
49838  input_path="$new_path"
49839  # Check if we need to convert this using DOS-style short mode. If the path
49840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49841  # take no chances and rewrite it.
49842  # Note: m4 eats our [], so we need to use [ and ] instead.
49843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49844  if test "x$has_forbidden_chars" != x; then
49845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49849      # Going to short mode and back again did indeed matter. Since short mode is
49850      # case insensitive, let's make it lowercase to improve readability.
49851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49852      # Now convert it back to Unix-style (cygpath)
49853      input_path=`$CYGPATH -u "$shortmode_path"`
49854      new_path="$input_path"
49855    fi
49856  fi
49857
49858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49859  if test "x$test_cygdrive_prefix" = x; then
49860    # As a simple fix, exclude /usr/bin since it's not a real path.
49861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49863      # a path prefixed by /cygdrive for fixpath to work.
49864      new_path="$CYGWIN_ROOT_PATH$input_path"
49865    fi
49866  fi
49867
49868
49869  if test "x$path" != "x$new_path"; then
49870    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49873  fi
49874
49875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49876
49877  path="$POTENTIAL_FREETYPE_LIB_PATH"
49878  has_colon=`$ECHO $path | $GREP ^.:`
49879  new_path="$path"
49880  if test "x$has_colon" = x; then
49881    # Not in mixed or Windows style, start by that.
49882    new_path=`cmd //c echo $path`
49883  fi
49884
49885
49886  input_path="$new_path"
49887  # Check if we need to convert this using DOS-style short mode. If the path
49888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49889  # take no chances and rewrite it.
49890  # Note: m4 eats our [], so we need to use [ and ] instead.
49891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49892  if test "x$has_forbidden_chars" != x; then
49893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49895  fi
49896
49897
49898  windows_path="$new_path"
49899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49900    unix_path=`$CYGPATH -u "$windows_path"`
49901    new_path="$unix_path"
49902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49904    new_path="$unix_path"
49905  fi
49906
49907  if test "x$path" != "x$new_path"; then
49908    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49910$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49911  fi
49912
49913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49915
49916    else
49917      # We're on a unix platform. Hooray! :)
49918      path="$POTENTIAL_FREETYPE_LIB_PATH"
49919      has_space=`$ECHO "$path" | $GREP " "`
49920      if test "x$has_space" != x; then
49921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49924      fi
49925
49926      # Use eval to expand a potential ~
49927      eval path="$path"
49928      if test ! -f "$path" && test ! -d "$path"; then
49929        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49930      fi
49931
49932      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49933    fi
49934  fi
49935
49936
49937    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49938    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49939$as_echo_n "checking for freetype includes... " >&6; }
49940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49941$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49942    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49944$as_echo_n "checking for freetype libraries... " >&6; }
49945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49946$as_echo "$FREETYPE_LIB_PATH" >&6; }
49947  fi
49948
49949          if test "x$FOUND_FREETYPE" != xyes; then
49950            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
49951          fi
49952        else
49953          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
49954$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
49955          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
49956        fi
49957      else
49958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
49959$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
49960      fi
49961    fi
49962
49963    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
49964      # User has specified settings
49965
49966      if test "x$BUNDLE_FREETYPE" = x; then
49967        # If not specified, default is to bundle freetype
49968        BUNDLE_FREETYPE=yes
49969      fi
49970
49971      if test "x$with_freetype" != x; then
49972        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
49973        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
49974      fi
49975
49976      # Allow --with-freetype-lib and --with-freetype-include to override
49977      if test "x$with_freetype_include" != x; then
49978        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
49979      fi
49980      if test "x$with_freetype_lib" != x; then
49981        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
49982      fi
49983
49984      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49985        # Okay, we got it. Check that it works.
49986
49987  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49988  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49989  METHOD="--with-freetype"
49990
49991  # Let's start with an optimistic view of the world :-)
49992  FOUND_FREETYPE=yes
49993
49994  # First look for the canonical freetype main include file ft2build.h.
49995  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49996    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49997    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49998    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49999      # Fail.
50000      FOUND_FREETYPE=no
50001    fi
50002  fi
50003
50004  if test "x$FOUND_FREETYPE" = xyes; then
50005    # Include file found, let's continue the sanity check.
50006    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50007$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50008
50009    # Reset to default value
50010    FREETYPE_BASE_NAME=freetype
50011    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50012    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50013      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50014          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50015        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50016        # for the .6 version explicitly.
50017        FREETYPE_BASE_NAME=freetype.6
50018        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50019        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50020$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50021      else
50022        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50023$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50024        FOUND_FREETYPE=no
50025      fi
50026    else
50027      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50028        # On Windows, we will need both .lib and .dll file.
50029        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50030          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50031$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50032          FOUND_FREETYPE=no
50033        fi
50034      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50035          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50036        # Found lib in isa dir, use that instead.
50037        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50038        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50039$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50040      fi
50041    fi
50042  fi
50043
50044  if test "x$FOUND_FREETYPE" = xyes; then
50045
50046  # Only process if variable expands to non-empty
50047
50048  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50050
50051  # Input might be given as Windows format, start by converting to
50052  # unix format.
50053  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50054  new_path=`$CYGPATH -u "$path"`
50055
50056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50059  # "foo.exe" is OK but "foo" is an error.
50060  #
50061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50062  # It is also a way to make sure we got the proper file name for the real test later on.
50063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50064  if test "x$test_shortpath" = x; then
50065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50066$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50067    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50068  fi
50069
50070  # Call helper function which possibly converts this using DOS-style short mode.
50071  # If so, the updated path is stored in $new_path.
50072
50073  input_path="$new_path"
50074  # Check if we need to convert this using DOS-style short mode. If the path
50075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50076  # take no chances and rewrite it.
50077  # Note: m4 eats our [], so we need to use [ and ] instead.
50078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50079  if test "x$has_forbidden_chars" != x; then
50080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50084      # Going to short mode and back again did indeed matter. Since short mode is
50085      # case insensitive, let's make it lowercase to improve readability.
50086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50087      # Now convert it back to Unix-style (cygpath)
50088      input_path=`$CYGPATH -u "$shortmode_path"`
50089      new_path="$input_path"
50090    fi
50091  fi
50092
50093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50094  if test "x$test_cygdrive_prefix" = x; then
50095    # As a simple fix, exclude /usr/bin since it's not a real path.
50096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50098      # a path prefixed by /cygdrive for fixpath to work.
50099      new_path="$CYGWIN_ROOT_PATH$input_path"
50100    fi
50101  fi
50102
50103
50104  if test "x$path" != "x$new_path"; then
50105    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50108  fi
50109
50110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50111
50112  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50113  has_colon=`$ECHO $path | $GREP ^.:`
50114  new_path="$path"
50115  if test "x$has_colon" = x; then
50116    # Not in mixed or Windows style, start by that.
50117    new_path=`cmd //c echo $path`
50118  fi
50119
50120
50121  input_path="$new_path"
50122  # Check if we need to convert this using DOS-style short mode. If the path
50123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50124  # take no chances and rewrite it.
50125  # Note: m4 eats our [], so we need to use [ and ] instead.
50126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50127  if test "x$has_forbidden_chars" != x; then
50128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50130  fi
50131
50132
50133  windows_path="$new_path"
50134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50135    unix_path=`$CYGPATH -u "$windows_path"`
50136    new_path="$unix_path"
50137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50139    new_path="$unix_path"
50140  fi
50141
50142  if test "x$path" != "x$new_path"; then
50143    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50145$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50146  fi
50147
50148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50150
50151    else
50152      # We're on a unix platform. Hooray! :)
50153      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50154      has_space=`$ECHO "$path" | $GREP " "`
50155      if test "x$has_space" != x; then
50156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50157$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50158        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50159      fi
50160
50161      # Use eval to expand a potential ~
50162      eval path="$path"
50163      if test ! -f "$path" && test ! -d "$path"; then
50164        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50165      fi
50166
50167      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50168    fi
50169  fi
50170
50171
50172  # Only process if variable expands to non-empty
50173
50174  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50176
50177  # Input might be given as Windows format, start by converting to
50178  # unix format.
50179  path="$POTENTIAL_FREETYPE_LIB_PATH"
50180  new_path=`$CYGPATH -u "$path"`
50181
50182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50185  # "foo.exe" is OK but "foo" is an error.
50186  #
50187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50188  # It is also a way to make sure we got the proper file name for the real test later on.
50189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50190  if test "x$test_shortpath" = x; then
50191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50193    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50194  fi
50195
50196  # Call helper function which possibly converts this using DOS-style short mode.
50197  # If so, the updated path is stored in $new_path.
50198
50199  input_path="$new_path"
50200  # Check if we need to convert this using DOS-style short mode. If the path
50201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50202  # take no chances and rewrite it.
50203  # Note: m4 eats our [], so we need to use [ and ] instead.
50204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50205  if test "x$has_forbidden_chars" != x; then
50206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50210      # Going to short mode and back again did indeed matter. Since short mode is
50211      # case insensitive, let's make it lowercase to improve readability.
50212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50213      # Now convert it back to Unix-style (cygpath)
50214      input_path=`$CYGPATH -u "$shortmode_path"`
50215      new_path="$input_path"
50216    fi
50217  fi
50218
50219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50220  if test "x$test_cygdrive_prefix" = x; then
50221    # As a simple fix, exclude /usr/bin since it's not a real path.
50222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50224      # a path prefixed by /cygdrive for fixpath to work.
50225      new_path="$CYGWIN_ROOT_PATH$input_path"
50226    fi
50227  fi
50228
50229
50230  if test "x$path" != "x$new_path"; then
50231    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50233$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50234  fi
50235
50236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50237
50238  path="$POTENTIAL_FREETYPE_LIB_PATH"
50239  has_colon=`$ECHO $path | $GREP ^.:`
50240  new_path="$path"
50241  if test "x$has_colon" = x; then
50242    # Not in mixed or Windows style, start by that.
50243    new_path=`cmd //c echo $path`
50244  fi
50245
50246
50247  input_path="$new_path"
50248  # Check if we need to convert this using DOS-style short mode. If the path
50249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50250  # take no chances and rewrite it.
50251  # Note: m4 eats our [], so we need to use [ and ] instead.
50252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50253  if test "x$has_forbidden_chars" != x; then
50254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50256  fi
50257
50258
50259  windows_path="$new_path"
50260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50261    unix_path=`$CYGPATH -u "$windows_path"`
50262    new_path="$unix_path"
50263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50265    new_path="$unix_path"
50266  fi
50267
50268  if test "x$path" != "x$new_path"; then
50269    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50271$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50272  fi
50273
50274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50276
50277    else
50278      # We're on a unix platform. Hooray! :)
50279      path="$POTENTIAL_FREETYPE_LIB_PATH"
50280      has_space=`$ECHO "$path" | $GREP " "`
50281      if test "x$has_space" != x; then
50282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50283$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50285      fi
50286
50287      # Use eval to expand a potential ~
50288      eval path="$path"
50289      if test ! -f "$path" && test ! -d "$path"; then
50290        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50291      fi
50292
50293      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50294    fi
50295  fi
50296
50297
50298    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50300$as_echo_n "checking for freetype includes... " >&6; }
50301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50302$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50303    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50305$as_echo_n "checking for freetype libraries... " >&6; }
50306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50307$as_echo "$FREETYPE_LIB_PATH" >&6; }
50308  fi
50309
50310        if test "x$FOUND_FREETYPE" != xyes; then
50311          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
50312        fi
50313      else
50314        # User specified only one of lib or include. This is an error.
50315        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
50316          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
50317$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
50318          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50319        else
50320          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
50321$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
50322          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50323        fi
50324      fi
50325    else
50326      # User did not specify settings, but we need freetype. Try to locate it.
50327
50328      if test "x$BUNDLE_FREETYPE" = x; then
50329        # If not specified, default is to bundle freetype only on windows
50330        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50331          BUNDLE_FREETYPE=yes
50332        else
50333          BUNDLE_FREETYPE=no
50334        fi
50335      fi
50336
50337      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
50338      if test "x$SYSROOT" = x; then
50339        if test "x$FOUND_FREETYPE" != xyes; then
50340          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
50341          if test "x$PKG_CONFIG" != x; then
50342
50343pkg_failed=no
50344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
50345$as_echo_n "checking for FREETYPE... " >&6; }
50346
50347if test -n "$FREETYPE_CFLAGS"; then
50348    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
50349 elif test -n "$PKG_CONFIG"; then
50350    if test -n "$PKG_CONFIG" && \
50351    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50352  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50353  ac_status=$?
50354  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50355  test $ac_status = 0; }; then
50356  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
50357else
50358  pkg_failed=yes
50359fi
50360 else
50361    pkg_failed=untried
50362fi
50363if test -n "$FREETYPE_LIBS"; then
50364    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
50365 elif test -n "$PKG_CONFIG"; then
50366    if test -n "$PKG_CONFIG" && \
50367    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50368  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50369  ac_status=$?
50370  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50371  test $ac_status = 0; }; then
50372  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
50373else
50374  pkg_failed=yes
50375fi
50376 else
50377    pkg_failed=untried
50378fi
50379
50380
50381
50382if test $pkg_failed = yes; then
50383
50384if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50385        _pkg_short_errors_supported=yes
50386else
50387        _pkg_short_errors_supported=no
50388fi
50389        if test $_pkg_short_errors_supported = yes; then
50390	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
50391        else
50392	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
50393        fi
50394	# Put the nasty error message in config.log where it belongs
50395	echo "$FREETYPE_PKG_ERRORS" >&5
50396
50397	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50398$as_echo "no" >&6; }
50399                FOUND_FREETYPE=no
50400elif test $pkg_failed = untried; then
50401	FOUND_FREETYPE=no
50402else
50403	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
50404	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
50405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50406$as_echo "yes" >&6; }
50407	FOUND_FREETYPE=yes
50408fi
50409            if test "x$FOUND_FREETYPE" = xyes; then
50410              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
50411              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
50412              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
50413              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50414                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
50415              fi
50416              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
50417              if test "x$BUNDLE_FREETYPE" = xyes; then
50418                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
50419$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
50420                FOUND_FREETYPE=no
50421              else
50422                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
50423$as_echo_n "checking for freetype... " >&6; }
50424                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
50425$as_echo "yes (using pkg-config)" >&6; }
50426              fi
50427            fi
50428          fi
50429        fi
50430      fi
50431
50432      if test "x$FOUND_FREETYPE" != xyes; then
50433        # Check in well-known locations
50434        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50435          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
50436
50437  windows_path="$FREETYPE_BASE_DIR"
50438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50439    unix_path=`$CYGPATH -u "$windows_path"`
50440    FREETYPE_BASE_DIR="$unix_path"
50441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50443    FREETYPE_BASE_DIR="$unix_path"
50444  fi
50445
50446
50447  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50448  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50449  METHOD="well-known location"
50450
50451  # Let's start with an optimistic view of the world :-)
50452  FOUND_FREETYPE=yes
50453
50454  # First look for the canonical freetype main include file ft2build.h.
50455  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50456    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50457    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50458    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50459      # Fail.
50460      FOUND_FREETYPE=no
50461    fi
50462  fi
50463
50464  if test "x$FOUND_FREETYPE" = xyes; then
50465    # Include file found, let's continue the sanity check.
50466    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50467$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50468
50469    # Reset to default value
50470    FREETYPE_BASE_NAME=freetype
50471    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50472    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50473      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50474          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50475        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50476        # for the .6 version explicitly.
50477        FREETYPE_BASE_NAME=freetype.6
50478        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50479        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50480$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50481      else
50482        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50483$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50484        FOUND_FREETYPE=no
50485      fi
50486    else
50487      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50488        # On Windows, we will need both .lib and .dll file.
50489        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50490          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50491$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50492          FOUND_FREETYPE=no
50493        fi
50494      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50495          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50496        # Found lib in isa dir, use that instead.
50497        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50498        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50499$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50500      fi
50501    fi
50502  fi
50503
50504  if test "x$FOUND_FREETYPE" = xyes; then
50505
50506  # Only process if variable expands to non-empty
50507
50508  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50510
50511  # Input might be given as Windows format, start by converting to
50512  # unix format.
50513  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50514  new_path=`$CYGPATH -u "$path"`
50515
50516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50519  # "foo.exe" is OK but "foo" is an error.
50520  #
50521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50522  # It is also a way to make sure we got the proper file name for the real test later on.
50523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50524  if test "x$test_shortpath" = x; then
50525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50526$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50527    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50528  fi
50529
50530  # Call helper function which possibly converts this using DOS-style short mode.
50531  # If so, the updated path is stored in $new_path.
50532
50533  input_path="$new_path"
50534  # Check if we need to convert this using DOS-style short mode. If the path
50535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50536  # take no chances and rewrite it.
50537  # Note: m4 eats our [], so we need to use [ and ] instead.
50538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50539  if test "x$has_forbidden_chars" != x; then
50540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50544      # Going to short mode and back again did indeed matter. Since short mode is
50545      # case insensitive, let's make it lowercase to improve readability.
50546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50547      # Now convert it back to Unix-style (cygpath)
50548      input_path=`$CYGPATH -u "$shortmode_path"`
50549      new_path="$input_path"
50550    fi
50551  fi
50552
50553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50554  if test "x$test_cygdrive_prefix" = x; then
50555    # As a simple fix, exclude /usr/bin since it's not a real path.
50556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50558      # a path prefixed by /cygdrive for fixpath to work.
50559      new_path="$CYGWIN_ROOT_PATH$input_path"
50560    fi
50561  fi
50562
50563
50564  if test "x$path" != "x$new_path"; then
50565    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50567$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50568  fi
50569
50570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50571
50572  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50573  has_colon=`$ECHO $path | $GREP ^.:`
50574  new_path="$path"
50575  if test "x$has_colon" = x; then
50576    # Not in mixed or Windows style, start by that.
50577    new_path=`cmd //c echo $path`
50578  fi
50579
50580
50581  input_path="$new_path"
50582  # Check if we need to convert this using DOS-style short mode. If the path
50583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50584  # take no chances and rewrite it.
50585  # Note: m4 eats our [], so we need to use [ and ] instead.
50586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50587  if test "x$has_forbidden_chars" != x; then
50588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50590  fi
50591
50592
50593  windows_path="$new_path"
50594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50595    unix_path=`$CYGPATH -u "$windows_path"`
50596    new_path="$unix_path"
50597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50599    new_path="$unix_path"
50600  fi
50601
50602  if test "x$path" != "x$new_path"; then
50603    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50606  fi
50607
50608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50610
50611    else
50612      # We're on a unix platform. Hooray! :)
50613      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50614      has_space=`$ECHO "$path" | $GREP " "`
50615      if test "x$has_space" != x; then
50616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50618        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50619      fi
50620
50621      # Use eval to expand a potential ~
50622      eval path="$path"
50623      if test ! -f "$path" && test ! -d "$path"; then
50624        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50625      fi
50626
50627      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50628    fi
50629  fi
50630
50631
50632  # Only process if variable expands to non-empty
50633
50634  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50636
50637  # Input might be given as Windows format, start by converting to
50638  # unix format.
50639  path="$POTENTIAL_FREETYPE_LIB_PATH"
50640  new_path=`$CYGPATH -u "$path"`
50641
50642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50645  # "foo.exe" is OK but "foo" is an error.
50646  #
50647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50648  # It is also a way to make sure we got the proper file name for the real test later on.
50649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50650  if test "x$test_shortpath" = x; then
50651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50652$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50653    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50654  fi
50655
50656  # Call helper function which possibly converts this using DOS-style short mode.
50657  # If so, the updated path is stored in $new_path.
50658
50659  input_path="$new_path"
50660  # Check if we need to convert this using DOS-style short mode. If the path
50661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50662  # take no chances and rewrite it.
50663  # Note: m4 eats our [], so we need to use [ and ] instead.
50664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50665  if test "x$has_forbidden_chars" != x; then
50666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50670      # Going to short mode and back again did indeed matter. Since short mode is
50671      # case insensitive, let's make it lowercase to improve readability.
50672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50673      # Now convert it back to Unix-style (cygpath)
50674      input_path=`$CYGPATH -u "$shortmode_path"`
50675      new_path="$input_path"
50676    fi
50677  fi
50678
50679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50680  if test "x$test_cygdrive_prefix" = x; then
50681    # As a simple fix, exclude /usr/bin since it's not a real path.
50682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50684      # a path prefixed by /cygdrive for fixpath to work.
50685      new_path="$CYGWIN_ROOT_PATH$input_path"
50686    fi
50687  fi
50688
50689
50690  if test "x$path" != "x$new_path"; then
50691    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50693$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50694  fi
50695
50696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50697
50698  path="$POTENTIAL_FREETYPE_LIB_PATH"
50699  has_colon=`$ECHO $path | $GREP ^.:`
50700  new_path="$path"
50701  if test "x$has_colon" = x; then
50702    # Not in mixed or Windows style, start by that.
50703    new_path=`cmd //c echo $path`
50704  fi
50705
50706
50707  input_path="$new_path"
50708  # Check if we need to convert this using DOS-style short mode. If the path
50709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50710  # take no chances and rewrite it.
50711  # Note: m4 eats our [], so we need to use [ and ] instead.
50712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50713  if test "x$has_forbidden_chars" != x; then
50714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50716  fi
50717
50718
50719  windows_path="$new_path"
50720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50721    unix_path=`$CYGPATH -u "$windows_path"`
50722    new_path="$unix_path"
50723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50725    new_path="$unix_path"
50726  fi
50727
50728  if test "x$path" != "x$new_path"; then
50729    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50731$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50732  fi
50733
50734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50736
50737    else
50738      # We're on a unix platform. Hooray! :)
50739      path="$POTENTIAL_FREETYPE_LIB_PATH"
50740      has_space=`$ECHO "$path" | $GREP " "`
50741      if test "x$has_space" != x; then
50742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50745      fi
50746
50747      # Use eval to expand a potential ~
50748      eval path="$path"
50749      if test ! -f "$path" && test ! -d "$path"; then
50750        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50751      fi
50752
50753      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50754    fi
50755  fi
50756
50757
50758    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50760$as_echo_n "checking for freetype includes... " >&6; }
50761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50762$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50763    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50765$as_echo_n "checking for freetype libraries... " >&6; }
50766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50767$as_echo "$FREETYPE_LIB_PATH" >&6; }
50768  fi
50769
50770          if test "x$FOUND_FREETYPE" != xyes; then
50771            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
50772
50773  windows_path="$FREETYPE_BASE_DIR"
50774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50775    unix_path=`$CYGPATH -u "$windows_path"`
50776    FREETYPE_BASE_DIR="$unix_path"
50777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50779    FREETYPE_BASE_DIR="$unix_path"
50780  fi
50781
50782
50783  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50784  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50785  METHOD="well-known location"
50786
50787  # Let's start with an optimistic view of the world :-)
50788  FOUND_FREETYPE=yes
50789
50790  # First look for the canonical freetype main include file ft2build.h.
50791  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50792    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50793    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50794    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50795      # Fail.
50796      FOUND_FREETYPE=no
50797    fi
50798  fi
50799
50800  if test "x$FOUND_FREETYPE" = xyes; then
50801    # Include file found, let's continue the sanity check.
50802    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50803$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50804
50805    # Reset to default value
50806    FREETYPE_BASE_NAME=freetype
50807    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50808    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50809      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50810          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50811        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50812        # for the .6 version explicitly.
50813        FREETYPE_BASE_NAME=freetype.6
50814        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50815        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50816$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50817      else
50818        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50819$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50820        FOUND_FREETYPE=no
50821      fi
50822    else
50823      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50824        # On Windows, we will need both .lib and .dll file.
50825        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50826          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50827$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50828          FOUND_FREETYPE=no
50829        fi
50830      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50831          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50832        # Found lib in isa dir, use that instead.
50833        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50834        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50835$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50836      fi
50837    fi
50838  fi
50839
50840  if test "x$FOUND_FREETYPE" = xyes; then
50841
50842  # Only process if variable expands to non-empty
50843
50844  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50846
50847  # Input might be given as Windows format, start by converting to
50848  # unix format.
50849  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50850  new_path=`$CYGPATH -u "$path"`
50851
50852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50855  # "foo.exe" is OK but "foo" is an error.
50856  #
50857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50858  # It is also a way to make sure we got the proper file name for the real test later on.
50859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50860  if test "x$test_shortpath" = x; then
50861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50862$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50863    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50864  fi
50865
50866  # Call helper function which possibly converts this using DOS-style short mode.
50867  # If so, the updated path is stored in $new_path.
50868
50869  input_path="$new_path"
50870  # Check if we need to convert this using DOS-style short mode. If the path
50871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50872  # take no chances and rewrite it.
50873  # Note: m4 eats our [], so we need to use [ and ] instead.
50874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50875  if test "x$has_forbidden_chars" != x; then
50876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50880      # Going to short mode and back again did indeed matter. Since short mode is
50881      # case insensitive, let's make it lowercase to improve readability.
50882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50883      # Now convert it back to Unix-style (cygpath)
50884      input_path=`$CYGPATH -u "$shortmode_path"`
50885      new_path="$input_path"
50886    fi
50887  fi
50888
50889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50890  if test "x$test_cygdrive_prefix" = x; then
50891    # As a simple fix, exclude /usr/bin since it's not a real path.
50892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50894      # a path prefixed by /cygdrive for fixpath to work.
50895      new_path="$CYGWIN_ROOT_PATH$input_path"
50896    fi
50897  fi
50898
50899
50900  if test "x$path" != "x$new_path"; then
50901    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50903$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50904  fi
50905
50906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50907
50908  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50909  has_colon=`$ECHO $path | $GREP ^.:`
50910  new_path="$path"
50911  if test "x$has_colon" = x; then
50912    # Not in mixed or Windows style, start by that.
50913    new_path=`cmd //c echo $path`
50914  fi
50915
50916
50917  input_path="$new_path"
50918  # Check if we need to convert this using DOS-style short mode. If the path
50919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50920  # take no chances and rewrite it.
50921  # Note: m4 eats our [], so we need to use [ and ] instead.
50922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50923  if test "x$has_forbidden_chars" != x; then
50924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50926  fi
50927
50928
50929  windows_path="$new_path"
50930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50931    unix_path=`$CYGPATH -u "$windows_path"`
50932    new_path="$unix_path"
50933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50935    new_path="$unix_path"
50936  fi
50937
50938  if test "x$path" != "x$new_path"; then
50939    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50941$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50942  fi
50943
50944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50946
50947    else
50948      # We're on a unix platform. Hooray! :)
50949      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50950      has_space=`$ECHO "$path" | $GREP " "`
50951      if test "x$has_space" != x; then
50952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50953$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50955      fi
50956
50957      # Use eval to expand a potential ~
50958      eval path="$path"
50959      if test ! -f "$path" && test ! -d "$path"; then
50960        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50961      fi
50962
50963      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50964    fi
50965  fi
50966
50967
50968  # Only process if variable expands to non-empty
50969
50970  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50972
50973  # Input might be given as Windows format, start by converting to
50974  # unix format.
50975  path="$POTENTIAL_FREETYPE_LIB_PATH"
50976  new_path=`$CYGPATH -u "$path"`
50977
50978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50981  # "foo.exe" is OK but "foo" is an error.
50982  #
50983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50984  # It is also a way to make sure we got the proper file name for the real test later on.
50985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50986  if test "x$test_shortpath" = x; then
50987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50988$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50989    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50990  fi
50991
50992  # Call helper function which possibly converts this using DOS-style short mode.
50993  # If so, the updated path is stored in $new_path.
50994
50995  input_path="$new_path"
50996  # Check if we need to convert this using DOS-style short mode. If the path
50997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50998  # take no chances and rewrite it.
50999  # Note: m4 eats our [], so we need to use [ and ] instead.
51000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51001  if test "x$has_forbidden_chars" != x; then
51002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51006      # Going to short mode and back again did indeed matter. Since short mode is
51007      # case insensitive, let's make it lowercase to improve readability.
51008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51009      # Now convert it back to Unix-style (cygpath)
51010      input_path=`$CYGPATH -u "$shortmode_path"`
51011      new_path="$input_path"
51012    fi
51013  fi
51014
51015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51016  if test "x$test_cygdrive_prefix" = x; then
51017    # As a simple fix, exclude /usr/bin since it's not a real path.
51018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51020      # a path prefixed by /cygdrive for fixpath to work.
51021      new_path="$CYGWIN_ROOT_PATH$input_path"
51022    fi
51023  fi
51024
51025
51026  if test "x$path" != "x$new_path"; then
51027    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51029$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51030  fi
51031
51032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51033
51034  path="$POTENTIAL_FREETYPE_LIB_PATH"
51035  has_colon=`$ECHO $path | $GREP ^.:`
51036  new_path="$path"
51037  if test "x$has_colon" = x; then
51038    # Not in mixed or Windows style, start by that.
51039    new_path=`cmd //c echo $path`
51040  fi
51041
51042
51043  input_path="$new_path"
51044  # Check if we need to convert this using DOS-style short mode. If the path
51045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51046  # take no chances and rewrite it.
51047  # Note: m4 eats our [], so we need to use [ and ] instead.
51048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51049  if test "x$has_forbidden_chars" != x; then
51050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51052  fi
51053
51054
51055  windows_path="$new_path"
51056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51057    unix_path=`$CYGPATH -u "$windows_path"`
51058    new_path="$unix_path"
51059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51061    new_path="$unix_path"
51062  fi
51063
51064  if test "x$path" != "x$new_path"; then
51065    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51067$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51068  fi
51069
51070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51072
51073    else
51074      # We're on a unix platform. Hooray! :)
51075      path="$POTENTIAL_FREETYPE_LIB_PATH"
51076      has_space=`$ECHO "$path" | $GREP " "`
51077      if test "x$has_space" != x; then
51078        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51079$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51080        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51081      fi
51082
51083      # Use eval to expand a potential ~
51084      eval path="$path"
51085      if test ! -f "$path" && test ! -d "$path"; then
51086        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51087      fi
51088
51089      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51090    fi
51091  fi
51092
51093
51094    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51096$as_echo_n "checking for freetype includes... " >&6; }
51097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51098$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51099    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51101$as_echo_n "checking for freetype libraries... " >&6; }
51102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51103$as_echo "$FREETYPE_LIB_PATH" >&6; }
51104  fi
51105
51106          fi
51107        else
51108          FREETYPE_BASE_DIR="$SYSROOT/usr"
51109
51110  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51111  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51112  METHOD="well-known location"
51113
51114  # Let's start with an optimistic view of the world :-)
51115  FOUND_FREETYPE=yes
51116
51117  # First look for the canonical freetype main include file ft2build.h.
51118  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51119    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51120    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51121    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51122      # Fail.
51123      FOUND_FREETYPE=no
51124    fi
51125  fi
51126
51127  if test "x$FOUND_FREETYPE" = xyes; then
51128    # Include file found, let's continue the sanity check.
51129    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51130$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51131
51132    # Reset to default value
51133    FREETYPE_BASE_NAME=freetype
51134    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51135    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51136      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51137          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51138        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51139        # for the .6 version explicitly.
51140        FREETYPE_BASE_NAME=freetype.6
51141        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51142        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51143$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51144      else
51145        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51146$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51147        FOUND_FREETYPE=no
51148      fi
51149    else
51150      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51151        # On Windows, we will need both .lib and .dll file.
51152        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51153          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51154$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51155          FOUND_FREETYPE=no
51156        fi
51157      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51158          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51159        # Found lib in isa dir, use that instead.
51160        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51161        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51162$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51163      fi
51164    fi
51165  fi
51166
51167  if test "x$FOUND_FREETYPE" = xyes; then
51168
51169  # Only process if variable expands to non-empty
51170
51171  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51173
51174  # Input might be given as Windows format, start by converting to
51175  # unix format.
51176  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51177  new_path=`$CYGPATH -u "$path"`
51178
51179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51182  # "foo.exe" is OK but "foo" is an error.
51183  #
51184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51185  # It is also a way to make sure we got the proper file name for the real test later on.
51186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51187  if test "x$test_shortpath" = x; then
51188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51189$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51190    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51191  fi
51192
51193  # Call helper function which possibly converts this using DOS-style short mode.
51194  # If so, the updated path is stored in $new_path.
51195
51196  input_path="$new_path"
51197  # Check if we need to convert this using DOS-style short mode. If the path
51198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51199  # take no chances and rewrite it.
51200  # Note: m4 eats our [], so we need to use [ and ] instead.
51201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51202  if test "x$has_forbidden_chars" != x; then
51203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51207      # Going to short mode and back again did indeed matter. Since short mode is
51208      # case insensitive, let's make it lowercase to improve readability.
51209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51210      # Now convert it back to Unix-style (cygpath)
51211      input_path=`$CYGPATH -u "$shortmode_path"`
51212      new_path="$input_path"
51213    fi
51214  fi
51215
51216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51217  if test "x$test_cygdrive_prefix" = x; then
51218    # As a simple fix, exclude /usr/bin since it's not a real path.
51219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51221      # a path prefixed by /cygdrive for fixpath to work.
51222      new_path="$CYGWIN_ROOT_PATH$input_path"
51223    fi
51224  fi
51225
51226
51227  if test "x$path" != "x$new_path"; then
51228    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51230$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51231  fi
51232
51233    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51234
51235  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51236  has_colon=`$ECHO $path | $GREP ^.:`
51237  new_path="$path"
51238  if test "x$has_colon" = x; then
51239    # Not in mixed or Windows style, start by that.
51240    new_path=`cmd //c echo $path`
51241  fi
51242
51243
51244  input_path="$new_path"
51245  # Check if we need to convert this using DOS-style short mode. If the path
51246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51247  # take no chances and rewrite it.
51248  # Note: m4 eats our [], so we need to use [ and ] instead.
51249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51250  if test "x$has_forbidden_chars" != x; then
51251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51253  fi
51254
51255
51256  windows_path="$new_path"
51257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51258    unix_path=`$CYGPATH -u "$windows_path"`
51259    new_path="$unix_path"
51260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51262    new_path="$unix_path"
51263  fi
51264
51265  if test "x$path" != "x$new_path"; then
51266    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51268$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51269  fi
51270
51271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51273
51274    else
51275      # We're on a unix platform. Hooray! :)
51276      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51277      has_space=`$ECHO "$path" | $GREP " "`
51278      if test "x$has_space" != x; then
51279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51280$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51281        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51282      fi
51283
51284      # Use eval to expand a potential ~
51285      eval path="$path"
51286      if test ! -f "$path" && test ! -d "$path"; then
51287        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51288      fi
51289
51290      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51291    fi
51292  fi
51293
51294
51295  # Only process if variable expands to non-empty
51296
51297  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51299
51300  # Input might be given as Windows format, start by converting to
51301  # unix format.
51302  path="$POTENTIAL_FREETYPE_LIB_PATH"
51303  new_path=`$CYGPATH -u "$path"`
51304
51305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51308  # "foo.exe" is OK but "foo" is an error.
51309  #
51310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51311  # It is also a way to make sure we got the proper file name for the real test later on.
51312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51313  if test "x$test_shortpath" = x; then
51314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51315$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51316    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51317  fi
51318
51319  # Call helper function which possibly converts this using DOS-style short mode.
51320  # If so, the updated path is stored in $new_path.
51321
51322  input_path="$new_path"
51323  # Check if we need to convert this using DOS-style short mode. If the path
51324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51325  # take no chances and rewrite it.
51326  # Note: m4 eats our [], so we need to use [ and ] instead.
51327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51328  if test "x$has_forbidden_chars" != x; then
51329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51333      # Going to short mode and back again did indeed matter. Since short mode is
51334      # case insensitive, let's make it lowercase to improve readability.
51335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51336      # Now convert it back to Unix-style (cygpath)
51337      input_path=`$CYGPATH -u "$shortmode_path"`
51338      new_path="$input_path"
51339    fi
51340  fi
51341
51342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51343  if test "x$test_cygdrive_prefix" = x; then
51344    # As a simple fix, exclude /usr/bin since it's not a real path.
51345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51347      # a path prefixed by /cygdrive for fixpath to work.
51348      new_path="$CYGWIN_ROOT_PATH$input_path"
51349    fi
51350  fi
51351
51352
51353  if test "x$path" != "x$new_path"; then
51354    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51356$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51357  fi
51358
51359    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51360
51361  path="$POTENTIAL_FREETYPE_LIB_PATH"
51362  has_colon=`$ECHO $path | $GREP ^.:`
51363  new_path="$path"
51364  if test "x$has_colon" = x; then
51365    # Not in mixed or Windows style, start by that.
51366    new_path=`cmd //c echo $path`
51367  fi
51368
51369
51370  input_path="$new_path"
51371  # Check if we need to convert this using DOS-style short mode. If the path
51372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51373  # take no chances and rewrite it.
51374  # Note: m4 eats our [], so we need to use [ and ] instead.
51375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51376  if test "x$has_forbidden_chars" != x; then
51377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51379  fi
51380
51381
51382  windows_path="$new_path"
51383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51384    unix_path=`$CYGPATH -u "$windows_path"`
51385    new_path="$unix_path"
51386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51388    new_path="$unix_path"
51389  fi
51390
51391  if test "x$path" != "x$new_path"; then
51392    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51394$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51395  fi
51396
51397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51399
51400    else
51401      # We're on a unix platform. Hooray! :)
51402      path="$POTENTIAL_FREETYPE_LIB_PATH"
51403      has_space=`$ECHO "$path" | $GREP " "`
51404      if test "x$has_space" != x; then
51405        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51406$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51407        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51408      fi
51409
51410      # Use eval to expand a potential ~
51411      eval path="$path"
51412      if test ! -f "$path" && test ! -d "$path"; then
51413        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51414      fi
51415
51416      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51417    fi
51418  fi
51419
51420
51421    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51423$as_echo_n "checking for freetype includes... " >&6; }
51424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51425$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51426    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51428$as_echo_n "checking for freetype libraries... " >&6; }
51429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51430$as_echo "$FREETYPE_LIB_PATH" >&6; }
51431  fi
51432
51433
51434          if test "x$FOUND_FREETYPE" != xyes; then
51435            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
51436
51437  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51438  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51439  METHOD="well-known location"
51440
51441  # Let's start with an optimistic view of the world :-)
51442  FOUND_FREETYPE=yes
51443
51444  # First look for the canonical freetype main include file ft2build.h.
51445  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51446    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51447    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51448    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51449      # Fail.
51450      FOUND_FREETYPE=no
51451    fi
51452  fi
51453
51454  if test "x$FOUND_FREETYPE" = xyes; then
51455    # Include file found, let's continue the sanity check.
51456    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51457$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51458
51459    # Reset to default value
51460    FREETYPE_BASE_NAME=freetype
51461    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51462    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51463      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51464          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51465        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51466        # for the .6 version explicitly.
51467        FREETYPE_BASE_NAME=freetype.6
51468        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51469        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51470$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51471      else
51472        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51473$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51474        FOUND_FREETYPE=no
51475      fi
51476    else
51477      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51478        # On Windows, we will need both .lib and .dll file.
51479        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51480          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51481$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51482          FOUND_FREETYPE=no
51483        fi
51484      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51485          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51486        # Found lib in isa dir, use that instead.
51487        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51488        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51489$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51490      fi
51491    fi
51492  fi
51493
51494  if test "x$FOUND_FREETYPE" = xyes; then
51495
51496  # Only process if variable expands to non-empty
51497
51498  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51499    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51500
51501  # Input might be given as Windows format, start by converting to
51502  # unix format.
51503  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51504  new_path=`$CYGPATH -u "$path"`
51505
51506  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51507  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51508  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51509  # "foo.exe" is OK but "foo" is an error.
51510  #
51511  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51512  # It is also a way to make sure we got the proper file name for the real test later on.
51513  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51514  if test "x$test_shortpath" = x; then
51515    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51516$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51517    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51518  fi
51519
51520  # Call helper function which possibly converts this using DOS-style short mode.
51521  # If so, the updated path is stored in $new_path.
51522
51523  input_path="$new_path"
51524  # Check if we need to convert this using DOS-style short mode. If the path
51525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51526  # take no chances and rewrite it.
51527  # Note: m4 eats our [], so we need to use [ and ] instead.
51528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51529  if test "x$has_forbidden_chars" != x; then
51530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51531    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51532    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51533    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51534      # Going to short mode and back again did indeed matter. Since short mode is
51535      # case insensitive, let's make it lowercase to improve readability.
51536      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51537      # Now convert it back to Unix-style (cygpath)
51538      input_path=`$CYGPATH -u "$shortmode_path"`
51539      new_path="$input_path"
51540    fi
51541  fi
51542
51543  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51544  if test "x$test_cygdrive_prefix" = x; then
51545    # As a simple fix, exclude /usr/bin since it's not a real path.
51546    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51547      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51548      # a path prefixed by /cygdrive for fixpath to work.
51549      new_path="$CYGWIN_ROOT_PATH$input_path"
51550    fi
51551  fi
51552
51553
51554  if test "x$path" != "x$new_path"; then
51555    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51557$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51558  fi
51559
51560    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51561
51562  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51563  has_colon=`$ECHO $path | $GREP ^.:`
51564  new_path="$path"
51565  if test "x$has_colon" = x; then
51566    # Not in mixed or Windows style, start by that.
51567    new_path=`cmd //c echo $path`
51568  fi
51569
51570
51571  input_path="$new_path"
51572  # Check if we need to convert this using DOS-style short mode. If the path
51573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51574  # take no chances and rewrite it.
51575  # Note: m4 eats our [], so we need to use [ and ] instead.
51576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51577  if test "x$has_forbidden_chars" != x; then
51578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51580  fi
51581
51582
51583  windows_path="$new_path"
51584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51585    unix_path=`$CYGPATH -u "$windows_path"`
51586    new_path="$unix_path"
51587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51589    new_path="$unix_path"
51590  fi
51591
51592  if test "x$path" != "x$new_path"; then
51593    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51595$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51596  fi
51597
51598  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51599  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51600
51601    else
51602      # We're on a unix platform. Hooray! :)
51603      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51604      has_space=`$ECHO "$path" | $GREP " "`
51605      if test "x$has_space" != x; then
51606        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51607$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51608        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51609      fi
51610
51611      # Use eval to expand a potential ~
51612      eval path="$path"
51613      if test ! -f "$path" && test ! -d "$path"; then
51614        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51615      fi
51616
51617      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51618    fi
51619  fi
51620
51621
51622  # Only process if variable expands to non-empty
51623
51624  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51626
51627  # Input might be given as Windows format, start by converting to
51628  # unix format.
51629  path="$POTENTIAL_FREETYPE_LIB_PATH"
51630  new_path=`$CYGPATH -u "$path"`
51631
51632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51635  # "foo.exe" is OK but "foo" is an error.
51636  #
51637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51638  # It is also a way to make sure we got the proper file name for the real test later on.
51639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51640  if test "x$test_shortpath" = x; then
51641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51642$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51643    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51644  fi
51645
51646  # Call helper function which possibly converts this using DOS-style short mode.
51647  # If so, the updated path is stored in $new_path.
51648
51649  input_path="$new_path"
51650  # Check if we need to convert this using DOS-style short mode. If the path
51651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51652  # take no chances and rewrite it.
51653  # Note: m4 eats our [], so we need to use [ and ] instead.
51654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51655  if test "x$has_forbidden_chars" != x; then
51656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51660      # Going to short mode and back again did indeed matter. Since short mode is
51661      # case insensitive, let's make it lowercase to improve readability.
51662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51663      # Now convert it back to Unix-style (cygpath)
51664      input_path=`$CYGPATH -u "$shortmode_path"`
51665      new_path="$input_path"
51666    fi
51667  fi
51668
51669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51670  if test "x$test_cygdrive_prefix" = x; then
51671    # As a simple fix, exclude /usr/bin since it's not a real path.
51672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51674      # a path prefixed by /cygdrive for fixpath to work.
51675      new_path="$CYGWIN_ROOT_PATH$input_path"
51676    fi
51677  fi
51678
51679
51680  if test "x$path" != "x$new_path"; then
51681    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51684  fi
51685
51686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51687
51688  path="$POTENTIAL_FREETYPE_LIB_PATH"
51689  has_colon=`$ECHO $path | $GREP ^.:`
51690  new_path="$path"
51691  if test "x$has_colon" = x; then
51692    # Not in mixed or Windows style, start by that.
51693    new_path=`cmd //c echo $path`
51694  fi
51695
51696
51697  input_path="$new_path"
51698  # Check if we need to convert this using DOS-style short mode. If the path
51699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51700  # take no chances and rewrite it.
51701  # Note: m4 eats our [], so we need to use [ and ] instead.
51702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51703  if test "x$has_forbidden_chars" != x; then
51704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51706  fi
51707
51708
51709  windows_path="$new_path"
51710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51711    unix_path=`$CYGPATH -u "$windows_path"`
51712    new_path="$unix_path"
51713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51715    new_path="$unix_path"
51716  fi
51717
51718  if test "x$path" != "x$new_path"; then
51719    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51721$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51722  fi
51723
51724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51726
51727    else
51728      # We're on a unix platform. Hooray! :)
51729      path="$POTENTIAL_FREETYPE_LIB_PATH"
51730      has_space=`$ECHO "$path" | $GREP " "`
51731      if test "x$has_space" != x; then
51732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51733$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51735      fi
51736
51737      # Use eval to expand a potential ~
51738      eval path="$path"
51739      if test ! -f "$path" && test ! -d "$path"; then
51740        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51741      fi
51742
51743      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51744    fi
51745  fi
51746
51747
51748    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51750$as_echo_n "checking for freetype includes... " >&6; }
51751    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51752$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51753    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51755$as_echo_n "checking for freetype libraries... " >&6; }
51756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51757$as_echo "$FREETYPE_LIB_PATH" >&6; }
51758  fi
51759
51760          fi
51761
51762          if test "x$FOUND_FREETYPE" != xyes; then
51763            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
51764
51765  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51766  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51767  METHOD="well-known location"
51768
51769  # Let's start with an optimistic view of the world :-)
51770  FOUND_FREETYPE=yes
51771
51772  # First look for the canonical freetype main include file ft2build.h.
51773  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51774    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51775    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51776    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51777      # Fail.
51778      FOUND_FREETYPE=no
51779    fi
51780  fi
51781
51782  if test "x$FOUND_FREETYPE" = xyes; then
51783    # Include file found, let's continue the sanity check.
51784    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51785$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51786
51787    # Reset to default value
51788    FREETYPE_BASE_NAME=freetype
51789    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51790    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51791      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51792          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51793        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51794        # for the .6 version explicitly.
51795        FREETYPE_BASE_NAME=freetype.6
51796        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51797        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51798$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51799      else
51800        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51801$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51802        FOUND_FREETYPE=no
51803      fi
51804    else
51805      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51806        # On Windows, we will need both .lib and .dll file.
51807        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51808          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51809$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51810          FOUND_FREETYPE=no
51811        fi
51812      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51813          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51814        # Found lib in isa dir, use that instead.
51815        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51816        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51817$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51818      fi
51819    fi
51820  fi
51821
51822  if test "x$FOUND_FREETYPE" = xyes; then
51823
51824  # Only process if variable expands to non-empty
51825
51826  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51828
51829  # Input might be given as Windows format, start by converting to
51830  # unix format.
51831  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51832  new_path=`$CYGPATH -u "$path"`
51833
51834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51837  # "foo.exe" is OK but "foo" is an error.
51838  #
51839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51840  # It is also a way to make sure we got the proper file name for the real test later on.
51841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51842  if test "x$test_shortpath" = x; then
51843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51844$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51845    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51846  fi
51847
51848  # Call helper function which possibly converts this using DOS-style short mode.
51849  # If so, the updated path is stored in $new_path.
51850
51851  input_path="$new_path"
51852  # Check if we need to convert this using DOS-style short mode. If the path
51853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51854  # take no chances and rewrite it.
51855  # Note: m4 eats our [], so we need to use [ and ] instead.
51856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51857  if test "x$has_forbidden_chars" != x; then
51858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51862      # Going to short mode and back again did indeed matter. Since short mode is
51863      # case insensitive, let's make it lowercase to improve readability.
51864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51865      # Now convert it back to Unix-style (cygpath)
51866      input_path=`$CYGPATH -u "$shortmode_path"`
51867      new_path="$input_path"
51868    fi
51869  fi
51870
51871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51872  if test "x$test_cygdrive_prefix" = x; then
51873    # As a simple fix, exclude /usr/bin since it's not a real path.
51874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51876      # a path prefixed by /cygdrive for fixpath to work.
51877      new_path="$CYGWIN_ROOT_PATH$input_path"
51878    fi
51879  fi
51880
51881
51882  if test "x$path" != "x$new_path"; then
51883    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51885$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51886  fi
51887
51888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51889
51890  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51891  has_colon=`$ECHO $path | $GREP ^.:`
51892  new_path="$path"
51893  if test "x$has_colon" = x; then
51894    # Not in mixed or Windows style, start by that.
51895    new_path=`cmd //c echo $path`
51896  fi
51897
51898
51899  input_path="$new_path"
51900  # Check if we need to convert this using DOS-style short mode. If the path
51901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51902  # take no chances and rewrite it.
51903  # Note: m4 eats our [], so we need to use [ and ] instead.
51904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51905  if test "x$has_forbidden_chars" != x; then
51906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51908  fi
51909
51910
51911  windows_path="$new_path"
51912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51913    unix_path=`$CYGPATH -u "$windows_path"`
51914    new_path="$unix_path"
51915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51917    new_path="$unix_path"
51918  fi
51919
51920  if test "x$path" != "x$new_path"; then
51921    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51923$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51924  fi
51925
51926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51928
51929    else
51930      # We're on a unix platform. Hooray! :)
51931      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51932      has_space=`$ECHO "$path" | $GREP " "`
51933      if test "x$has_space" != x; then
51934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51935$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51936        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51937      fi
51938
51939      # Use eval to expand a potential ~
51940      eval path="$path"
51941      if test ! -f "$path" && test ! -d "$path"; then
51942        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51943      fi
51944
51945      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51946    fi
51947  fi
51948
51949
51950  # Only process if variable expands to non-empty
51951
51952  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51953    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51954
51955  # Input might be given as Windows format, start by converting to
51956  # unix format.
51957  path="$POTENTIAL_FREETYPE_LIB_PATH"
51958  new_path=`$CYGPATH -u "$path"`
51959
51960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51963  # "foo.exe" is OK but "foo" is an error.
51964  #
51965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51966  # It is also a way to make sure we got the proper file name for the real test later on.
51967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51968  if test "x$test_shortpath" = x; then
51969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51971    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51972  fi
51973
51974  # Call helper function which possibly converts this using DOS-style short mode.
51975  # If so, the updated path is stored in $new_path.
51976
51977  input_path="$new_path"
51978  # Check if we need to convert this using DOS-style short mode. If the path
51979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51980  # take no chances and rewrite it.
51981  # Note: m4 eats our [], so we need to use [ and ] instead.
51982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51983  if test "x$has_forbidden_chars" != x; then
51984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51988      # Going to short mode and back again did indeed matter. Since short mode is
51989      # case insensitive, let's make it lowercase to improve readability.
51990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51991      # Now convert it back to Unix-style (cygpath)
51992      input_path=`$CYGPATH -u "$shortmode_path"`
51993      new_path="$input_path"
51994    fi
51995  fi
51996
51997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51998  if test "x$test_cygdrive_prefix" = x; then
51999    # As a simple fix, exclude /usr/bin since it's not a real path.
52000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52002      # a path prefixed by /cygdrive for fixpath to work.
52003      new_path="$CYGWIN_ROOT_PATH$input_path"
52004    fi
52005  fi
52006
52007
52008  if test "x$path" != "x$new_path"; then
52009    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52012  fi
52013
52014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52015
52016  path="$POTENTIAL_FREETYPE_LIB_PATH"
52017  has_colon=`$ECHO $path | $GREP ^.:`
52018  new_path="$path"
52019  if test "x$has_colon" = x; then
52020    # Not in mixed or Windows style, start by that.
52021    new_path=`cmd //c echo $path`
52022  fi
52023
52024
52025  input_path="$new_path"
52026  # Check if we need to convert this using DOS-style short mode. If the path
52027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52028  # take no chances and rewrite it.
52029  # Note: m4 eats our [], so we need to use [ and ] instead.
52030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52031  if test "x$has_forbidden_chars" != x; then
52032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52034  fi
52035
52036
52037  windows_path="$new_path"
52038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52039    unix_path=`$CYGPATH -u "$windows_path"`
52040    new_path="$unix_path"
52041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52043    new_path="$unix_path"
52044  fi
52045
52046  if test "x$path" != "x$new_path"; then
52047    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52050  fi
52051
52052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52054
52055    else
52056      # We're on a unix platform. Hooray! :)
52057      path="$POTENTIAL_FREETYPE_LIB_PATH"
52058      has_space=`$ECHO "$path" | $GREP " "`
52059      if test "x$has_space" != x; then
52060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52062        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52063      fi
52064
52065      # Use eval to expand a potential ~
52066      eval path="$path"
52067      if test ! -f "$path" && test ! -d "$path"; then
52068        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52069      fi
52070
52071      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52072    fi
52073  fi
52074
52075
52076    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52078$as_echo_n "checking for freetype includes... " >&6; }
52079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52080$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52081    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52083$as_echo_n "checking for freetype libraries... " >&6; }
52084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52085$as_echo "$FREETYPE_LIB_PATH" >&6; }
52086  fi
52087
52088          fi
52089
52090          if test "x$FOUND_FREETYPE" != xyes; then
52091            FREETYPE_BASE_DIR="$SYSROOT/usr"
52092            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52093
52094  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52095  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
52096  METHOD="well-known location"
52097
52098  # Let's start with an optimistic view of the world :-)
52099  FOUND_FREETYPE=yes
52100
52101  # First look for the canonical freetype main include file ft2build.h.
52102  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52103    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52104    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52105    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52106      # Fail.
52107      FOUND_FREETYPE=no
52108    fi
52109  fi
52110
52111  if test "x$FOUND_FREETYPE" = xyes; then
52112    # Include file found, let's continue the sanity check.
52113    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52114$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52115
52116    # Reset to default value
52117    FREETYPE_BASE_NAME=freetype
52118    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52119    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52120      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52121          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52122        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52123        # for the .6 version explicitly.
52124        FREETYPE_BASE_NAME=freetype.6
52125        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52126        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52127$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52128      else
52129        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52130$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52131        FOUND_FREETYPE=no
52132      fi
52133    else
52134      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52135        # On Windows, we will need both .lib and .dll file.
52136        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52137          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52138$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52139          FOUND_FREETYPE=no
52140        fi
52141      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52142          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52143        # Found lib in isa dir, use that instead.
52144        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52145        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52146$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52147      fi
52148    fi
52149  fi
52150
52151  if test "x$FOUND_FREETYPE" = xyes; then
52152
52153  # Only process if variable expands to non-empty
52154
52155  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52157
52158  # Input might be given as Windows format, start by converting to
52159  # unix format.
52160  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52161  new_path=`$CYGPATH -u "$path"`
52162
52163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52166  # "foo.exe" is OK but "foo" is an error.
52167  #
52168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52169  # It is also a way to make sure we got the proper file name for the real test later on.
52170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52171  if test "x$test_shortpath" = x; then
52172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52174    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52175  fi
52176
52177  # Call helper function which possibly converts this using DOS-style short mode.
52178  # If so, the updated path is stored in $new_path.
52179
52180  input_path="$new_path"
52181  # Check if we need to convert this using DOS-style short mode. If the path
52182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52183  # take no chances and rewrite it.
52184  # Note: m4 eats our [], so we need to use [ and ] instead.
52185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52186  if test "x$has_forbidden_chars" != x; then
52187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52191      # Going to short mode and back again did indeed matter. Since short mode is
52192      # case insensitive, let's make it lowercase to improve readability.
52193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52194      # Now convert it back to Unix-style (cygpath)
52195      input_path=`$CYGPATH -u "$shortmode_path"`
52196      new_path="$input_path"
52197    fi
52198  fi
52199
52200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52201  if test "x$test_cygdrive_prefix" = x; then
52202    # As a simple fix, exclude /usr/bin since it's not a real path.
52203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52205      # a path prefixed by /cygdrive for fixpath to work.
52206      new_path="$CYGWIN_ROOT_PATH$input_path"
52207    fi
52208  fi
52209
52210
52211  if test "x$path" != "x$new_path"; then
52212    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52214$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52215  fi
52216
52217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52218
52219  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52220  has_colon=`$ECHO $path | $GREP ^.:`
52221  new_path="$path"
52222  if test "x$has_colon" = x; then
52223    # Not in mixed or Windows style, start by that.
52224    new_path=`cmd //c echo $path`
52225  fi
52226
52227
52228  input_path="$new_path"
52229  # Check if we need to convert this using DOS-style short mode. If the path
52230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52231  # take no chances and rewrite it.
52232  # Note: m4 eats our [], so we need to use [ and ] instead.
52233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52234  if test "x$has_forbidden_chars" != x; then
52235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52237  fi
52238
52239
52240  windows_path="$new_path"
52241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52242    unix_path=`$CYGPATH -u "$windows_path"`
52243    new_path="$unix_path"
52244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52246    new_path="$unix_path"
52247  fi
52248
52249  if test "x$path" != "x$new_path"; then
52250    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52252$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52253  fi
52254
52255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52257
52258    else
52259      # We're on a unix platform. Hooray! :)
52260      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52261      has_space=`$ECHO "$path" | $GREP " "`
52262      if test "x$has_space" != x; then
52263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52264$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52266      fi
52267
52268      # Use eval to expand a potential ~
52269      eval path="$path"
52270      if test ! -f "$path" && test ! -d "$path"; then
52271        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52272      fi
52273
52274      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52275    fi
52276  fi
52277
52278
52279  # Only process if variable expands to non-empty
52280
52281  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52283
52284  # Input might be given as Windows format, start by converting to
52285  # unix format.
52286  path="$POTENTIAL_FREETYPE_LIB_PATH"
52287  new_path=`$CYGPATH -u "$path"`
52288
52289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52292  # "foo.exe" is OK but "foo" is an error.
52293  #
52294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52295  # It is also a way to make sure we got the proper file name for the real test later on.
52296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52297  if test "x$test_shortpath" = x; then
52298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52299$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52300    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52301  fi
52302
52303  # Call helper function which possibly converts this using DOS-style short mode.
52304  # If so, the updated path is stored in $new_path.
52305
52306  input_path="$new_path"
52307  # Check if we need to convert this using DOS-style short mode. If the path
52308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52309  # take no chances and rewrite it.
52310  # Note: m4 eats our [], so we need to use [ and ] instead.
52311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52312  if test "x$has_forbidden_chars" != x; then
52313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52317      # Going to short mode and back again did indeed matter. Since short mode is
52318      # case insensitive, let's make it lowercase to improve readability.
52319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52320      # Now convert it back to Unix-style (cygpath)
52321      input_path=`$CYGPATH -u "$shortmode_path"`
52322      new_path="$input_path"
52323    fi
52324  fi
52325
52326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52327  if test "x$test_cygdrive_prefix" = x; then
52328    # As a simple fix, exclude /usr/bin since it's not a real path.
52329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52331      # a path prefixed by /cygdrive for fixpath to work.
52332      new_path="$CYGWIN_ROOT_PATH$input_path"
52333    fi
52334  fi
52335
52336
52337  if test "x$path" != "x$new_path"; then
52338    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52340$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52341  fi
52342
52343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52344
52345  path="$POTENTIAL_FREETYPE_LIB_PATH"
52346  has_colon=`$ECHO $path | $GREP ^.:`
52347  new_path="$path"
52348  if test "x$has_colon" = x; then
52349    # Not in mixed or Windows style, start by that.
52350    new_path=`cmd //c echo $path`
52351  fi
52352
52353
52354  input_path="$new_path"
52355  # Check if we need to convert this using DOS-style short mode. If the path
52356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52357  # take no chances and rewrite it.
52358  # Note: m4 eats our [], so we need to use [ and ] instead.
52359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52360  if test "x$has_forbidden_chars" != x; then
52361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52363  fi
52364
52365
52366  windows_path="$new_path"
52367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52368    unix_path=`$CYGPATH -u "$windows_path"`
52369    new_path="$unix_path"
52370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52372    new_path="$unix_path"
52373  fi
52374
52375  if test "x$path" != "x$new_path"; then
52376    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52378$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52379  fi
52380
52381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52383
52384    else
52385      # We're on a unix platform. Hooray! :)
52386      path="$POTENTIAL_FREETYPE_LIB_PATH"
52387      has_space=`$ECHO "$path" | $GREP " "`
52388      if test "x$has_space" != x; then
52389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52390$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52392      fi
52393
52394      # Use eval to expand a potential ~
52395      eval path="$path"
52396      if test ! -f "$path" && test ! -d "$path"; then
52397        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52398      fi
52399
52400      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52401    fi
52402  fi
52403
52404
52405    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52407$as_echo_n "checking for freetype includes... " >&6; }
52408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52409$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52410    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52411    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52412$as_echo_n "checking for freetype libraries... " >&6; }
52413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52414$as_echo "$FREETYPE_LIB_PATH" >&6; }
52415  fi
52416
52417            else
52418
52419  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52420  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
52421  METHOD="well-known location"
52422
52423  # Let's start with an optimistic view of the world :-)
52424  FOUND_FREETYPE=yes
52425
52426  # First look for the canonical freetype main include file ft2build.h.
52427  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52428    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52429    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52430    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52431      # Fail.
52432      FOUND_FREETYPE=no
52433    fi
52434  fi
52435
52436  if test "x$FOUND_FREETYPE" = xyes; then
52437    # Include file found, let's continue the sanity check.
52438    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52439$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52440
52441    # Reset to default value
52442    FREETYPE_BASE_NAME=freetype
52443    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52444    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52445      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52446          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52447        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52448        # for the .6 version explicitly.
52449        FREETYPE_BASE_NAME=freetype.6
52450        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52451        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52452$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52453      else
52454        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52455$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52456        FOUND_FREETYPE=no
52457      fi
52458    else
52459      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52460        # On Windows, we will need both .lib and .dll file.
52461        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52462          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52463$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52464          FOUND_FREETYPE=no
52465        fi
52466      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52467          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52468        # Found lib in isa dir, use that instead.
52469        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52470        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52471$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52472      fi
52473    fi
52474  fi
52475
52476  if test "x$FOUND_FREETYPE" = xyes; then
52477
52478  # Only process if variable expands to non-empty
52479
52480  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52482
52483  # Input might be given as Windows format, start by converting to
52484  # unix format.
52485  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52486  new_path=`$CYGPATH -u "$path"`
52487
52488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52491  # "foo.exe" is OK but "foo" is an error.
52492  #
52493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52494  # It is also a way to make sure we got the proper file name for the real test later on.
52495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52496  if test "x$test_shortpath" = x; then
52497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52498$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52499    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52500  fi
52501
52502  # Call helper function which possibly converts this using DOS-style short mode.
52503  # If so, the updated path is stored in $new_path.
52504
52505  input_path="$new_path"
52506  # Check if we need to convert this using DOS-style short mode. If the path
52507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52508  # take no chances and rewrite it.
52509  # Note: m4 eats our [], so we need to use [ and ] instead.
52510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52511  if test "x$has_forbidden_chars" != x; then
52512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52516      # Going to short mode and back again did indeed matter. Since short mode is
52517      # case insensitive, let's make it lowercase to improve readability.
52518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52519      # Now convert it back to Unix-style (cygpath)
52520      input_path=`$CYGPATH -u "$shortmode_path"`
52521      new_path="$input_path"
52522    fi
52523  fi
52524
52525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52526  if test "x$test_cygdrive_prefix" = x; then
52527    # As a simple fix, exclude /usr/bin since it's not a real path.
52528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52530      # a path prefixed by /cygdrive for fixpath to work.
52531      new_path="$CYGWIN_ROOT_PATH$input_path"
52532    fi
52533  fi
52534
52535
52536  if test "x$path" != "x$new_path"; then
52537    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52540  fi
52541
52542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52543
52544  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52545  has_colon=`$ECHO $path | $GREP ^.:`
52546  new_path="$path"
52547  if test "x$has_colon" = x; then
52548    # Not in mixed or Windows style, start by that.
52549    new_path=`cmd //c echo $path`
52550  fi
52551
52552
52553  input_path="$new_path"
52554  # Check if we need to convert this using DOS-style short mode. If the path
52555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52556  # take no chances and rewrite it.
52557  # Note: m4 eats our [], so we need to use [ and ] instead.
52558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52559  if test "x$has_forbidden_chars" != x; then
52560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52562  fi
52563
52564
52565  windows_path="$new_path"
52566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52567    unix_path=`$CYGPATH -u "$windows_path"`
52568    new_path="$unix_path"
52569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52571    new_path="$unix_path"
52572  fi
52573
52574  if test "x$path" != "x$new_path"; then
52575    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52577$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52578  fi
52579
52580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52582
52583    else
52584      # We're on a unix platform. Hooray! :)
52585      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52586      has_space=`$ECHO "$path" | $GREP " "`
52587      if test "x$has_space" != x; then
52588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52589$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52590        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52591      fi
52592
52593      # Use eval to expand a potential ~
52594      eval path="$path"
52595      if test ! -f "$path" && test ! -d "$path"; then
52596        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52597      fi
52598
52599      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52600    fi
52601  fi
52602
52603
52604  # Only process if variable expands to non-empty
52605
52606  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52608
52609  # Input might be given as Windows format, start by converting to
52610  # unix format.
52611  path="$POTENTIAL_FREETYPE_LIB_PATH"
52612  new_path=`$CYGPATH -u "$path"`
52613
52614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52617  # "foo.exe" is OK but "foo" is an error.
52618  #
52619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52620  # It is also a way to make sure we got the proper file name for the real test later on.
52621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52622  if test "x$test_shortpath" = x; then
52623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52624$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52625    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52626  fi
52627
52628  # Call helper function which possibly converts this using DOS-style short mode.
52629  # If so, the updated path is stored in $new_path.
52630
52631  input_path="$new_path"
52632  # Check if we need to convert this using DOS-style short mode. If the path
52633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52634  # take no chances and rewrite it.
52635  # Note: m4 eats our [], so we need to use [ and ] instead.
52636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52637  if test "x$has_forbidden_chars" != x; then
52638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52642      # Going to short mode and back again did indeed matter. Since short mode is
52643      # case insensitive, let's make it lowercase to improve readability.
52644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52645      # Now convert it back to Unix-style (cygpath)
52646      input_path=`$CYGPATH -u "$shortmode_path"`
52647      new_path="$input_path"
52648    fi
52649  fi
52650
52651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52652  if test "x$test_cygdrive_prefix" = x; then
52653    # As a simple fix, exclude /usr/bin since it's not a real path.
52654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52656      # a path prefixed by /cygdrive for fixpath to work.
52657      new_path="$CYGWIN_ROOT_PATH$input_path"
52658    fi
52659  fi
52660
52661
52662  if test "x$path" != "x$new_path"; then
52663    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52665$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52666  fi
52667
52668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52669
52670  path="$POTENTIAL_FREETYPE_LIB_PATH"
52671  has_colon=`$ECHO $path | $GREP ^.:`
52672  new_path="$path"
52673  if test "x$has_colon" = x; then
52674    # Not in mixed or Windows style, start by that.
52675    new_path=`cmd //c echo $path`
52676  fi
52677
52678
52679  input_path="$new_path"
52680  # Check if we need to convert this using DOS-style short mode. If the path
52681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52682  # take no chances and rewrite it.
52683  # Note: m4 eats our [], so we need to use [ and ] instead.
52684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52685  if test "x$has_forbidden_chars" != x; then
52686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52688  fi
52689
52690
52691  windows_path="$new_path"
52692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52693    unix_path=`$CYGPATH -u "$windows_path"`
52694    new_path="$unix_path"
52695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52697    new_path="$unix_path"
52698  fi
52699
52700  if test "x$path" != "x$new_path"; then
52701    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52703$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52704  fi
52705
52706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52708
52709    else
52710      # We're on a unix platform. Hooray! :)
52711      path="$POTENTIAL_FREETYPE_LIB_PATH"
52712      has_space=`$ECHO "$path" | $GREP " "`
52713      if test "x$has_space" != x; then
52714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52715$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52716        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52717      fi
52718
52719      # Use eval to expand a potential ~
52720      eval path="$path"
52721      if test ! -f "$path" && test ! -d "$path"; then
52722        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52723      fi
52724
52725      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52726    fi
52727  fi
52728
52729
52730    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52732$as_echo_n "checking for freetype includes... " >&6; }
52733    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52734$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52735    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52737$as_echo_n "checking for freetype libraries... " >&6; }
52738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52739$as_echo "$FREETYPE_LIB_PATH" >&6; }
52740  fi
52741
52742              if test "x$FOUND_FREETYPE" != xyes; then
52743
52744  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52745  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
52746  METHOD="well-known location"
52747
52748  # Let's start with an optimistic view of the world :-)
52749  FOUND_FREETYPE=yes
52750
52751  # First look for the canonical freetype main include file ft2build.h.
52752  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52753    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52754    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52755    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52756      # Fail.
52757      FOUND_FREETYPE=no
52758    fi
52759  fi
52760
52761  if test "x$FOUND_FREETYPE" = xyes; then
52762    # Include file found, let's continue the sanity check.
52763    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52764$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52765
52766    # Reset to default value
52767    FREETYPE_BASE_NAME=freetype
52768    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52769    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52770      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52771          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52772        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52773        # for the .6 version explicitly.
52774        FREETYPE_BASE_NAME=freetype.6
52775        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52776        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52777$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52778      else
52779        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52780$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52781        FOUND_FREETYPE=no
52782      fi
52783    else
52784      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52785        # On Windows, we will need both .lib and .dll file.
52786        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52787          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52788$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52789          FOUND_FREETYPE=no
52790        fi
52791      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52792          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52793        # Found lib in isa dir, use that instead.
52794        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52795        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52796$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52797      fi
52798    fi
52799  fi
52800
52801  if test "x$FOUND_FREETYPE" = xyes; then
52802
52803  # Only process if variable expands to non-empty
52804
52805  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52807
52808  # Input might be given as Windows format, start by converting to
52809  # unix format.
52810  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52811  new_path=`$CYGPATH -u "$path"`
52812
52813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52816  # "foo.exe" is OK but "foo" is an error.
52817  #
52818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52819  # It is also a way to make sure we got the proper file name for the real test later on.
52820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52821  if test "x$test_shortpath" = x; then
52822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52823$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52824    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52825  fi
52826
52827  # Call helper function which possibly converts this using DOS-style short mode.
52828  # If so, the updated path is stored in $new_path.
52829
52830  input_path="$new_path"
52831  # Check if we need to convert this using DOS-style short mode. If the path
52832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52833  # take no chances and rewrite it.
52834  # Note: m4 eats our [], so we need to use [ and ] instead.
52835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52836  if test "x$has_forbidden_chars" != x; then
52837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52841      # Going to short mode and back again did indeed matter. Since short mode is
52842      # case insensitive, let's make it lowercase to improve readability.
52843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52844      # Now convert it back to Unix-style (cygpath)
52845      input_path=`$CYGPATH -u "$shortmode_path"`
52846      new_path="$input_path"
52847    fi
52848  fi
52849
52850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52851  if test "x$test_cygdrive_prefix" = x; then
52852    # As a simple fix, exclude /usr/bin since it's not a real path.
52853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52855      # a path prefixed by /cygdrive for fixpath to work.
52856      new_path="$CYGWIN_ROOT_PATH$input_path"
52857    fi
52858  fi
52859
52860
52861  if test "x$path" != "x$new_path"; then
52862    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52864$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52865  fi
52866
52867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52868
52869  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52870  has_colon=`$ECHO $path | $GREP ^.:`
52871  new_path="$path"
52872  if test "x$has_colon" = x; then
52873    # Not in mixed or Windows style, start by that.
52874    new_path=`cmd //c echo $path`
52875  fi
52876
52877
52878  input_path="$new_path"
52879  # Check if we need to convert this using DOS-style short mode. If the path
52880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52881  # take no chances and rewrite it.
52882  # Note: m4 eats our [], so we need to use [ and ] instead.
52883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52884  if test "x$has_forbidden_chars" != x; then
52885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52887  fi
52888
52889
52890  windows_path="$new_path"
52891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52892    unix_path=`$CYGPATH -u "$windows_path"`
52893    new_path="$unix_path"
52894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52896    new_path="$unix_path"
52897  fi
52898
52899  if test "x$path" != "x$new_path"; then
52900    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52903  fi
52904
52905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52907
52908    else
52909      # We're on a unix platform. Hooray! :)
52910      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52911      has_space=`$ECHO "$path" | $GREP " "`
52912      if test "x$has_space" != x; then
52913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52914$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52915        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52916      fi
52917
52918      # Use eval to expand a potential ~
52919      eval path="$path"
52920      if test ! -f "$path" && test ! -d "$path"; then
52921        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52922      fi
52923
52924      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52925    fi
52926  fi
52927
52928
52929  # Only process if variable expands to non-empty
52930
52931  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52933
52934  # Input might be given as Windows format, start by converting to
52935  # unix format.
52936  path="$POTENTIAL_FREETYPE_LIB_PATH"
52937  new_path=`$CYGPATH -u "$path"`
52938
52939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52942  # "foo.exe" is OK but "foo" is an error.
52943  #
52944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52945  # It is also a way to make sure we got the proper file name for the real test later on.
52946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52947  if test "x$test_shortpath" = x; then
52948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52949$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52950    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52951  fi
52952
52953  # Call helper function which possibly converts this using DOS-style short mode.
52954  # If so, the updated path is stored in $new_path.
52955
52956  input_path="$new_path"
52957  # Check if we need to convert this using DOS-style short mode. If the path
52958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52959  # take no chances and rewrite it.
52960  # Note: m4 eats our [], so we need to use [ and ] instead.
52961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52962  if test "x$has_forbidden_chars" != x; then
52963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52967      # Going to short mode and back again did indeed matter. Since short mode is
52968      # case insensitive, let's make it lowercase to improve readability.
52969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52970      # Now convert it back to Unix-style (cygpath)
52971      input_path=`$CYGPATH -u "$shortmode_path"`
52972      new_path="$input_path"
52973    fi
52974  fi
52975
52976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52977  if test "x$test_cygdrive_prefix" = x; then
52978    # As a simple fix, exclude /usr/bin since it's not a real path.
52979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52981      # a path prefixed by /cygdrive for fixpath to work.
52982      new_path="$CYGWIN_ROOT_PATH$input_path"
52983    fi
52984  fi
52985
52986
52987  if test "x$path" != "x$new_path"; then
52988    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52990$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52991  fi
52992
52993    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52994
52995  path="$POTENTIAL_FREETYPE_LIB_PATH"
52996  has_colon=`$ECHO $path | $GREP ^.:`
52997  new_path="$path"
52998  if test "x$has_colon" = x; then
52999    # Not in mixed or Windows style, start by that.
53000    new_path=`cmd //c echo $path`
53001  fi
53002
53003
53004  input_path="$new_path"
53005  # Check if we need to convert this using DOS-style short mode. If the path
53006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53007  # take no chances and rewrite it.
53008  # Note: m4 eats our [], so we need to use [ and ] instead.
53009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53010  if test "x$has_forbidden_chars" != x; then
53011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53013  fi
53014
53015
53016  windows_path="$new_path"
53017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53018    unix_path=`$CYGPATH -u "$windows_path"`
53019    new_path="$unix_path"
53020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53022    new_path="$unix_path"
53023  fi
53024
53025  if test "x$path" != "x$new_path"; then
53026    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53028$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53029  fi
53030
53031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53033
53034    else
53035      # We're on a unix platform. Hooray! :)
53036      path="$POTENTIAL_FREETYPE_LIB_PATH"
53037      has_space=`$ECHO "$path" | $GREP " "`
53038      if test "x$has_space" != x; then
53039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53040$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53041        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53042      fi
53043
53044      # Use eval to expand a potential ~
53045      eval path="$path"
53046      if test ! -f "$path" && test ! -d "$path"; then
53047        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53048      fi
53049
53050      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53051    fi
53052  fi
53053
53054
53055    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53057$as_echo_n "checking for freetype includes... " >&6; }
53058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53059$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53060    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53062$as_echo_n "checking for freetype libraries... " >&6; }
53063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53064$as_echo "$FREETYPE_LIB_PATH" >&6; }
53065  fi
53066
53067              fi
53068            fi
53069          fi
53070        fi
53071      fi # end check in well-known locations
53072
53073      if test "x$FOUND_FREETYPE" != xyes; then
53074
53075  # Print a helpful message on how to acquire the necessary build dependency.
53076  # freetype is the help tag: freetype, cups, alsa etc
53077  MISSING_DEPENDENCY=freetype
53078
53079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53080    cygwin_help $MISSING_DEPENDENCY
53081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53082    msys_help $MISSING_DEPENDENCY
53083  else
53084    PKGHANDLER_COMMAND=
53085
53086    case $PKGHANDLER in
53087      apt-get)
53088        apt_help     $MISSING_DEPENDENCY ;;
53089      yum)
53090        yum_help     $MISSING_DEPENDENCY ;;
53091      port)
53092        port_help    $MISSING_DEPENDENCY ;;
53093      pkgutil)
53094        pkgutil_help $MISSING_DEPENDENCY ;;
53095      pkgadd)
53096        pkgadd_help  $MISSING_DEPENDENCY ;;
53097    esac
53098
53099    if test "x$PKGHANDLER_COMMAND" != x; then
53100      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53101    fi
53102  fi
53103
53104        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
53105      fi
53106    fi # end user specified settings
53107
53108    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
53109    if test "x$FREETYPE_CFLAGS" = x; then
53110
53111  # Only process if variable expands to non-empty
53112
53113  if test "x$FREETYPE_INCLUDE_PATH" != x; then
53114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53115
53116  # Input might be given as Windows format, start by converting to
53117  # unix format.
53118  path="$FREETYPE_INCLUDE_PATH"
53119  new_path=`$CYGPATH -u "$path"`
53120
53121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53124  # "foo.exe" is OK but "foo" is an error.
53125  #
53126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53127  # It is also a way to make sure we got the proper file name for the real test later on.
53128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53129  if test "x$test_shortpath" = x; then
53130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53131$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53132    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
53133  fi
53134
53135  # Call helper function which possibly converts this using DOS-style short mode.
53136  # If so, the updated path is stored in $new_path.
53137
53138  input_path="$new_path"
53139  # Check if we need to convert this using DOS-style short mode. If the path
53140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53141  # take no chances and rewrite it.
53142  # Note: m4 eats our [], so we need to use [ and ] instead.
53143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53144  if test "x$has_forbidden_chars" != x; then
53145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53149      # Going to short mode and back again did indeed matter. Since short mode is
53150      # case insensitive, let's make it lowercase to improve readability.
53151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53152      # Now convert it back to Unix-style (cygpath)
53153      input_path=`$CYGPATH -u "$shortmode_path"`
53154      new_path="$input_path"
53155    fi
53156  fi
53157
53158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53159  if test "x$test_cygdrive_prefix" = x; then
53160    # As a simple fix, exclude /usr/bin since it's not a real path.
53161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53163      # a path prefixed by /cygdrive for fixpath to work.
53164      new_path="$CYGWIN_ROOT_PATH$input_path"
53165    fi
53166  fi
53167
53168
53169  if test "x$path" != "x$new_path"; then
53170    FREETYPE_INCLUDE_PATH="$new_path"
53171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53172$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53173  fi
53174
53175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53176
53177  path="$FREETYPE_INCLUDE_PATH"
53178  has_colon=`$ECHO $path | $GREP ^.:`
53179  new_path="$path"
53180  if test "x$has_colon" = x; then
53181    # Not in mixed or Windows style, start by that.
53182    new_path=`cmd //c echo $path`
53183  fi
53184
53185
53186  input_path="$new_path"
53187  # Check if we need to convert this using DOS-style short mode. If the path
53188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53189  # take no chances and rewrite it.
53190  # Note: m4 eats our [], so we need to use [ and ] instead.
53191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53192  if test "x$has_forbidden_chars" != x; then
53193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53195  fi
53196
53197
53198  windows_path="$new_path"
53199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53200    unix_path=`$CYGPATH -u "$windows_path"`
53201    new_path="$unix_path"
53202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53204    new_path="$unix_path"
53205  fi
53206
53207  if test "x$path" != "x$new_path"; then
53208    FREETYPE_INCLUDE_PATH="$new_path"
53209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53210$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53211  fi
53212
53213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53215
53216    else
53217      # We're on a unix platform. Hooray! :)
53218      path="$FREETYPE_INCLUDE_PATH"
53219      has_space=`$ECHO "$path" | $GREP " "`
53220      if test "x$has_space" != x; then
53221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53222$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53223        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53224      fi
53225
53226      # Use eval to expand a potential ~
53227      eval path="$path"
53228      if test ! -f "$path" && test ! -d "$path"; then
53229        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53230      fi
53231
53232      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53233    fi
53234  fi
53235
53236      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
53237        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
53238      else
53239        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
53240      fi
53241    fi
53242
53243    if test "x$FREETYPE_LIBS" = x; then
53244
53245  # Only process if variable expands to non-empty
53246
53247  if test "x$FREETYPE_LIB_PATH" != x; then
53248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53249
53250  # Input might be given as Windows format, start by converting to
53251  # unix format.
53252  path="$FREETYPE_LIB_PATH"
53253  new_path=`$CYGPATH -u "$path"`
53254
53255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53258  # "foo.exe" is OK but "foo" is an error.
53259  #
53260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53261  # It is also a way to make sure we got the proper file name for the real test later on.
53262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53263  if test "x$test_shortpath" = x; then
53264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53265$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53266    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
53267  fi
53268
53269  # Call helper function which possibly converts this using DOS-style short mode.
53270  # If so, the updated path is stored in $new_path.
53271
53272  input_path="$new_path"
53273  # Check if we need to convert this using DOS-style short mode. If the path
53274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53275  # take no chances and rewrite it.
53276  # Note: m4 eats our [], so we need to use [ and ] instead.
53277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53278  if test "x$has_forbidden_chars" != x; then
53279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53283      # Going to short mode and back again did indeed matter. Since short mode is
53284      # case insensitive, let's make it lowercase to improve readability.
53285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53286      # Now convert it back to Unix-style (cygpath)
53287      input_path=`$CYGPATH -u "$shortmode_path"`
53288      new_path="$input_path"
53289    fi
53290  fi
53291
53292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53293  if test "x$test_cygdrive_prefix" = x; then
53294    # As a simple fix, exclude /usr/bin since it's not a real path.
53295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53297      # a path prefixed by /cygdrive for fixpath to work.
53298      new_path="$CYGWIN_ROOT_PATH$input_path"
53299    fi
53300  fi
53301
53302
53303  if test "x$path" != "x$new_path"; then
53304    FREETYPE_LIB_PATH="$new_path"
53305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53306$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53307  fi
53308
53309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53310
53311  path="$FREETYPE_LIB_PATH"
53312  has_colon=`$ECHO $path | $GREP ^.:`
53313  new_path="$path"
53314  if test "x$has_colon" = x; then
53315    # Not in mixed or Windows style, start by that.
53316    new_path=`cmd //c echo $path`
53317  fi
53318
53319
53320  input_path="$new_path"
53321  # Check if we need to convert this using DOS-style short mode. If the path
53322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53323  # take no chances and rewrite it.
53324  # Note: m4 eats our [], so we need to use [ and ] instead.
53325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53326  if test "x$has_forbidden_chars" != x; then
53327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53329  fi
53330
53331
53332  windows_path="$new_path"
53333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53334    unix_path=`$CYGPATH -u "$windows_path"`
53335    new_path="$unix_path"
53336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53338    new_path="$unix_path"
53339  fi
53340
53341  if test "x$path" != "x$new_path"; then
53342    FREETYPE_LIB_PATH="$new_path"
53343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53344$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53345  fi
53346
53347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53349
53350    else
53351      # We're on a unix platform. Hooray! :)
53352      path="$FREETYPE_LIB_PATH"
53353      has_space=`$ECHO "$path" | $GREP " "`
53354      if test "x$has_space" != x; then
53355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53356$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53357        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53358      fi
53359
53360      # Use eval to expand a potential ~
53361      eval path="$path"
53362      if test ! -f "$path" && test ! -d "$path"; then
53363        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53364      fi
53365
53366      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53367    fi
53368  fi
53369
53370      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53371        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
53372      else
53373        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
53374      fi
53375    fi
53376
53377    # Try to compile it
53378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
53379$as_echo_n "checking if we can compile and link with freetype... " >&6; }
53380    ac_ext=cpp
53381ac_cpp='$CXXCPP $CPPFLAGS'
53382ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53383ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53384ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53385
53386    PREV_CXXCFLAGS="$CXXFLAGS"
53387    PREV_LIBS="$LIBS"
53388    PREV_CXX="$CXX"
53389    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
53390    LIBS="$LIBS $FREETYPE_LIBS"
53391    CXX="$FIXPATH $CXX"
53392    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53393/* end confdefs.h.  */
53394
53395          #include<ft2build.h>
53396          #include FT_FREETYPE_H
53397          int main () {
53398            FT_Init_FreeType(NULL);
53399            return 0;
53400          }
53401
53402_ACEOF
53403if ac_fn_cxx_try_link "$LINENO"; then :
53404
53405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53406$as_echo "yes" >&6; }
53407
53408else
53409
53410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53411$as_echo "no" >&6; }
53412          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
53413$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
53414          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
53415$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
53416
53417
53418  # Print a helpful message on how to acquire the necessary build dependency.
53419  # freetype is the help tag: freetype, cups, alsa etc
53420  MISSING_DEPENDENCY=freetype
53421
53422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53423    cygwin_help $MISSING_DEPENDENCY
53424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53425    msys_help $MISSING_DEPENDENCY
53426  else
53427    PKGHANDLER_COMMAND=
53428
53429    case $PKGHANDLER in
53430      apt-get)
53431        apt_help     $MISSING_DEPENDENCY ;;
53432      yum)
53433        yum_help     $MISSING_DEPENDENCY ;;
53434      port)
53435        port_help    $MISSING_DEPENDENCY ;;
53436      pkgutil)
53437        pkgutil_help $MISSING_DEPENDENCY ;;
53438      pkgadd)
53439        pkgadd_help  $MISSING_DEPENDENCY ;;
53440    esac
53441
53442    if test "x$PKGHANDLER_COMMAND" != x; then
53443      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53444    fi
53445  fi
53446
53447
53448          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
53449
53450
53451fi
53452rm -f core conftest.err conftest.$ac_objext \
53453    conftest$ac_exeext conftest.$ac_ext
53454    CXXCFLAGS="$PREV_CXXFLAGS"
53455    LIBS="$PREV_LIBS"
53456    CXX="$PREV_CXX"
53457    ac_ext=cpp
53458ac_cpp='$CXXCPP $CPPFLAGS'
53459ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53460ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53461ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53462
53463
53464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
53465$as_echo_n "checking if we should bundle freetype... " >&6; }
53466    if test "x$BUNDLE_FREETYPE" = xyes; then
53467      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
53468    fi
53469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
53470$as_echo "$BUNDLE_FREETYPE" >&6; }
53471
53472  fi # end freetype needed
53473
53474
53475
53476
53477
53478
53479
53480# Check whether --with-alsa was given.
53481if test "${with_alsa+set}" = set; then :
53482  withval=$with_alsa;
53483fi
53484
53485
53486# Check whether --with-alsa-include was given.
53487if test "${with_alsa_include+set}" = set; then :
53488  withval=$with_alsa_include;
53489fi
53490
53491
53492# Check whether --with-alsa-lib was given.
53493if test "${with_alsa_lib+set}" = set; then :
53494  withval=$with_alsa_lib;
53495fi
53496
53497
53498  if test "x$NEEDS_LIB_ALSA" = xfalse; then
53499    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
53500        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
53501        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
53502      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
53503$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
53504    fi
53505    ALSA_CFLAGS=
53506    ALSA_LIBS=
53507  else
53508    ALSA_FOUND=no
53509
53510    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
53511      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
53512    fi
53513
53514    if test "x${with_alsa}" != x; then
53515      ALSA_LIBS="-L${with_alsa}/lib -lasound"
53516      ALSA_CFLAGS="-I${with_alsa}/include"
53517      ALSA_FOUND=yes
53518    fi
53519    if test "x${with_alsa_include}" != x; then
53520      ALSA_CFLAGS="-I${with_alsa_include}"
53521      ALSA_FOUND=yes
53522    fi
53523    if test "x${with_alsa_lib}" != x; then
53524      ALSA_LIBS="-L${with_alsa_lib} -lasound"
53525      ALSA_FOUND=yes
53526    fi
53527    # Do not try pkg-config if we have a sysroot set.
53528    if test "x$SYSROOT" = x; then
53529      if test "x$ALSA_FOUND" = xno; then
53530
53531pkg_failed=no
53532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
53533$as_echo_n "checking for ALSA... " >&6; }
53534
53535if test -n "$ALSA_CFLAGS"; then
53536    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
53537 elif test -n "$PKG_CONFIG"; then
53538    if test -n "$PKG_CONFIG" && \
53539    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53540  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53541  ac_status=$?
53542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53543  test $ac_status = 0; }; then
53544  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
53545else
53546  pkg_failed=yes
53547fi
53548 else
53549    pkg_failed=untried
53550fi
53551if test -n "$ALSA_LIBS"; then
53552    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
53553 elif test -n "$PKG_CONFIG"; then
53554    if test -n "$PKG_CONFIG" && \
53555    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53556  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53557  ac_status=$?
53558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53559  test $ac_status = 0; }; then
53560  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
53561else
53562  pkg_failed=yes
53563fi
53564 else
53565    pkg_failed=untried
53566fi
53567
53568
53569
53570if test $pkg_failed = yes; then
53571
53572if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53573        _pkg_short_errors_supported=yes
53574else
53575        _pkg_short_errors_supported=no
53576fi
53577        if test $_pkg_short_errors_supported = yes; then
53578	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
53579        else
53580	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
53581        fi
53582	# Put the nasty error message in config.log where it belongs
53583	echo "$ALSA_PKG_ERRORS" >&5
53584
53585	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53586$as_echo "no" >&6; }
53587                ALSA_FOUND=no
53588elif test $pkg_failed = untried; then
53589	ALSA_FOUND=no
53590else
53591	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
53592	ALSA_LIBS=$pkg_cv_ALSA_LIBS
53593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53594$as_echo "yes" >&6; }
53595	ALSA_FOUND=yes
53596fi
53597      fi
53598    fi
53599    if test "x$ALSA_FOUND" = xno; then
53600      for ac_header in alsa/asoundlib.h
53601do :
53602  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
53603if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
53604  cat >>confdefs.h <<_ACEOF
53605#define HAVE_ALSA_ASOUNDLIB_H 1
53606_ACEOF
53607
53608            ALSA_FOUND=yes
53609            ALSA_CFLAGS=-Iignoreme
53610            ALSA_LIBS=-lasound
53611            DEFAULT_ALSA=yes
53612
53613else
53614  ALSA_FOUND=no
53615
53616fi
53617
53618done
53619
53620    fi
53621    if test "x$ALSA_FOUND" = xno; then
53622
53623  # Print a helpful message on how to acquire the necessary build dependency.
53624  # alsa is the help tag: freetype, cups, alsa etc
53625  MISSING_DEPENDENCY=alsa
53626
53627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53628    cygwin_help $MISSING_DEPENDENCY
53629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53630    msys_help $MISSING_DEPENDENCY
53631  else
53632    PKGHANDLER_COMMAND=
53633
53634    case $PKGHANDLER in
53635      apt-get)
53636        apt_help     $MISSING_DEPENDENCY ;;
53637      yum)
53638        yum_help     $MISSING_DEPENDENCY ;;
53639      port)
53640        port_help    $MISSING_DEPENDENCY ;;
53641      pkgutil)
53642        pkgutil_help $MISSING_DEPENDENCY ;;
53643      pkgadd)
53644        pkgadd_help  $MISSING_DEPENDENCY ;;
53645    esac
53646
53647    if test "x$PKGHANDLER_COMMAND" != x; then
53648      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53649    fi
53650  fi
53651
53652      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
53653    fi
53654  fi
53655
53656
53657
53658
53659
53660
53661# Check whether --with-libffi was given.
53662if test "${with_libffi+set}" = set; then :
53663  withval=$with_libffi;
53664fi
53665
53666
53667# Check whether --with-libffi-include was given.
53668if test "${with_libffi_include+set}" = set; then :
53669  withval=$with_libffi_include;
53670fi
53671
53672
53673# Check whether --with-libffi-lib was given.
53674if test "${with_libffi_lib+set}" = set; then :
53675  withval=$with_libffi_lib;
53676fi
53677
53678
53679  if test "x$NEEDS_LIB_FFI" = xfalse; then
53680    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
53681        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
53682        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
53683      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
53684$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
53685    fi
53686    LIBFFI_CFLAGS=
53687    LIBFFI_LIBS=
53688  else
53689    LIBFFI_FOUND=no
53690
53691    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
53692      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
53693    fi
53694
53695    if test "x${with_libffi}" != x; then
53696      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
53697      LIBFFI_CFLAGS="-I${with_libffi}/include"
53698      LIBFFI_FOUND=yes
53699    fi
53700    if test "x${with_libffi_include}" != x; then
53701      LIBFFI_CFLAGS="-I${with_libffi_include}"
53702      LIBFFI_FOUND=yes
53703    fi
53704    if test "x${with_libffi_lib}" != x; then
53705      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
53706      LIBFFI_FOUND=yes
53707    fi
53708    # Do not try pkg-config if we have a sysroot set.
53709    if test "x$SYSROOT" = x; then
53710      if test "x$LIBFFI_FOUND" = xno; then
53711        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
53712
53713pkg_failed=no
53714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
53715$as_echo_n "checking for LIBFFI... " >&6; }
53716
53717if test -n "$LIBFFI_CFLAGS"; then
53718    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
53719 elif test -n "$PKG_CONFIG"; then
53720    if test -n "$PKG_CONFIG" && \
53721    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53722  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53723  ac_status=$?
53724  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53725  test $ac_status = 0; }; then
53726  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
53727else
53728  pkg_failed=yes
53729fi
53730 else
53731    pkg_failed=untried
53732fi
53733if test -n "$LIBFFI_LIBS"; then
53734    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
53735 elif test -n "$PKG_CONFIG"; then
53736    if test -n "$PKG_CONFIG" && \
53737    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53738  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53739  ac_status=$?
53740  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53741  test $ac_status = 0; }; then
53742  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
53743else
53744  pkg_failed=yes
53745fi
53746 else
53747    pkg_failed=untried
53748fi
53749
53750
53751
53752if test $pkg_failed = yes; then
53753
53754if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53755        _pkg_short_errors_supported=yes
53756else
53757        _pkg_short_errors_supported=no
53758fi
53759        if test $_pkg_short_errors_supported = yes; then
53760	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
53761        else
53762	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
53763        fi
53764	# Put the nasty error message in config.log where it belongs
53765	echo "$LIBFFI_PKG_ERRORS" >&5
53766
53767	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53768$as_echo "no" >&6; }
53769                LIBFFI_FOUND=no
53770elif test $pkg_failed = untried; then
53771	LIBFFI_FOUND=no
53772else
53773	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
53774	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
53775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53776$as_echo "yes" >&6; }
53777	LIBFFI_FOUND=yes
53778fi
53779      fi
53780    fi
53781    if test "x$LIBFFI_FOUND" = xno; then
53782      for ac_header in ffi.h
53783do :
53784  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
53785if test "x$ac_cv_header_ffi_h" = xyes; then :
53786  cat >>confdefs.h <<_ACEOF
53787#define HAVE_FFI_H 1
53788_ACEOF
53789
53790            LIBFFI_FOUND=yes
53791            LIBFFI_CFLAGS=
53792            LIBFFI_LIBS=-lffi
53793
53794else
53795  LIBFFI_FOUND=no
53796
53797fi
53798
53799done
53800
53801    fi
53802    if test "x$LIBFFI_FOUND" = xno; then
53803
53804  # Print a helpful message on how to acquire the necessary build dependency.
53805  # ffi is the help tag: freetype, cups, alsa etc
53806  MISSING_DEPENDENCY=ffi
53807
53808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53809    cygwin_help $MISSING_DEPENDENCY
53810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53811    msys_help $MISSING_DEPENDENCY
53812  else
53813    PKGHANDLER_COMMAND=
53814
53815    case $PKGHANDLER in
53816      apt-get)
53817        apt_help     $MISSING_DEPENDENCY ;;
53818      yum)
53819        yum_help     $MISSING_DEPENDENCY ;;
53820      port)
53821        port_help    $MISSING_DEPENDENCY ;;
53822      pkgutil)
53823        pkgutil_help $MISSING_DEPENDENCY ;;
53824      pkgadd)
53825        pkgadd_help  $MISSING_DEPENDENCY ;;
53826    esac
53827
53828    if test "x$PKGHANDLER_COMMAND" != x; then
53829      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53830    fi
53831  fi
53832
53833      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
53834    fi
53835
53836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
53837$as_echo_n "checking if libffi works... " >&6; }
53838    ac_ext=c
53839ac_cpp='$CPP $CPPFLAGS'
53840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53842ac_compiler_gnu=$ac_cv_c_compiler_gnu
53843
53844    OLD_CFLAGS="$CFLAGS"
53845    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
53846    OLD_LIBS="$LIBS"
53847    LIBS="$LIBS $LIBFFI_LIBS"
53848    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53849/* end confdefs.h.  */
53850#include <ffi.h>
53851int
53852main ()
53853{
53854
53855          ffi_call(NULL, NULL, NULL, NULL);
53856          return 0;
53857
53858  ;
53859  return 0;
53860}
53861_ACEOF
53862if ac_fn_c_try_link "$LINENO"; then :
53863  LIBFFI_WORKS=yes
53864else
53865  LIBFFI_WORKS=no
53866
53867fi
53868rm -f core conftest.err conftest.$ac_objext \
53869    conftest$ac_exeext conftest.$ac_ext
53870    CFLAGS="$OLD_CFLAGS"
53871    LIBS="$OLD_LIBS"
53872    ac_ext=cpp
53873ac_cpp='$CXXCPP $CPPFLAGS'
53874ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53875ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53876ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53877
53878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
53879$as_echo "$LIBFFI_WORKS" >&6; }
53880
53881    if test "x$LIBFFI_WORKS" = xno; then
53882
53883  # Print a helpful message on how to acquire the necessary build dependency.
53884  # ffi is the help tag: freetype, cups, alsa etc
53885  MISSING_DEPENDENCY=ffi
53886
53887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53888    cygwin_help $MISSING_DEPENDENCY
53889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53890    msys_help $MISSING_DEPENDENCY
53891  else
53892    PKGHANDLER_COMMAND=
53893
53894    case $PKGHANDLER in
53895      apt-get)
53896        apt_help     $MISSING_DEPENDENCY ;;
53897      yum)
53898        yum_help     $MISSING_DEPENDENCY ;;
53899      port)
53900        port_help    $MISSING_DEPENDENCY ;;
53901      pkgutil)
53902        pkgutil_help $MISSING_DEPENDENCY ;;
53903      pkgadd)
53904        pkgadd_help  $MISSING_DEPENDENCY ;;
53905    esac
53906
53907    if test "x$PKGHANDLER_COMMAND" != x; then
53908      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53909    fi
53910  fi
53911
53912      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
53913    fi
53914  fi
53915
53916
53917
53918
53919
53920  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
53921    # Extract the first word of "llvm-config", so it can be a program name with args.
53922set dummy llvm-config; ac_word=$2
53923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53924$as_echo_n "checking for $ac_word... " >&6; }
53925if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
53926  $as_echo_n "(cached) " >&6
53927else
53928  if test -n "$LLVM_CONFIG"; then
53929  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
53930else
53931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53932for as_dir in $PATH
53933do
53934  IFS=$as_save_IFS
53935  test -z "$as_dir" && as_dir=.
53936    for ac_exec_ext in '' $ac_executable_extensions; do
53937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53938    ac_cv_prog_LLVM_CONFIG="llvm-config"
53939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53940    break 2
53941  fi
53942done
53943  done
53944IFS=$as_save_IFS
53945
53946fi
53947fi
53948LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
53949if test -n "$LLVM_CONFIG"; then
53950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
53951$as_echo "$LLVM_CONFIG" >&6; }
53952else
53953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53954$as_echo "no" >&6; }
53955fi
53956
53957
53958
53959    if test "x$LLVM_CONFIG" != xllvm-config; then
53960      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
53961    fi
53962
53963    llvm_components="jit mcjit engine nativecodegen native"
53964    unset LLVM_CFLAGS
53965    for flag in $("$LLVM_CONFIG" --cxxflags); do
53966      if echo "${flag}" | grep -q '^-[ID]'; then
53967        if test "${flag}" != "-D_DEBUG" ; then
53968          if test "${LLVM_CFLAGS}" != "" ; then
53969            LLVM_CFLAGS="${LLVM_CFLAGS} "
53970          fi
53971          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
53972        fi
53973      fi
53974    done
53975    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
53976    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
53977
53978    unset LLVM_LDFLAGS
53979    for flag in $("${LLVM_CONFIG}" --ldflags); do
53980      if echo "${flag}" | grep -q '^-L'; then
53981        if test "${LLVM_LDFLAGS}" != ""; then
53982          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
53983        fi
53984        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
53985      fi
53986    done
53987
53988    unset LLVM_LIBS
53989    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
53990      if echo "${flag}" | grep -q '^-l'; then
53991        if test "${LLVM_LIBS}" != ""; then
53992          LLVM_LIBS="${LLVM_LIBS} "
53993        fi
53994        LLVM_LIBS="${LLVM_LIBS}${flag}"
53995      fi
53996    done
53997
53998
53999
54000
54001  fi
54002
54003
54004
54005# Check whether --with-libjpeg was given.
54006if test "${with_libjpeg+set}" = set; then :
54007  withval=$with_libjpeg;
54008fi
54009
54010
54011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
54012$as_echo_n "checking for which libjpeg to use... " >&6; }
54013  # default is bundled
54014  DEFAULT_LIBJPEG=bundled
54015  # if user didn't specify, use DEFAULT_LIBJPEG
54016  if test "x${with_libjpeg}" = "x"; then
54017    with_libjpeg=${DEFAULT_LIBJPEG}
54018  fi
54019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
54020$as_echo "${with_libjpeg}" >&6; }
54021
54022  if test "x${with_libjpeg}" = "xbundled"; then
54023    USE_EXTERNAL_LIBJPEG=false
54024  elif test "x${with_libjpeg}" = "xsystem"; then
54025    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
54026if test "x$ac_cv_header_jpeglib_h" = xyes; then :
54027
54028else
54029   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
54030fi
54031
54032
54033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
54034$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
54035if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
54036  $as_echo_n "(cached) " >&6
54037else
54038  ac_check_lib_save_LIBS=$LIBS
54039LIBS="-ljpeg  $LIBS"
54040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54041/* end confdefs.h.  */
54042
54043/* Override any GCC internal prototype to avoid an error.
54044   Use char because int might match the return type of a GCC
54045   builtin and then its argument prototype would still apply.  */
54046#ifdef __cplusplus
54047extern "C"
54048#endif
54049char jpeg_CreateDecompress ();
54050int
54051main ()
54052{
54053return jpeg_CreateDecompress ();
54054  ;
54055  return 0;
54056}
54057_ACEOF
54058if ac_fn_cxx_try_link "$LINENO"; then :
54059  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
54060else
54061  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
54062fi
54063rm -f core conftest.err conftest.$ac_objext \
54064    conftest$ac_exeext conftest.$ac_ext
54065LIBS=$ac_check_lib_save_LIBS
54066fi
54067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
54068$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
54069if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
54070  cat >>confdefs.h <<_ACEOF
54071#define HAVE_LIBJPEG 1
54072_ACEOF
54073
54074  LIBS="-ljpeg $LIBS"
54075
54076else
54077   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
54078fi
54079
54080
54081    USE_EXTERNAL_LIBJPEG=true
54082  else
54083    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
54084  fi
54085
54086
54087
54088
54089
54090# Check whether --with-giflib was given.
54091if test "${with_giflib+set}" = set; then :
54092  withval=$with_giflib;
54093fi
54094
54095
54096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
54097$as_echo_n "checking for which giflib to use... " >&6; }
54098  # default is bundled
54099  DEFAULT_GIFLIB=bundled
54100  # if user didn't specify, use DEFAULT_GIFLIB
54101  if test "x${with_giflib}" = "x"; then
54102    with_giflib=${DEFAULT_GIFLIB}
54103  fi
54104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
54105$as_echo "${with_giflib}" >&6; }
54106
54107  if test "x${with_giflib}" = "xbundled"; then
54108    USE_EXTERNAL_LIBGIF=false
54109  elif test "x${with_giflib}" = "xsystem"; then
54110    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
54111if test "x$ac_cv_header_gif_lib_h" = xyes; then :
54112
54113else
54114   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
54115fi
54116
54117
54118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
54119$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
54120if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
54121  $as_echo_n "(cached) " >&6
54122else
54123  ac_check_lib_save_LIBS=$LIBS
54124LIBS="-lgif  $LIBS"
54125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54126/* end confdefs.h.  */
54127
54128/* Override any GCC internal prototype to avoid an error.
54129   Use char because int might match the return type of a GCC
54130   builtin and then its argument prototype would still apply.  */
54131#ifdef __cplusplus
54132extern "C"
54133#endif
54134char DGifGetCode ();
54135int
54136main ()
54137{
54138return DGifGetCode ();
54139  ;
54140  return 0;
54141}
54142_ACEOF
54143if ac_fn_cxx_try_link "$LINENO"; then :
54144  ac_cv_lib_gif_DGifGetCode=yes
54145else
54146  ac_cv_lib_gif_DGifGetCode=no
54147fi
54148rm -f core conftest.err conftest.$ac_objext \
54149    conftest$ac_exeext conftest.$ac_ext
54150LIBS=$ac_check_lib_save_LIBS
54151fi
54152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
54153$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
54154if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
54155  cat >>confdefs.h <<_ACEOF
54156#define HAVE_LIBGIF 1
54157_ACEOF
54158
54159  LIBS="-lgif $LIBS"
54160
54161else
54162   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
54163fi
54164
54165
54166    USE_EXTERNAL_LIBGIF=true
54167  else
54168    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
54169  fi
54170
54171
54172
54173
54174
54175# Check whether --with-libpng was given.
54176if test "${with_libpng+set}" = set; then :
54177  withval=$with_libpng;
54178fi
54179
54180
54181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
54182$as_echo_n "checking for which libpng to use... " >&6; }
54183
54184  # default is bundled
54185  DEFAULT_LIBPNG=bundled
54186  # if user didn't specify, use DEFAULT_LIBPNG
54187  if test "x${with_libpng}" = "x"; then
54188      with_libpng=${DEFAULT_LIBPNG}
54189  fi
54190
54191  if test "x${with_libpng}" = "xbundled"; then
54192      USE_EXTERNAL_LIBPNG=false
54193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54194$as_echo "bundled" >&6; }
54195  elif test "x${with_libpng}" = "xsystem"; then
54196
54197pkg_failed=no
54198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
54199$as_echo_n "checking for PNG... " >&6; }
54200
54201if test -n "$PNG_CFLAGS"; then
54202    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
54203 elif test -n "$PKG_CONFIG"; then
54204    if test -n "$PKG_CONFIG" && \
54205    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54206  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54207  ac_status=$?
54208  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54209  test $ac_status = 0; }; then
54210  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
54211else
54212  pkg_failed=yes
54213fi
54214 else
54215    pkg_failed=untried
54216fi
54217if test -n "$PNG_LIBS"; then
54218    pkg_cv_PNG_LIBS="$PNG_LIBS"
54219 elif test -n "$PKG_CONFIG"; then
54220    if test -n "$PKG_CONFIG" && \
54221    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54222  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54223  ac_status=$?
54224  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54225  test $ac_status = 0; }; then
54226  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
54227else
54228  pkg_failed=yes
54229fi
54230 else
54231    pkg_failed=untried
54232fi
54233
54234
54235
54236if test $pkg_failed = yes; then
54237
54238if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54239        _pkg_short_errors_supported=yes
54240else
54241        _pkg_short_errors_supported=no
54242fi
54243        if test $_pkg_short_errors_supported = yes; then
54244	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
54245        else
54246	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
54247        fi
54248	# Put the nasty error message in config.log where it belongs
54249	echo "$PNG_PKG_ERRORS" >&5
54250
54251	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54252$as_echo "no" >&6; }
54253                 LIBPNG_FOUND=no
54254elif test $pkg_failed = untried; then
54255	 LIBPNG_FOUND=no
54256else
54257	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
54258	PNG_LIBS=$pkg_cv_PNG_LIBS
54259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54260$as_echo "yes" >&6; }
54261	 LIBPNG_FOUND=yes
54262fi
54263      if test "x${LIBPNG_FOUND}" = "xyes"; then
54264          USE_EXTERNAL_LIBPNG=true
54265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54266$as_echo "system" >&6; }
54267      else
54268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54269$as_echo "system not found" >&6; }
54270          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
54271      fi
54272  else
54273      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
54274  fi
54275
54276
54277
54278
54279
54280# Check whether --with-zlib was given.
54281if test "${with_zlib+set}" = set; then :
54282  withval=$with_zlib;
54283fi
54284
54285
54286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
54287$as_echo_n "checking for compress in -lz... " >&6; }
54288if ${ac_cv_lib_z_compress+:} false; then :
54289  $as_echo_n "(cached) " >&6
54290else
54291  ac_check_lib_save_LIBS=$LIBS
54292LIBS="-lz  $LIBS"
54293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54294/* end confdefs.h.  */
54295
54296/* Override any GCC internal prototype to avoid an error.
54297   Use char because int might match the return type of a GCC
54298   builtin and then its argument prototype would still apply.  */
54299#ifdef __cplusplus
54300extern "C"
54301#endif
54302char compress ();
54303int
54304main ()
54305{
54306return compress ();
54307  ;
54308  return 0;
54309}
54310_ACEOF
54311if ac_fn_cxx_try_link "$LINENO"; then :
54312  ac_cv_lib_z_compress=yes
54313else
54314  ac_cv_lib_z_compress=no
54315fi
54316rm -f core conftest.err conftest.$ac_objext \
54317    conftest$ac_exeext conftest.$ac_ext
54318LIBS=$ac_check_lib_save_LIBS
54319fi
54320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
54321$as_echo "$ac_cv_lib_z_compress" >&6; }
54322if test "x$ac_cv_lib_z_compress" = xyes; then :
54323   ZLIB_FOUND=yes
54324else
54325   ZLIB_FOUND=no
54326fi
54327
54328
54329  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
54330$as_echo_n "checking for which zlib to use... " >&6; }
54331
54332  DEFAULT_ZLIB=bundled
54333  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
54334    # On macosx default is system...on others default is bundled
54335    DEFAULT_ZLIB=system
54336  fi
54337
54338  if test "x${ZLIB_FOUND}" != "xyes"; then
54339    # If we don't find any system...set default to bundled
54340    DEFAULT_ZLIB=bundled
54341  fi
54342
54343  # If user didn't specify, use DEFAULT_ZLIB
54344  if test "x${with_zlib}" = "x"; then
54345    with_zlib=${DEFAULT_ZLIB}
54346  fi
54347
54348  if test "x${with_zlib}" = "xbundled"; then
54349    USE_EXTERNAL_LIBZ=false
54350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54351$as_echo "bundled" >&6; }
54352  elif test "x${with_zlib}" = "xsystem"; then
54353    if test "x${ZLIB_FOUND}" = "xyes"; then
54354      USE_EXTERNAL_LIBZ=true
54355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54356$as_echo "system" >&6; }
54357    else
54358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54359$as_echo "system not found" >&6; }
54360      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
54361    fi
54362  else
54363    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
54364  fi
54365
54366
54367
54368
54369
54370# Check whether --with-lcms was given.
54371if test "${with_lcms+set}" = set; then :
54372  withval=$with_lcms;
54373fi
54374
54375
54376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
54377$as_echo_n "checking for which lcms to use... " >&6; }
54378
54379  DEFAULT_LCMS=bundled
54380  # If user didn't specify, use DEFAULT_LCMS
54381  if test "x${with_lcms}" = "x"; then
54382      with_lcms=${DEFAULT_LCMS}
54383  fi
54384
54385  if test "x${with_lcms}" = "xbundled"; then
54386    USE_EXTERNAL_LCMS=false
54387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54388$as_echo "bundled" >&6; }
54389  elif test "x${with_lcms}" = "xsystem"; then
54390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54391$as_echo "system" >&6; }
54392
54393pkg_failed=no
54394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
54395$as_echo_n "checking for LCMS... " >&6; }
54396
54397if test -n "$LCMS_CFLAGS"; then
54398    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
54399 elif test -n "$PKG_CONFIG"; then
54400    if test -n "$PKG_CONFIG" && \
54401    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54402  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54403  ac_status=$?
54404  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54405  test $ac_status = 0; }; then
54406  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
54407else
54408  pkg_failed=yes
54409fi
54410 else
54411    pkg_failed=untried
54412fi
54413if test -n "$LCMS_LIBS"; then
54414    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
54415 elif test -n "$PKG_CONFIG"; then
54416    if test -n "$PKG_CONFIG" && \
54417    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54418  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54419  ac_status=$?
54420  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54421  test $ac_status = 0; }; then
54422  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
54423else
54424  pkg_failed=yes
54425fi
54426 else
54427    pkg_failed=untried
54428fi
54429
54430
54431
54432if test $pkg_failed = yes; then
54433
54434if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54435        _pkg_short_errors_supported=yes
54436else
54437        _pkg_short_errors_supported=no
54438fi
54439        if test $_pkg_short_errors_supported = yes; then
54440	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
54441        else
54442	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
54443        fi
54444	# Put the nasty error message in config.log where it belongs
54445	echo "$LCMS_PKG_ERRORS" >&5
54446
54447	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54448$as_echo "no" >&6; }
54449                LCMS_FOUND=no
54450elif test $pkg_failed = untried; then
54451	LCMS_FOUND=no
54452else
54453	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
54454	LCMS_LIBS=$pkg_cv_LCMS_LIBS
54455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54456$as_echo "yes" >&6; }
54457	LCMS_FOUND=yes
54458fi
54459    if test "x${LCMS_FOUND}" = "xyes"; then
54460      USE_EXTERNAL_LCMS=true
54461    else
54462      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
54463    fi
54464  else
54465    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
54466  fi
54467
54468
54469
54470
54471
54472
54473
54474
54475
54476
54477
54478  # Setup libm (the maths library)
54479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
54480$as_echo_n "checking for cos in -lm... " >&6; }
54481if ${ac_cv_lib_m_cos+:} false; then :
54482  $as_echo_n "(cached) " >&6
54483else
54484  ac_check_lib_save_LIBS=$LIBS
54485LIBS="-lm  $LIBS"
54486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54487/* end confdefs.h.  */
54488
54489/* Override any GCC internal prototype to avoid an error.
54490   Use char because int might match the return type of a GCC
54491   builtin and then its argument prototype would still apply.  */
54492#ifdef __cplusplus
54493extern "C"
54494#endif
54495char cos ();
54496int
54497main ()
54498{
54499return cos ();
54500  ;
54501  return 0;
54502}
54503_ACEOF
54504if ac_fn_cxx_try_link "$LINENO"; then :
54505  ac_cv_lib_m_cos=yes
54506else
54507  ac_cv_lib_m_cos=no
54508fi
54509rm -f core conftest.err conftest.$ac_objext \
54510    conftest$ac_exeext conftest.$ac_ext
54511LIBS=$ac_check_lib_save_LIBS
54512fi
54513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
54514$as_echo "$ac_cv_lib_m_cos" >&6; }
54515if test "x$ac_cv_lib_m_cos" = xyes; then :
54516  cat >>confdefs.h <<_ACEOF
54517#define HAVE_LIBM 1
54518_ACEOF
54519
54520  LIBS="-lm $LIBS"
54521
54522else
54523
54524      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
54525$as_echo "$as_me: Maths library was not found" >&6;}
54526
54527fi
54528
54529  LIBM=-lm
54530
54531
54532  # Setup libdl (for dynamic library loading)
54533  save_LIBS="$LIBS"
54534  LIBS=""
54535  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
54536$as_echo_n "checking for dlopen in -ldl... " >&6; }
54537if ${ac_cv_lib_dl_dlopen+:} false; then :
54538  $as_echo_n "(cached) " >&6
54539else
54540  ac_check_lib_save_LIBS=$LIBS
54541LIBS="-ldl  $LIBS"
54542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54543/* end confdefs.h.  */
54544
54545/* Override any GCC internal prototype to avoid an error.
54546   Use char because int might match the return type of a GCC
54547   builtin and then its argument prototype would still apply.  */
54548#ifdef __cplusplus
54549extern "C"
54550#endif
54551char dlopen ();
54552int
54553main ()
54554{
54555return dlopen ();
54556  ;
54557  return 0;
54558}
54559_ACEOF
54560if ac_fn_cxx_try_link "$LINENO"; then :
54561  ac_cv_lib_dl_dlopen=yes
54562else
54563  ac_cv_lib_dl_dlopen=no
54564fi
54565rm -f core conftest.err conftest.$ac_objext \
54566    conftest$ac_exeext conftest.$ac_ext
54567LIBS=$ac_check_lib_save_LIBS
54568fi
54569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
54570$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
54571if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
54572  cat >>confdefs.h <<_ACEOF
54573#define HAVE_LIBDL 1
54574_ACEOF
54575
54576  LIBS="-ldl $LIBS"
54577
54578fi
54579
54580  LIBDL="$LIBS"
54581
54582  LIBS="$save_LIBS"
54583
54584  # Deprecated libraries, keep the flags for backwards compatibility
54585  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54586
54587
54588# Check whether --with-dxsdk was given.
54589if test "${with_dxsdk+set}" = set; then :
54590  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
54591$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
54592fi
54593
54594
54595
54596
54597# Check whether --with-dxsdk-lib was given.
54598if test "${with_dxsdk_lib+set}" = set; then :
54599  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
54600$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
54601fi
54602
54603
54604
54605
54606# Check whether --with-dxsdk-include was given.
54607if test "${with_dxsdk_include+set}" = set; then :
54608  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
54609$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
54610fi
54611
54612
54613  fi
54614
54615  # Control if libzip can use mmap. Available for purposes of overriding.
54616  LIBZIP_CAN_USE_MMAP=true
54617
54618
54619
54620
54621
54622
54623
54624
54625
54626
54627
54628
54629
54630
54631###############################################################################
54632#
54633# We need to do some final tweaking, when everything else is done.
54634#
54635###############################################################################
54636
54637
54638  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
54639
54640
54641  # The name of the Service Agent jar.
54642  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
54643  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54644    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
54645  fi
54646
54647
54648
54649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
54650$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
54651
54652    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
54653      ENABLE_INTREE_EC=yes
54654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54655$as_echo "yes" >&6; }
54656    else
54657      ENABLE_INTREE_EC=no
54658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54659$as_echo "no" >&6; }
54660    fi
54661
54662
54663
54664
54665###############################################################################
54666#
54667# Configure parts of the build that only affect the build performance,
54668# not the result.
54669#
54670###############################################################################
54671
54672
54673  # How many cores do we have on this build system?
54674
54675# Check whether --with-num-cores was given.
54676if test "${with_num_cores+set}" = set; then :
54677  withval=$with_num_cores;
54678fi
54679
54680  if test "x$with_num_cores" = x; then
54681    # The number of cores were not specified, try to probe them.
54682
54683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
54684$as_echo_n "checking for number of cores... " >&6; }
54685  NUM_CORES=1
54686  FOUND_CORES=no
54687
54688  if test -f /proc/cpuinfo; then
54689    # Looks like a Linux (or cygwin) system
54690    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
54691    FOUND_CORES=yes
54692  elif test -x /usr/sbin/psrinfo; then
54693    # Looks like a Solaris system
54694    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
54695    FOUND_CORES=yes
54696  elif test -x /usr/sbin/system_profiler; then
54697    # Looks like a MacOSX system
54698    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
54699    FOUND_CORES=yes
54700  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
54701    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
54702    FOUND_CORES=yes
54703  elif test -n "$NUMBER_OF_PROCESSORS"; then
54704    # On windows, look in the env
54705    NUM_CORES=$NUMBER_OF_PROCESSORS
54706    FOUND_CORES=yes
54707  fi
54708
54709  if test "x$FOUND_CORES" = xyes; then
54710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
54711$as_echo "$NUM_CORES" >&6; }
54712  else
54713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
54714$as_echo "could not detect number of cores, defaulting to 1" >&6; }
54715    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
54716$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
54717  fi
54718
54719  else
54720    NUM_CORES=$with_num_cores
54721  fi
54722
54723
54724
54725  # How much memory do we have on this build system?
54726
54727# Check whether --with-memory-size was given.
54728if test "${with_memory_size+set}" = set; then :
54729  withval=$with_memory_size;
54730fi
54731
54732  if test "x$with_memory_size" = x; then
54733    # The memory size was not specified, try to probe it.
54734
54735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
54736$as_echo_n "checking for memory size... " >&6; }
54737  # Default to 1024 MB
54738  MEMORY_SIZE=1024
54739  FOUND_MEM=no
54740
54741  if test -f /proc/meminfo; then
54742    # Looks like a Linux (or cygwin) system
54743    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
54744    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
54745    FOUND_MEM=yes
54746  elif test -x /usr/sbin/prtconf; then
54747    # Looks like a Solaris or AIX system
54748    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
54749    FOUND_MEM=yes
54750  elif test -x /usr/sbin/system_profiler; then
54751    # Looks like a MacOSX system
54752    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
54753    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
54754    FOUND_MEM=yes
54755  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
54756    # Windows, but without cygwin
54757    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
54758    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
54759    FOUND_MEM=yes
54760  fi
54761
54762  if test "x$FOUND_MEM" = xyes; then
54763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
54764$as_echo "$MEMORY_SIZE MB" >&6; }
54765  else
54766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
54767$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
54768    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
54769$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
54770  fi
54771
54772  else
54773    MEMORY_SIZE=$with_memory_size
54774  fi
54775
54776
54777
54778  # Provide a decent default number of parallel jobs for make depending on
54779  # number of cores, amount of memory and machine architecture.
54780
54781# Check whether --with-jobs was given.
54782if test "${with_jobs+set}" = set; then :
54783  withval=$with_jobs;
54784fi
54785
54786  if test "x$with_jobs" = x; then
54787    # Number of jobs was not specified, calculate.
54788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
54789$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
54790    # Approximate memory in GB.
54791    memory_gb=`expr $MEMORY_SIZE / 1024`
54792    # Pick the lowest of memory in gb and number of cores.
54793    if test "$memory_gb" -lt "$NUM_CORES"; then
54794      JOBS="$memory_gb"
54795    else
54796      JOBS="$NUM_CORES"
54797      # On bigger machines, leave some room for other processes to run
54798      if test "$JOBS" -gt "4"; then
54799        JOBS=`expr $JOBS '*' 90 / 100`
54800      fi
54801    fi
54802    # Cap number of jobs to 16
54803    if test "$JOBS" -gt "16"; then
54804      JOBS=16
54805    fi
54806    if test "$JOBS" -eq "0"; then
54807      JOBS=1
54808    fi
54809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
54810$as_echo "$JOBS" >&6; }
54811  else
54812    JOBS=$with_jobs
54813  fi
54814
54815
54816
54817# Setup arguments for the boot jdk (after cores and memory have been setup)
54818
54819  ##############################################################################
54820  #
54821  # Specify jvm options for anything that is run with the Boot JDK.
54822  # Not all JVM:s accept the same arguments on the command line.
54823  #
54824
54825# Check whether --with-boot-jdk-jvmargs was given.
54826if test "${with_boot_jdk_jvmargs+set}" = set; then :
54827  withval=$with_boot_jdk_jvmargs;
54828fi
54829
54830
54831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
54832$as_echo_n "checking flags for boot jdk java command ... " >&6; }
54833
54834  # Disable special log output when a debug build is used as Boot JDK...
54835
54836  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
54837  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
54838  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
54839  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54840  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54841  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54842    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
54843    JVM_ARG_OK=true
54844  else
54845    $ECHO "Arg failed:" >&5
54846    $ECHO "$OUTPUT" >&5
54847    JVM_ARG_OK=false
54848  fi
54849
54850
54851  # Apply user provided options.
54852
54853  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
54854  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
54855  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
54856  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54857  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54858  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54859    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
54860    JVM_ARG_OK=true
54861  else
54862    $ECHO "Arg failed:" >&5
54863    $ECHO "$OUTPUT" >&5
54864    JVM_ARG_OK=false
54865  fi
54866
54867
54868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
54869$as_echo "$boot_jdk_jvmargs" >&6; }
54870
54871  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
54872  JAVA_FLAGS=$boot_jdk_jvmargs
54873
54874
54875
54876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
54877$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
54878
54879  # Starting amount of heap memory.
54880
54881  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
54882  $ECHO "Command: $JAVA -Xms64M -version" >&5
54883  OUTPUT=`$JAVA -Xms64M -version 2>&1`
54884  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54885  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54886  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54887    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
54888    JVM_ARG_OK=true
54889  else
54890    $ECHO "Arg failed:" >&5
54891    $ECHO "$OUTPUT" >&5
54892    JVM_ARG_OK=false
54893  fi
54894
54895
54896  # Maximum amount of heap memory.
54897  # Maximum stack size.
54898  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
54899  if test "x$BOOT_JDK_BITS" = "x32"; then
54900    if test "$JVM_MAX_HEAP" -gt "1100"; then
54901      JVM_MAX_HEAP=1100
54902    elif test "$JVM_MAX_HEAP" -lt "512"; then
54903      JVM_MAX_HEAP=512
54904    fi
54905    STACK_SIZE=768
54906  else
54907    # Running a 64 bit JVM allows for and requires a bigger heap
54908    if test "$JVM_MAX_HEAP" -gt "1600"; then
54909      JVM_MAX_HEAP=1600
54910    elif test "$JVM_MAX_HEAP" -lt "512"; then
54911      JVM_MAX_HEAP=512
54912    fi
54913    STACK_SIZE=1536
54914  fi
54915
54916  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
54917  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
54918  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
54919  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54920  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54921  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54922    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
54923    JVM_ARG_OK=true
54924  else
54925    $ECHO "Arg failed:" >&5
54926    $ECHO "$OUTPUT" >&5
54927    JVM_ARG_OK=false
54928  fi
54929
54930
54931  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
54932  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
54933  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
54934  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54935  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54936  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54937    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
54938    JVM_ARG_OK=true
54939  else
54940    $ECHO "Arg failed:" >&5
54941    $ECHO "$OUTPUT" >&5
54942    JVM_ARG_OK=false
54943  fi
54944
54945
54946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
54947$as_echo "$boot_jdk_jvmargs_big" >&6; }
54948
54949  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
54950
54951
54952
54953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
54954$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
54955
54956  # Use serial gc for small short lived tools if possible
54957
54958  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
54959  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
54960  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
54961  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54962  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54963  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54964    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
54965    JVM_ARG_OK=true
54966  else
54967    $ECHO "Arg failed:" >&5
54968    $ECHO "$OUTPUT" >&5
54969    JVM_ARG_OK=false
54970  fi
54971
54972
54973  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
54974  $ECHO "Command: $JAVA -Xms32M -version" >&5
54975  OUTPUT=`$JAVA -Xms32M -version 2>&1`
54976  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54977  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54978  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54979    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
54980    JVM_ARG_OK=true
54981  else
54982    $ECHO "Arg failed:" >&5
54983    $ECHO "$OUTPUT" >&5
54984    JVM_ARG_OK=false
54985  fi
54986
54987
54988  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
54989  $ECHO "Command: $JAVA -Xmx512M -version" >&5
54990  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
54991  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54992  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54993  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54994    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
54995    JVM_ARG_OK=true
54996  else
54997    $ECHO "Arg failed:" >&5
54998    $ECHO "$OUTPUT" >&5
54999    JVM_ARG_OK=false
55000  fi
55001
55002
55003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
55004$as_echo "$boot_jdk_jvmargs_small" >&6; }
55005
55006  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
55007
55008
55009  JAVA_TOOL_FLAGS_SMALL=""
55010  for f in $JAVA_FLAGS_SMALL; do
55011    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
55012  done
55013
55014
55015
55016# Setup smart javac (after cores and memory have been setup)
55017
55018
55019# Check whether --with-sjavac-server-java was given.
55020if test "${with_sjavac_server_java+set}" = set; then :
55021  withval=$with_sjavac_server_java;
55022fi
55023
55024
55025  if test "x$with_sjavac_server_java" != x; then
55026    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
55027    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
55028    if test "x$FOUND_VERSION" = x; then
55029      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
55030    fi
55031  else
55032    SJAVAC_SERVER_JAVA="$JAVA"
55033  fi
55034
55035
55036  if test "$MEMORY_SIZE" -gt "3000"; then
55037
55038  $ECHO "Check if jvm arg is ok: -d64" >&5
55039  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
55040  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
55041  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55042  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55043  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55044    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
55045    JVM_ARG_OK=true
55046  else
55047    $ECHO "Arg failed:" >&5
55048    $ECHO "$OUTPUT" >&5
55049    JVM_ARG_OK=false
55050  fi
55051
55052    if test "$JVM_ARG_OK" = true; then
55053      JVM_64BIT=true
55054      JVM_ARG_OK=false
55055    fi
55056  fi
55057
55058  MX_VALUE=`expr $MEMORY_SIZE / 2`
55059  if test "$JVM_64BIT" = true; then
55060    # Set ms lower than mx since more than one instance of the server might
55061    # get launched at the same time before they figure out which instance won.
55062    MS_VALUE=512
55063    if test "$MX_VALUE" -gt "2048"; then
55064      MX_VALUE=2048
55065    fi
55066  else
55067    MS_VALUE=256
55068    if test "$MX_VALUE" -gt "1500"; then
55069      MX_VALUE=1500
55070    fi
55071  fi
55072  if test "$MX_VALUE" -lt "512"; then
55073    MX_VALUE=512
55074  fi
55075
55076  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
55077  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
55078  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
55079  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55080  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55081  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55082    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
55083    JVM_ARG_OK=true
55084  else
55085    $ECHO "Arg failed:" >&5
55086    $ECHO "$OUTPUT" >&5
55087    JVM_ARG_OK=false
55088  fi
55089
55090
55091
55092  # Check whether --enable-sjavac was given.
55093if test "${enable_sjavac+set}" = set; then :
55094  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
55095else
55096  ENABLE_SJAVAC="no"
55097fi
55098
55099  if test "x$JVM_ARG_OK" = "xfalse"; then
55100    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
55101$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
55102    ENABLE_SJAVAC="no"
55103  fi
55104  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
55105$as_echo_n "checking whether to use sjavac... " >&6; }
55106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
55107$as_echo "$ENABLE_SJAVAC" >&6; }
55108
55109
55110  # Check whether --enable-javac-server was given.
55111if test "${enable_javac_server+set}" = set; then :
55112  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
55113else
55114  ENABLE_JAVAC_SERVER="no"
55115fi
55116
55117  if test "x$JVM_ARG_OK" = "xfalse"; then
55118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
55119$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
55120    ENABLE_JAVAC_SERVER="no"
55121  fi
55122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
55123$as_echo_n "checking whether to use javac server... " >&6; }
55124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
55125$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
55126
55127
55128
55129# Can the C/C++ compiler use precompiled headers?
55130
55131
55132  ###############################################################################
55133  #
55134  # Can the C/C++ compiler use precompiled headers?
55135  #
55136  # Check whether --enable-precompiled-headers was given.
55137if test "${enable_precompiled_headers+set}" = set; then :
55138  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
55139else
55140  ENABLE_PRECOMPH=yes
55141fi
55142
55143
55144  USE_PRECOMPILED_HEADER=1
55145  if test "x$ENABLE_PRECOMPH" = xno; then
55146    USE_PRECOMPILED_HEADER=0
55147  fi
55148
55149  if test "x$ENABLE_PRECOMPH" = xyes; then
55150    # Check that the compiler actually supports precomp headers.
55151    if test "x$TOOLCHAIN_TYPE" = xgcc; then
55152      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
55153$as_echo_n "checking that precompiled headers work... " >&6; }
55154      echo "int alfa();" > conftest.h
55155      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
55156      if test ! -f conftest.hpp.gch; then
55157        USE_PRECOMPILED_HEADER=0
55158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55159$as_echo "no" >&6; }
55160      else
55161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55162$as_echo "yes" >&6; }
55163      fi
55164      rm -f conftest.h conftest.hpp.gch
55165    fi
55166  fi
55167
55168
55169
55170
55171# Setup use of ccache, if available
55172
55173  # Check whether --enable-ccache was given.
55174if test "${enable_ccache+set}" = set; then :
55175  enableval=$enable_ccache;
55176fi
55177
55178
55179  CCACHE=
55180  CCACHE_STATUS=
55181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
55182$as_echo_n "checking is ccache enabled... " >&6; }
55183  if test "x$enable_ccache" = xyes; then
55184    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
55185      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55186$as_echo "yes" >&6; }
55187      OLD_PATH="$PATH"
55188      if test "x$TOOLCHAIN_PATH" != x; then
55189        PATH=$TOOLCHAIN_PATH:$PATH
55190      fi
55191
55192
55193
55194  # Publish this variable in the help.
55195
55196
55197  if [ -z "${CCACHE+x}" ]; then
55198    # The variable is not set by user, try to locate tool using the code snippet
55199    for ac_prog in ccache
55200do
55201  # Extract the first word of "$ac_prog", so it can be a program name with args.
55202set dummy $ac_prog; ac_word=$2
55203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55204$as_echo_n "checking for $ac_word... " >&6; }
55205if ${ac_cv_path_CCACHE+:} false; then :
55206  $as_echo_n "(cached) " >&6
55207else
55208  case $CCACHE in
55209  [\\/]* | ?:[\\/]*)
55210  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55211  ;;
55212  *)
55213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55214for as_dir in $PATH
55215do
55216  IFS=$as_save_IFS
55217  test -z "$as_dir" && as_dir=.
55218    for ac_exec_ext in '' $ac_executable_extensions; do
55219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55220    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55222    break 2
55223  fi
55224done
55225  done
55226IFS=$as_save_IFS
55227
55228  ;;
55229esac
55230fi
55231CCACHE=$ac_cv_path_CCACHE
55232if test -n "$CCACHE"; then
55233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55234$as_echo "$CCACHE" >&6; }
55235else
55236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55237$as_echo "no" >&6; }
55238fi
55239
55240
55241  test -n "$CCACHE" && break
55242done
55243
55244  else
55245    # The variable is set, but is it from the command line or the environment?
55246
55247    # Try to remove the string !CCACHE! from our list.
55248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
55249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
55250      # If it failed, the variable was not from the command line. Ignore it,
55251      # but warn the user (except for BASH, which is always set by the calling BASH).
55252      if test "xCCACHE" != xBASH; then
55253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
55254$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
55255      fi
55256      # Try to locate tool using the code snippet
55257      for ac_prog in ccache
55258do
55259  # Extract the first word of "$ac_prog", so it can be a program name with args.
55260set dummy $ac_prog; ac_word=$2
55261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55262$as_echo_n "checking for $ac_word... " >&6; }
55263if ${ac_cv_path_CCACHE+:} false; then :
55264  $as_echo_n "(cached) " >&6
55265else
55266  case $CCACHE in
55267  [\\/]* | ?:[\\/]*)
55268  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55269  ;;
55270  *)
55271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55272for as_dir in $PATH
55273do
55274  IFS=$as_save_IFS
55275  test -z "$as_dir" && as_dir=.
55276    for ac_exec_ext in '' $ac_executable_extensions; do
55277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55278    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55280    break 2
55281  fi
55282done
55283  done
55284IFS=$as_save_IFS
55285
55286  ;;
55287esac
55288fi
55289CCACHE=$ac_cv_path_CCACHE
55290if test -n "$CCACHE"; then
55291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55292$as_echo "$CCACHE" >&6; }
55293else
55294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55295$as_echo "no" >&6; }
55296fi
55297
55298
55299  test -n "$CCACHE" && break
55300done
55301
55302    else
55303      # If it succeeded, then it was overridden by the user. We will use it
55304      # for the tool.
55305
55306      # First remove it from the list of overridden variables, so we can test
55307      # for unknown variables in the end.
55308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
55309
55310      # Check if we try to supply an empty value
55311      if test "x$CCACHE" = x; then
55312        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
55313$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
55314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55315$as_echo_n "checking for CCACHE... " >&6; }
55316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
55317$as_echo "disabled" >&6; }
55318      else
55319        # Check if the provided tool contains a complete path.
55320        tool_specified="$CCACHE"
55321        tool_basename="${tool_specified##*/}"
55322        if test "x$tool_basename" = "x$tool_specified"; then
55323          # A command without a complete path is provided, search $PATH.
55324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
55325$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
55326          # Extract the first word of "$tool_basename", so it can be a program name with args.
55327set dummy $tool_basename; ac_word=$2
55328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55329$as_echo_n "checking for $ac_word... " >&6; }
55330if ${ac_cv_path_CCACHE+:} false; then :
55331  $as_echo_n "(cached) " >&6
55332else
55333  case $CCACHE in
55334  [\\/]* | ?:[\\/]*)
55335  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55336  ;;
55337  *)
55338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55339for as_dir in $PATH
55340do
55341  IFS=$as_save_IFS
55342  test -z "$as_dir" && as_dir=.
55343    for ac_exec_ext in '' $ac_executable_extensions; do
55344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55345    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55347    break 2
55348  fi
55349done
55350  done
55351IFS=$as_save_IFS
55352
55353  ;;
55354esac
55355fi
55356CCACHE=$ac_cv_path_CCACHE
55357if test -n "$CCACHE"; then
55358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55359$as_echo "$CCACHE" >&6; }
55360else
55361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55362$as_echo "no" >&6; }
55363fi
55364
55365
55366          if test "x$CCACHE" = x; then
55367            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
55368          fi
55369        else
55370          # Otherwise we believe it is a complete path. Use it as it is.
55371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
55372$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
55373          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55374$as_echo_n "checking for CCACHE... " >&6; }
55375          if test ! -x "$tool_specified"; then
55376            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
55377$as_echo "not found" >&6; }
55378            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
55379          fi
55380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
55381$as_echo "$tool_specified" >&6; }
55382        fi
55383      fi
55384    fi
55385
55386  fi
55387
55388
55389
55390  if test "x$CCACHE" = x; then
55391    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
55392  fi
55393
55394
55395      PATH="$OLD_PATH"
55396      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
55397      CCACHE_STATUS="Active ($CCACHE_VERSION)"
55398    else
55399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55400$as_echo "no" >&6; }
55401      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
55402$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
55403    fi
55404  elif test "x$enable_ccache" = xno; then
55405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
55406$as_echo "no, explicitly disabled" >&6; }
55407    CCACHE_STATUS="Disabled"
55408  elif test "x$enable_ccache" = x; then
55409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55410$as_echo "no" >&6; }
55411  else
55412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
55413$as_echo "unknown" >&6; }
55414    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
55415  fi
55416
55417
55418
55419# Check whether --with-ccache-dir was given.
55420if test "${with_ccache_dir+set}" = set; then :
55421  withval=$with_ccache_dir;
55422fi
55423
55424
55425  if test "x$with_ccache_dir" != x; then
55426    # When using a non home ccache directory, assume the use is to share ccache files
55427    # with other users. Thus change the umask.
55428    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
55429    if test "x$CCACHE" = x; then
55430      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
55431$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
55432    fi
55433  fi
55434
55435  if test "x$CCACHE" != x; then
55436
55437  if test "x$CCACHE" != x; then
55438    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
55439      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
55440          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
55441      if test "x$HAS_BAD_CCACHE" != "x"; then
55442        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
55443      fi
55444      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
55445$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
55446      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
55447      PUSHED_FLAGS="$CXXFLAGS"
55448      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
55449      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55450/* end confdefs.h.  */
55451
55452int
55453main ()
55454{
55455
55456  ;
55457  return 0;
55458}
55459_ACEOF
55460if ac_fn_cxx_try_compile "$LINENO"; then :
55461  CC_KNOWS_CCACHE_TRICK=yes
55462else
55463  CC_KNOWS_CCACHE_TRICK=no
55464fi
55465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55466      CXXFLAGS="$PUSHED_FLAGS"
55467      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
55468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55469$as_echo "yes" >&6; }
55470        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
55471
55472        CCACHE_SLOPPINESS=pch_defines,time_macros
55473      else
55474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55475$as_echo "no" >&6; }
55476        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
55477      fi
55478    fi
55479
55480    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
55481        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
55482
55483    if test "x$SET_CCACHE_DIR" != x; then
55484      mkdir -p $CCACHE_DIR > /dev/null 2>&1
55485      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
55486    fi
55487  fi
55488
55489  fi
55490
55491
55492###############################################################################
55493#
55494# And now the finish...
55495#
55496###############################################################################
55497
55498# Check for some common pitfalls
55499
55500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55501    file_to_test="$SRC_ROOT/LICENSE"
55502    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
55503      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
55504    fi
55505  fi
55506
55507
55508  # Did user specify any unknown variables?
55509
55510  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
55511    # Replace the separating ! with spaces before presenting for end user.
55512    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
55513    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
55514$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
55515  fi
55516
55517
55518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
55519$as_echo_n "checking if build directory is on local disk... " >&6; }
55520
55521  # df -l lists only local disks; if the given directory is not found then
55522  # a non-zero exit code is given
55523  if test "x$DF" = x; then
55524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55525      # msys does not have df; use Windows "net use" instead.
55526      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
55527      if test "x$IS_NETWORK_DISK" = x; then
55528        OUTPUT_DIR_IS_LOCAL="yes"
55529      else
55530        OUTPUT_DIR_IS_LOCAL="no"
55531      fi
55532    else
55533      # No df here, say it's local
55534      OUTPUT_DIR_IS_LOCAL="yes"
55535    fi
55536  else
55537    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
55538      OUTPUT_DIR_IS_LOCAL="yes"
55539    else
55540      OUTPUT_DIR_IS_LOCAL="no"
55541    fi
55542  fi
55543
55544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
55545$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
55546
55547
55548
55549  # Check if the user has any old-style ALT_ variables set.
55550  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
55551
55552  # Before generating output files, test if they exist. If they do, this is a reconfigure.
55553  # Since we can't properly handle the dependencies for this, warn the user about the situation
55554  if test -e $OUTPUT_ROOT/spec.gmk; then
55555    IS_RECONFIGURE=yes
55556  else
55557    IS_RECONFIGURE=no
55558  fi
55559
55560
55561# At the end, call the custom hook. (Dummy macro if no custom sources available)
55562
55563
55564# We're messing a bit with internal autoconf variables to put the config.status
55565# in the output directory instead of the current directory.
55566CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
55567
55568# Create the actual output files. Now the main work of configure is done.
55569cat >confcache <<\_ACEOF
55570# This file is a shell script that caches the results of configure
55571# tests run on this system so they can be shared between configure
55572# scripts and configure runs, see configure's option --config-cache.
55573# It is not useful on other systems.  If it contains results you don't
55574# want to keep, you may remove or edit it.
55575#
55576# config.status only pays attention to the cache file if you give it
55577# the --recheck option to rerun configure.
55578#
55579# `ac_cv_env_foo' variables (set or unset) will be overridden when
55580# loading this file, other *unset* `ac_cv_foo' will be assigned the
55581# following values.
55582
55583_ACEOF
55584
55585# The following way of writing the cache mishandles newlines in values,
55586# but we know of no workaround that is simple, portable, and efficient.
55587# So, we kill variables containing newlines.
55588# Ultrix sh set writes to stderr and can't be redirected directly,
55589# and sets the high bit in the cache file unless we assign to the vars.
55590(
55591  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
55592    eval ac_val=\$$ac_var
55593    case $ac_val in #(
55594    *${as_nl}*)
55595      case $ac_var in #(
55596      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
55597$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
55598      esac
55599      case $ac_var in #(
55600      _ | IFS | as_nl) ;; #(
55601      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
55602      *) { eval $ac_var=; unset $ac_var;} ;;
55603      esac ;;
55604    esac
55605  done
55606
55607  (set) 2>&1 |
55608    case $as_nl`(ac_space=' '; set) 2>&1` in #(
55609    *${as_nl}ac_space=\ *)
55610      # `set' does not quote correctly, so add quotes: double-quote
55611      # substitution turns \\\\ into \\, and sed turns \\ into \.
55612      sed -n \
55613	"s/'/'\\\\''/g;
55614	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
55615      ;; #(
55616    *)
55617      # `set' quotes correctly as required by POSIX, so do not add quotes.
55618      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
55619      ;;
55620    esac |
55621    sort
55622) |
55623  sed '
55624     /^ac_cv_env_/b end
55625     t clear
55626     :clear
55627     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
55628     t end
55629     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
55630     :end' >>confcache
55631if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
55632  if test -w "$cache_file"; then
55633    if test "x$cache_file" != "x/dev/null"; then
55634      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
55635$as_echo "$as_me: updating cache $cache_file" >&6;}
55636      if test ! -f "$cache_file" || test -h "$cache_file"; then
55637	cat confcache >"$cache_file"
55638      else
55639        case $cache_file in #(
55640        */* | ?:*)
55641	  mv -f confcache "$cache_file"$$ &&
55642	  mv -f "$cache_file"$$ "$cache_file" ;; #(
55643        *)
55644	  mv -f confcache "$cache_file" ;;
55645	esac
55646      fi
55647    fi
55648  else
55649    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
55650$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
55651  fi
55652fi
55653rm -f confcache
55654
55655test "x$prefix" = xNONE && prefix=$ac_default_prefix
55656# Let make expand exec_prefix.
55657test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
55658
55659# Transform confdefs.h into DEFS.
55660# Protect against shell expansion while executing Makefile rules.
55661# Protect against Makefile macro expansion.
55662#
55663# If the first sed substitution is executed (which looks for macros that
55664# take arguments), then branch to the quote section.  Otherwise,
55665# look for a macro that doesn't take arguments.
55666ac_script='
55667:mline
55668/\\$/{
55669 N
55670 s,\\\n,,
55671 b mline
55672}
55673t clear
55674:clear
55675s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
55676t quote
55677s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
55678t quote
55679b any
55680:quote
55681s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
55682s/\[/\\&/g
55683s/\]/\\&/g
55684s/\$/$$/g
55685H
55686:any
55687${
55688	g
55689	s/^\n//
55690	s/\n/ /g
55691	p
55692}
55693'
55694DEFS=`sed -n "$ac_script" confdefs.h`
55695
55696
55697ac_libobjs=
55698ac_ltlibobjs=
55699U=
55700for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
55701  # 1. Remove the extension, and $U if already installed.
55702  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
55703  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
55704  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
55705  #    will be set to the directory where LIBOBJS objects are built.
55706  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
55707  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
55708done
55709LIBOBJS=$ac_libobjs
55710
55711LTLIBOBJS=$ac_ltlibobjs
55712
55713
55714
55715: "${CONFIG_STATUS=./config.status}"
55716ac_write_fail=0
55717ac_clean_files_save=$ac_clean_files
55718ac_clean_files="$ac_clean_files $CONFIG_STATUS"
55719{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
55720$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
55721as_write_fail=0
55722cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
55723#! $SHELL
55724# Generated by $as_me.
55725# Run this file to recreate the current configuration.
55726# Compiler output produced by configure, useful for debugging
55727# configure, is in config.log if it exists.
55728
55729debug=false
55730ac_cs_recheck=false
55731ac_cs_silent=false
55732
55733SHELL=\${CONFIG_SHELL-$SHELL}
55734export SHELL
55735_ASEOF
55736cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
55737## -------------------- ##
55738## M4sh Initialization. ##
55739## -------------------- ##
55740
55741# Be more Bourne compatible
55742DUALCASE=1; export DUALCASE # for MKS sh
55743if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
55744  emulate sh
55745  NULLCMD=:
55746  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
55747  # is contrary to our usage.  Disable this feature.
55748  alias -g '${1+"$@"}'='"$@"'
55749  setopt NO_GLOB_SUBST
55750else
55751  case `(set -o) 2>/dev/null` in #(
55752  *posix*) :
55753    set -o posix ;; #(
55754  *) :
55755     ;;
55756esac
55757fi
55758
55759
55760as_nl='
55761'
55762export as_nl
55763# Printing a long string crashes Solaris 7 /usr/bin/printf.
55764as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
55765as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
55766as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
55767# Prefer a ksh shell builtin over an external printf program on Solaris,
55768# but without wasting forks for bash or zsh.
55769if test -z "$BASH_VERSION$ZSH_VERSION" \
55770    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
55771  as_echo='print -r --'
55772  as_echo_n='print -rn --'
55773elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
55774  as_echo='printf %s\n'
55775  as_echo_n='printf %s'
55776else
55777  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55778    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55779    as_echo_n='/usr/ucb/echo -n'
55780  else
55781    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55782    as_echo_n_body='eval
55783      arg=$1;
55784      case $arg in #(
55785      *"$as_nl"*)
55786	expr "X$arg" : "X\\(.*\\)$as_nl";
55787	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
55788      esac;
55789      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
55790    '
55791    export as_echo_n_body
55792    as_echo_n='sh -c $as_echo_n_body as_echo'
55793  fi
55794  export as_echo_body
55795  as_echo='sh -c $as_echo_body as_echo'
55796fi
55797
55798# The user is always right.
55799if test "${PATH_SEPARATOR+set}" != set; then
55800  PATH_SEPARATOR=:
55801  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
55802    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
55803      PATH_SEPARATOR=';'
55804  }
55805fi
55806
55807
55808# IFS
55809# We need space, tab and new line, in precisely that order.  Quoting is
55810# there to prevent editors from complaining about space-tab.
55811# (If _AS_PATH_WALK were called with IFS unset, it would disable word
55812# splitting by setting IFS to empty value.)
55813IFS=" ""	$as_nl"
55814
55815# Find who we are.  Look in the path if we contain no directory separator.
55816as_myself=
55817case $0 in #((
55818  *[\\/]* ) as_myself=$0 ;;
55819  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55820for as_dir in $PATH
55821do
55822  IFS=$as_save_IFS
55823  test -z "$as_dir" && as_dir=.
55824    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
55825  done
55826IFS=$as_save_IFS
55827
55828     ;;
55829esac
55830# We did not find ourselves, most probably we were run as `sh COMMAND'
55831# in which case we are not to be found in the path.
55832if test "x$as_myself" = x; then
55833  as_myself=$0
55834fi
55835if test ! -f "$as_myself"; then
55836  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
55837  exit 1
55838fi
55839
55840# Unset variables that we do not need and which cause bugs (e.g. in
55841# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
55842# suppresses any "Segmentation fault" message there.  '((' could
55843# trigger a bug in pdksh 5.2.14.
55844for as_var in BASH_ENV ENV MAIL MAILPATH
55845do eval test x\${$as_var+set} = xset \
55846  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
55847done
55848PS1='$ '
55849PS2='> '
55850PS4='+ '
55851
55852# NLS nuisances.
55853LC_ALL=C
55854export LC_ALL
55855LANGUAGE=C
55856export LANGUAGE
55857
55858# CDPATH.
55859(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
55860
55861
55862# as_fn_error STATUS ERROR [LINENO LOG_FD]
55863# ----------------------------------------
55864# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
55865# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
55866# script with STATUS, using 1 if that was 0.
55867as_fn_error ()
55868{
55869  as_status=$1; test $as_status -eq 0 && as_status=1
55870  if test "$4"; then
55871    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
55872    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
55873  fi
55874  $as_echo "$as_me: error: $2" >&2
55875  as_fn_exit $as_status
55876} # as_fn_error
55877
55878
55879# as_fn_set_status STATUS
55880# -----------------------
55881# Set $? to STATUS, without forking.
55882as_fn_set_status ()
55883{
55884  return $1
55885} # as_fn_set_status
55886
55887# as_fn_exit STATUS
55888# -----------------
55889# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
55890as_fn_exit ()
55891{
55892  set +e
55893  as_fn_set_status $1
55894  exit $1
55895} # as_fn_exit
55896
55897# as_fn_unset VAR
55898# ---------------
55899# Portably unset VAR.
55900as_fn_unset ()
55901{
55902  { eval $1=; unset $1;}
55903}
55904as_unset=as_fn_unset
55905# as_fn_append VAR VALUE
55906# ----------------------
55907# Append the text in VALUE to the end of the definition contained in VAR. Take
55908# advantage of any shell optimizations that allow amortized linear growth over
55909# repeated appends, instead of the typical quadratic growth present in naive
55910# implementations.
55911if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
55912  eval 'as_fn_append ()
55913  {
55914    eval $1+=\$2
55915  }'
55916else
55917  as_fn_append ()
55918  {
55919    eval $1=\$$1\$2
55920  }
55921fi # as_fn_append
55922
55923# as_fn_arith ARG...
55924# ------------------
55925# Perform arithmetic evaluation on the ARGs, and store the result in the
55926# global $as_val. Take advantage of shells that can avoid forks. The arguments
55927# must be portable across $(()) and expr.
55928if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
55929  eval 'as_fn_arith ()
55930  {
55931    as_val=$(( $* ))
55932  }'
55933else
55934  as_fn_arith ()
55935  {
55936    as_val=`expr "$@" || test $? -eq 1`
55937  }
55938fi # as_fn_arith
55939
55940
55941if expr a : '\(a\)' >/dev/null 2>&1 &&
55942   test "X`expr 00001 : '.*\(...\)'`" = X001; then
55943  as_expr=expr
55944else
55945  as_expr=false
55946fi
55947
55948if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
55949  as_basename=basename
55950else
55951  as_basename=false
55952fi
55953
55954if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
55955  as_dirname=dirname
55956else
55957  as_dirname=false
55958fi
55959
55960as_me=`$as_basename -- "$0" ||
55961$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
55962	 X"$0" : 'X\(//\)$' \| \
55963	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
55964$as_echo X/"$0" |
55965    sed '/^.*\/\([^/][^/]*\)\/*$/{
55966	    s//\1/
55967	    q
55968	  }
55969	  /^X\/\(\/\/\)$/{
55970	    s//\1/
55971	    q
55972	  }
55973	  /^X\/\(\/\).*/{
55974	    s//\1/
55975	    q
55976	  }
55977	  s/.*/./; q'`
55978
55979# Avoid depending upon Character Ranges.
55980as_cr_letters='abcdefghijklmnopqrstuvwxyz'
55981as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
55982as_cr_Letters=$as_cr_letters$as_cr_LETTERS
55983as_cr_digits='0123456789'
55984as_cr_alnum=$as_cr_Letters$as_cr_digits
55985
55986ECHO_C= ECHO_N= ECHO_T=
55987case `echo -n x` in #(((((
55988-n*)
55989  case `echo 'xy\c'` in
55990  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
55991  xy)  ECHO_C='\c';;
55992  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
55993       ECHO_T='	';;
55994  esac;;
55995*)
55996  ECHO_N='-n';;
55997esac
55998
55999rm -f conf$$ conf$$.exe conf$$.file
56000if test -d conf$$.dir; then
56001  rm -f conf$$.dir/conf$$.file
56002else
56003  rm -f conf$$.dir
56004  mkdir conf$$.dir 2>/dev/null
56005fi
56006if (echo >conf$$.file) 2>/dev/null; then
56007  if ln -s conf$$.file conf$$ 2>/dev/null; then
56008    as_ln_s='ln -s'
56009    # ... but there are two gotchas:
56010    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
56011    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
56012    # In both cases, we have to default to `cp -pR'.
56013    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
56014      as_ln_s='cp -pR'
56015  elif ln conf$$.file conf$$ 2>/dev/null; then
56016    as_ln_s=ln
56017  else
56018    as_ln_s='cp -pR'
56019  fi
56020else
56021  as_ln_s='cp -pR'
56022fi
56023rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
56024rmdir conf$$.dir 2>/dev/null
56025
56026
56027# as_fn_mkdir_p
56028# -------------
56029# Create "$as_dir" as a directory, including parents if necessary.
56030as_fn_mkdir_p ()
56031{
56032
56033  case $as_dir in #(
56034  -*) as_dir=./$as_dir;;
56035  esac
56036  test -d "$as_dir" || eval $as_mkdir_p || {
56037    as_dirs=
56038    while :; do
56039      case $as_dir in #(
56040      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
56041      *) as_qdir=$as_dir;;
56042      esac
56043      as_dirs="'$as_qdir' $as_dirs"
56044      as_dir=`$as_dirname -- "$as_dir" ||
56045$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56046	 X"$as_dir" : 'X\(//\)[^/]' \| \
56047	 X"$as_dir" : 'X\(//\)$' \| \
56048	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
56049$as_echo X"$as_dir" |
56050    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56051	    s//\1/
56052	    q
56053	  }
56054	  /^X\(\/\/\)[^/].*/{
56055	    s//\1/
56056	    q
56057	  }
56058	  /^X\(\/\/\)$/{
56059	    s//\1/
56060	    q
56061	  }
56062	  /^X\(\/\).*/{
56063	    s//\1/
56064	    q
56065	  }
56066	  s/.*/./; q'`
56067      test -d "$as_dir" && break
56068    done
56069    test -z "$as_dirs" || eval "mkdir $as_dirs"
56070  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
56071
56072
56073} # as_fn_mkdir_p
56074if mkdir -p . 2>/dev/null; then
56075  as_mkdir_p='mkdir -p "$as_dir"'
56076else
56077  test -d ./-p && rmdir ./-p
56078  as_mkdir_p=false
56079fi
56080
56081
56082# as_fn_executable_p FILE
56083# -----------------------
56084# Test if FILE is an executable regular file.
56085as_fn_executable_p ()
56086{
56087  test -f "$1" && test -x "$1"
56088} # as_fn_executable_p
56089as_test_x='test -x'
56090as_executable_p=as_fn_executable_p
56091
56092# Sed expression to map a string onto a valid CPP name.
56093as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
56094
56095# Sed expression to map a string onto a valid variable name.
56096as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
56097
56098
56099exec 6>&1
56100## ----------------------------------- ##
56101## Main body of $CONFIG_STATUS script. ##
56102## ----------------------------------- ##
56103_ASEOF
56104test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
56105
56106cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56107# Save the log message, to keep $0 and so on meaningful, and to
56108# report actual input values of CONFIG_FILES etc. instead of their
56109# values after options handling.
56110ac_log="
56111This file was extended by OpenJDK $as_me jdk9, which was
56112generated by GNU Autoconf 2.69.  Invocation command line was
56113
56114  CONFIG_FILES    = $CONFIG_FILES
56115  CONFIG_HEADERS  = $CONFIG_HEADERS
56116  CONFIG_LINKS    = $CONFIG_LINKS
56117  CONFIG_COMMANDS = $CONFIG_COMMANDS
56118  $ $0 $@
56119
56120on `(hostname || uname -n) 2>/dev/null | sed 1q`
56121"
56122
56123_ACEOF
56124
56125case $ac_config_files in *"
56126"*) set x $ac_config_files; shift; ac_config_files=$*;;
56127esac
56128
56129
56130
56131cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56132# Files that config.status was made for.
56133config_files="$ac_config_files"
56134
56135_ACEOF
56136
56137cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56138ac_cs_usage="\
56139\`$as_me' instantiates files and other configuration actions
56140from templates according to the current configuration.  Unless the files
56141and actions are specified as TAGs, all are instantiated by default.
56142
56143Usage: $0 [OPTION]... [TAG]...
56144
56145  -h, --help       print this help, then exit
56146  -V, --version    print version number and configuration settings, then exit
56147      --config     print configuration, then exit
56148  -q, --quiet, --silent
56149                   do not print progress messages
56150  -d, --debug      don't remove temporary files
56151      --recheck    update $as_me by reconfiguring in the same conditions
56152      --file=FILE[:TEMPLATE]
56153                   instantiate the configuration file FILE
56154
56155Configuration files:
56156$config_files
56157
56158Report bugs to <build-dev@openjdk.java.net>.
56159OpenJDK home page: <http://openjdk.java.net>."
56160
56161_ACEOF
56162cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56163ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
56164ac_cs_version="\\
56165OpenJDK config.status jdk9
56166configured by $0, generated by GNU Autoconf 2.69,
56167  with options \\"\$ac_cs_config\\"
56168
56169Copyright (C) 2012 Free Software Foundation, Inc.
56170This config.status script is free software; the Free Software Foundation
56171gives unlimited permission to copy, distribute and modify it."
56172
56173ac_pwd='$ac_pwd'
56174srcdir='$srcdir'
56175AWK='$AWK'
56176test -n "\$AWK" || AWK=awk
56177_ACEOF
56178
56179cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56180# The default lists apply if the user does not specify any file.
56181ac_need_defaults=:
56182while test $# != 0
56183do
56184  case $1 in
56185  --*=?*)
56186    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56187    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
56188    ac_shift=:
56189    ;;
56190  --*=)
56191    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56192    ac_optarg=
56193    ac_shift=:
56194    ;;
56195  *)
56196    ac_option=$1
56197    ac_optarg=$2
56198    ac_shift=shift
56199    ;;
56200  esac
56201
56202  case $ac_option in
56203  # Handling of the options.
56204  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
56205    ac_cs_recheck=: ;;
56206  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
56207    $as_echo "$ac_cs_version"; exit ;;
56208  --config | --confi | --conf | --con | --co | --c )
56209    $as_echo "$ac_cs_config"; exit ;;
56210  --debug | --debu | --deb | --de | --d | -d )
56211    debug=: ;;
56212  --file | --fil | --fi | --f )
56213    $ac_shift
56214    case $ac_optarg in
56215    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
56216    '') as_fn_error $? "missing file argument" ;;
56217    esac
56218    as_fn_append CONFIG_FILES " '$ac_optarg'"
56219    ac_need_defaults=false;;
56220  --he | --h |  --help | --hel | -h )
56221    $as_echo "$ac_cs_usage"; exit ;;
56222  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
56223  | -silent | --silent | --silen | --sile | --sil | --si | --s)
56224    ac_cs_silent=: ;;
56225
56226  # This is an error.
56227  -*) as_fn_error $? "unrecognized option: \`$1'
56228Try \`$0 --help' for more information." ;;
56229
56230  *) as_fn_append ac_config_targets " $1"
56231     ac_need_defaults=false ;;
56232
56233  esac
56234  shift
56235done
56236
56237ac_configure_extra_args=
56238
56239if $ac_cs_silent; then
56240  exec 6>/dev/null
56241  ac_configure_extra_args="$ac_configure_extra_args --silent"
56242fi
56243
56244_ACEOF
56245cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56246if \$ac_cs_recheck; then
56247  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
56248  shift
56249  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
56250  CONFIG_SHELL='$SHELL'
56251  export CONFIG_SHELL
56252  exec "\$@"
56253fi
56254
56255_ACEOF
56256cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56257exec 5>>config.log
56258{
56259  echo
56260  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
56261## Running $as_me. ##
56262_ASBOX
56263  $as_echo "$ac_log"
56264} >&5
56265
56266_ACEOF
56267cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56268_ACEOF
56269
56270cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56271
56272# Handling of arguments.
56273for ac_config_target in $ac_config_targets
56274do
56275  case $ac_config_target in
56276    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
56277    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
56278    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
56279    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
56280    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
56281
56282  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
56283  esac
56284done
56285
56286
56287# If the user did not use the arguments to specify the items to instantiate,
56288# then the envvar interface is used.  Set only those that are not.
56289# We use the long form for the default assignment because of an extremely
56290# bizarre bug on SunOS 4.1.3.
56291if $ac_need_defaults; then
56292  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
56293fi
56294
56295# Have a temporary directory for convenience.  Make it in the build tree
56296# simply because there is no reason against having it here, and in addition,
56297# creating and moving files from /tmp can sometimes cause problems.
56298# Hook for its removal unless debugging.
56299# Note that there is a small window in which the directory will not be cleaned:
56300# after its creation but before its name has been assigned to `$tmp'.
56301$debug ||
56302{
56303  tmp= ac_tmp=
56304  trap 'exit_status=$?
56305  : "${ac_tmp:=$tmp}"
56306  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
56307' 0
56308  trap 'as_fn_exit 1' 1 2 13 15
56309}
56310# Create a (secure) tmp directory for tmp files.
56311
56312{
56313  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
56314  test -d "$tmp"
56315}  ||
56316{
56317  tmp=./conf$$-$RANDOM
56318  (umask 077 && mkdir "$tmp")
56319} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
56320ac_tmp=$tmp
56321
56322# Set up the scripts for CONFIG_FILES section.
56323# No need to generate them if there are no CONFIG_FILES.
56324# This happens for instance with `./config.status config.h'.
56325if test -n "$CONFIG_FILES"; then
56326
56327
56328ac_cr=`echo X | tr X '\015'`
56329# On cygwin, bash can eat \r inside `` if the user requested igncr.
56330# But we know of no other shell where ac_cr would be empty at this
56331# point, so we can use a bashism as a fallback.
56332if test "x$ac_cr" = x; then
56333  eval ac_cr=\$\'\\r\'
56334fi
56335ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
56336if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
56337  ac_cs_awk_cr='\\r'
56338else
56339  ac_cs_awk_cr=$ac_cr
56340fi
56341
56342echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
56343_ACEOF
56344
56345
56346{
56347  echo "cat >conf$$subs.awk <<_ACEOF" &&
56348  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
56349  echo "_ACEOF"
56350} >conf$$subs.sh ||
56351  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56352ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
56353ac_delim='%!_!# '
56354for ac_last_try in false false false false false :; do
56355  . ./conf$$subs.sh ||
56356    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56357
56358  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
56359  if test $ac_delim_n = $ac_delim_num; then
56360    break
56361  elif $ac_last_try; then
56362    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56363  else
56364    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
56365  fi
56366done
56367rm -f conf$$subs.sh
56368
56369cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56370cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
56371_ACEOF
56372sed -n '
56373h
56374s/^/S["/; s/!.*/"]=/
56375p
56376g
56377s/^[^!]*!//
56378:repl
56379t repl
56380s/'"$ac_delim"'$//
56381t delim
56382:nl
56383h
56384s/\(.\{148\}\)..*/\1/
56385t more1
56386s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
56387p
56388n
56389b repl
56390:more1
56391s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56392p
56393g
56394s/.\{148\}//
56395t nl
56396:delim
56397h
56398s/\(.\{148\}\)..*/\1/
56399t more2
56400s/["\\]/\\&/g; s/^/"/; s/$/"/
56401p
56402b
56403:more2
56404s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56405p
56406g
56407s/.\{148\}//
56408t delim
56409' <conf$$subs.awk | sed '
56410/^[^""]/{
56411  N
56412  s/\n//
56413}
56414' >>$CONFIG_STATUS || ac_write_fail=1
56415rm -f conf$$subs.awk
56416cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56417_ACAWK
56418cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
56419  for (key in S) S_is_set[key] = 1
56420  FS = ""
56421
56422}
56423{
56424  line = $ 0
56425  nfields = split(line, field, "@")
56426  substed = 0
56427  len = length(field[1])
56428  for (i = 2; i < nfields; i++) {
56429    key = field[i]
56430    keylen = length(key)
56431    if (S_is_set[key]) {
56432      value = S[key]
56433      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
56434      len += length(value) + length(field[++i])
56435      substed = 1
56436    } else
56437      len += 1 + keylen
56438  }
56439
56440  print line
56441}
56442
56443_ACAWK
56444_ACEOF
56445cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56446if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
56447  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
56448else
56449  cat
56450fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
56451  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
56452_ACEOF
56453
56454# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
56455# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
56456# trailing colons and then remove the whole line if VPATH becomes empty
56457# (actually we leave an empty line to preserve line numbers).
56458if test "x$srcdir" = x.; then
56459  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
56460h
56461s///
56462s/^/:/
56463s/[	 ]*$/:/
56464s/:\$(srcdir):/:/g
56465s/:\${srcdir}:/:/g
56466s/:@srcdir@:/:/g
56467s/^:*//
56468s/:*$//
56469x
56470s/\(=[	 ]*\).*/\1/
56471G
56472s/\n//
56473s/^[^=]*=[	 ]*$//
56474}'
56475fi
56476
56477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56478fi # test -n "$CONFIG_FILES"
56479
56480
56481eval set X "  :F $CONFIG_FILES      "
56482shift
56483for ac_tag
56484do
56485  case $ac_tag in
56486  :[FHLC]) ac_mode=$ac_tag; continue;;
56487  esac
56488  case $ac_mode$ac_tag in
56489  :[FHL]*:*);;
56490  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
56491  :[FH]-) ac_tag=-:-;;
56492  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
56493  esac
56494  ac_save_IFS=$IFS
56495  IFS=:
56496  set x $ac_tag
56497  IFS=$ac_save_IFS
56498  shift
56499  ac_file=$1
56500  shift
56501
56502  case $ac_mode in
56503  :L) ac_source=$1;;
56504  :[FH])
56505    ac_file_inputs=
56506    for ac_f
56507    do
56508      case $ac_f in
56509      -) ac_f="$ac_tmp/stdin";;
56510      *) # Look for the file first in the build tree, then in the source tree
56511	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
56512	 # because $ac_f cannot contain `:'.
56513	 test -f "$ac_f" ||
56514	   case $ac_f in
56515	   [\\/$]*) false;;
56516	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
56517	   esac ||
56518	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
56519      esac
56520      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
56521      as_fn_append ac_file_inputs " '$ac_f'"
56522    done
56523
56524    # Let's still pretend it is `configure' which instantiates (i.e., don't
56525    # use $as_me), people would be surprised to read:
56526    #    /* config.h.  Generated by config.status.  */
56527    configure_input='Generated from '`
56528	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
56529	`' by configure.'
56530    if test x"$ac_file" != x-; then
56531      configure_input="$ac_file.  $configure_input"
56532      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
56533$as_echo "$as_me: creating $ac_file" >&6;}
56534    fi
56535    # Neutralize special characters interpreted by sed in replacement strings.
56536    case $configure_input in #(
56537    *\&* | *\|* | *\\* )
56538       ac_sed_conf_input=`$as_echo "$configure_input" |
56539       sed 's/[\\\\&|]/\\\\&/g'`;; #(
56540    *) ac_sed_conf_input=$configure_input;;
56541    esac
56542
56543    case $ac_tag in
56544    *:-:* | *:-) cat >"$ac_tmp/stdin" \
56545      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
56546    esac
56547    ;;
56548  esac
56549
56550  ac_dir=`$as_dirname -- "$ac_file" ||
56551$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56552	 X"$ac_file" : 'X\(//\)[^/]' \| \
56553	 X"$ac_file" : 'X\(//\)$' \| \
56554	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
56555$as_echo X"$ac_file" |
56556    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56557	    s//\1/
56558	    q
56559	  }
56560	  /^X\(\/\/\)[^/].*/{
56561	    s//\1/
56562	    q
56563	  }
56564	  /^X\(\/\/\)$/{
56565	    s//\1/
56566	    q
56567	  }
56568	  /^X\(\/\).*/{
56569	    s//\1/
56570	    q
56571	  }
56572	  s/.*/./; q'`
56573  as_dir="$ac_dir"; as_fn_mkdir_p
56574  ac_builddir=.
56575
56576case "$ac_dir" in
56577.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
56578*)
56579  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
56580  # A ".." for each directory in $ac_dir_suffix.
56581  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
56582  case $ac_top_builddir_sub in
56583  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
56584  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
56585  esac ;;
56586esac
56587ac_abs_top_builddir=$ac_pwd
56588ac_abs_builddir=$ac_pwd$ac_dir_suffix
56589# for backward compatibility:
56590ac_top_builddir=$ac_top_build_prefix
56591
56592case $srcdir in
56593  .)  # We are building in place.
56594    ac_srcdir=.
56595    ac_top_srcdir=$ac_top_builddir_sub
56596    ac_abs_top_srcdir=$ac_pwd ;;
56597  [\\/]* | ?:[\\/]* )  # Absolute name.
56598    ac_srcdir=$srcdir$ac_dir_suffix;
56599    ac_top_srcdir=$srcdir
56600    ac_abs_top_srcdir=$srcdir ;;
56601  *) # Relative name.
56602    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
56603    ac_top_srcdir=$ac_top_build_prefix$srcdir
56604    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
56605esac
56606ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
56607
56608
56609  case $ac_mode in
56610  :F)
56611  #
56612  # CONFIG_FILE
56613  #
56614
56615_ACEOF
56616
56617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56618# If the template does not know about datarootdir, expand it.
56619# FIXME: This hack should be removed a few years after 2.60.
56620ac_datarootdir_hack=; ac_datarootdir_seen=
56621ac_sed_dataroot='
56622/datarootdir/ {
56623  p
56624  q
56625}
56626/@datadir@/p
56627/@docdir@/p
56628/@infodir@/p
56629/@localedir@/p
56630/@mandir@/p'
56631case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
56632*datarootdir*) ac_datarootdir_seen=yes;;
56633*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
56634  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
56635$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
56636_ACEOF
56637cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56638  ac_datarootdir_hack='
56639  s&@datadir@&$datadir&g
56640  s&@docdir@&$docdir&g
56641  s&@infodir@&$infodir&g
56642  s&@localedir@&$localedir&g
56643  s&@mandir@&$mandir&g
56644  s&\\\${datarootdir}&$datarootdir&g' ;;
56645esac
56646_ACEOF
56647
56648# Neutralize VPATH when `$srcdir' = `.'.
56649# Shell code in configure.ac might set extrasub.
56650# FIXME: do we really want to maintain this feature?
56651cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56652ac_sed_extra="$ac_vpsub
56653$extrasub
56654_ACEOF
56655cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56656:t
56657/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
56658s|@configure_input@|$ac_sed_conf_input|;t t
56659s&@top_builddir@&$ac_top_builddir_sub&;t t
56660s&@top_build_prefix@&$ac_top_build_prefix&;t t
56661s&@srcdir@&$ac_srcdir&;t t
56662s&@abs_srcdir@&$ac_abs_srcdir&;t t
56663s&@top_srcdir@&$ac_top_srcdir&;t t
56664s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
56665s&@builddir@&$ac_builddir&;t t
56666s&@abs_builddir@&$ac_abs_builddir&;t t
56667s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
56668$ac_datarootdir_hack
56669"
56670eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
56671  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56672
56673test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
56674  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
56675  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
56676      "$ac_tmp/out"`; test -z "$ac_out"; } &&
56677  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56678which seems to be undefined.  Please make sure it is defined" >&5
56679$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56680which seems to be undefined.  Please make sure it is defined" >&2;}
56681
56682  rm -f "$ac_tmp/stdin"
56683  case $ac_file in
56684  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
56685  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
56686  esac \
56687  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56688 ;;
56689
56690
56691
56692  esac
56693
56694done # for ac_tag
56695
56696
56697as_fn_exit 0
56698_ACEOF
56699ac_clean_files=$ac_clean_files_save
56700
56701test $ac_write_fail = 0 ||
56702  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
56703
56704
56705# configure is writing to config.log, and then calls config.status.
56706# config.status does its own redirection, appending to config.log.
56707# Unfortunately, on DOS this fails, as config.log is still kept open
56708# by configure, so config.status won't be able to write to it; its
56709# output is simply discarded.  So we exec the FD to /dev/null,
56710# effectively closing config.log, so it can be properly (re)opened and
56711# appended to by config.status.  When coming back to configure, we
56712# need to make the FD available again.
56713if test "$no_create" != yes; then
56714  ac_cs_success=:
56715  ac_config_status_args=
56716  test "$silent" = yes &&
56717    ac_config_status_args="$ac_config_status_args --quiet"
56718  exec 5>/dev/null
56719  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
56720  exec 5>>config.log
56721  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
56722  # would make configure fail if this is the last instruction.
56723  $ac_cs_success || as_fn_exit 1
56724fi
56725if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
56726  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
56727$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
56728fi
56729
56730
56731# After AC_OUTPUT, we need to do final work
56732
56733
56734  # Try to move config.log (generated by autoconf) to the configure-support directory.
56735  if test -e ./config.log; then
56736    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
56737  fi
56738
56739  # Rotate our log file (configure.log)
56740  if test -e "$OUTPUT_ROOT/configure.log.old"; then
56741    $RM -f "$OUTPUT_ROOT/configure.log.old"
56742  fi
56743  if test -e "$OUTPUT_ROOT/configure.log"; then
56744    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
56745  fi
56746
56747  # Move configure.log from current directory to the build output root
56748  if test -e ./configure.log; then
56749    echo found it
56750    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
56751  fi
56752
56753  # Make the compare script executable
56754  $CHMOD +x $OUTPUT_ROOT/compare.sh
56755
56756
56757# Finally output some useful information to the user
56758
56759  # Finally output some useful information to the user
56760
56761  printf "\n"
56762  printf "====================================================\n"
56763  if test "x$no_create" != "xyes"; then
56764    if test "x$IS_RECONFIGURE" != "xyes"; then
56765      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
56766    else
56767      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
56768    fi
56769  else
56770    if test "x$IS_RECONFIGURE" != "xyes"; then
56771      printf "A configuration has been successfully checked but not created\n"
56772    else
56773      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
56774    fi
56775  fi
56776  if test "x$CONFIGURE_COMMAND_LINE" != x; then
56777    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
56778  else
56779    printf "using default settings.\n"
56780  fi
56781
56782  printf "\n"
56783  printf "Configuration summary:\n"
56784  printf "* Debug level:    $DEBUG_LEVEL\n"
56785  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
56786  printf "* JDK variant:    $JDK_VARIANT\n"
56787  printf "* JVM variants:   $with_jvm_variants\n"
56788  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
56789
56790  printf "\n"
56791  printf "Tools summary:\n"
56792  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
56793    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
56794  fi
56795  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
56796  if test "x$TOOLCHAIN_VERSION" != "x"; then
56797    print_version=" $TOOLCHAIN_VERSION"
56798  fi
56799  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
56800  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
56801  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
56802
56803  printf "\n"
56804  printf "Build performance summary:\n"
56805  printf "* Cores to use:   $JOBS\n"
56806  printf "* Memory limit:   $MEMORY_SIZE MB\n"
56807  if test "x$CCACHE_STATUS" != "x"; then
56808    printf "* ccache status:  $CCACHE_STATUS\n"
56809  fi
56810  printf "\n"
56811
56812  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
56813    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
56814    printf "will result in longer build times.\n"
56815    printf "\n"
56816  fi
56817
56818  if test "x$FOUND_ALT_VARIABLES" != "x"; then
56819    printf "WARNING: You have old-style ALT_ environment variables set.\n"
56820    printf "These are not respected, and will be ignored. It is recommended\n"
56821    printf "that you clean your environment. The following variables are set:\n"
56822    printf "$FOUND_ALT_VARIABLES\n"
56823    printf "\n"
56824  fi
56825
56826  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
56827    printf "WARNING: Your build output directory is not on a local disk.\n"
56828    printf "This will severely degrade build performance!\n"
56829    printf "It is recommended that you create an output directory on a local disk,\n"
56830    printf "and run the configure script again from that directory.\n"
56831    printf "\n"
56832  fi
56833
56834  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
56835    printf "WARNING: The result of this configuration has overridden an older\n"
56836    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
56837    printf "proper build. Failure to do so might result in strange build problems.\n"
56838    printf "\n"
56839  fi
56840
56841  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
56842    printf "WARNING: The result of this configuration was not saved.\n"
56843    printf "You should run without '--no-create | -n' to create the configuration.\n"
56844    printf "\n"
56845  fi
56846
56847
56848
56849  # Locate config.log.
56850  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
56851    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
56852  elif test -e "./config.log"; then
56853    CONFIG_LOG_PATH="."
56854  fi
56855
56856  if test -e "$CONFIG_LOG_PATH/config.log"; then
56857    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
56858    if test $? -eq 0; then
56859      printf "The following warnings were produced. Repeated here for convenience:\n"
56860      # We must quote sed expression (using []) to stop m4 from eating the [].
56861      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
56862      printf "\n"
56863    fi
56864  fi
56865
56866