1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666STLPORT_LIB
667LIBZIP_CAN_USE_MMAP
668LIBDL
669LIBM
670USE_EXTERNAL_LCMS
671LCMS_LIBS
672LCMS_CFLAGS
673USE_EXTERNAL_LIBZ
674USE_EXTERNAL_LIBPNG
675PNG_LIBS
676PNG_CFLAGS
677USE_EXTERNAL_LIBGIF
678USE_EXTERNAL_LIBJPEG
679LLVM_LIBS
680LLVM_LDFLAGS
681LLVM_CFLAGS
682LLVM_CONFIG
683LIBFFI_LIB_FILE
684ENABLE_LIBFFI_BUNDLING
685LIBFFI_LIBS
686LIBFFI_CFLAGS
687ALSA_LIBS
688ALSA_CFLAGS
689FREETYPE_LICENSE
690FREETYPE_BUNDLE_LIB_PATH
691FREETYPE_LIBS
692FREETYPE_CFLAGS
693CUPS_CFLAGS
694X_EXTRA_LIBS
695X_LIBS
696X_PRE_LIBS
697X_CFLAGS
698XMKMF
699MSVCP_DLL
700MSVCR_DLL
701LIBCXX
702FIXPATH_DETACH_FLAG
703FIXPATH
704BUILD_GTEST
705ENABLE_CDS
706ENABLE_AOT
707GCOV_ENABLED
708ZIP_EXTERNAL_DEBUG_SYMBOLS
709COPY_DEBUG_SYMBOLS
710COMPILE_WITH_DEBUG_SYMBOLS
711CFLAGS_WARNINGS_ARE_ERRORS
712BUILD_CC_DISABLE_WARNING_PREFIX
713DISABLE_WARNING_PREFIX
714WARNINGS_AS_ERRORS
715COMPILER_SUPPORTS_TARGET_BITS_FLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MAX
752MACOSX_VERSION_MIN
753CXXSTD_CXXFLAG
754JDK_ARCH_ABI_PROP_NAME
755CXX_O_FLAG_SIZE
756CXX_O_FLAG_NONE
757CXX_O_FLAG_DEBUG
758CXX_O_FLAG_NORM
759CXX_O_FLAG_HI
760CXX_O_FLAG_HIGHEST
761CXX_O_FLAG_HIGHEST_JVM
762C_O_FLAG_SIZE
763C_O_FLAG_NONE
764C_O_FLAG_DEBUG
765C_O_FLAG_NORM
766C_O_FLAG_HI
767C_O_FLAG_HIGHEST
768C_O_FLAG_HIGHEST_JVM
769JVM_CFLAGS_SYMBOLS
770CXXFLAGS_DEBUG_SYMBOLS
771CFLAGS_DEBUG_SYMBOLS
772CXX_FLAG_DEPS
773C_FLAG_DEPS
774SHARED_LIBRARY_FLAGS
775SET_SHARED_LIBRARY_MAPFILE
776SET_SHARED_LIBRARY_NAME
777SET_SHARED_LIBRARY_ORIGIN
778SET_EXECUTABLE_ORIGIN
779CXX_FLAG_REORDER
780C_FLAG_REORDER
781JVM_RCFLAGS
782RC_FLAGS
783AR_OUT_OPTION
784LD_OUT_OPTION
785EXE_OUT_OPTION
786CC_OUT_OPTION
787STRIPFLAGS
788ARFLAGS
789COMPILER_BINDCMD_FILE_FLAG
790COMPILER_COMMAND_FILE_FLAG
791COMPILER_TARGET_BITS_FLAG
792JIB_JAR
793JT_HOME
794JTREGEXE
795HOTSPOT_TOOLCHAIN_TYPE
796USING_BROKEN_SUSE_LD
797PACKAGE_PATH
798BUILD_AS
799BUILD_LDCXX
800BUILD_LD
801BUILD_STRIP
802BUILD_OBJCOPY
803BUILD_AR
804BUILD_NM
805BUILD_CXX
806BUILD_CC
807BUILD_SYSROOT_LDFLAGS
808BUILD_SYSROOT_CFLAGS
809ac_ct_OBJDUMP
810OBJDUMP
811ac_ct_OBJCOPY
812OBJCOPY
813ac_ct_NM
814ac_ct_STRIP
815GNM
816NM
817STRIP
818MSBUILD
819DUMPBIN
820RC
821MT
822LIPO
823ac_ct_AR
824AR
825AS
826LDCXX
827LD
828CXXCPP
829CPP
830CXX_VERSION_NUMBER
831CC_VERSION_NUMBER
832ac_ct_CXX
833CXXFLAGS
834CXX
835TOOLCHAIN_PATH_CXX
836POTENTIAL_CXX
837OBJEXT
838EXEEXT
839ac_ct_CC
840CPPFLAGS
841LDFLAGS
842CFLAGS
843CC
844TOOLCHAIN_PATH_CC
845POTENTIAL_CC
846TOOLCHAIN_VERSION
847VS_LIB
848VS_INCLUDE
849VS_PATH
850CYGWIN_LINK
851SYSROOT_LDFLAGS
852SYSROOT_CFLAGS
853EXTRA_LDFLAGS
854EXTRA_CXXFLAGS
855EXTRA_CFLAGS
856EXE_SUFFIX
857OBJ_SUFFIX
858STATIC_LIBRARY
859SHARED_LIBRARY
860STATIC_LIBRARY_SUFFIX
861SHARED_LIBRARY_SUFFIX
862LIBRARY_PREFIX
863TOOLCHAIN_TYPE
864STATIC_BUILD
865IMPORT_MODULES_MAKE
866IMPORT_MODULES_SRC
867IMPORT_MODULES_MAN
868IMPORT_MODULES_LEGAL
869IMPORT_MODULES_CONF
870IMPORT_MODULES_LIBS
871IMPORT_MODULES_CMDS
872IMPORT_MODULES_CLASSES
873BUILD_OUTPUT
874JDK_TOPDIR
875NASHORN_TOPDIR
876HOTSPOT_TOPDIR
877JAXWS_TOPDIR
878JAXP_TOPDIR
879CORBA_TOPDIR
880LANGTOOLS_TOPDIR
881EXTERNAL_BUILDJDK
882BUILD_JDK
883CREATE_BUILDJDK
884JLINK
885JMOD
886JAVAC_FLAGS
887BOOT_JDK_MODULAR
888BOOT_JDK_SOURCETARGET
889JARSIGNER
890JAR
891JAVAH
892JAVAC
893JAVA
894BOOT_JDK
895JAVA_CHECK
896JAVAC_CHECK
897VERSION_IS_GA
898VERSION_SHORT
899VERSION_STRING
900VERSION_NUMBER_FOUR_POSITIONS
901VERSION_NUMBER
902VERSION_OPT
903VERSION_BUILD
904VERSION_PRE
905VERSION_PATCH
906VERSION_SECURITY
907VERSION_MINOR
908VERSION_MAJOR
909MACOSX_BUNDLE_ID_BASE
910MACOSX_BUNDLE_NAME_BASE
911HOTSPOT_VM_DISTRO
912COMPANY_NAME
913JDK_RC_PLATFORM_NAME
914PRODUCT_SUFFIX
915PRODUCT_NAME
916LAUNCHER_NAME
917JLINK_KEEP_PACKAGED_MODULES
918COPYRIGHT_YEAR
919COMPRESS_JARS
920INCLUDE_SA
921UNLIMITED_CRYPTO
922CACERTS_FILE
923ENABLE_FULL_DOCS
924ENABLE_HEADLESS_ONLY
925DEFAULT_MAKE_TARGET
926OS_VERSION_MICRO
927OS_VERSION_MINOR
928OS_VERSION_MAJOR
929PKG_CONFIG
930BASH_ARGS
931SETFILE
932CODESIGN
933XATTR
934DSYMUTIL
935IS_GNU_TIME
936PATCH
937DTRACE
938FLOCK
939TIME
940STAT
941HG
942DOT
943READELF
944OTOOL
945LDD
946ZIPEXE
947UNZIP
948TAR_SUPPORTS_TRANSFORM
949TAR_INCLUDE_PARAM
950TAR_CREATE_EXTRA_PARAM
951TAR_TYPE
952FIND_DELETE
953OUTPUT_SYNC
954OUTPUT_SYNC_SUPPORTED
955CHECK_TOOLSDIR_MAKE
956CHECK_TOOLSDIR_GMAKE
957CHECK_MAKE
958CHECK_GMAKE
959MAKE
960PKGHANDLER
961CONFIGURESUPPORT_OUTPUTDIR
962OUTPUT_ROOT
963CONF_NAME
964SPEC
965SDKROOT
966XCODEBUILD
967JVM_VARIANT_MAIN
968VALID_JVM_VARIANTS
969JVM_VARIANTS
970DEBUG_LEVEL
971HOTSPOT_DEBUG_LEVEL
972JDK_VARIANT
973USERNAME
974CANONICAL_TOPDIR
975ORIGINAL_TOPDIR
976TOPDIR
977PATH_SEP
978HOTSPOT_BUILD_CPU_DEFINE
979HOTSPOT_BUILD_CPU_ARCH
980HOTSPOT_BUILD_CPU
981HOTSPOT_BUILD_OS_TYPE
982HOTSPOT_BUILD_OS
983OPENJDK_BUILD_BUNDLE_PLATFORM
984OPENJDK_BUILD_OS_EXPORT_DIR
985OPENJDK_BUILD_CPU_OSARCH
986OPENJDK_BUILD_CPU_ISADIR
987OPENJDK_BUILD_CPU_LEGACY_LIB
988OPENJDK_BUILD_CPU_LEGACY
989HOTSPOT_TARGET_CPU_DEFINE
990HOTSPOT_TARGET_CPU_ARCH
991HOTSPOT_TARGET_CPU
992HOTSPOT_TARGET_OS_TYPE
993HOTSPOT_TARGET_OS
994DEFINE_CROSS_COMPILE_ARCH
995OPENJDK_TARGET_BUNDLE_PLATFORM
996OPENJDK_TARGET_OS_EXPORT_DIR
997OPENJDK_TARGET_CPU_OSARCH
998OPENJDK_TARGET_CPU_ISADIR
999OPENJDK_TARGET_CPU_LEGACY_LIB
1000OPENJDK_TARGET_CPU_LEGACY
1001RELEASE_FILE_OS_ARCH
1002RELEASE_FILE_OS_NAME
1003OPENJDK_MODULE_TARGET_PLATFORM
1004COMPILE_TYPE
1005OPENJDK_TARGET_CPU_ENDIAN
1006OPENJDK_TARGET_CPU_BITS
1007OPENJDK_TARGET_CPU_ARCH
1008OPENJDK_TARGET_CPU
1009OPENJDK_TARGET_OS_ENV
1010OPENJDK_TARGET_OS_TYPE
1011OPENJDK_TARGET_OS
1012OPENJDK_BUILD_CPU_ENDIAN
1013OPENJDK_BUILD_CPU_BITS
1014OPENJDK_BUILD_CPU_ARCH
1015OPENJDK_BUILD_CPU
1016OPENJDK_BUILD_OS_ENV
1017OPENJDK_BUILD_OS_TYPE
1018OPENJDK_BUILD_OS
1019OPENJDK_BUILD_AUTOCONF_NAME
1020OPENJDK_TARGET_AUTOCONF_NAME
1021target_os
1022target_vendor
1023target_cpu
1024target
1025host_os
1026host_vendor
1027host_cpu
1028host
1029build_os
1030build_vendor
1031build_cpu
1032build
1033PANDOC
1034NICE
1035CPIO
1036DF
1037READLINK
1038CYGPATH
1039SED
1040FGREP
1041EGREP
1042GREP
1043AWK
1044XARGS
1045WHICH
1046WC
1047UNIQ
1048UNAME
1049TR
1050TOUCH
1051TEE
1052TAR
1053TAIL
1054SORT
1055SH
1056RMDIR
1057RM
1058PRINTF
1059NAWK
1060MV
1061MKTEMP
1062MKDIR
1063LS
1064LN
1065GZIP
1066GUNZIP
1067HEAD
1068FIND
1069FILE
1070EXPR
1071ECHO
1072DIRNAME
1073DIFF
1074DATE
1075CUT
1076CP
1077COMM
1078CMP
1079CHMOD
1080CAT
1081BASH
1082BASENAME
1083DATE_WHEN_CONFIGURED
1084ORIGINAL_PATH
1085CONFIGURE_COMMAND_LINE
1086target_alias
1087host_alias
1088build_alias
1089LIBS
1090ECHO_T
1091ECHO_N
1092ECHO_C
1093DEFS
1094mandir
1095localedir
1096libdir
1097psdir
1098pdfdir
1099dvidir
1100htmldir
1101infodir
1102docdir
1103oldincludedir
1104includedir
1105localstatedir
1106sharedstatedir
1107sysconfdir
1108datadir
1109datarootdir
1110libexecdir
1111sbindir
1112bindir
1113program_transform_name
1114prefix
1115exec_prefix
1116PACKAGE_URL
1117PACKAGE_BUGREPORT
1118PACKAGE_STRING
1119PACKAGE_VERSION
1120PACKAGE_TARNAME
1121PACKAGE_NAME
1122PATH_SEPARATOR
1123SHELL'
1124ac_subst_files=''
1125ac_user_opts='
1126enable_option_checking
1127with_target_bits
1128enable_openjdk_only
1129with_custom_make_dir
1130with_jdk_variant
1131enable_debug
1132with_debug_level
1133with_jvm_variants
1134with_cpu_port
1135with_devkit
1136with_sys_root
1137with_sysroot
1138with_tools_dir
1139with_toolchain_path
1140with_extra_path
1141with_sdk_name
1142with_conf_name
1143with_output_sync
1144with_default_make_target
1145enable_headless_only
1146enable_full_docs
1147with_cacerts_file
1148enable_unlimited_crypto
1149with_copyright_year
1150enable_keep_packaged_modules
1151with_milestone
1152with_update_version
1153with_user_release_suffix
1154with_build_number
1155with_version_string
1156with_version_pre
1157with_version_opt
1158with_version_build
1159with_version_major
1160with_version_minor
1161with_version_security
1162with_version_patch
1163with_boot_jdk
1164with_build_jdk
1165with_add_source_root
1166with_override_source_root
1167with_adds_and_overrides
1168with_override_langtools
1169with_override_corba
1170with_override_jaxp
1171with_override_jaxws
1172with_override_hotspot
1173with_override_nashorn
1174with_override_jdk
1175with_import_hotspot
1176with_import_modules
1177enable_static_build
1178with_toolchain_type
1179with_extra_cflags
1180with_extra_cxxflags
1181with_extra_ldflags
1182with_toolchain_version
1183with_build_devkit
1184with_jtreg
1185with_jib
1186with_abi_profile
1187with_macosx_version_max
1188enable_warnings_as_errors
1189with_native_debug_symbols
1190enable_debug_symbols
1191enable_zip_debug_info
1192enable_native_coverage
1193enable_dtrace
1194enable_aot
1195enable_cds
1196enable_hotspot_gtest
1197with_stdc__lib
1198with_msvcr_dll
1199with_msvcp_dll
1200with_x
1201with_cups
1202with_cups_include
1203with_freetype
1204with_freetype_include
1205with_freetype_lib
1206with_freetype_src
1207enable_freetype_bundling
1208with_freetype_license
1209with_alsa
1210with_alsa_include
1211with_alsa_lib
1212with_libffi
1213with_libffi_include
1214with_libffi_lib
1215enable_libffi_bundling
1216with_libjpeg
1217with_giflib
1218with_libpng
1219with_zlib
1220with_lcms
1221with_dxsdk
1222with_dxsdk_lib
1223with_dxsdk_include
1224with_jvm_features
1225with_jvm_interpreter
1226enable_jtreg_failure_handler
1227enable_generate_classlist
1228with_num_cores
1229with_memory_size
1230with_jobs
1231with_test_jobs
1232with_boot_jdk_jvmargs
1233with_sjavac_server_java
1234enable_sjavac
1235enable_javac_server
1236enable_icecc
1237enable_precompiled_headers
1238enable_ccache
1239with_ccache_dir
1240'
1241      ac_precious_vars='build_alias
1242host_alias
1243target_alias
1244BASENAME
1245BASH
1246CAT
1247CHMOD
1248CMP
1249COMM
1250CP
1251CUT
1252DATE
1253DIFF
1254DIRNAME
1255ECHO
1256EXPR
1257FILE
1258FIND
1259HEAD
1260GUNZIP
1261GZIP
1262LN
1263LS
1264MKDIR
1265MKTEMP
1266MV
1267NAWK
1268PRINTF
1269RM
1270RMDIR
1271SH
1272SORT
1273TAIL
1274TAR
1275TEE
1276TOUCH
1277TR
1278UNAME
1279UNIQ
1280WC
1281WHICH
1282XARGS
1283AWK
1284GREP
1285EGREP
1286FGREP
1287SED
1288CYGPATH
1289READLINK
1290DF
1291CPIO
1292NICE
1293PANDOC
1294MAKE
1295UNZIP
1296ZIPEXE
1297LDD
1298OTOOL
1299READELF
1300DOT
1301HG
1302STAT
1303TIME
1304FLOCK
1305DTRACE
1306PATCH
1307DSYMUTIL
1308XATTR
1309CODESIGN
1310SETFILE
1311PKG_CONFIG
1312JAVA
1313JAVAC
1314JAVAH
1315JAR
1316JARSIGNER
1317CC
1318CFLAGS
1319LDFLAGS
1320LIBS
1321CPPFLAGS
1322CXX
1323CXXFLAGS
1324CCC
1325CPP
1326CXXCPP
1327AS
1328AR
1329LIPO
1330STRIP
1331NM
1332GNM
1333OBJCOPY
1334OBJDUMP
1335BUILD_CC
1336BUILD_CXX
1337BUILD_NM
1338BUILD_AR
1339BUILD_OBJCOPY
1340BUILD_STRIP
1341JTREGEXE
1342XMKMF
1343FREETYPE_CFLAGS
1344FREETYPE_LIBS
1345ALSA_CFLAGS
1346ALSA_LIBS
1347LIBFFI_CFLAGS
1348LIBFFI_LIBS
1349PNG_CFLAGS
1350PNG_LIBS
1351LCMS_CFLAGS
1352LCMS_LIBS
1353ICECC_CMD
1354ICECC_CREATE_ENV
1355ICECC_WRAPPER
1356CCACHE'
1357
1358
1359# Initialize some variables set by options.
1360ac_init_help=
1361ac_init_version=false
1362ac_unrecognized_opts=
1363ac_unrecognized_sep=
1364# The variables have the same names as the options, with
1365# dashes changed to underlines.
1366cache_file=/dev/null
1367exec_prefix=NONE
1368no_create=
1369no_recursion=
1370prefix=NONE
1371program_prefix=NONE
1372program_suffix=NONE
1373program_transform_name=s,x,x,
1374silent=
1375site=
1376srcdir=
1377verbose=
1378x_includes=NONE
1379x_libraries=NONE
1380
1381# Installation directory options.
1382# These are left unexpanded so users can "make install exec_prefix=/foo"
1383# and all the variables that are supposed to be based on exec_prefix
1384# by default will actually change.
1385# Use braces instead of parens because sh, perl, etc. also accept them.
1386# (The list follows the same order as the GNU Coding Standards.)
1387bindir='${exec_prefix}/bin'
1388sbindir='${exec_prefix}/sbin'
1389libexecdir='${exec_prefix}/libexec'
1390datarootdir='${prefix}/share'
1391datadir='${datarootdir}'
1392sysconfdir='${prefix}/etc'
1393sharedstatedir='${prefix}/com'
1394localstatedir='${prefix}/var'
1395includedir='${prefix}/include'
1396oldincludedir='/usr/include'
1397docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398infodir='${datarootdir}/info'
1399htmldir='${docdir}'
1400dvidir='${docdir}'
1401pdfdir='${docdir}'
1402psdir='${docdir}'
1403libdir='${exec_prefix}/lib'
1404localedir='${datarootdir}/locale'
1405mandir='${datarootdir}/man'
1406
1407ac_prev=
1408ac_dashdash=
1409for ac_option
1410do
1411  # If the previous option needs an argument, assign it.
1412  if test -n "$ac_prev"; then
1413    eval $ac_prev=\$ac_option
1414    ac_prev=
1415    continue
1416  fi
1417
1418  case $ac_option in
1419  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420  *=)   ac_optarg= ;;
1421  *)    ac_optarg=yes ;;
1422  esac
1423
1424  # Accept the important Cygnus configure options, so we can diagnose typos.
1425
1426  case $ac_dashdash$ac_option in
1427  --)
1428    ac_dashdash=yes ;;
1429
1430  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431    ac_prev=bindir ;;
1432  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433    bindir=$ac_optarg ;;
1434
1435  -build | --build | --buil | --bui | --bu)
1436    ac_prev=build_alias ;;
1437  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438    build_alias=$ac_optarg ;;
1439
1440  -cache-file | --cache-file | --cache-fil | --cache-fi \
1441  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442    ac_prev=cache_file ;;
1443  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445    cache_file=$ac_optarg ;;
1446
1447  --config-cache | -C)
1448    cache_file=config.cache ;;
1449
1450  -datadir | --datadir | --datadi | --datad)
1451    ac_prev=datadir ;;
1452  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453    datadir=$ac_optarg ;;
1454
1455  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456  | --dataroo | --dataro | --datar)
1457    ac_prev=datarootdir ;;
1458  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460    datarootdir=$ac_optarg ;;
1461
1462  -disable-* | --disable-*)
1463    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464    # Reject names that are not valid shell variable names.
1465    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466      as_fn_error $? "invalid feature name: $ac_useropt"
1467    ac_useropt_orig=$ac_useropt
1468    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469    case $ac_user_opts in
1470      *"
1471"enable_$ac_useropt"
1472"*) ;;
1473      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474	 ac_unrecognized_sep=', ';;
1475    esac
1476    eval enable_$ac_useropt=no ;;
1477
1478  -docdir | --docdir | --docdi | --doc | --do)
1479    ac_prev=docdir ;;
1480  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481    docdir=$ac_optarg ;;
1482
1483  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484    ac_prev=dvidir ;;
1485  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486    dvidir=$ac_optarg ;;
1487
1488  -enable-* | --enable-*)
1489    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490    # Reject names that are not valid shell variable names.
1491    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492      as_fn_error $? "invalid feature name: $ac_useropt"
1493    ac_useropt_orig=$ac_useropt
1494    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495    case $ac_user_opts in
1496      *"
1497"enable_$ac_useropt"
1498"*) ;;
1499      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500	 ac_unrecognized_sep=', ';;
1501    esac
1502    eval enable_$ac_useropt=\$ac_optarg ;;
1503
1504  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506  | --exec | --exe | --ex)
1507    ac_prev=exec_prefix ;;
1508  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510  | --exec=* | --exe=* | --ex=*)
1511    exec_prefix=$ac_optarg ;;
1512
1513  -gas | --gas | --ga | --g)
1514    # Obsolete; use --with-gas.
1515    with_gas=yes ;;
1516
1517  -help | --help | --hel | --he | -h)
1518    ac_init_help=long ;;
1519  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520    ac_init_help=recursive ;;
1521  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522    ac_init_help=short ;;
1523
1524  -host | --host | --hos | --ho)
1525    ac_prev=host_alias ;;
1526  -host=* | --host=* | --hos=* | --ho=*)
1527    host_alias=$ac_optarg ;;
1528
1529  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530    ac_prev=htmldir ;;
1531  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532  | --ht=*)
1533    htmldir=$ac_optarg ;;
1534
1535  -includedir | --includedir | --includedi | --included | --include \
1536  | --includ | --inclu | --incl | --inc)
1537    ac_prev=includedir ;;
1538  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539  | --includ=* | --inclu=* | --incl=* | --inc=*)
1540    includedir=$ac_optarg ;;
1541
1542  -infodir | --infodir | --infodi | --infod | --info | --inf)
1543    ac_prev=infodir ;;
1544  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545    infodir=$ac_optarg ;;
1546
1547  -libdir | --libdir | --libdi | --libd)
1548    ac_prev=libdir ;;
1549  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550    libdir=$ac_optarg ;;
1551
1552  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553  | --libexe | --libex | --libe)
1554    ac_prev=libexecdir ;;
1555  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556  | --libexe=* | --libex=* | --libe=*)
1557    libexecdir=$ac_optarg ;;
1558
1559  -localedir | --localedir | --localedi | --localed | --locale)
1560    ac_prev=localedir ;;
1561  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562    localedir=$ac_optarg ;;
1563
1564  -localstatedir | --localstatedir | --localstatedi | --localstated \
1565  | --localstate | --localstat | --localsta | --localst | --locals)
1566    ac_prev=localstatedir ;;
1567  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569    localstatedir=$ac_optarg ;;
1570
1571  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572    ac_prev=mandir ;;
1573  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574    mandir=$ac_optarg ;;
1575
1576  -nfp | --nfp | --nf)
1577    # Obsolete; use --without-fp.
1578    with_fp=no ;;
1579
1580  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581  | --no-cr | --no-c | -n)
1582    no_create=yes ;;
1583
1584  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586    no_recursion=yes ;;
1587
1588  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590  | --oldin | --oldi | --old | --ol | --o)
1591    ac_prev=oldincludedir ;;
1592  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595    oldincludedir=$ac_optarg ;;
1596
1597  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598    ac_prev=prefix ;;
1599  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600    prefix=$ac_optarg ;;
1601
1602  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603  | --program-pre | --program-pr | --program-p)
1604    ac_prev=program_prefix ;;
1605  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607    program_prefix=$ac_optarg ;;
1608
1609  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610  | --program-suf | --program-su | --program-s)
1611    ac_prev=program_suffix ;;
1612  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614    program_suffix=$ac_optarg ;;
1615
1616  -program-transform-name | --program-transform-name \
1617  | --program-transform-nam | --program-transform-na \
1618  | --program-transform-n | --program-transform- \
1619  | --program-transform | --program-transfor \
1620  | --program-transfo | --program-transf \
1621  | --program-trans | --program-tran \
1622  | --progr-tra | --program-tr | --program-t)
1623    ac_prev=program_transform_name ;;
1624  -program-transform-name=* | --program-transform-name=* \
1625  | --program-transform-nam=* | --program-transform-na=* \
1626  | --program-transform-n=* | --program-transform-=* \
1627  | --program-transform=* | --program-transfor=* \
1628  | --program-transfo=* | --program-transf=* \
1629  | --program-trans=* | --program-tran=* \
1630  | --progr-tra=* | --program-tr=* | --program-t=*)
1631    program_transform_name=$ac_optarg ;;
1632
1633  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634    ac_prev=pdfdir ;;
1635  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636    pdfdir=$ac_optarg ;;
1637
1638  -psdir | --psdir | --psdi | --psd | --ps)
1639    ac_prev=psdir ;;
1640  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641    psdir=$ac_optarg ;;
1642
1643  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644  | -silent | --silent | --silen | --sile | --sil)
1645    silent=yes ;;
1646
1647  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648    ac_prev=sbindir ;;
1649  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650  | --sbi=* | --sb=*)
1651    sbindir=$ac_optarg ;;
1652
1653  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655  | --sharedst | --shareds | --shared | --share | --shar \
1656  | --sha | --sh)
1657    ac_prev=sharedstatedir ;;
1658  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661  | --sha=* | --sh=*)
1662    sharedstatedir=$ac_optarg ;;
1663
1664  -site | --site | --sit)
1665    ac_prev=site ;;
1666  -site=* | --site=* | --sit=*)
1667    site=$ac_optarg ;;
1668
1669  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670    ac_prev=srcdir ;;
1671  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672    srcdir=$ac_optarg ;;
1673
1674  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675  | --syscon | --sysco | --sysc | --sys | --sy)
1676    ac_prev=sysconfdir ;;
1677  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679    sysconfdir=$ac_optarg ;;
1680
1681  -target | --target | --targe | --targ | --tar | --ta | --t)
1682    ac_prev=target_alias ;;
1683  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684    target_alias=$ac_optarg ;;
1685
1686  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687    verbose=yes ;;
1688
1689  -version | --version | --versio | --versi | --vers | -V)
1690    ac_init_version=: ;;
1691
1692  -with-* | --with-*)
1693    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694    # Reject names that are not valid shell variable names.
1695    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696      as_fn_error $? "invalid package name: $ac_useropt"
1697    ac_useropt_orig=$ac_useropt
1698    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699    case $ac_user_opts in
1700      *"
1701"with_$ac_useropt"
1702"*) ;;
1703      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704	 ac_unrecognized_sep=', ';;
1705    esac
1706    eval with_$ac_useropt=\$ac_optarg ;;
1707
1708  -without-* | --without-*)
1709    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710    # Reject names that are not valid shell variable names.
1711    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712      as_fn_error $? "invalid package name: $ac_useropt"
1713    ac_useropt_orig=$ac_useropt
1714    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715    case $ac_user_opts in
1716      *"
1717"with_$ac_useropt"
1718"*) ;;
1719      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720	 ac_unrecognized_sep=', ';;
1721    esac
1722    eval with_$ac_useropt=no ;;
1723
1724  --x)
1725    # Obsolete; use --with-x.
1726    with_x=yes ;;
1727
1728  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729  | --x-incl | --x-inc | --x-in | --x-i)
1730    ac_prev=x_includes ;;
1731  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733    x_includes=$ac_optarg ;;
1734
1735  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737    ac_prev=x_libraries ;;
1738  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740    x_libraries=$ac_optarg ;;
1741
1742  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743Try \`$0 --help' for more information"
1744    ;;
1745
1746  *=*)
1747    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748    # Reject names that are not valid shell variable names.
1749    case $ac_envvar in #(
1750      '' | [0-9]* | *[!_$as_cr_alnum]* )
1751      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752    esac
1753    eval $ac_envvar=\$ac_optarg
1754    export $ac_envvar ;;
1755
1756  *)
1757    # FIXME: should be removed in autoconf 3.0.
1758    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762    ;;
1763
1764  esac
1765done
1766
1767if test -n "$ac_prev"; then
1768  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769  as_fn_error $? "missing argument to $ac_option"
1770fi
1771
1772if test -n "$ac_unrecognized_opts"; then
1773  case $enable_option_checking in
1774    no) ;;
1775    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777  esac
1778fi
1779
1780# Check all directory arguments for consistency.
1781for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782		datadir sysconfdir sharedstatedir localstatedir includedir \
1783		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784		libdir localedir mandir
1785do
1786  eval ac_val=\$$ac_var
1787  # Remove trailing slashes.
1788  case $ac_val in
1789    */ )
1790      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791      eval $ac_var=\$ac_val;;
1792  esac
1793  # Be sure to have absolute directory names.
1794  case $ac_val in
1795    [\\/$]* | ?:[\\/]* )  continue;;
1796    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797  esac
1798  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799done
1800
1801# There might be people who depend on the old broken behavior: `$host'
1802# used to hold the argument of --host etc.
1803# FIXME: To remove some day.
1804build=$build_alias
1805host=$host_alias
1806target=$target_alias
1807
1808# FIXME: To remove some day.
1809if test "x$host_alias" != x; then
1810  if test "x$build_alias" = x; then
1811    cross_compiling=maybe
1812  elif test "x$build_alias" != "x$host_alias"; then
1813    cross_compiling=yes
1814  fi
1815fi
1816
1817ac_tool_prefix=
1818test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819
1820test "$silent" = yes && exec 6>/dev/null
1821
1822
1823ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824ac_ls_di=`ls -di .` &&
1825ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826  as_fn_error $? "working directory cannot be determined"
1827test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828  as_fn_error $? "pwd does not report name of working directory"
1829
1830
1831# Find the source files, if location was not specified.
1832if test -z "$srcdir"; then
1833  ac_srcdir_defaulted=yes
1834  # Try the directory containing this script, then the parent directory.
1835  ac_confdir=`$as_dirname -- "$as_myself" ||
1836$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837	 X"$as_myself" : 'X\(//\)[^/]' \| \
1838	 X"$as_myself" : 'X\(//\)$' \| \
1839	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840$as_echo X"$as_myself" |
1841    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)[^/].*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\/\)$/{
1850	    s//\1/
1851	    q
1852	  }
1853	  /^X\(\/\).*/{
1854	    s//\1/
1855	    q
1856	  }
1857	  s/.*/./; q'`
1858  srcdir=$ac_confdir
1859  if test ! -r "$srcdir/$ac_unique_file"; then
1860    srcdir=..
1861  fi
1862else
1863  ac_srcdir_defaulted=no
1864fi
1865if test ! -r "$srcdir/$ac_unique_file"; then
1866  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868fi
1869ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870ac_abs_confdir=`(
1871	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872	pwd)`
1873# When building in place, set srcdir=.
1874if test "$ac_abs_confdir" = "$ac_pwd"; then
1875  srcdir=.
1876fi
1877# Remove unnecessary trailing slashes from srcdir.
1878# Double slashes in file names in object file debugging info
1879# mess up M-x gdb in Emacs.
1880case $srcdir in
1881*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882esac
1883for ac_var in $ac_precious_vars; do
1884  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_env_${ac_var}_value=\$${ac_var}
1886  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888done
1889
1890#
1891# Report the --help message.
1892#
1893if test "$ac_init_help" = "long"; then
1894  # Omit some internal or obsolete options to make the list less imposing.
1895  # This message is too long to be a string in the A/UX 3.1 sh.
1896  cat <<_ACEOF
1897\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898
1899Usage: $0 [OPTION]... [VAR=VALUE]...
1900
1901To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902VAR=VALUE.  See below for descriptions of some of the useful variables.
1903
1904Defaults for the options are specified in brackets.
1905
1906Configuration:
1907  -h, --help              display this help and exit
1908      --help=short        display options specific to this package
1909      --help=recursive    display the short help of all the included packages
1910  -V, --version           display version information and exit
1911  -q, --quiet, --silent   do not print \`checking ...' messages
1912      --cache-file=FILE   cache test results in FILE [disabled]
1913  -C, --config-cache      alias for \`--cache-file=config.cache'
1914  -n, --no-create         do not create output files
1915      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916
1917Installation directories:
1918  --prefix=PREFIX         install architecture-independent files in PREFIX
1919                          [$ac_default_prefix]
1920  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                          [PREFIX]
1922
1923By default, \`make install' will install all the files in
1924\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926for instance \`--prefix=\$HOME'.
1927
1928For better control, use the options below.
1929
1930Fine tuning of the installation directories:
1931  --bindir=DIR            user executables [EPREFIX/bin]
1932  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933  --libexecdir=DIR        program executables [EPREFIX/libexec]
1934  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937  --libdir=DIR            object code libraries [EPREFIX/lib]
1938  --includedir=DIR        C header files [PREFIX/include]
1939  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942  --infodir=DIR           info documentation [DATAROOTDIR/info]
1943  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944  --mandir=DIR            man documentation [DATAROOTDIR/man]
1945  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946  --htmldir=DIR           html documentation [DOCDIR]
1947  --dvidir=DIR            dvi documentation [DOCDIR]
1948  --pdfdir=DIR            pdf documentation [DOCDIR]
1949  --psdir=DIR             ps documentation [DOCDIR]
1950_ACEOF
1951
1952  cat <<\_ACEOF
1953
1954X features:
1955  --x-includes=DIR    X include files are in DIR
1956  --x-libraries=DIR   X library files are in DIR
1957
1958System types:
1959  --build=BUILD     configure for building on BUILD [guessed]
1960  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961  --target=TARGET   configure for building compilers for TARGET [HOST]
1962_ACEOF
1963fi
1964
1965if test -n "$ac_init_help"; then
1966  case $ac_init_help in
1967     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968   esac
1969  cat <<\_ACEOF
1970
1971Optional Features:
1972  --disable-option-checking  ignore unrecognized --enable/--with options
1973  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975  --enable-openjdk-only   suppress building custom source even if present
1976                          [disabled]
1977  --enable-debug          set the debug level to fastdebug (shorthand for
1978                          --with-debug-level=fastdebug) [disabled]
1979  --enable-headless-only  only build headless (no GUI) support [disabled]
1980  --enable-full-docs      build complete documentation [enabled if all tools
1981                          found]
1982  --disable-unlimited-crypto
1983                          Disable unlimited crypto policy [enabled]
1984  --disable-keep-packaged-modules
1985                          Do not keep packaged modules in jdk image [enable]
1986  --enable-static-build   enable static library build [disabled]
1987  --disable-warnings-as-errors
1988                          do not consider native warnings to be an error
1989                          [enabled]
1990  --enable-debug-symbols  Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --enable-zip-debug-info Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --enable-native-coverage
1995                          enable native compilation with code coverage
1996                          data[disabled]
1997  --enable-dtrace[=yes/no/auto]
1998                          enable dtrace. Default is auto, where dtrace is
1999                          enabled if all dependencies are present.
2000  --enable-aot[=yes/no/auto]
2001                          enable ahead of time compilation feature. Default is
2002                          auto, where aot is enabled if all dependencies are
2003                          present.
2004  --enable-cds[=yes/no]   enable class data sharing feature in non-minimal VM.
2005                          Default is yes.
2006  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2007  --disable-freetype-bundling
2008                          disable bundling of the freetype library with the
2009                          build result [enabled on Windows or when using
2010                          --with-freetype, disabled otherwise]
2011  --enable-libffi-bundling
2012                          enable bundling of libffi.so to make the built JDK
2013                          runnable on more systems
2014  --enable-jtreg-failure-handler
2015                          forces build of the jtreg failure handler to be
2016                          enabled, missing dependencies become fatal errors.
2017                          Default is auto, where the failure handler is built
2018                          if all dependencies are present and otherwise just
2019                          disabled.
2020  --disable-generate-classlist
2021                          forces enabling or disabling of the generation of a
2022                          CDS classlist at build time. Default is to generate
2023                          it when either the server or client JVMs are built
2024                          and enable-cds is true.
2025  --enable-sjavac         use sjavac to do fast incremental compiles
2026                          [disabled]
2027  --disable-javac-server  disable javac server [enabled]
2028  --enable-icecc          enable distribted compilation of native code using
2029                          icecc/icecream [disabled]
2030  --disable-precompiled-headers
2031                          disable using precompiled headers when compiling C++
2032                          [enabled]
2033  --enable-ccache         enable using ccache to speed up recompilations
2034                          [disabled]
2035
2036Optional Packages:
2037  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2038  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2039  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2040                          support it), e.g. --with-target-bits=32 [guessed]
2041  --with-custom-make-dir  Deprecated. Option is kept for backwards
2042                          compatibility and is ignored
2043  --with-jdk-variant      JDK variant to build (normal) [normal]
2044  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2045                          optimized) [release]
2046  --with-jvm-variants     JVM variants (separated by commas) to build
2047                          (server,client,minimal,core,zero,zeroshark,custom)
2048                          [server]
2049  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2050                          (arm64,aarch64) [aarch64]
2051  --with-devkit           use this devkit for compilers, tools and resources
2052  --with-sys-root         alias for --with-sysroot for backwards compatability
2053  --with-sysroot          use this directory as sysroot
2054  --with-tools-dir        alias for --with-toolchain-path for backwards
2055                          compatibility
2056  --with-toolchain-path   prepend these directories when searching for
2057                          toolchain binaries (compilers etc)
2058  --with-extra-path       prepend these directories to the default path
2059  --with-sdk-name         use the platform SDK of the given name. [macosx]
2060  --with-conf-name        use this as the name of the configuration [generated
2061                          from important configuration options]
2062  --with-output-sync      set make output sync type if supported by make.
2063                          [recurse]
2064  --with-default-make-target
2065                          set the default make target [exploded-image]
2066  --with-cacerts-file     specify alternative cacerts file
2067  --with-copyright-year   Set copyright year value for build [current year]
2068  --with-milestone        Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-update-version   Deprecated. Option is kept for backwards
2071                          compatibility and is ignored
2072  --with-user-release-suffix
2073                          Deprecated. Option is kept for backwards
2074                          compatibility and is ignored
2075  --with-build-number     Deprecated. Option is kept for backwards
2076                          compatibility and is ignored
2077  --with-version-string   Set version string [calculated]
2078  --with-version-pre      Set the base part of the version 'PRE' field
2079                          (pre-release identifier) ['internal']
2080  --with-version-opt      Set version 'OPT' field (build metadata)
2081                          [<timestamp>.<user>.<dirname>]
2082  --with-version-build    Set version 'BUILD' field (build number) [not
2083                          specified]
2084  --with-version-major    Set version 'MAJOR' field (first number) [current
2085                          source value]
2086  --with-version-minor    Set version 'MINOR' field (second number) [current
2087                          source value]
2088  --with-version-security Set version 'SECURITY' field (third number) [current
2089                          source value]
2090  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2091                          specified]
2092  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2093  --with-build-jdk        path to JDK of same version as is being built[the
2094                          newly built JDK]
2095  --with-add-source-root  Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-source-root
2098                          Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-adds-and-overrides
2101                          Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-langtools
2104                          Deprecated. Option is kept for backwards
2105                          compatibility and is ignored
2106  --with-override-corba   Deprecated. Option is kept for backwards
2107                          compatibility and is ignored
2108  --with-override-jaxp    Deprecated. Option is kept for backwards
2109                          compatibility and is ignored
2110  --with-override-jaxws   Deprecated. Option is kept for backwards
2111                          compatibility and is ignored
2112  --with-override-hotspot Deprecated. Option is kept for backwards
2113                          compatibility and is ignored
2114  --with-override-nashorn Deprecated. Option is kept for backwards
2115                          compatibility and is ignored
2116  --with-override-jdk     Deprecated. Option is kept for backwards
2117                          compatibility and is ignored
2118  --with-import_hotspot   Deprecated. Option is kept for backwards
2119                          compatibility and is ignored
2120  --with-import-modules   import a set of prebuilt modules either as a zip
2121                          file or an exploded directory
2122  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2123                          to show possible values [platform dependent]
2124  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2125  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2126  --with-extra-ldflags    extra flags to be used when linking jdk
2127  --with-toolchain-version
2128                          the version of the toolchain to look for, use
2129                          '--help' to show possible values [platform
2130                          dependent]
2131  --with-build-devkit     Devkit to use for the build platform toolchain
2132  --with-jtreg            Regression Test Harness [probed]
2133  --with-jib              Jib dependency management tool [not used]
2134  --with-abi-profile      specify ABI profile for ARM builds
2135                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2136                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2137                          [toolchain dependent]
2138  --with-macosx-version-max
2139                          error on use of newer functionality. [macosx]
2140  --with-native-debug-symbols
2141                          set the native debug symbol configuration (none,
2142                          internal, external, zipped) [varying]
2143  --with-stdc++lib=<static>,<dynamic>,<default>
2144                          force linking of the C++ runtime on Linux to either
2145                          static or dynamic, default is static with dynamic as
2146                          fallback
2147  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2148                          (Windows only) [probed]
2149  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2150                          (Windows only) [probed]
2151  --with-x                use the X Window System
2152  --with-cups             specify prefix directory for the cups package
2153                          (expecting the headers under PATH/include)
2154  --with-cups-include     specify directory for the cups include files
2155  --with-freetype         specify prefix directory for the freetype package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-freetype-include specify directory for the freetype include files
2159  --with-freetype-lib     specify directory for the freetype library
2160  --with-freetype-src     specify directory with freetype sources to
2161                          automatically build the library (experimental,
2162                          Windows-only)
2163  --with-freetype-license if bundling freetype, also bundle this license file
2164  --with-alsa             specify prefix directory for the alsa package
2165                          (expecting the libraries under PATH/lib and the
2166                          headers under PATH/include)
2167  --with-alsa-include     specify directory for the alsa include files
2168  --with-alsa-lib         specify directory for the alsa library
2169  --with-libffi           specify prefix directory for the libffi package
2170                          (expecting the libraries under PATH/lib and the
2171                          headers under PATH/include)
2172  --with-libffi-include   specify directory for the libffi include files
2173  --with-libffi-lib       specify directory for the libffi library
2174  --with-libjpeg          use libjpeg from build system or OpenJDK source
2175                          (system, bundled) [bundled]
2176  --with-giflib           use giflib from build system or OpenJDK source
2177                          (system, bundled) [bundled]
2178  --with-libpng           use libpng from build system or OpenJDK source
2179                          (system, bundled) [bundled]
2180  --with-zlib             use zlib from build system or OpenJDK source
2181                          (system, bundled) [bundled]
2182  --with-lcms             use lcms2 from build system or OpenJDK source
2183                          (system, bundled) [bundled]
2184  --with-dxsdk            Deprecated. Option is kept for backwards
2185                          compatibility and is ignored
2186  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2187                          compatibility and is ignored
2188  --with-dxsdk-include    Deprecated. Option is kept for backwards
2189                          compatibility and is ignored
2190  --with-jvm-features     additional JVM features to enable (separated by
2191                          comma), use '--help' to show possible values [none]
2192  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2193                          compatibility and is ignored
2194  --with-num-cores        number of cores in the build system, e.g.
2195                          --with-num-cores=8 [probed]
2196  --with-memory-size      memory (in MB) available in the build system, e.g.
2197                          --with-memory-size=1024 [probed]
2198  --with-jobs             number of parallel jobs to let make run [calculated
2199                          based on cores and memory]
2200  --with-test-jobs        number of parallel tests jobs to run [based on build
2201                          jobs]
2202  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2203                          invocations of boot JDK, overriding the default
2204                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2205                          -enableassertions"
2206  --with-sjavac-server-java
2207                          use this java binary for running the sjavac
2208                          background server [Boot JDK java]
2209  --with-ccache-dir       where to store ccache files [~/.ccache]
2210
2211Some influential environment variables:
2212  BASENAME    Override default value for BASENAME
2213  BASH        Override default value for BASH
2214  CAT         Override default value for CAT
2215  CHMOD       Override default value for CHMOD
2216  CMP         Override default value for CMP
2217  COMM        Override default value for COMM
2218  CP          Override default value for CP
2219  CUT         Override default value for CUT
2220  DATE        Override default value for DATE
2221  DIFF        Override default value for DIFF
2222  DIRNAME     Override default value for DIRNAME
2223  ECHO        Override default value for ECHO
2224  EXPR        Override default value for EXPR
2225  FILE        Override default value for FILE
2226  FIND        Override default value for FIND
2227  HEAD        Override default value for HEAD
2228  GUNZIP      Override default value for GUNZIP
2229  GZIP        Override default value for GZIP
2230  LN          Override default value for LN
2231  LS          Override default value for LS
2232  MKDIR       Override default value for MKDIR
2233  MKTEMP      Override default value for MKTEMP
2234  MV          Override default value for MV
2235  NAWK        Override default value for NAWK
2236  PRINTF      Override default value for PRINTF
2237  RM          Override default value for RM
2238  RMDIR       Override default value for RMDIR
2239  SH          Override default value for SH
2240  SORT        Override default value for SORT
2241  TAIL        Override default value for TAIL
2242  TAR         Override default value for TAR
2243  TEE         Override default value for TEE
2244  TOUCH       Override default value for TOUCH
2245  TR          Override default value for TR
2246  UNAME       Override default value for UNAME
2247  UNIQ        Override default value for UNIQ
2248  WC          Override default value for WC
2249  WHICH       Override default value for WHICH
2250  XARGS       Override default value for XARGS
2251  AWK         Override default value for AWK
2252  GREP        Override default value for GREP
2253  EGREP       Override default value for EGREP
2254  FGREP       Override default value for FGREP
2255  SED         Override default value for SED
2256  CYGPATH     Override default value for CYGPATH
2257  READLINK    Override default value for READLINK
2258  DF          Override default value for DF
2259  CPIO        Override default value for CPIO
2260  NICE        Override default value for NICE
2261  PANDOC      Override default value for PANDOC
2262  MAKE        Override default value for MAKE
2263  UNZIP       Override default value for UNZIP
2264  ZIPEXE      Override default value for ZIPEXE
2265  LDD         Override default value for LDD
2266  OTOOL       Override default value for OTOOL
2267  READELF     Override default value for READELF
2268  DOT         Override default value for DOT
2269  HG          Override default value for HG
2270  STAT        Override default value for STAT
2271  TIME        Override default value for TIME
2272  FLOCK       Override default value for FLOCK
2273  DTRACE      Override default value for DTRACE
2274  PATCH       Override default value for PATCH
2275  DSYMUTIL    Override default value for DSYMUTIL
2276  XATTR       Override default value for XATTR
2277  CODESIGN    Override default value for CODESIGN
2278  SETFILE     Override default value for SETFILE
2279  PKG_CONFIG  path to pkg-config utility
2280  JAVA        Override default value for JAVA
2281  JAVAC       Override default value for JAVAC
2282  JAVAH       Override default value for JAVAH
2283  JAR         Override default value for JAR
2284  JARSIGNER   Override default value for JARSIGNER
2285  CC          C compiler command
2286  CFLAGS      C compiler flags
2287  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2288              nonstandard directory <lib dir>
2289  LIBS        libraries to pass to the linker, e.g. -l<library>
2290  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2291              you have headers in a nonstandard directory <include dir>
2292  CXX         C++ compiler command
2293  CXXFLAGS    C++ compiler flags
2294  CPP         C preprocessor
2295  CXXCPP      C++ preprocessor
2296  AS          Override default value for AS
2297  AR          Override default value for AR
2298  LIPO        Override default value for LIPO
2299  STRIP       Override default value for STRIP
2300  NM          Override default value for NM
2301  GNM         Override default value for GNM
2302  OBJCOPY     Override default value for OBJCOPY
2303  OBJDUMP     Override default value for OBJDUMP
2304  BUILD_CC    Override default value for BUILD_CC
2305  BUILD_CXX   Override default value for BUILD_CXX
2306  BUILD_NM    Override default value for BUILD_NM
2307  BUILD_AR    Override default value for BUILD_AR
2308  BUILD_OBJCOPY
2309              Override default value for BUILD_OBJCOPY
2310  BUILD_STRIP Override default value for BUILD_STRIP
2311  JTREGEXE    Override default value for JTREGEXE
2312  XMKMF       Path to xmkmf, Makefile generator for X Window System
2313  FREETYPE_CFLAGS
2314              C compiler flags for FREETYPE, overriding pkg-config
2315  FREETYPE_LIBS
2316              linker flags for FREETYPE, overriding pkg-config
2317  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2318  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2319  LIBFFI_CFLAGS
2320              C compiler flags for LIBFFI, overriding pkg-config
2321  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2322  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2323  PNG_LIBS    linker flags for PNG, overriding pkg-config
2324  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2325  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2326  ICECC_CMD   Override default value for ICECC_CMD
2327  ICECC_CREATE_ENV
2328              Override default value for ICECC_CREATE_ENV
2329  ICECC_WRAPPER
2330              Override default value for ICECC_WRAPPER
2331  CCACHE      Override default value for CCACHE
2332
2333Use these variables to override the choices made by `configure' or to help
2334it to find libraries and programs with nonstandard names/locations.
2335
2336Report bugs to <build-dev@openjdk.java.net>.
2337OpenJDK home page: <http://openjdk.java.net>.
2338_ACEOF
2339ac_status=$?
2340fi
2341
2342if test "$ac_init_help" = "recursive"; then
2343  # If there are subdirs, report their specific --help.
2344  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2345    test -d "$ac_dir" ||
2346      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2347      continue
2348    ac_builddir=.
2349
2350case "$ac_dir" in
2351.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2352*)
2353  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2354  # A ".." for each directory in $ac_dir_suffix.
2355  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2356  case $ac_top_builddir_sub in
2357  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2358  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2359  esac ;;
2360esac
2361ac_abs_top_builddir=$ac_pwd
2362ac_abs_builddir=$ac_pwd$ac_dir_suffix
2363# for backward compatibility:
2364ac_top_builddir=$ac_top_build_prefix
2365
2366case $srcdir in
2367  .)  # We are building in place.
2368    ac_srcdir=.
2369    ac_top_srcdir=$ac_top_builddir_sub
2370    ac_abs_top_srcdir=$ac_pwd ;;
2371  [\\/]* | ?:[\\/]* )  # Absolute name.
2372    ac_srcdir=$srcdir$ac_dir_suffix;
2373    ac_top_srcdir=$srcdir
2374    ac_abs_top_srcdir=$srcdir ;;
2375  *) # Relative name.
2376    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2377    ac_top_srcdir=$ac_top_build_prefix$srcdir
2378    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2379esac
2380ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2381
2382    cd "$ac_dir" || { ac_status=$?; continue; }
2383    # Check for guested configure.
2384    if test -f "$ac_srcdir/configure.gnu"; then
2385      echo &&
2386      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2387    elif test -f "$ac_srcdir/configure"; then
2388      echo &&
2389      $SHELL "$ac_srcdir/configure" --help=recursive
2390    else
2391      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2392    fi || ac_status=$?
2393    cd "$ac_pwd" || { ac_status=$?; break; }
2394  done
2395fi
2396
2397test -n "$ac_init_help" && exit $ac_status
2398if $ac_init_version; then
2399  cat <<\_ACEOF
2400OpenJDK configure jdk9
2401generated by GNU Autoconf 2.69
2402
2403Copyright (C) 2012 Free Software Foundation, Inc.
2404This configure script is free software; the Free Software Foundation
2405gives unlimited permission to copy, distribute and modify it.
2406_ACEOF
2407  exit
2408fi
2409
2410## ------------------------ ##
2411## Autoconf initialization. ##
2412## ------------------------ ##
2413
2414# ac_fn_c_try_compile LINENO
2415# --------------------------
2416# Try to compile conftest.$ac_ext, and return whether this succeeded.
2417ac_fn_c_try_compile ()
2418{
2419  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2420  rm -f conftest.$ac_objext
2421  if { { ac_try="$ac_compile"
2422case "(($ac_try" in
2423  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2424  *) ac_try_echo=$ac_try;;
2425esac
2426eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2427$as_echo "$ac_try_echo"; } >&5
2428  (eval "$ac_compile") 2>conftest.err
2429  ac_status=$?
2430  if test -s conftest.err; then
2431    grep -v '^ *+' conftest.err >conftest.er1
2432    cat conftest.er1 >&5
2433    mv -f conftest.er1 conftest.err
2434  fi
2435  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2436  test $ac_status = 0; } && {
2437	 test -z "$ac_c_werror_flag" ||
2438	 test ! -s conftest.err
2439       } && test -s conftest.$ac_objext; then :
2440  ac_retval=0
2441else
2442  $as_echo "$as_me: failed program was:" >&5
2443sed 's/^/| /' conftest.$ac_ext >&5
2444
2445	ac_retval=1
2446fi
2447  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2448  as_fn_set_status $ac_retval
2449
2450} # ac_fn_c_try_compile
2451
2452# ac_fn_cxx_try_compile LINENO
2453# ----------------------------
2454# Try to compile conftest.$ac_ext, and return whether this succeeded.
2455ac_fn_cxx_try_compile ()
2456{
2457  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2458  rm -f conftest.$ac_objext
2459  if { { ac_try="$ac_compile"
2460case "(($ac_try" in
2461  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2462  *) ac_try_echo=$ac_try;;
2463esac
2464eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2465$as_echo "$ac_try_echo"; } >&5
2466  (eval "$ac_compile") 2>conftest.err
2467  ac_status=$?
2468  if test -s conftest.err; then
2469    grep -v '^ *+' conftest.err >conftest.er1
2470    cat conftest.er1 >&5
2471    mv -f conftest.er1 conftest.err
2472  fi
2473  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2474  test $ac_status = 0; } && {
2475	 test -z "$ac_cxx_werror_flag" ||
2476	 test ! -s conftest.err
2477       } && test -s conftest.$ac_objext; then :
2478  ac_retval=0
2479else
2480  $as_echo "$as_me: failed program was:" >&5
2481sed 's/^/| /' conftest.$ac_ext >&5
2482
2483	ac_retval=1
2484fi
2485  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2486  as_fn_set_status $ac_retval
2487
2488} # ac_fn_cxx_try_compile
2489
2490# ac_fn_c_try_cpp LINENO
2491# ----------------------
2492# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2493ac_fn_c_try_cpp ()
2494{
2495  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2496  if { { ac_try="$ac_cpp conftest.$ac_ext"
2497case "(($ac_try" in
2498  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2499  *) ac_try_echo=$ac_try;;
2500esac
2501eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2502$as_echo "$ac_try_echo"; } >&5
2503  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2504  ac_status=$?
2505  if test -s conftest.err; then
2506    grep -v '^ *+' conftest.err >conftest.er1
2507    cat conftest.er1 >&5
2508    mv -f conftest.er1 conftest.err
2509  fi
2510  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2511  test $ac_status = 0; } > conftest.i && {
2512	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2513	 test ! -s conftest.err
2514       }; then :
2515  ac_retval=0
2516else
2517  $as_echo "$as_me: failed program was:" >&5
2518sed 's/^/| /' conftest.$ac_ext >&5
2519
2520    ac_retval=1
2521fi
2522  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2523  as_fn_set_status $ac_retval
2524
2525} # ac_fn_c_try_cpp
2526
2527# ac_fn_cxx_try_cpp LINENO
2528# ------------------------
2529# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2530ac_fn_cxx_try_cpp ()
2531{
2532  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2533  if { { ac_try="$ac_cpp conftest.$ac_ext"
2534case "(($ac_try" in
2535  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2536  *) ac_try_echo=$ac_try;;
2537esac
2538eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2539$as_echo "$ac_try_echo"; } >&5
2540  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2541  ac_status=$?
2542  if test -s conftest.err; then
2543    grep -v '^ *+' conftest.err >conftest.er1
2544    cat conftest.er1 >&5
2545    mv -f conftest.er1 conftest.err
2546  fi
2547  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2548  test $ac_status = 0; } > conftest.i && {
2549	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2550	 test ! -s conftest.err
2551       }; then :
2552  ac_retval=0
2553else
2554  $as_echo "$as_me: failed program was:" >&5
2555sed 's/^/| /' conftest.$ac_ext >&5
2556
2557    ac_retval=1
2558fi
2559  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2560  as_fn_set_status $ac_retval
2561
2562} # ac_fn_cxx_try_cpp
2563
2564# ac_fn_c_try_link LINENO
2565# -----------------------
2566# Try to link conftest.$ac_ext, and return whether this succeeded.
2567ac_fn_c_try_link ()
2568{
2569  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2570  rm -f conftest.$ac_objext conftest$ac_exeext
2571  if { { ac_try="$ac_link"
2572case "(($ac_try" in
2573  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2574  *) ac_try_echo=$ac_try;;
2575esac
2576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2577$as_echo "$ac_try_echo"; } >&5
2578  (eval "$ac_link") 2>conftest.err
2579  ac_status=$?
2580  if test -s conftest.err; then
2581    grep -v '^ *+' conftest.err >conftest.er1
2582    cat conftest.er1 >&5
2583    mv -f conftest.er1 conftest.err
2584  fi
2585  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2586  test $ac_status = 0; } && {
2587	 test -z "$ac_c_werror_flag" ||
2588	 test ! -s conftest.err
2589       } && test -s conftest$ac_exeext && {
2590	 test "$cross_compiling" = yes ||
2591	 test -x conftest$ac_exeext
2592       }; then :
2593  ac_retval=0
2594else
2595  $as_echo "$as_me: failed program was:" >&5
2596sed 's/^/| /' conftest.$ac_ext >&5
2597
2598	ac_retval=1
2599fi
2600  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2601  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2602  # interfere with the next link command; also delete a directory that is
2603  # left behind by Apple's compiler.  We do this before executing the actions.
2604  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2605  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2606  as_fn_set_status $ac_retval
2607
2608} # ac_fn_c_try_link
2609
2610# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2611# ---------------------------------------------------------
2612# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2613# the include files in INCLUDES and setting the cache variable VAR
2614# accordingly.
2615ac_fn_cxx_check_header_mongrel ()
2616{
2617  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618  if eval \${$3+:} false; then :
2619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2620$as_echo_n "checking for $2... " >&6; }
2621if eval \${$3+:} false; then :
2622  $as_echo_n "(cached) " >&6
2623fi
2624eval ac_res=\$$3
2625	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2626$as_echo "$ac_res" >&6; }
2627else
2628  # Is the header compilable?
2629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2630$as_echo_n "checking $2 usability... " >&6; }
2631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2632/* end confdefs.h.  */
2633$4
2634#include <$2>
2635_ACEOF
2636if ac_fn_cxx_try_compile "$LINENO"; then :
2637  ac_header_compiler=yes
2638else
2639  ac_header_compiler=no
2640fi
2641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2643$as_echo "$ac_header_compiler" >&6; }
2644
2645# Is the header present?
2646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2647$as_echo_n "checking $2 presence... " >&6; }
2648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2649/* end confdefs.h.  */
2650#include <$2>
2651_ACEOF
2652if ac_fn_cxx_try_cpp "$LINENO"; then :
2653  ac_header_preproc=yes
2654else
2655  ac_header_preproc=no
2656fi
2657rm -f conftest.err conftest.i conftest.$ac_ext
2658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2659$as_echo "$ac_header_preproc" >&6; }
2660
2661# So?  What about this header?
2662case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2663  yes:no: )
2664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2665$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2666    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2667$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2668    ;;
2669  no:yes:* )
2670    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2671$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2672    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2673$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2674    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2675$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2676    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2677$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2678    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2679$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2680( $as_echo "## ----------------------------------------- ##
2681## Report this to build-dev@openjdk.java.net ##
2682## ----------------------------------------- ##"
2683     ) | sed "s/^/$as_me: WARNING:     /" >&2
2684    ;;
2685esac
2686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2687$as_echo_n "checking for $2... " >&6; }
2688if eval \${$3+:} false; then :
2689  $as_echo_n "(cached) " >&6
2690else
2691  eval "$3=\$ac_header_compiler"
2692fi
2693eval ac_res=\$$3
2694	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2695$as_echo "$ac_res" >&6; }
2696fi
2697  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2698
2699} # ac_fn_cxx_check_header_mongrel
2700
2701# ac_fn_cxx_try_run LINENO
2702# ------------------------
2703# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2704# that executables *can* be run.
2705ac_fn_cxx_try_run ()
2706{
2707  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2708  if { { ac_try="$ac_link"
2709case "(($ac_try" in
2710  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2711  *) ac_try_echo=$ac_try;;
2712esac
2713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2714$as_echo "$ac_try_echo"; } >&5
2715  (eval "$ac_link") 2>&5
2716  ac_status=$?
2717  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2718  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2719  { { case "(($ac_try" in
2720  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2721  *) ac_try_echo=$ac_try;;
2722esac
2723eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2724$as_echo "$ac_try_echo"; } >&5
2725  (eval "$ac_try") 2>&5
2726  ac_status=$?
2727  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2728  test $ac_status = 0; }; }; then :
2729  ac_retval=0
2730else
2731  $as_echo "$as_me: program exited with status $ac_status" >&5
2732       $as_echo "$as_me: failed program was:" >&5
2733sed 's/^/| /' conftest.$ac_ext >&5
2734
2735       ac_retval=$ac_status
2736fi
2737  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2738  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2739  as_fn_set_status $ac_retval
2740
2741} # ac_fn_cxx_try_run
2742
2743# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2744# ---------------------------------------------------------
2745# Tests whether HEADER exists and can be compiled using the include files in
2746# INCLUDES, setting the cache variable VAR accordingly.
2747ac_fn_cxx_check_header_compile ()
2748{
2749  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2751$as_echo_n "checking for $2... " >&6; }
2752if eval \${$3+:} false; then :
2753  $as_echo_n "(cached) " >&6
2754else
2755  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2756/* end confdefs.h.  */
2757$4
2758#include <$2>
2759_ACEOF
2760if ac_fn_cxx_try_compile "$LINENO"; then :
2761  eval "$3=yes"
2762else
2763  eval "$3=no"
2764fi
2765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2766fi
2767eval ac_res=\$$3
2768	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2769$as_echo "$ac_res" >&6; }
2770  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2771
2772} # ac_fn_cxx_check_header_compile
2773
2774# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2775# ----------------------------------------------
2776# Tries to find the compile-time value of EXPR in a program that includes
2777# INCLUDES, setting VAR accordingly. Returns whether the value could be
2778# computed
2779ac_fn_cxx_compute_int ()
2780{
2781  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2782  if test "$cross_compiling" = yes; then
2783    # Depending upon the size, compute the lo and hi bounds.
2784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2785/* end confdefs.h.  */
2786$4
2787int
2788main ()
2789{
2790static int test_array [1 - 2 * !(($2) >= 0)];
2791test_array [0] = 0;
2792return test_array [0];
2793
2794  ;
2795  return 0;
2796}
2797_ACEOF
2798if ac_fn_cxx_try_compile "$LINENO"; then :
2799  ac_lo=0 ac_mid=0
2800  while :; do
2801    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2802/* end confdefs.h.  */
2803$4
2804int
2805main ()
2806{
2807static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2808test_array [0] = 0;
2809return test_array [0];
2810
2811  ;
2812  return 0;
2813}
2814_ACEOF
2815if ac_fn_cxx_try_compile "$LINENO"; then :
2816  ac_hi=$ac_mid; break
2817else
2818  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2819			if test $ac_lo -le $ac_mid; then
2820			  ac_lo= ac_hi=
2821			  break
2822			fi
2823			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2824fi
2825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2826  done
2827else
2828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2829/* end confdefs.h.  */
2830$4
2831int
2832main ()
2833{
2834static int test_array [1 - 2 * !(($2) < 0)];
2835test_array [0] = 0;
2836return test_array [0];
2837
2838  ;
2839  return 0;
2840}
2841_ACEOF
2842if ac_fn_cxx_try_compile "$LINENO"; then :
2843  ac_hi=-1 ac_mid=-1
2844  while :; do
2845    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2846/* end confdefs.h.  */
2847$4
2848int
2849main ()
2850{
2851static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2852test_array [0] = 0;
2853return test_array [0];
2854
2855  ;
2856  return 0;
2857}
2858_ACEOF
2859if ac_fn_cxx_try_compile "$LINENO"; then :
2860  ac_lo=$ac_mid; break
2861else
2862  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2863			if test $ac_mid -le $ac_hi; then
2864			  ac_lo= ac_hi=
2865			  break
2866			fi
2867			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870  done
2871else
2872  ac_lo= ac_hi=
2873fi
2874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2875fi
2876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2877# Binary search between lo and hi bounds.
2878while test "x$ac_lo" != "x$ac_hi"; do
2879  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2881/* end confdefs.h.  */
2882$4
2883int
2884main ()
2885{
2886static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2887test_array [0] = 0;
2888return test_array [0];
2889
2890  ;
2891  return 0;
2892}
2893_ACEOF
2894if ac_fn_cxx_try_compile "$LINENO"; then :
2895  ac_hi=$ac_mid
2896else
2897  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2898fi
2899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2900done
2901case $ac_lo in #((
2902?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2903'') ac_retval=1 ;;
2904esac
2905  else
2906    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2907/* end confdefs.h.  */
2908$4
2909static long int longval () { return $2; }
2910static unsigned long int ulongval () { return $2; }
2911#include <stdio.h>
2912#include <stdlib.h>
2913int
2914main ()
2915{
2916
2917  FILE *f = fopen ("conftest.val", "w");
2918  if (! f)
2919    return 1;
2920  if (($2) < 0)
2921    {
2922      long int i = longval ();
2923      if (i != ($2))
2924	return 1;
2925      fprintf (f, "%ld", i);
2926    }
2927  else
2928    {
2929      unsigned long int i = ulongval ();
2930      if (i != ($2))
2931	return 1;
2932      fprintf (f, "%lu", i);
2933    }
2934  /* Do not output a trailing newline, as this causes \r\n confusion
2935     on some platforms.  */
2936  return ferror (f) || fclose (f) != 0;
2937
2938  ;
2939  return 0;
2940}
2941_ACEOF
2942if ac_fn_cxx_try_run "$LINENO"; then :
2943  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2944else
2945  ac_retval=1
2946fi
2947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2948  conftest.$ac_objext conftest.beam conftest.$ac_ext
2949rm -f conftest.val
2950
2951  fi
2952  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2953  as_fn_set_status $ac_retval
2954
2955} # ac_fn_cxx_compute_int
2956
2957# ac_fn_cxx_try_link LINENO
2958# -------------------------
2959# Try to link conftest.$ac_ext, and return whether this succeeded.
2960ac_fn_cxx_try_link ()
2961{
2962  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2963  rm -f conftest.$ac_objext conftest$ac_exeext
2964  if { { ac_try="$ac_link"
2965case "(($ac_try" in
2966  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2967  *) ac_try_echo=$ac_try;;
2968esac
2969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2970$as_echo "$ac_try_echo"; } >&5
2971  (eval "$ac_link") 2>conftest.err
2972  ac_status=$?
2973  if test -s conftest.err; then
2974    grep -v '^ *+' conftest.err >conftest.er1
2975    cat conftest.er1 >&5
2976    mv -f conftest.er1 conftest.err
2977  fi
2978  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2979  test $ac_status = 0; } && {
2980	 test -z "$ac_cxx_werror_flag" ||
2981	 test ! -s conftest.err
2982       } && test -s conftest$ac_exeext && {
2983	 test "$cross_compiling" = yes ||
2984	 test -x conftest$ac_exeext
2985       }; then :
2986  ac_retval=0
2987else
2988  $as_echo "$as_me: failed program was:" >&5
2989sed 's/^/| /' conftest.$ac_ext >&5
2990
2991	ac_retval=1
2992fi
2993  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2994  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2995  # interfere with the next link command; also delete a directory that is
2996  # left behind by Apple's compiler.  We do this before executing the actions.
2997  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2998  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2999  as_fn_set_status $ac_retval
3000
3001} # ac_fn_cxx_try_link
3002
3003# ac_fn_cxx_check_func LINENO FUNC VAR
3004# ------------------------------------
3005# Tests whether FUNC exists, setting the cache variable VAR accordingly
3006ac_fn_cxx_check_func ()
3007{
3008  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3010$as_echo_n "checking for $2... " >&6; }
3011if eval \${$3+:} false; then :
3012  $as_echo_n "(cached) " >&6
3013else
3014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3015/* end confdefs.h.  */
3016/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3017   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3018#define $2 innocuous_$2
3019
3020/* System header to define __stub macros and hopefully few prototypes,
3021    which can conflict with char $2 (); below.
3022    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3023    <limits.h> exists even on freestanding compilers.  */
3024
3025#ifdef __STDC__
3026# include <limits.h>
3027#else
3028# include <assert.h>
3029#endif
3030
3031#undef $2
3032
3033/* Override any GCC internal prototype to avoid an error.
3034   Use char because int might match the return type of a GCC
3035   builtin and then its argument prototype would still apply.  */
3036#ifdef __cplusplus
3037extern "C"
3038#endif
3039char $2 ();
3040/* The GNU C library defines this for functions which it implements
3041    to always fail with ENOSYS.  Some functions are actually named
3042    something starting with __ and the normal name is an alias.  */
3043#if defined __stub_$2 || defined __stub___$2
3044choke me
3045#endif
3046
3047int
3048main ()
3049{
3050return $2 ();
3051  ;
3052  return 0;
3053}
3054_ACEOF
3055if ac_fn_cxx_try_link "$LINENO"; then :
3056  eval "$3=yes"
3057else
3058  eval "$3=no"
3059fi
3060rm -f core conftest.err conftest.$ac_objext \
3061    conftest$ac_exeext conftest.$ac_ext
3062fi
3063eval ac_res=\$$3
3064	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3065$as_echo "$ac_res" >&6; }
3066  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3067
3068} # ac_fn_cxx_check_func
3069
3070# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3071# -------------------------------------------------------
3072# Tests whether HEADER exists and can be compiled using the include files in
3073# INCLUDES, setting the cache variable VAR accordingly.
3074ac_fn_c_check_header_compile ()
3075{
3076  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3078$as_echo_n "checking for $2... " >&6; }
3079if eval \${$3+:} false; then :
3080  $as_echo_n "(cached) " >&6
3081else
3082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3083/* end confdefs.h.  */
3084$4
3085#include <$2>
3086_ACEOF
3087if ac_fn_c_try_compile "$LINENO"; then :
3088  eval "$3=yes"
3089else
3090  eval "$3=no"
3091fi
3092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3093fi
3094eval ac_res=\$$3
3095	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3096$as_echo "$ac_res" >&6; }
3097  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3098
3099} # ac_fn_c_check_header_compile
3100cat >config.log <<_ACEOF
3101This file contains any messages produced by compilers while
3102running configure, to aid debugging if configure makes a mistake.
3103
3104It was created by OpenJDK $as_me jdk9, which was
3105generated by GNU Autoconf 2.69.  Invocation command line was
3106
3107  $ $0 $@
3108
3109_ACEOF
3110exec 5>>config.log
3111{
3112cat <<_ASUNAME
3113## --------- ##
3114## Platform. ##
3115## --------- ##
3116
3117hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3118uname -m = `(uname -m) 2>/dev/null || echo unknown`
3119uname -r = `(uname -r) 2>/dev/null || echo unknown`
3120uname -s = `(uname -s) 2>/dev/null || echo unknown`
3121uname -v = `(uname -v) 2>/dev/null || echo unknown`
3122
3123/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3124/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3125
3126/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3127/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3128/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3129/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3130/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3131/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3132/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3133
3134_ASUNAME
3135
3136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3137for as_dir in $PATH
3138do
3139  IFS=$as_save_IFS
3140  test -z "$as_dir" && as_dir=.
3141    $as_echo "PATH: $as_dir"
3142  done
3143IFS=$as_save_IFS
3144
3145} >&5
3146
3147cat >&5 <<_ACEOF
3148
3149
3150## ----------- ##
3151## Core tests. ##
3152## ----------- ##
3153
3154_ACEOF
3155
3156
3157# Keep a trace of the command line.
3158# Strip out --no-create and --no-recursion so they do not pile up.
3159# Strip out --silent because we don't want to record it for future runs.
3160# Also quote any args containing shell meta-characters.
3161# Make two passes to allow for proper duplicate-argument suppression.
3162ac_configure_args=
3163ac_configure_args0=
3164ac_configure_args1=
3165ac_must_keep_next=false
3166for ac_pass in 1 2
3167do
3168  for ac_arg
3169  do
3170    case $ac_arg in
3171    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3172    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3173    | -silent | --silent | --silen | --sile | --sil)
3174      continue ;;
3175    *\'*)
3176      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3177    esac
3178    case $ac_pass in
3179    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3180    2)
3181      as_fn_append ac_configure_args1 " '$ac_arg'"
3182      if test $ac_must_keep_next = true; then
3183	ac_must_keep_next=false # Got value, back to normal.
3184      else
3185	case $ac_arg in
3186	  *=* | --config-cache | -C | -disable-* | --disable-* \
3187	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3188	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3189	  | -with-* | --with-* | -without-* | --without-* | --x)
3190	    case "$ac_configure_args0 " in
3191	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3192	    esac
3193	    ;;
3194	  -* ) ac_must_keep_next=true ;;
3195	esac
3196      fi
3197      as_fn_append ac_configure_args " '$ac_arg'"
3198      ;;
3199    esac
3200  done
3201done
3202{ ac_configure_args0=; unset ac_configure_args0;}
3203{ ac_configure_args1=; unset ac_configure_args1;}
3204
3205# When interrupted or exit'd, cleanup temporary files, and complete
3206# config.log.  We remove comments because anyway the quotes in there
3207# would cause problems or look ugly.
3208# WARNING: Use '\'' to represent an apostrophe within the trap.
3209# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3210trap 'exit_status=$?
3211  # Save into config.log some information that might help in debugging.
3212  {
3213    echo
3214
3215    $as_echo "## ---------------- ##
3216## Cache variables. ##
3217## ---------------- ##"
3218    echo
3219    # The following way of writing the cache mishandles newlines in values,
3220(
3221  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3222    eval ac_val=\$$ac_var
3223    case $ac_val in #(
3224    *${as_nl}*)
3225      case $ac_var in #(
3226      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3227$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3228      esac
3229      case $ac_var in #(
3230      _ | IFS | as_nl) ;; #(
3231      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3232      *) { eval $ac_var=; unset $ac_var;} ;;
3233      esac ;;
3234    esac
3235  done
3236  (set) 2>&1 |
3237    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3238    *${as_nl}ac_space=\ *)
3239      sed -n \
3240	"s/'\''/'\''\\\\'\'''\''/g;
3241	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3242      ;; #(
3243    *)
3244      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3245      ;;
3246    esac |
3247    sort
3248)
3249    echo
3250
3251    $as_echo "## ----------------- ##
3252## Output variables. ##
3253## ----------------- ##"
3254    echo
3255    for ac_var in $ac_subst_vars
3256    do
3257      eval ac_val=\$$ac_var
3258      case $ac_val in
3259      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3260      esac
3261      $as_echo "$ac_var='\''$ac_val'\''"
3262    done | sort
3263    echo
3264
3265    if test -n "$ac_subst_files"; then
3266      $as_echo "## ------------------- ##
3267## File substitutions. ##
3268## ------------------- ##"
3269      echo
3270      for ac_var in $ac_subst_files
3271      do
3272	eval ac_val=\$$ac_var
3273	case $ac_val in
3274	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3275	esac
3276	$as_echo "$ac_var='\''$ac_val'\''"
3277      done | sort
3278      echo
3279    fi
3280
3281    if test -s confdefs.h; then
3282      $as_echo "## ----------- ##
3283## confdefs.h. ##
3284## ----------- ##"
3285      echo
3286      cat confdefs.h
3287      echo
3288    fi
3289    test "$ac_signal" != 0 &&
3290      $as_echo "$as_me: caught signal $ac_signal"
3291    $as_echo "$as_me: exit $exit_status"
3292  } >&5
3293  rm -f core *.core core.conftest.* &&
3294    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3295    exit $exit_status
3296' 0
3297for ac_signal in 1 2 13 15; do
3298  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3299done
3300ac_signal=0
3301
3302# confdefs.h avoids OS command line length limits that DEFS can exceed.
3303rm -f -r conftest* confdefs.h
3304
3305$as_echo "/* confdefs.h */" > confdefs.h
3306
3307# Predefined preprocessor variables.
3308
3309cat >>confdefs.h <<_ACEOF
3310#define PACKAGE_NAME "$PACKAGE_NAME"
3311_ACEOF
3312
3313cat >>confdefs.h <<_ACEOF
3314#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3315_ACEOF
3316
3317cat >>confdefs.h <<_ACEOF
3318#define PACKAGE_VERSION "$PACKAGE_VERSION"
3319_ACEOF
3320
3321cat >>confdefs.h <<_ACEOF
3322#define PACKAGE_STRING "$PACKAGE_STRING"
3323_ACEOF
3324
3325cat >>confdefs.h <<_ACEOF
3326#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3327_ACEOF
3328
3329cat >>confdefs.h <<_ACEOF
3330#define PACKAGE_URL "$PACKAGE_URL"
3331_ACEOF
3332
3333
3334# Let the site file select an alternate cache file if it wants to.
3335# Prefer an explicitly selected file to automatically selected ones.
3336ac_site_file1=NONE
3337ac_site_file2=NONE
3338if test -n "$CONFIG_SITE"; then
3339  # We do not want a PATH search for config.site.
3340  case $CONFIG_SITE in #((
3341    -*)  ac_site_file1=./$CONFIG_SITE;;
3342    */*) ac_site_file1=$CONFIG_SITE;;
3343    *)   ac_site_file1=./$CONFIG_SITE;;
3344  esac
3345elif test "x$prefix" != xNONE; then
3346  ac_site_file1=$prefix/share/config.site
3347  ac_site_file2=$prefix/etc/config.site
3348else
3349  ac_site_file1=$ac_default_prefix/share/config.site
3350  ac_site_file2=$ac_default_prefix/etc/config.site
3351fi
3352for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3353do
3354  test "x$ac_site_file" = xNONE && continue
3355  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3356    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3357$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3358    sed 's/^/| /' "$ac_site_file" >&5
3359    . "$ac_site_file" \
3360      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3361$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3362as_fn_error $? "failed to load site script $ac_site_file
3363See \`config.log' for more details" "$LINENO" 5; }
3364  fi
3365done
3366
3367if test -r "$cache_file"; then
3368  # Some versions of bash will fail to source /dev/null (special files
3369  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3370  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3371    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3372$as_echo "$as_me: loading cache $cache_file" >&6;}
3373    case $cache_file in
3374      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3375      *)                      . "./$cache_file";;
3376    esac
3377  fi
3378else
3379  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3380$as_echo "$as_me: creating cache $cache_file" >&6;}
3381  >$cache_file
3382fi
3383
3384# Check that the precious variables saved in the cache have kept the same
3385# value.
3386ac_cache_corrupted=false
3387for ac_var in $ac_precious_vars; do
3388  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3389  eval ac_new_set=\$ac_env_${ac_var}_set
3390  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3391  eval ac_new_val=\$ac_env_${ac_var}_value
3392  case $ac_old_set,$ac_new_set in
3393    set,)
3394      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3395$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3396      ac_cache_corrupted=: ;;
3397    ,set)
3398      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3399$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3400      ac_cache_corrupted=: ;;
3401    ,);;
3402    *)
3403      if test "x$ac_old_val" != "x$ac_new_val"; then
3404	# differences in whitespace do not lead to failure.
3405	ac_old_val_w=`echo x $ac_old_val`
3406	ac_new_val_w=`echo x $ac_new_val`
3407	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3408	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3409$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3410	  ac_cache_corrupted=:
3411	else
3412	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3413$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3414	  eval $ac_var=\$ac_old_val
3415	fi
3416	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3417$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3418	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3419$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3420      fi;;
3421  esac
3422  # Pass precious variables to config.status.
3423  if test "$ac_new_set" = set; then
3424    case $ac_new_val in
3425    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3426    *) ac_arg=$ac_var=$ac_new_val ;;
3427    esac
3428    case " $ac_configure_args " in
3429      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3430      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3431    esac
3432  fi
3433done
3434if $ac_cache_corrupted; then
3435  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3436$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3437  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3438$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3439  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3440fi
3441## -------------------- ##
3442## Main body of script. ##
3443## -------------------- ##
3444
3445ac_ext=c
3446ac_cpp='$CPP $CPPFLAGS'
3447ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3448ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3449ac_compiler_gnu=$ac_cv_c_compiler_gnu
3450
3451
3452
3453ac_aux_dir=
3454for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3455  if test -f "$ac_dir/install-sh"; then
3456    ac_aux_dir=$ac_dir
3457    ac_install_sh="$ac_aux_dir/install-sh -c"
3458    break
3459  elif test -f "$ac_dir/install.sh"; then
3460    ac_aux_dir=$ac_dir
3461    ac_install_sh="$ac_aux_dir/install.sh -c"
3462    break
3463  elif test -f "$ac_dir/shtool"; then
3464    ac_aux_dir=$ac_dir
3465    ac_install_sh="$ac_aux_dir/shtool install -c"
3466    break
3467  fi
3468done
3469if test -z "$ac_aux_dir"; then
3470  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
3471fi
3472
3473# These three variables are undocumented and unsupported,
3474# and are intended to be withdrawn in a future Autoconf release.
3475# They can cause serious problems if a builder's source tree is in a directory
3476# whose full name contains unusual characters.
3477ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3478ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3479ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3480
3481
3482# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3483
3484#
3485# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3486# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3487#
3488# This code is free software; you can redistribute it and/or modify it
3489# under the terms of the GNU General Public License version 2 only, as
3490# published by the Free Software Foundation.  Oracle designates this
3491# particular file as subject to the "Classpath" exception as provided
3492# by Oracle in the LICENSE file that accompanied this code.
3493#
3494# This code is distributed in the hope that it will be useful, but WITHOUT
3495# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3496# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3497# version 2 for more details (a copy is included in the LICENSE file that
3498# accompanied this code).
3499#
3500# You should have received a copy of the GNU General Public License version
3501# 2 along with this work; if not, write to the Free Software Foundation,
3502# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3503#
3504# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3505# or visit www.oracle.com if you need additional information or have any
3506# questions.
3507#
3508
3509#
3510# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3511#
3512# This program is free software; you can redistribute it and/or modify
3513# it under the terms of the GNU General Public License as published by
3514# the Free Software Foundation; either version 2 of the License, or
3515# (at your option) any later version.
3516#
3517# This program is distributed in the hope that it will be useful, but
3518# WITHOUT ANY WARRANTY; without even the implied warranty of
3519# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3520# General Public License for more details.
3521#
3522# You should have received a copy of the GNU General Public License
3523# along with this program; if not, write to the Free Software
3524# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3525#
3526# As a special exception to the GNU General Public License, if you
3527# distribute this file as part of a program that contains a
3528# configuration script generated by Autoconf, you may include it under
3529# the same distribution terms that you use for the rest of that program.
3530
3531# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3532# ----------------------------------
3533# PKG_PROG_PKG_CONFIG
3534
3535# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3536#
3537# Check to see whether a particular set of modules exists.  Similar
3538# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3539#
3540#
3541# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3542# this or PKG_CHECK_MODULES is called, or make sure to call
3543# PKG_CHECK_EXISTS manually
3544# --------------------------------------------------------------
3545
3546
3547
3548# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3549# ---------------------------------------------
3550# _PKG_CONFIG
3551
3552# _PKG_SHORT_ERRORS_SUPPORTED
3553# -----------------------------
3554# _PKG_SHORT_ERRORS_SUPPORTED
3555
3556
3557# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3558# [ACTION-IF-NOT-FOUND])
3559#
3560#
3561# Note that if there is a possibility the first call to
3562# PKG_CHECK_MODULES might not happen, you should be sure to include an
3563# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3564#
3565#
3566# --------------------------------------------------------------
3567# PKG_CHECK_MODULES
3568
3569
3570# Include these first...
3571#
3572# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3573# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3574#
3575# This code is free software; you can redistribute it and/or modify it
3576# under the terms of the GNU General Public License version 2 only, as
3577# published by the Free Software Foundation.  Oracle designates this
3578# particular file as subject to the "Classpath" exception as provided
3579# by Oracle in the LICENSE file that accompanied this code.
3580#
3581# This code is distributed in the hope that it will be useful, but WITHOUT
3582# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3583# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3584# version 2 for more details (a copy is included in the LICENSE file that
3585# accompanied this code).
3586#
3587# You should have received a copy of the GNU General Public License version
3588# 2 along with this work; if not, write to the Free Software Foundation,
3589# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3590#
3591# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3592# or visit www.oracle.com if you need additional information or have any
3593# questions.
3594#
3595
3596# Create a function/macro that takes a series of named arguments. The call is
3597# similar to AC_DEFUN, but the setup of the function looks like this:
3598# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3599# ... do something
3600#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3601# ])
3602# A star (*) in front of a named argument means that it is required and it's
3603# presence will be verified. To pass e.g. the first value as a normal indexed
3604# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3605# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3606# "ARG_FOO".
3607#
3608# The generated function can be called like this:
3609# MYFUNC(FOO: [foo-val],
3610#     BAR: [
3611#         $ECHO hello world
3612#     ])
3613# Note that the argument value must start on the same line as the argument name.
3614#
3615# Argument 1: Name of the function to define
3616# Argument 2: List of legal named arguments, with a * prefix for required arguments
3617# Argument 3: Argument array to treat as named, typically $@
3618# Argument 4: The main function body
3619
3620
3621# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3622# If so, then append $1 to $2 \
3623# Also set JVM_ARG_OK to true/false depending on outcome.
3624
3625
3626# Appends a string to a path variable, only adding the : when needed.
3627
3628
3629# Prepends a string to a path variable, only adding the : when needed.
3630
3631
3632# This will make sure the given variable points to a full and proper
3633# path. This means:
3634# 1) There will be no spaces in the path. On unix platforms,
3635#    spaces in the path will result in an error. On Windows,
3636#    the path will be rewritten using short-style to be space-free.
3637# 2) The path will be absolute, and it will be in unix-style (on
3638#     cygwin).
3639# $1: The name of the variable to fix
3640
3641
3642# This will make sure the given variable points to a executable
3643# with a full and proper path. This means:
3644# 1) There will be no spaces in the path. On unix platforms,
3645#    spaces in the path will result in an error. On Windows,
3646#    the path will be rewritten using short-style to be space-free.
3647# 2) The path will be absolute, and it will be in unix-style (on
3648#     cygwin).
3649# Any arguments given to the executable is preserved.
3650# If the input variable does not have a directory specification, then
3651# it need to be in the PATH.
3652# $1: The name of the variable to fix
3653
3654
3655
3656
3657# Register a --with argument but mark it as deprecated
3658# $1: The name of the with argument to deprecate, not including --with-
3659
3660
3661# Register a --enable argument but mark it as deprecated
3662# $1: The name of the with argument to deprecate, not including --enable-
3663# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3664# $3: Messages to user.
3665
3666
3667
3668
3669# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3670# $1: variable to check
3671
3672
3673# Check that there are no unprocessed overridden variables left.
3674# If so, they are an incorrect argument and we will exit with an error.
3675
3676
3677# Setup a tool for the given variable. If correctly specified by the user,
3678# use that value, otherwise search for the tool using the supplied code snippet.
3679# $1: variable to set
3680# $2: code snippet to call to look for the tool
3681# $3: code snippet to call if variable was used to find tool
3682
3683
3684# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3685# $1: variable to set
3686# $2: executable name (or list of names) to look for
3687# $3: [path]
3688
3689
3690# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3691# $1: variable to set
3692# $2: executable name (or list of names) to look for
3693
3694
3695# Like BASIC_PATH_PROGS but fails if no tool was found.
3696# $1: variable to set
3697# $2: executable name (or list of names) to look for
3698# $3: [path]
3699
3700
3701# Like BASIC_SETUP_TOOL but fails if no tool was found.
3702# $1: variable to set
3703# $2: autoconf macro to call to look for the special tool
3704
3705
3706# Setup the most fundamental tools that relies on not much else to set up,
3707# but is used by much of the early bootstrap code.
3708
3709
3710# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3711
3712
3713# Evaluates platform specific overrides for devkit variables.
3714# $1: Name of variable
3715
3716
3717
3718
3719
3720
3721#%%% Simple tools %%%
3722
3723# Check if we have found a usable version of make
3724# $1: the path to a potential make binary (or empty)
3725# $2: the description on how we found this
3726
3727
3728
3729
3730# Goes looking for a usable version of GNU make.
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741# Check if build directory is on local disk. If not possible to determine,
3742# we prefer to claim it's local.
3743# Argument 1: directory to test
3744# Argument 2: what to do if it is on local disk
3745# Argument 3: what to do otherwise (remote disk or failure)
3746
3747
3748# Check that source files have basic read permissions set. This might
3749# not be the case in cygwin in certain conditions.
3750
3751
3752
3753
3754# Check for support for specific options in bash
3755
3756
3757################################################################################
3758#
3759# Default make target
3760#
3761
3762
3763# Code to run after AC_OUTPUT
3764
3765
3766#
3767# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3768# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3769#
3770# This code is free software; you can redistribute it and/or modify it
3771# under the terms of the GNU General Public License version 2 only, as
3772# published by the Free Software Foundation.  Oracle designates this
3773# particular file as subject to the "Classpath" exception as provided
3774# by Oracle in the LICENSE file that accompanied this code.
3775#
3776# This code is distributed in the hope that it will be useful, but WITHOUT
3777# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3778# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3779# version 2 for more details (a copy is included in the LICENSE file that
3780# accompanied this code).
3781#
3782# You should have received a copy of the GNU General Public License version
3783# 2 along with this work; if not, write to the Free Software Foundation,
3784# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3785#
3786# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3787# or visit www.oracle.com if you need additional information or have any
3788# questions.
3789#
3790
3791
3792
3793
3794
3795# Helper function which possibly converts a path using DOS-style short mode.
3796# If so, the updated path is stored in $new_path.
3797# $1: The path to check
3798
3799
3800# Helper function which possibly converts a path using DOS-style short mode.
3801# If so, the updated path is stored in $new_path.
3802# $1: The path to check
3803
3804
3805# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3806# and could probably be heavily simplified. However, all changes in this
3807# area tend to need lot of testing in different scenarios, and in lack of
3808# proper unit testing, cleaning this up has not been deemed worth the effort
3809# at the moment.
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3820
3821
3822
3823
3824# ... then the rest
3825#
3826# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3827# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3828#
3829# This code is free software; you can redistribute it and/or modify it
3830# under the terms of the GNU General Public License version 2 only, as
3831# published by the Free Software Foundation.  Oracle designates this
3832# particular file as subject to the "Classpath" exception as provided
3833# by Oracle in the LICENSE file that accompanied this code.
3834#
3835# This code is distributed in the hope that it will be useful, but WITHOUT
3836# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3837# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3838# version 2 for more details (a copy is included in the LICENSE file that
3839# accompanied this code).
3840#
3841# You should have received a copy of the GNU General Public License version
3842# 2 along with this work; if not, write to the Free Software Foundation,
3843# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3844#
3845# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3846# or visit www.oracle.com if you need additional information or have any
3847# questions.
3848#
3849
3850########################################################################
3851# This file handles detection of the Boot JDK. The Boot JDK detection
3852# process has been developed as a response to solve a complex real-world
3853# problem. Initially, it was simple, but it has grown as platform after
3854# platform, idiosyncracy after idiosyncracy has been supported.
3855#
3856# The basic idea is this:
3857# 1) You need an acceptable *) JDK to use as a Boot JDK
3858# 2) There are several ways to locate a JDK, that are mostly platform
3859#    dependent **)
3860# 3) You can have multiple JDKs installed
3861# 4) If possible, configure should try to dig out an acceptable JDK
3862#    automatically, without having to resort to command-line options
3863#
3864# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3865#     javac) and not a JRE, etc.
3866#
3867# **) On Windows we typically use a well-known path.
3868#     On MacOSX we typically use the tool java_home.
3869#     On Linux we typically find javac in the $PATH, and then follow a
3870#     chain of symlinks that often ends up in a real JDK.
3871#
3872# This leads to the code where we check in different ways to locate a
3873# JDK, and if one is found, check if it is acceptable. If not, we print
3874# our reasons for rejecting it (useful when debugging non-working
3875# configure situations) and continue checking the next one.
3876########################################################################
3877
3878# Execute the check given as argument, and verify the result
3879# If the Boot JDK was previously found, do nothing
3880# $1 A command line (typically autoconf macro) to execute
3881
3882
3883# Test: Is bootjdk explicitly set by command line arguments?
3884
3885
3886# Test: Is $JAVA_HOME set?
3887
3888
3889# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3890
3891
3892# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3893# $1: Argument to the java_home binary (optional)
3894
3895
3896# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3897
3898
3899# Look for a jdk in the given path. If there are multiple, try to select the newest.
3900# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3901# $1 = Path to directory containing jdk installations.
3902# $2 = String to append to the found JDK directory to get the proper JDK home
3903
3904
3905# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3906# environmental variable as base for where to look.
3907# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3908
3909
3910# Test: Is there a JDK installed in default, well-known locations?
3911
3912
3913# Check that a command-line tool in the Boot JDK is correct
3914# $1 = name of variable to assign
3915# $2 = name of binary
3916
3917
3918###############################################################################
3919#
3920# We need a Boot JDK to bootstrap the build.
3921#
3922
3923
3924
3925
3926
3927# BUILD_JDK: the location of the latest JDK that can run
3928#   on the host system and supports the target class file version
3929#   generated in this JDK build.  This variable should only be
3930#   used after the launchers are built.
3931#
3932
3933# Execute the check given as argument, and verify the result.
3934# If the JDK was previously found, do nothing.
3935# $1 A command line (typically autoconf macro) to execute
3936
3937
3938# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3939# is different than the host system doing the build (e.g. cross-compilation),
3940# a special BUILD_JDK is built as part of the build process.  An external
3941# prebuilt BUILD_JDK can also be supplied.
3942
3943
3944#
3945# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3946# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3947#
3948# This code is free software; you can redistribute it and/or modify it
3949# under the terms of the GNU General Public License version 2 only, as
3950# published by the Free Software Foundation.  Oracle designates this
3951# particular file as subject to the "Classpath" exception as provided
3952# by Oracle in the LICENSE file that accompanied this code.
3953#
3954# This code is distributed in the hope that it will be useful, but WITHOUT
3955# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3956# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3957# version 2 for more details (a copy is included in the LICENSE file that
3958# accompanied this code).
3959#
3960# You should have received a copy of the GNU General Public License version
3961# 2 along with this work; if not, write to the Free Software Foundation,
3962# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3963#
3964# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3965# or visit www.oracle.com if you need additional information or have any
3966# questions.
3967#
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985################################################################################
3986#
3987# Runs icecc-create-env once and prints the error if it fails
3988#
3989# $1: arguments to icecc-create-env
3990# $2: log file
3991#
3992
3993
3994################################################################################
3995#
3996# Optionally enable distributed compilation of native code using icecc/icecream
3997#
3998
3999
4000
4001
4002
4003
4004
4005#
4006# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4007# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4008#
4009# This code is free software; you can redistribute it and/or modify it
4010# under the terms of the GNU General Public License version 2 only, as
4011# published by the Free Software Foundation.  Oracle designates this
4012# particular file as subject to the "Classpath" exception as provided
4013# by Oracle in the LICENSE file that accompanied this code.
4014#
4015# This code is distributed in the hope that it will be useful, but WITHOUT
4016# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4017# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4018# version 2 for more details (a copy is included in the LICENSE file that
4019# accompanied this code).
4020#
4021# You should have received a copy of the GNU General Public License version
4022# 2 along with this work; if not, write to the Free Software Foundation,
4023# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4024#
4025# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4026# or visit www.oracle.com if you need additional information or have any
4027# questions.
4028#
4029
4030################################################################################
4031#
4032# Setup ABI profile (for arm)
4033#
4034
4035
4036# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4037# corresponding configure arguments instead
4038
4039
4040# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4041# that configure can use them while detecting compilers.
4042# TOOLCHAIN_TYPE is available here.
4043# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4044
4045
4046
4047
4048
4049
4050# Documentation on common flags used for solstudio in HIGHEST.
4051#
4052# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4053#          done with care, there are some assumptions below that need to
4054#          be understood about the use of pointers, and IEEE behavior.
4055#
4056# -fns: Use non-standard floating point mode (not IEEE 754)
4057# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4058# -fsingle: Use single precision floating point with 'float'
4059# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4060#   (Source with excessing pointer casting and data access with mixed
4061#    pointer types are not recommended)
4062# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4063#   (If you expect perfect errno behavior, do not use this)
4064# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4065# -xrestrict: Pointer parameters to functions do not overlap
4066#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4067#    If you pass in multiple pointers to the same data, do not use this)
4068# -xlibmil: Inline some library routines
4069#   (If you expect perfect errno behavior, do not use this)
4070# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4071#   (If you expect perfect errno behavior, do not use this)
4072#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4073
4074    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4075    # Bug?
4076    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4077    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4078    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4079    #fi
4080
4081
4082
4083
4084
4085
4086################################################################################
4087# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4088#      conditionals against.
4089# $2 - Optional prefix for each variable defined.
4090
4091
4092# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4093#                                  IF_FALSE: [RUN-IF-FALSE])
4094# ------------------------------------------------------------
4095# Check that the C compiler supports an argument
4096
4097
4098
4099
4100# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4101#                                    IF_FALSE: [RUN-IF-FALSE])
4102# ------------------------------------------------------------
4103# Check that the C++ compiler supports an argument
4104
4105
4106
4107
4108# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4109#                                IF_FALSE: [RUN-IF-FALSE])
4110# ------------------------------------------------------------
4111# Check that the C and C++ compilers support an argument
4112
4113
4114
4115
4116# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4117#                                   IF_FALSE: [RUN-IF-FALSE])
4118# ------------------------------------------------------------
4119# Check that the linker support an argument
4120
4121
4122
4123
4124
4125
4126# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4127# Arguments:
4128# $1 - Optional prefix for each variable defined.
4129
4130
4131#
4132# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4133# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4134#
4135# This code is free software; you can redistribute it and/or modify it
4136# under the terms of the GNU General Public License version 2 only, as
4137# published by the Free Software Foundation.  Oracle designates this
4138# particular file as subject to the "Classpath" exception as provided
4139# by Oracle in the LICENSE file that accompanied this code.
4140#
4141# This code is distributed in the hope that it will be useful, but WITHOUT
4142# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4143# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4144# version 2 for more details (a copy is included in the LICENSE file that
4145# accompanied this code).
4146#
4147# You should have received a copy of the GNU General Public License version
4148# 2 along with this work; if not, write to the Free Software Foundation,
4149# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4150#
4151# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4152# or visit www.oracle.com if you need additional information or have any
4153# questions.
4154#
4155
4156
4157
4158
4159
4160cygwin_help() {
4161  case $1 in
4162    unzip)
4163      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4164      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4165      ;;
4166    zip)
4167      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4168      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4169      ;;
4170    make)
4171      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4172      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4173      ;;
4174    freetype)
4175      HELP_MSG="
4176The freetype library can now be build during the configure process.
4177Download the freetype sources and unpack them into an arbitrary directory:
4178
4179wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4180tar -xzf freetype-2.5.3.tar.gz
4181
4182Then run configure with '--with-freetype-src=<freetype_src>'. This will
4183automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4184builds or into '<freetype_src>/lib32' for 32-bit builds.
4185Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4186and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4187
4188Alternatively you can unpack the sources like this to use the default directory:
4189
4190tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4191      ;;
4192  esac
4193}
4194
4195msys_help() {
4196  PKGHANDLER_COMMAND=""
4197}
4198
4199apt_help() {
4200  case $1 in
4201    reduced)
4202      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4203    devkit)
4204      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4205    openjdk)
4206      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4207    alsa)
4208      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4209    cups)
4210      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4211    freetype)
4212      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4213    ffi)
4214      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4215    x11)
4216      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4217    ccache)
4218      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4219    dtrace)
4220      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4221  esac
4222}
4223
4224yum_help() {
4225  case $1 in
4226    devkit)
4227      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4228    openjdk)
4229      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4230    alsa)
4231      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4232    cups)
4233      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4234    freetype)
4235      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4236    x11)
4237      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4238    ccache)
4239      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4240  esac
4241}
4242
4243brew_help() {
4244  case $1 in
4245    openjdk)
4246      PKGHANDLER_COMMAND="brew cask install java" ;;
4247    freetype)
4248      PKGHANDLER_COMMAND="brew install freetype" ;;
4249    ccache)
4250      PKGHANDLER_COMMAND="brew install ccache" ;;
4251  esac
4252}
4253
4254port_help() {
4255  PKGHANDLER_COMMAND=""
4256}
4257
4258pkgutil_help() {
4259  PKGHANDLER_COMMAND=""
4260}
4261
4262pkgadd_help() {
4263  PKGHANDLER_COMMAND=""
4264}
4265
4266# This function will check if we're called from the "configure" wrapper while
4267# printing --help. If so, we will print out additional information that can
4268# only be extracted within the autoconf script, and then exit. This must be
4269# called at the very beginning in configure.ac.
4270
4271
4272
4273
4274
4275
4276#
4277# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4278# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4279#
4280# This code is free software; you can redistribute it and/or modify it
4281# under the terms of the GNU General Public License version 2 only, as
4282# published by the Free Software Foundation.  Oracle designates this
4283# particular file as subject to the "Classpath" exception as provided
4284# by Oracle in the LICENSE file that accompanied this code.
4285#
4286# This code is distributed in the hope that it will be useful, but WITHOUT
4287# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4288# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4289# version 2 for more details (a copy is included in the LICENSE file that
4290# accompanied this code).
4291#
4292# You should have received a copy of the GNU General Public License version
4293# 2 along with this work; if not, write to the Free Software Foundation,
4294# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4295#
4296# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4297# or visit www.oracle.com if you need additional information or have any
4298# questions.
4299#
4300
4301# All valid JVM features, regardless of platform
4302VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4303    graal vm-structs jni-check services management all-gcs nmt cds \
4304    static-build link-time-opt aot"
4305
4306# All valid JVM variants
4307VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4308
4309###############################################################################
4310# Check if the specified JVM variant should be built. To be used in shell if
4311# constructs, like this:
4312# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4313#
4314# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4315
4316# Definition kept in one line to allow inlining in if statements.
4317# Additional [] needed to keep m4 from mangling shell constructs.
4318
4319
4320###############################################################################
4321# Check if the specified JVM features are explicitly enabled. To be used in
4322# shell if constructs, like this:
4323# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4324#
4325# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4326
4327# Definition kept in one line to allow inlining in if statements.
4328# Additional [] needed to keep m4 from mangling shell constructs.
4329
4330
4331###############################################################################
4332# Check which variants of the JVM that we want to build. Available variants are:
4333#   server: normal interpreter, and a tiered C1/C2 compiler
4334#   client: normal interpreter, and C1 (no C2 compiler)
4335#   minimal: reduced form of client with optional features stripped out
4336#   core: normal interpreter only, no compiler
4337#   zero: C++ based interpreter only, no compiler
4338#   zeroshark: C++ based interpreter, and a llvm-based compiler
4339#   custom: baseline JVM with no default features
4340#
4341
4342
4343###############################################################################
4344# Check if dtrace should be enabled and has all prerequisites present.
4345#
4346
4347
4348################################################################################
4349# Check if AOT should be enabled
4350#
4351
4352
4353################################################################################
4354# Allow to disable CDS
4355#
4356
4357
4358###############################################################################
4359# Set up all JVM features for each JVM variant.
4360#
4361
4362
4363###############################################################################
4364# Validate JVM features once all setup is complete, including custom setup.
4365#
4366
4367
4368################################################################################
4369#
4370# Specify which sources will be used to build the 64-bit ARM port
4371#
4372# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4373# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4374#
4375
4376
4377
4378################################################################################
4379# Check if gtest should be built
4380#
4381
4382
4383#
4384# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4385# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4386#
4387# This code is free software; you can redistribute it and/or modify it
4388# under the terms of the GNU General Public License version 2 only, as
4389# published by the Free Software Foundation.  Oracle designates this
4390# particular file as subject to the "Classpath" exception as provided
4391# by Oracle in the LICENSE file that accompanied this code.
4392#
4393# This code is distributed in the hope that it will be useful, but WITHOUT
4394# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4395# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4396# version 2 for more details (a copy is included in the LICENSE file that
4397# accompanied this code).
4398#
4399# You should have received a copy of the GNU General Public License version
4400# 2 along with this work; if not, write to the Free Software Foundation,
4401# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4402#
4403# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4404# or visit www.oracle.com if you need additional information or have any
4405# questions.
4406#
4407
4408###############################################################################
4409# Check which variant of the JDK that we want to build.
4410# Currently we have:
4411#    normal:   standard edition
4412# but the custom make system may add other variants
4413#
4414# Effectively the JDK variant gives a name to a specific set of
4415# modules to compile into the JDK.
4416
4417
4418###############################################################################
4419# Set the debug level
4420#    release: no debug information, all optimizations, no asserts.
4421#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4422#    fastdebug: debug information (-g), all optimizations, all asserts
4423#    slowdebug: debug information (-g), no optimizations, all asserts
4424
4425
4426###############################################################################
4427#
4428# Should we build only OpenJDK even if closed sources are present?
4429#
4430
4431
4432
4433
4434###############################################################################
4435#
4436# Enable or disable the elliptic curve crypto implementation
4437#
4438
4439
4440
4441
4442################################################################################
4443#
4444# Gcov coverage data for hotspot
4445#
4446
4447
4448################################################################################
4449#
4450# Static build support.  When enabled will generate static
4451# libraries instead of shared libraries for all JDK libs.
4452#
4453
4454
4455################################################################################
4456#
4457# jlink options.
4458# We always keep packaged modules in JDK image.
4459#
4460
4461
4462################################################################################
4463#
4464# Check if building of the jtreg failure handler should be enabled.
4465#
4466
4467
4468################################################################################
4469#
4470# Enable or disable generation of the classlist at build time
4471#
4472
4473
4474#
4475# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4476# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4477#
4478# This code is free software; you can redistribute it and/or modify it
4479# under the terms of the GNU General Public License version 2 only, as
4480# published by the Free Software Foundation.  Oracle designates this
4481# particular file as subject to the "Classpath" exception as provided
4482# by Oracle in the LICENSE file that accompanied this code.
4483#
4484# This code is distributed in the hope that it will be useful, but WITHOUT
4485# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4486# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4487# version 2 for more details (a copy is included in the LICENSE file that
4488# accompanied this code).
4489#
4490# You should have received a copy of the GNU General Public License version
4491# 2 along with this work; if not, write to the Free Software Foundation,
4492# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4493#
4494# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4495# or visit www.oracle.com if you need additional information or have any
4496# questions.
4497#
4498
4499###############################################################################
4500#
4501# Setup version numbers
4502#
4503
4504# Verify that a given string represents a valid version number, and assign it
4505# to a variable.
4506
4507# Argument 1: the variable to assign to
4508# Argument 2: the value given by the user
4509
4510
4511
4512
4513#
4514# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4515# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4516#
4517# This code is free software; you can redistribute it and/or modify it
4518# under the terms of the GNU General Public License version 2 only, as
4519# published by the Free Software Foundation.  Oracle designates this
4520# particular file as subject to the "Classpath" exception as provided
4521# by Oracle in the LICENSE file that accompanied this code.
4522#
4523# This code is distributed in the hope that it will be useful, but WITHOUT
4524# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4525# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4526# version 2 for more details (a copy is included in the LICENSE file that
4527# accompanied this code).
4528#
4529# You should have received a copy of the GNU General Public License version
4530# 2 along with this work; if not, write to the Free Software Foundation,
4531# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4532#
4533# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4534# or visit www.oracle.com if you need additional information or have any
4535# questions.
4536#
4537
4538# Major library component reside in separate files.
4539#
4540# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4541# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4542#
4543# This code is free software; you can redistribute it and/or modify it
4544# under the terms of the GNU General Public License version 2 only, as
4545# published by the Free Software Foundation.  Oracle designates this
4546# particular file as subject to the "Classpath" exception as provided
4547# by Oracle in the LICENSE file that accompanied this code.
4548#
4549# This code is distributed in the hope that it will be useful, but WITHOUT
4550# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4551# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4552# version 2 for more details (a copy is included in the LICENSE file that
4553# accompanied this code).
4554#
4555# You should have received a copy of the GNU General Public License version
4556# 2 along with this work; if not, write to the Free Software Foundation,
4557# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4558#
4559# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4560# or visit www.oracle.com if you need additional information or have any
4561# questions.
4562#
4563
4564################################################################################
4565# Setup alsa (Advanced Linux Sound Architecture)
4566################################################################################
4567
4568
4569#
4570# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4571# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4572#
4573# This code is free software; you can redistribute it and/or modify it
4574# under the terms of the GNU General Public License version 2 only, as
4575# published by the Free Software Foundation.  Oracle designates this
4576# particular file as subject to the "Classpath" exception as provided
4577# by Oracle in the LICENSE file that accompanied this code.
4578#
4579# This code is distributed in the hope that it will be useful, but WITHOUT
4580# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4581# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4582# version 2 for more details (a copy is included in the LICENSE file that
4583# accompanied this code).
4584#
4585# You should have received a copy of the GNU General Public License version
4586# 2 along with this work; if not, write to the Free Software Foundation,
4587# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4588#
4589# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4590# or visit www.oracle.com if you need additional information or have any
4591# questions.
4592#
4593
4594################################################################################
4595# Setup bundled libraries.
4596#
4597# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4598# OpenJDK repository. Default is to use these libraries as bundled, but they
4599# might be replaced by en external version by the user.
4600################################################################################
4601
4602
4603################################################################################
4604# Setup libjpeg
4605################################################################################
4606
4607
4608################################################################################
4609# Setup giflib
4610################################################################################
4611
4612
4613################################################################################
4614# Setup libpng
4615################################################################################
4616
4617
4618################################################################################
4619# Setup zlib
4620################################################################################
4621
4622
4623################################################################################
4624# Setup lcms (Little CMS)
4625################################################################################
4626
4627
4628#
4629# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4630# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4631#
4632# This code is free software; you can redistribute it and/or modify it
4633# under the terms of the GNU General Public License version 2 only, as
4634# published by the Free Software Foundation.  Oracle designates this
4635# particular file as subject to the "Classpath" exception as provided
4636# by Oracle in the LICENSE file that accompanied this code.
4637#
4638# This code is distributed in the hope that it will be useful, but WITHOUT
4639# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4640# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4641# version 2 for more details (a copy is included in the LICENSE file that
4642# accompanied this code).
4643#
4644# You should have received a copy of the GNU General Public License version
4645# 2 along with this work; if not, write to the Free Software Foundation,
4646# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4647#
4648# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4649# or visit www.oracle.com if you need additional information or have any
4650# questions.
4651#
4652
4653################################################################################
4654# Setup cups (Common Unix Printing System)
4655################################################################################
4656
4657
4658#
4659# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4660# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4661#
4662# This code is free software; you can redistribute it and/or modify it
4663# under the terms of the GNU General Public License version 2 only, as
4664# published by the Free Software Foundation.  Oracle designates this
4665# particular file as subject to the "Classpath" exception as provided
4666# by Oracle in the LICENSE file that accompanied this code.
4667#
4668# This code is distributed in the hope that it will be useful, but WITHOUT
4669# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4670# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4671# version 2 for more details (a copy is included in the LICENSE file that
4672# accompanied this code).
4673#
4674# You should have received a copy of the GNU General Public License version
4675# 2 along with this work; if not, write to the Free Software Foundation,
4676# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4677#
4678# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4679# or visit www.oracle.com if you need additional information or have any
4680# questions.
4681#
4682
4683################################################################################
4684# Setup libffi (Foreign Function Interface)
4685################################################################################
4686
4687
4688#
4689# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4690# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4691#
4692# This code is free software; you can redistribute it and/or modify it
4693# under the terms of the GNU General Public License version 2 only, as
4694# published by the Free Software Foundation.  Oracle designates this
4695# particular file as subject to the "Classpath" exception as provided
4696# by Oracle in the LICENSE file that accompanied this code.
4697#
4698# This code is distributed in the hope that it will be useful, but WITHOUT
4699# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4700# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4701# version 2 for more details (a copy is included in the LICENSE file that
4702# accompanied this code).
4703#
4704# You should have received a copy of the GNU General Public License version
4705# 2 along with this work; if not, write to the Free Software Foundation,
4706# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4707#
4708# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4709# or visit www.oracle.com if you need additional information or have any
4710# questions.
4711#
4712
4713################################################################################
4714# Build the freetype lib from source
4715################################################################################
4716
4717
4718################################################################################
4719# Check if a potential freeype library match is correct and usable
4720################################################################################
4721
4722
4723################################################################################
4724# Setup freetype (The FreeType2 font rendering library)
4725################################################################################
4726
4727
4728#
4729# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4730# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4731#
4732# This code is free software; you can redistribute it and/or modify it
4733# under the terms of the GNU General Public License version 2 only, as
4734# published by the Free Software Foundation.  Oracle designates this
4735# particular file as subject to the "Classpath" exception as provided
4736# by Oracle in the LICENSE file that accompanied this code.
4737#
4738# This code is distributed in the hope that it will be useful, but WITHOUT
4739# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4740# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4741# version 2 for more details (a copy is included in the LICENSE file that
4742# accompanied this code).
4743#
4744# You should have received a copy of the GNU General Public License version
4745# 2 along with this work; if not, write to the Free Software Foundation,
4746# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4747#
4748# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4749# or visit www.oracle.com if you need additional information or have any
4750# questions.
4751#
4752
4753################################################################################
4754# Setup the standard C/C++ runtime libraries.
4755#
4756# Most importantly, determine if stdc++ should be linked statically or
4757# dynamically.
4758################################################################################
4759
4760
4761#
4762# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4763# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4764#
4765# This code is free software; you can redistribute it and/or modify it
4766# under the terms of the GNU General Public License version 2 only, as
4767# published by the Free Software Foundation.  Oracle designates this
4768# particular file as subject to the "Classpath" exception as provided
4769# by Oracle in the LICENSE file that accompanied this code.
4770#
4771# This code is distributed in the hope that it will be useful, but WITHOUT
4772# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4773# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4774# version 2 for more details (a copy is included in the LICENSE file that
4775# accompanied this code).
4776#
4777# You should have received a copy of the GNU General Public License version
4778# 2 along with this work; if not, write to the Free Software Foundation,
4779# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4780#
4781# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4782# or visit www.oracle.com if you need additional information or have any
4783# questions.
4784#
4785
4786################################################################################
4787# Setup X11 Windows system
4788################################################################################
4789
4790
4791
4792################################################################################
4793# Determine which libraries are needed for this configuration
4794################################################################################
4795
4796
4797################################################################################
4798# Parse library options, and setup needed libraries
4799################################################################################
4800
4801
4802################################################################################
4803# Setup llvm (Low-Level VM)
4804################################################################################
4805
4806
4807################################################################################
4808# Setup various libraries, typically small system libraries
4809################################################################################
4810
4811
4812################################################################################
4813# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4814# redistribute it in the test image.
4815################################################################################
4816
4817
4818
4819#
4820# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4821# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4822#
4823# This code is free software; you can redistribute it and/or modify it
4824# under the terms of the GNU General Public License version 2 only, as
4825# published by the Free Software Foundation.  Oracle designates this
4826# particular file as subject to the "Classpath" exception as provided
4827# by Oracle in the LICENSE file that accompanied this code.
4828#
4829# This code is distributed in the hope that it will be useful, but WITHOUT
4830# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4831# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4832# version 2 for more details (a copy is included in the LICENSE file that
4833# accompanied this code).
4834#
4835# You should have received a copy of the GNU General Public License version
4836# 2 along with this work; if not, write to the Free Software Foundation,
4837# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4838#
4839# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4840# or visit www.oracle.com if you need additional information or have any
4841# questions.
4842#
4843
4844# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4845# Converts autoconf style CPU name to OpenJDK style, into
4846# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4847
4848
4849# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4850# Converts autoconf style OS name to OpenJDK style, into
4851# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4852
4853
4854# Expects $host_os $host_cpu $build_os and $build_cpu
4855# and $with_target_bits to have been setup!
4856#
4857# Translate the standard triplet(quadruplet) definition
4858# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4859# OPENJDK_BUILD_OS, etc.
4860
4861
4862# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4863# accordingly. Must be done after setting up build and target system, but before
4864# doing anything else with these values.
4865
4866
4867# Setup the legacy variables, for controlling the old makefiles.
4868#
4869
4870
4871# $1 - Either TARGET or BUILD to setup the variables for.
4872
4873
4874
4875
4876
4877
4878#%%% Build and target systems %%%
4879
4880
4881
4882
4883# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4884# Add -mX to various FLAGS variables.
4885
4886
4887
4888
4889
4890
4891#
4892# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4893# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4894#
4895# This code is free software; you can redistribute it and/or modify it
4896# under the terms of the GNU General Public License version 2 only, as
4897# published by the Free Software Foundation.  Oracle designates this
4898# particular file as subject to the "Classpath" exception as provided
4899# by Oracle in the LICENSE file that accompanied this code.
4900#
4901# This code is distributed in the hope that it will be useful, but WITHOUT
4902# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4903# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4904# version 2 for more details (a copy is included in the LICENSE file that
4905# accompanied this code).
4906#
4907# You should have received a copy of the GNU General Public License version
4908# 2 along with this work; if not, write to the Free Software Foundation,
4909# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4910#
4911# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4912# or visit www.oracle.com if you need additional information or have any
4913# questions.
4914#
4915
4916
4917
4918
4919
4920
4921
4922################################################################################
4923# Define a mechanism for importing extra prebuilt modules
4924#
4925
4926
4927
4928#
4929# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4930# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4931#
4932# This code is free software; you can redistribute it and/or modify it
4933# under the terms of the GNU General Public License version 2 only, as
4934# published by the Free Software Foundation.  Oracle designates this
4935# particular file as subject to the "Classpath" exception as provided
4936# by Oracle in the LICENSE file that accompanied this code.
4937#
4938# This code is distributed in the hope that it will be useful, but WITHOUT
4939# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4940# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4941# version 2 for more details (a copy is included in the LICENSE file that
4942# accompanied this code).
4943#
4944# You should have received a copy of the GNU General Public License version
4945# 2 along with this work; if not, write to the Free Software Foundation,
4946# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4947#
4948# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4949# or visit www.oracle.com if you need additional information or have any
4950# questions.
4951#
4952
4953########################################################################
4954# This file is responsible for detecting, verifying and setting up the
4955# toolchain, i.e. the compiler, linker and related utilities. It will setup
4956# proper paths to the binaries, but it will not setup any flags.
4957#
4958# The binaries used is determined by the toolchain type, which is the family of
4959# compilers and related tools that are used.
4960########################################################################
4961
4962
4963# All valid toolchains, regardless of platform (used by help.m4)
4964VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4965
4966# These toolchains are valid on different platforms
4967VALID_TOOLCHAINS_linux="gcc clang"
4968VALID_TOOLCHAINS_solaris="solstudio"
4969VALID_TOOLCHAINS_macosx="gcc clang"
4970VALID_TOOLCHAINS_aix="xlc"
4971VALID_TOOLCHAINS_windows="microsoft"
4972
4973# Toolchain descriptions
4974TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4975TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4976TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4977TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4978TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4979
4980# Minimum supported versions, empty means unspecified
4981TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4982TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
4983TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4984TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4985TOOLCHAIN_MINIMUM_VERSION_xlc=""
4986
4987# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4988# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4989# $1 - optional variable prefix for compiler and version variables (BUILD_)
4990# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4991
4992
4993# Check if the configured compiler (C and C++) is of a specific version or
4994# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4995#
4996# Arguments:
4997#   VERSION:   The version string to check against the found version
4998#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4999#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5000#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5001
5002
5003
5004
5005# Setup a number of variables describing how native output files are
5006# named on this platform/toolchain.
5007
5008
5009# Determine which toolchain type to use, and make sure it is valid for this
5010# platform. Setup various information about the selected toolchain.
5011
5012
5013# Before we start detecting the toolchain executables, we might need some
5014# special setup, e.g. additional paths etc.
5015
5016
5017# Restore path, etc
5018
5019
5020# Check if a compiler is of the toolchain type we expect, and save the version
5021# information from it. If the compiler does not match the expected type,
5022# this function will abort using AC_MSG_ERROR. If it matches, the version will
5023# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5024# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5025#
5026# $1 = compiler to test (CC or CXX)
5027# $2 = human readable name of compiler (C or C++)
5028
5029
5030# Try to locate the given C or C++ compiler in the path, or otherwise.
5031#
5032# $1 = compiler to test (CC or CXX)
5033# $2 = human readable name of compiler (C or C++)
5034# $3 = compiler name to search for
5035
5036
5037# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5038# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5039# archiver (AR). Verify that the compilers are correct according to the
5040# toolchain type.
5041
5042
5043# Setup additional tools that is considered a part of the toolchain, but not the
5044# core part. Many of these are highly platform-specific and do not exist,
5045# and/or are not needed on all platforms.
5046
5047
5048# Setup the build tools (i.e, the compiler and linker used to build programs
5049# that should be run on the build platform, not the target platform, as a build
5050# helper). Since the non-cross-compile case uses the normal, target compilers
5051# for this, we can only do this after these have been setup.
5052
5053
5054# Do some additional checks on the detected tools.
5055
5056
5057# Setup the JTReg Regression Test Harness.
5058
5059
5060# Setup the JIB dependency resolver
5061
5062
5063#
5064# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5065# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5066#
5067# This code is free software; you can redistribute it and/or modify it
5068# under the terms of the GNU General Public License version 2 only, as
5069# published by the Free Software Foundation.  Oracle designates this
5070# particular file as subject to the "Classpath" exception as provided
5071# by Oracle in the LICENSE file that accompanied this code.
5072#
5073# This code is distributed in the hope that it will be useful, but WITHOUT
5074# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5075# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5076# version 2 for more details (a copy is included in the LICENSE file that
5077# accompanied this code).
5078#
5079# You should have received a copy of the GNU General Public License version
5080# 2 along with this work; if not, write to the Free Software Foundation,
5081# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5082#
5083# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5084# or visit www.oracle.com if you need additional information or have any
5085# questions.
5086#
5087
5088################################################################################
5089# The order of these defines the priority by which we try to find them.
5090VALID_VS_VERSIONS="2013 2012 2010"
5091
5092VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5093VS_VERSION_INTERNAL_2010=100
5094VS_MSVCR_2010=msvcr100.dll
5095# We don't use msvcp on Visual Studio 2010
5096#VS_MSVCP_2010=msvcp100.dll
5097VS_ENVVAR_2010="VS100COMNTOOLS"
5098VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5099VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5100VS_VS_PLATFORM_NAME_2010="v100"
5101VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5102
5103VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5104VS_VERSION_INTERNAL_2012=110
5105VS_MSVCR_2012=msvcr110.dll
5106VS_MSVCP_2012=msvcp110.dll
5107VS_ENVVAR_2012="VS110COMNTOOLS"
5108VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5109VS_SDK_INSTALLDIR_2012=
5110VS_VS_PLATFORM_NAME_2012="v110"
5111VS_SDK_PLATFORM_NAME_2012=
5112
5113VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5114VS_VERSION_INTERNAL_2013=120
5115VS_MSVCR_2013=msvcr120.dll
5116VS_MSVCP_2013=msvcp120.dll
5117VS_ENVVAR_2013="VS120COMNTOOLS"
5118VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5119VS_SDK_INSTALLDIR_2013=
5120VS_VS_PLATFORM_NAME_2013="v120"
5121VS_SDK_PLATFORM_NAME_2013=
5122
5123################################################################################
5124
5125
5126
5127################################################################################
5128
5129
5130
5131################################################################################
5132# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5133# build environment and assigns it to VS_ENV_CMD
5134
5135
5136################################################################################
5137
5138
5139
5140################################################################################
5141# Check if the VS env variables were setup prior to running configure.
5142# If not, then find vcvarsall.bat and run it automatically, and integrate
5143# the set env variables into the spec file.
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158# This line needs to be here, verbatim, after all includes and the dummy hook
5159# definitions. It is replaced with custom functionality when building
5160# custom sources.
5161#CUSTOM_AUTOCONF_INCLUDE
5162
5163# Do not change or remove the following line, it is needed for consistency checks:
5164DATE_WHEN_GENERATED=1504441177
5165
5166###############################################################################
5167#
5168# Initialization / Boot-strapping
5169#
5170# The bootstrapping process needs to solve the "chicken or the egg" problem,
5171# thus it jumps back and forth, each time gaining something needed later on.
5172#
5173###############################################################################
5174
5175# If we are requested to print additional help, do that and then exit.
5176# This must be the very first call.
5177
5178  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5179
5180    # Print available toolchains
5181    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5182    $PRINTF "Which are valid to use depends on the build platform.\n"
5183    for toolchain in $VALID_TOOLCHAINS_all; do
5184      # Use indirect variable referencing
5185      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5186      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5187      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5188    done
5189    $PRINTF "\n"
5190
5191    # Print available jvm features
5192    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5193    $PRINTF "Which are valid to use depends on the target platform.\n  "
5194    $PRINTF "%s " $VALID_JVM_FEATURES
5195    $PRINTF "\n"
5196
5197    # And now exit directly
5198    exit 0
5199  fi
5200
5201
5202# Basic initialization that must happen first of all in the normal process.
5203
5204  # Save the original command line. This is passed to us by the wrapper configure script.
5205
5206  # Save the path variable before it gets changed
5207  ORIGINAL_PATH="$PATH"
5208
5209  DATE_WHEN_CONFIGURED=`LANG=C date`
5210
5211  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5212$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5213  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5214$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5215
5216
5217  # Start with tools that do not need have cross compilation support
5218  # and can be expected to be found in the default PATH. These tools are
5219  # used by configure.
5220
5221  # First are all the simple required tools.
5222
5223
5224
5225  # Publish this variable in the help.
5226
5227
5228  if [ -z "${BASENAME+x}" ]; then
5229    # The variable is not set by user, try to locate tool using the code snippet
5230    for ac_prog in basename
5231do
5232  # Extract the first word of "$ac_prog", so it can be a program name with args.
5233set dummy $ac_prog; ac_word=$2
5234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5235$as_echo_n "checking for $ac_word... " >&6; }
5236if ${ac_cv_path_BASENAME+:} false; then :
5237  $as_echo_n "(cached) " >&6
5238else
5239  case $BASENAME in
5240  [\\/]* | ?:[\\/]*)
5241  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5242  ;;
5243  *)
5244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5245for as_dir in $PATH
5246do
5247  IFS=$as_save_IFS
5248  test -z "$as_dir" && as_dir=.
5249    for ac_exec_ext in '' $ac_executable_extensions; do
5250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5251    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5253    break 2
5254  fi
5255done
5256  done
5257IFS=$as_save_IFS
5258
5259  ;;
5260esac
5261fi
5262BASENAME=$ac_cv_path_BASENAME
5263if test -n "$BASENAME"; then
5264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5265$as_echo "$BASENAME" >&6; }
5266else
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5268$as_echo "no" >&6; }
5269fi
5270
5271
5272  test -n "$BASENAME" && break
5273done
5274
5275  else
5276    # The variable is set, but is it from the command line or the environment?
5277
5278    # Try to remove the string !BASENAME! from our list.
5279    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5280    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5281      # If it failed, the variable was not from the command line. Ignore it,
5282      # but warn the user (except for BASH, which is always set by the calling BASH).
5283      if test "xBASENAME" != xBASH; then
5284        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5285$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5286      fi
5287      # Try to locate tool using the code snippet
5288      for ac_prog in basename
5289do
5290  # Extract the first word of "$ac_prog", so it can be a program name with args.
5291set dummy $ac_prog; ac_word=$2
5292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5293$as_echo_n "checking for $ac_word... " >&6; }
5294if ${ac_cv_path_BASENAME+:} false; then :
5295  $as_echo_n "(cached) " >&6
5296else
5297  case $BASENAME in
5298  [\\/]* | ?:[\\/]*)
5299  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5300  ;;
5301  *)
5302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5303for as_dir in $PATH
5304do
5305  IFS=$as_save_IFS
5306  test -z "$as_dir" && as_dir=.
5307    for ac_exec_ext in '' $ac_executable_extensions; do
5308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5309    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5311    break 2
5312  fi
5313done
5314  done
5315IFS=$as_save_IFS
5316
5317  ;;
5318esac
5319fi
5320BASENAME=$ac_cv_path_BASENAME
5321if test -n "$BASENAME"; then
5322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5323$as_echo "$BASENAME" >&6; }
5324else
5325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326$as_echo "no" >&6; }
5327fi
5328
5329
5330  test -n "$BASENAME" && break
5331done
5332
5333    else
5334      # If it succeeded, then it was overridden by the user. We will use it
5335      # for the tool.
5336
5337      # First remove it from the list of overridden variables, so we can test
5338      # for unknown variables in the end.
5339      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5340
5341      # Check if we try to supply an empty value
5342      if test "x$BASENAME" = x; then
5343        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5344$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5346$as_echo_n "checking for BASENAME... " >&6; }
5347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5348$as_echo "disabled" >&6; }
5349      else
5350        # Check if the provided tool contains a complete path.
5351        tool_specified="$BASENAME"
5352        tool_basename="${tool_specified##*/}"
5353        if test "x$tool_basename" = "x$tool_specified"; then
5354          # A command without a complete path is provided, search $PATH.
5355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5356$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5357          # Extract the first word of "$tool_basename", so it can be a program name with args.
5358set dummy $tool_basename; ac_word=$2
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5360$as_echo_n "checking for $ac_word... " >&6; }
5361if ${ac_cv_path_BASENAME+:} false; then :
5362  $as_echo_n "(cached) " >&6
5363else
5364  case $BASENAME in
5365  [\\/]* | ?:[\\/]*)
5366  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5367  ;;
5368  *)
5369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5370for as_dir in $PATH
5371do
5372  IFS=$as_save_IFS
5373  test -z "$as_dir" && as_dir=.
5374    for ac_exec_ext in '' $ac_executable_extensions; do
5375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5376    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5378    break 2
5379  fi
5380done
5381  done
5382IFS=$as_save_IFS
5383
5384  ;;
5385esac
5386fi
5387BASENAME=$ac_cv_path_BASENAME
5388if test -n "$BASENAME"; then
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5390$as_echo "$BASENAME" >&6; }
5391else
5392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5393$as_echo "no" >&6; }
5394fi
5395
5396
5397          if test "x$BASENAME" = x; then
5398            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5399          fi
5400        else
5401          # Otherwise we believe it is a complete path. Use it as it is.
5402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5403$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5404          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5405$as_echo_n "checking for BASENAME... " >&6; }
5406          if test ! -x "$tool_specified"; then
5407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5408$as_echo "not found" >&6; }
5409            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5410          fi
5411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5412$as_echo "$tool_specified" >&6; }
5413        fi
5414      fi
5415    fi
5416
5417  fi
5418
5419
5420
5421  if test "x$BASENAME" = x; then
5422    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5423  fi
5424
5425
5426
5427
5428
5429  # Publish this variable in the help.
5430
5431
5432  if [ -z "${BASH+x}" ]; then
5433    # The variable is not set by user, try to locate tool using the code snippet
5434    for ac_prog in bash
5435do
5436  # Extract the first word of "$ac_prog", so it can be a program name with args.
5437set dummy $ac_prog; ac_word=$2
5438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5439$as_echo_n "checking for $ac_word... " >&6; }
5440if ${ac_cv_path_BASH+:} false; then :
5441  $as_echo_n "(cached) " >&6
5442else
5443  case $BASH in
5444  [\\/]* | ?:[\\/]*)
5445  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5446  ;;
5447  *)
5448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5449for as_dir in $PATH
5450do
5451  IFS=$as_save_IFS
5452  test -z "$as_dir" && as_dir=.
5453    for ac_exec_ext in '' $ac_executable_extensions; do
5454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5455    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5457    break 2
5458  fi
5459done
5460  done
5461IFS=$as_save_IFS
5462
5463  ;;
5464esac
5465fi
5466BASH=$ac_cv_path_BASH
5467if test -n "$BASH"; then
5468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5469$as_echo "$BASH" >&6; }
5470else
5471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5472$as_echo "no" >&6; }
5473fi
5474
5475
5476  test -n "$BASH" && break
5477done
5478
5479  else
5480    # The variable is set, but is it from the command line or the environment?
5481
5482    # Try to remove the string !BASH! from our list.
5483    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5484    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5485      # If it failed, the variable was not from the command line. Ignore it,
5486      # but warn the user (except for BASH, which is always set by the calling BASH).
5487      if test "xBASH" != xBASH; then
5488        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5489$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5490      fi
5491      # Try to locate tool using the code snippet
5492      for ac_prog in bash
5493do
5494  # Extract the first word of "$ac_prog", so it can be a program name with args.
5495set dummy $ac_prog; ac_word=$2
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497$as_echo_n "checking for $ac_word... " >&6; }
5498if ${ac_cv_path_BASH+:} false; then :
5499  $as_echo_n "(cached) " >&6
5500else
5501  case $BASH in
5502  [\\/]* | ?:[\\/]*)
5503  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5504  ;;
5505  *)
5506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5507for as_dir in $PATH
5508do
5509  IFS=$as_save_IFS
5510  test -z "$as_dir" && as_dir=.
5511    for ac_exec_ext in '' $ac_executable_extensions; do
5512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5513    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5515    break 2
5516  fi
5517done
5518  done
5519IFS=$as_save_IFS
5520
5521  ;;
5522esac
5523fi
5524BASH=$ac_cv_path_BASH
5525if test -n "$BASH"; then
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5527$as_echo "$BASH" >&6; }
5528else
5529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530$as_echo "no" >&6; }
5531fi
5532
5533
5534  test -n "$BASH" && break
5535done
5536
5537    else
5538      # If it succeeded, then it was overridden by the user. We will use it
5539      # for the tool.
5540
5541      # First remove it from the list of overridden variables, so we can test
5542      # for unknown variables in the end.
5543      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5544
5545      # Check if we try to supply an empty value
5546      if test "x$BASH" = x; then
5547        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5548$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5549        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5550$as_echo_n "checking for BASH... " >&6; }
5551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5552$as_echo "disabled" >&6; }
5553      else
5554        # Check if the provided tool contains a complete path.
5555        tool_specified="$BASH"
5556        tool_basename="${tool_specified##*/}"
5557        if test "x$tool_basename" = "x$tool_specified"; then
5558          # A command without a complete path is provided, search $PATH.
5559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5560$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5561          # Extract the first word of "$tool_basename", so it can be a program name with args.
5562set dummy $tool_basename; ac_word=$2
5563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5564$as_echo_n "checking for $ac_word... " >&6; }
5565if ${ac_cv_path_BASH+:} false; then :
5566  $as_echo_n "(cached) " >&6
5567else
5568  case $BASH in
5569  [\\/]* | ?:[\\/]*)
5570  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5571  ;;
5572  *)
5573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5574for as_dir in $PATH
5575do
5576  IFS=$as_save_IFS
5577  test -z "$as_dir" && as_dir=.
5578    for ac_exec_ext in '' $ac_executable_extensions; do
5579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5580    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5582    break 2
5583  fi
5584done
5585  done
5586IFS=$as_save_IFS
5587
5588  ;;
5589esac
5590fi
5591BASH=$ac_cv_path_BASH
5592if test -n "$BASH"; then
5593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5594$as_echo "$BASH" >&6; }
5595else
5596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5597$as_echo "no" >&6; }
5598fi
5599
5600
5601          if test "x$BASH" = x; then
5602            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5603          fi
5604        else
5605          # Otherwise we believe it is a complete path. Use it as it is.
5606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5607$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5608          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5609$as_echo_n "checking for BASH... " >&6; }
5610          if test ! -x "$tool_specified"; then
5611            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5612$as_echo "not found" >&6; }
5613            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5614          fi
5615          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5616$as_echo "$tool_specified" >&6; }
5617        fi
5618      fi
5619    fi
5620
5621  fi
5622
5623
5624
5625  if test "x$BASH" = x; then
5626    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5627  fi
5628
5629
5630
5631
5632
5633  # Publish this variable in the help.
5634
5635
5636  if [ -z "${CAT+x}" ]; then
5637    # The variable is not set by user, try to locate tool using the code snippet
5638    for ac_prog in cat
5639do
5640  # Extract the first word of "$ac_prog", so it can be a program name with args.
5641set dummy $ac_prog; ac_word=$2
5642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5643$as_echo_n "checking for $ac_word... " >&6; }
5644if ${ac_cv_path_CAT+:} false; then :
5645  $as_echo_n "(cached) " >&6
5646else
5647  case $CAT in
5648  [\\/]* | ?:[\\/]*)
5649  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5650  ;;
5651  *)
5652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653for as_dir in $PATH
5654do
5655  IFS=$as_save_IFS
5656  test -z "$as_dir" && as_dir=.
5657    for ac_exec_ext in '' $ac_executable_extensions; do
5658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5659    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5661    break 2
5662  fi
5663done
5664  done
5665IFS=$as_save_IFS
5666
5667  ;;
5668esac
5669fi
5670CAT=$ac_cv_path_CAT
5671if test -n "$CAT"; then
5672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5673$as_echo "$CAT" >&6; }
5674else
5675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
5677fi
5678
5679
5680  test -n "$CAT" && break
5681done
5682
5683  else
5684    # The variable is set, but is it from the command line or the environment?
5685
5686    # Try to remove the string !CAT! from our list.
5687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5689      # If it failed, the variable was not from the command line. Ignore it,
5690      # but warn the user (except for BASH, which is always set by the calling BASH).
5691      if test "xCAT" != xBASH; then
5692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5693$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5694      fi
5695      # Try to locate tool using the code snippet
5696      for ac_prog in cat
5697do
5698  # Extract the first word of "$ac_prog", so it can be a program name with args.
5699set dummy $ac_prog; ac_word=$2
5700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701$as_echo_n "checking for $ac_word... " >&6; }
5702if ${ac_cv_path_CAT+:} false; then :
5703  $as_echo_n "(cached) " >&6
5704else
5705  case $CAT in
5706  [\\/]* | ?:[\\/]*)
5707  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5708  ;;
5709  *)
5710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713  IFS=$as_save_IFS
5714  test -z "$as_dir" && as_dir=.
5715    for ac_exec_ext in '' $ac_executable_extensions; do
5716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5717    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719    break 2
5720  fi
5721done
5722  done
5723IFS=$as_save_IFS
5724
5725  ;;
5726esac
5727fi
5728CAT=$ac_cv_path_CAT
5729if test -n "$CAT"; then
5730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5731$as_echo "$CAT" >&6; }
5732else
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
5735fi
5736
5737
5738  test -n "$CAT" && break
5739done
5740
5741    else
5742      # If it succeeded, then it was overridden by the user. We will use it
5743      # for the tool.
5744
5745      # First remove it from the list of overridden variables, so we can test
5746      # for unknown variables in the end.
5747      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5748
5749      # Check if we try to supply an empty value
5750      if test "x$CAT" = x; then
5751        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5752$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5754$as_echo_n "checking for CAT... " >&6; }
5755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5756$as_echo "disabled" >&6; }
5757      else
5758        # Check if the provided tool contains a complete path.
5759        tool_specified="$CAT"
5760        tool_basename="${tool_specified##*/}"
5761        if test "x$tool_basename" = "x$tool_specified"; then
5762          # A command without a complete path is provided, search $PATH.
5763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5764$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5765          # Extract the first word of "$tool_basename", so it can be a program name with args.
5766set dummy $tool_basename; ac_word=$2
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5768$as_echo_n "checking for $ac_word... " >&6; }
5769if ${ac_cv_path_CAT+:} false; then :
5770  $as_echo_n "(cached) " >&6
5771else
5772  case $CAT in
5773  [\\/]* | ?:[\\/]*)
5774  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5775  ;;
5776  *)
5777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780  IFS=$as_save_IFS
5781  test -z "$as_dir" && as_dir=.
5782    for ac_exec_ext in '' $ac_executable_extensions; do
5783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5784    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5786    break 2
5787  fi
5788done
5789  done
5790IFS=$as_save_IFS
5791
5792  ;;
5793esac
5794fi
5795CAT=$ac_cv_path_CAT
5796if test -n "$CAT"; then
5797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5798$as_echo "$CAT" >&6; }
5799else
5800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801$as_echo "no" >&6; }
5802fi
5803
5804
5805          if test "x$CAT" = x; then
5806            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5807          fi
5808        else
5809          # Otherwise we believe it is a complete path. Use it as it is.
5810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5811$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5812          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5813$as_echo_n "checking for CAT... " >&6; }
5814          if test ! -x "$tool_specified"; then
5815            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5816$as_echo "not found" >&6; }
5817            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5818          fi
5819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5820$as_echo "$tool_specified" >&6; }
5821        fi
5822      fi
5823    fi
5824
5825  fi
5826
5827
5828
5829  if test "x$CAT" = x; then
5830    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5831  fi
5832
5833
5834
5835
5836
5837  # Publish this variable in the help.
5838
5839
5840  if [ -z "${CHMOD+x}" ]; then
5841    # The variable is not set by user, try to locate tool using the code snippet
5842    for ac_prog in chmod
5843do
5844  # Extract the first word of "$ac_prog", so it can be a program name with args.
5845set dummy $ac_prog; ac_word=$2
5846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5847$as_echo_n "checking for $ac_word... " >&6; }
5848if ${ac_cv_path_CHMOD+:} false; then :
5849  $as_echo_n "(cached) " >&6
5850else
5851  case $CHMOD in
5852  [\\/]* | ?:[\\/]*)
5853  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5854  ;;
5855  *)
5856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857for as_dir in $PATH
5858do
5859  IFS=$as_save_IFS
5860  test -z "$as_dir" && as_dir=.
5861    for ac_exec_ext in '' $ac_executable_extensions; do
5862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5863    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5865    break 2
5866  fi
5867done
5868  done
5869IFS=$as_save_IFS
5870
5871  ;;
5872esac
5873fi
5874CHMOD=$ac_cv_path_CHMOD
5875if test -n "$CHMOD"; then
5876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5877$as_echo "$CHMOD" >&6; }
5878else
5879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5880$as_echo "no" >&6; }
5881fi
5882
5883
5884  test -n "$CHMOD" && break
5885done
5886
5887  else
5888    # The variable is set, but is it from the command line or the environment?
5889
5890    # Try to remove the string !CHMOD! from our list.
5891    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5892    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5893      # If it failed, the variable was not from the command line. Ignore it,
5894      # but warn the user (except for BASH, which is always set by the calling BASH).
5895      if test "xCHMOD" != xBASH; then
5896        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5897$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5898      fi
5899      # Try to locate tool using the code snippet
5900      for ac_prog in chmod
5901do
5902  # Extract the first word of "$ac_prog", so it can be a program name with args.
5903set dummy $ac_prog; ac_word=$2
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5905$as_echo_n "checking for $ac_word... " >&6; }
5906if ${ac_cv_path_CHMOD+:} false; then :
5907  $as_echo_n "(cached) " >&6
5908else
5909  case $CHMOD in
5910  [\\/]* | ?:[\\/]*)
5911  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5912  ;;
5913  *)
5914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5915for as_dir in $PATH
5916do
5917  IFS=$as_save_IFS
5918  test -z "$as_dir" && as_dir=.
5919    for ac_exec_ext in '' $ac_executable_extensions; do
5920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5921    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5923    break 2
5924  fi
5925done
5926  done
5927IFS=$as_save_IFS
5928
5929  ;;
5930esac
5931fi
5932CHMOD=$ac_cv_path_CHMOD
5933if test -n "$CHMOD"; then
5934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5935$as_echo "$CHMOD" >&6; }
5936else
5937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5938$as_echo "no" >&6; }
5939fi
5940
5941
5942  test -n "$CHMOD" && break
5943done
5944
5945    else
5946      # If it succeeded, then it was overridden by the user. We will use it
5947      # for the tool.
5948
5949      # First remove it from the list of overridden variables, so we can test
5950      # for unknown variables in the end.
5951      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5952
5953      # Check if we try to supply an empty value
5954      if test "x$CHMOD" = x; then
5955        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5956$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5957        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5958$as_echo_n "checking for CHMOD... " >&6; }
5959        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5960$as_echo "disabled" >&6; }
5961      else
5962        # Check if the provided tool contains a complete path.
5963        tool_specified="$CHMOD"
5964        tool_basename="${tool_specified##*/}"
5965        if test "x$tool_basename" = "x$tool_specified"; then
5966          # A command without a complete path is provided, search $PATH.
5967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5968$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5969          # Extract the first word of "$tool_basename", so it can be a program name with args.
5970set dummy $tool_basename; ac_word=$2
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
5973if ${ac_cv_path_CHMOD+:} false; then :
5974  $as_echo_n "(cached) " >&6
5975else
5976  case $CHMOD in
5977  [\\/]* | ?:[\\/]*)
5978  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5979  ;;
5980  *)
5981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984  IFS=$as_save_IFS
5985  test -z "$as_dir" && as_dir=.
5986    for ac_exec_ext in '' $ac_executable_extensions; do
5987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5988    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990    break 2
5991  fi
5992done
5993  done
5994IFS=$as_save_IFS
5995
5996  ;;
5997esac
5998fi
5999CHMOD=$ac_cv_path_CHMOD
6000if test -n "$CHMOD"; then
6001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6002$as_echo "$CHMOD" >&6; }
6003else
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005$as_echo "no" >&6; }
6006fi
6007
6008
6009          if test "x$CHMOD" = x; then
6010            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6011          fi
6012        else
6013          # Otherwise we believe it is a complete path. Use it as it is.
6014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6015$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6016          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6017$as_echo_n "checking for CHMOD... " >&6; }
6018          if test ! -x "$tool_specified"; then
6019            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6020$as_echo "not found" >&6; }
6021            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6022          fi
6023          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6024$as_echo "$tool_specified" >&6; }
6025        fi
6026      fi
6027    fi
6028
6029  fi
6030
6031
6032
6033  if test "x$CHMOD" = x; then
6034    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6035  fi
6036
6037
6038
6039
6040
6041  # Publish this variable in the help.
6042
6043
6044  if [ -z "${CMP+x}" ]; then
6045    # The variable is not set by user, try to locate tool using the code snippet
6046    for ac_prog in cmp
6047do
6048  # Extract the first word of "$ac_prog", so it can be a program name with args.
6049set dummy $ac_prog; ac_word=$2
6050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6051$as_echo_n "checking for $ac_word... " >&6; }
6052if ${ac_cv_path_CMP+:} false; then :
6053  $as_echo_n "(cached) " >&6
6054else
6055  case $CMP in
6056  [\\/]* | ?:[\\/]*)
6057  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6058  ;;
6059  *)
6060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061for as_dir in $PATH
6062do
6063  IFS=$as_save_IFS
6064  test -z "$as_dir" && as_dir=.
6065    for ac_exec_ext in '' $ac_executable_extensions; do
6066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6067    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6069    break 2
6070  fi
6071done
6072  done
6073IFS=$as_save_IFS
6074
6075  ;;
6076esac
6077fi
6078CMP=$ac_cv_path_CMP
6079if test -n "$CMP"; then
6080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6081$as_echo "$CMP" >&6; }
6082else
6083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }
6085fi
6086
6087
6088  test -n "$CMP" && break
6089done
6090
6091  else
6092    # The variable is set, but is it from the command line or the environment?
6093
6094    # Try to remove the string !CMP! from our list.
6095    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6096    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6097      # If it failed, the variable was not from the command line. Ignore it,
6098      # but warn the user (except for BASH, which is always set by the calling BASH).
6099      if test "xCMP" != xBASH; then
6100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6101$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6102      fi
6103      # Try to locate tool using the code snippet
6104      for ac_prog in cmp
6105do
6106  # Extract the first word of "$ac_prog", so it can be a program name with args.
6107set dummy $ac_prog; ac_word=$2
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6109$as_echo_n "checking for $ac_word... " >&6; }
6110if ${ac_cv_path_CMP+:} false; then :
6111  $as_echo_n "(cached) " >&6
6112else
6113  case $CMP in
6114  [\\/]* | ?:[\\/]*)
6115  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6116  ;;
6117  *)
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_exec_ext in '' $ac_executable_extensions; do
6124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6125    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127    break 2
6128  fi
6129done
6130  done
6131IFS=$as_save_IFS
6132
6133  ;;
6134esac
6135fi
6136CMP=$ac_cv_path_CMP
6137if test -n "$CMP"; then
6138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6139$as_echo "$CMP" >&6; }
6140else
6141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6142$as_echo "no" >&6; }
6143fi
6144
6145
6146  test -n "$CMP" && break
6147done
6148
6149    else
6150      # If it succeeded, then it was overridden by the user. We will use it
6151      # for the tool.
6152
6153      # First remove it from the list of overridden variables, so we can test
6154      # for unknown variables in the end.
6155      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6156
6157      # Check if we try to supply an empty value
6158      if test "x$CMP" = x; then
6159        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6160$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6162$as_echo_n "checking for CMP... " >&6; }
6163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6164$as_echo "disabled" >&6; }
6165      else
6166        # Check if the provided tool contains a complete path.
6167        tool_specified="$CMP"
6168        tool_basename="${tool_specified##*/}"
6169        if test "x$tool_basename" = "x$tool_specified"; then
6170          # A command without a complete path is provided, search $PATH.
6171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6172$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6173          # Extract the first word of "$tool_basename", so it can be a program name with args.
6174set dummy $tool_basename; ac_word=$2
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6176$as_echo_n "checking for $ac_word... " >&6; }
6177if ${ac_cv_path_CMP+:} false; then :
6178  $as_echo_n "(cached) " >&6
6179else
6180  case $CMP in
6181  [\\/]* | ?:[\\/]*)
6182  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6183  ;;
6184  *)
6185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6186for as_dir in $PATH
6187do
6188  IFS=$as_save_IFS
6189  test -z "$as_dir" && as_dir=.
6190    for ac_exec_ext in '' $ac_executable_extensions; do
6191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6192    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6194    break 2
6195  fi
6196done
6197  done
6198IFS=$as_save_IFS
6199
6200  ;;
6201esac
6202fi
6203CMP=$ac_cv_path_CMP
6204if test -n "$CMP"; then
6205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6206$as_echo "$CMP" >&6; }
6207else
6208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6209$as_echo "no" >&6; }
6210fi
6211
6212
6213          if test "x$CMP" = x; then
6214            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6215          fi
6216        else
6217          # Otherwise we believe it is a complete path. Use it as it is.
6218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6219$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6220          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6221$as_echo_n "checking for CMP... " >&6; }
6222          if test ! -x "$tool_specified"; then
6223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6224$as_echo "not found" >&6; }
6225            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6226          fi
6227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6228$as_echo "$tool_specified" >&6; }
6229        fi
6230      fi
6231    fi
6232
6233  fi
6234
6235
6236
6237  if test "x$CMP" = x; then
6238    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6239  fi
6240
6241
6242
6243
6244
6245  # Publish this variable in the help.
6246
6247
6248  if [ -z "${COMM+x}" ]; then
6249    # The variable is not set by user, try to locate tool using the code snippet
6250    for ac_prog in comm
6251do
6252  # Extract the first word of "$ac_prog", so it can be a program name with args.
6253set dummy $ac_prog; ac_word=$2
6254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6255$as_echo_n "checking for $ac_word... " >&6; }
6256if ${ac_cv_path_COMM+:} false; then :
6257  $as_echo_n "(cached) " >&6
6258else
6259  case $COMM in
6260  [\\/]* | ?:[\\/]*)
6261  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6262  ;;
6263  *)
6264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265for as_dir in $PATH
6266do
6267  IFS=$as_save_IFS
6268  test -z "$as_dir" && as_dir=.
6269    for ac_exec_ext in '' $ac_executable_extensions; do
6270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6271    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6273    break 2
6274  fi
6275done
6276  done
6277IFS=$as_save_IFS
6278
6279  ;;
6280esac
6281fi
6282COMM=$ac_cv_path_COMM
6283if test -n "$COMM"; then
6284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6285$as_echo "$COMM" >&6; }
6286else
6287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288$as_echo "no" >&6; }
6289fi
6290
6291
6292  test -n "$COMM" && break
6293done
6294
6295  else
6296    # The variable is set, but is it from the command line or the environment?
6297
6298    # Try to remove the string !COMM! from our list.
6299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6301      # If it failed, the variable was not from the command line. Ignore it,
6302      # but warn the user (except for BASH, which is always set by the calling BASH).
6303      if test "xCOMM" != xBASH; then
6304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6305$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6306      fi
6307      # Try to locate tool using the code snippet
6308      for ac_prog in comm
6309do
6310  # Extract the first word of "$ac_prog", so it can be a program name with args.
6311set dummy $ac_prog; ac_word=$2
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313$as_echo_n "checking for $ac_word... " >&6; }
6314if ${ac_cv_path_COMM+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317  case $COMM in
6318  [\\/]* | ?:[\\/]*)
6319  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6320  ;;
6321  *)
6322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325  IFS=$as_save_IFS
6326  test -z "$as_dir" && as_dir=.
6327    for ac_exec_ext in '' $ac_executable_extensions; do
6328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6329    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6331    break 2
6332  fi
6333done
6334  done
6335IFS=$as_save_IFS
6336
6337  ;;
6338esac
6339fi
6340COMM=$ac_cv_path_COMM
6341if test -n "$COMM"; then
6342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6343$as_echo "$COMM" >&6; }
6344else
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346$as_echo "no" >&6; }
6347fi
6348
6349
6350  test -n "$COMM" && break
6351done
6352
6353    else
6354      # If it succeeded, then it was overridden by the user. We will use it
6355      # for the tool.
6356
6357      # First remove it from the list of overridden variables, so we can test
6358      # for unknown variables in the end.
6359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6360
6361      # Check if we try to supply an empty value
6362      if test "x$COMM" = x; then
6363        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6364$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6366$as_echo_n "checking for COMM... " >&6; }
6367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6368$as_echo "disabled" >&6; }
6369      else
6370        # Check if the provided tool contains a complete path.
6371        tool_specified="$COMM"
6372        tool_basename="${tool_specified##*/}"
6373        if test "x$tool_basename" = "x$tool_specified"; then
6374          # A command without a complete path is provided, search $PATH.
6375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6376$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6377          # Extract the first word of "$tool_basename", so it can be a program name with args.
6378set dummy $tool_basename; ac_word=$2
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380$as_echo_n "checking for $ac_word... " >&6; }
6381if ${ac_cv_path_COMM+:} false; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  case $COMM in
6385  [\\/]* | ?:[\\/]*)
6386  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6387  ;;
6388  *)
6389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390for as_dir in $PATH
6391do
6392  IFS=$as_save_IFS
6393  test -z "$as_dir" && as_dir=.
6394    for ac_exec_ext in '' $ac_executable_extensions; do
6395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6396    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398    break 2
6399  fi
6400done
6401  done
6402IFS=$as_save_IFS
6403
6404  ;;
6405esac
6406fi
6407COMM=$ac_cv_path_COMM
6408if test -n "$COMM"; then
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6410$as_echo "$COMM" >&6; }
6411else
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413$as_echo "no" >&6; }
6414fi
6415
6416
6417          if test "x$COMM" = x; then
6418            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6419          fi
6420        else
6421          # Otherwise we believe it is a complete path. Use it as it is.
6422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6423$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6424          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6425$as_echo_n "checking for COMM... " >&6; }
6426          if test ! -x "$tool_specified"; then
6427            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6428$as_echo "not found" >&6; }
6429            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6430          fi
6431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6432$as_echo "$tool_specified" >&6; }
6433        fi
6434      fi
6435    fi
6436
6437  fi
6438
6439
6440
6441  if test "x$COMM" = x; then
6442    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6443  fi
6444
6445
6446
6447
6448
6449  # Publish this variable in the help.
6450
6451
6452  if [ -z "${CP+x}" ]; then
6453    # The variable is not set by user, try to locate tool using the code snippet
6454    for ac_prog in cp
6455do
6456  # Extract the first word of "$ac_prog", so it can be a program name with args.
6457set dummy $ac_prog; ac_word=$2
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6459$as_echo_n "checking for $ac_word... " >&6; }
6460if ${ac_cv_path_CP+:} false; then :
6461  $as_echo_n "(cached) " >&6
6462else
6463  case $CP in
6464  [\\/]* | ?:[\\/]*)
6465  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6466  ;;
6467  *)
6468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6469for as_dir in $PATH
6470do
6471  IFS=$as_save_IFS
6472  test -z "$as_dir" && as_dir=.
6473    for ac_exec_ext in '' $ac_executable_extensions; do
6474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6475    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6477    break 2
6478  fi
6479done
6480  done
6481IFS=$as_save_IFS
6482
6483  ;;
6484esac
6485fi
6486CP=$ac_cv_path_CP
6487if test -n "$CP"; then
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6489$as_echo "$CP" >&6; }
6490else
6491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6492$as_echo "no" >&6; }
6493fi
6494
6495
6496  test -n "$CP" && break
6497done
6498
6499  else
6500    # The variable is set, but is it from the command line or the environment?
6501
6502    # Try to remove the string !CP! from our list.
6503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6505      # If it failed, the variable was not from the command line. Ignore it,
6506      # but warn the user (except for BASH, which is always set by the calling BASH).
6507      if test "xCP" != xBASH; then
6508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6509$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6510      fi
6511      # Try to locate tool using the code snippet
6512      for ac_prog in cp
6513do
6514  # Extract the first word of "$ac_prog", so it can be a program name with args.
6515set dummy $ac_prog; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_CP+:} false; then :
6519  $as_echo_n "(cached) " >&6
6520else
6521  case $CP in
6522  [\\/]* | ?:[\\/]*)
6523  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6524  ;;
6525  *)
6526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in $PATH
6528do
6529  IFS=$as_save_IFS
6530  test -z "$as_dir" && as_dir=.
6531    for ac_exec_ext in '' $ac_executable_extensions; do
6532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535    break 2
6536  fi
6537done
6538  done
6539IFS=$as_save_IFS
6540
6541  ;;
6542esac
6543fi
6544CP=$ac_cv_path_CP
6545if test -n "$CP"; then
6546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6547$as_echo "$CP" >&6; }
6548else
6549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
6554  test -n "$CP" && break
6555done
6556
6557    else
6558      # If it succeeded, then it was overridden by the user. We will use it
6559      # for the tool.
6560
6561      # First remove it from the list of overridden variables, so we can test
6562      # for unknown variables in the end.
6563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6564
6565      # Check if we try to supply an empty value
6566      if test "x$CP" = x; then
6567        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6568$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6570$as_echo_n "checking for CP... " >&6; }
6571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6572$as_echo "disabled" >&6; }
6573      else
6574        # Check if the provided tool contains a complete path.
6575        tool_specified="$CP"
6576        tool_basename="${tool_specified##*/}"
6577        if test "x$tool_basename" = "x$tool_specified"; then
6578          # A command without a complete path is provided, search $PATH.
6579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6580$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6581          # Extract the first word of "$tool_basename", so it can be a program name with args.
6582set dummy $tool_basename; ac_word=$2
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6584$as_echo_n "checking for $ac_word... " >&6; }
6585if ${ac_cv_path_CP+:} false; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  case $CP in
6589  [\\/]* | ?:[\\/]*)
6590  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6591  ;;
6592  *)
6593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594for as_dir in $PATH
6595do
6596  IFS=$as_save_IFS
6597  test -z "$as_dir" && as_dir=.
6598    for ac_exec_ext in '' $ac_executable_extensions; do
6599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6600    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6602    break 2
6603  fi
6604done
6605  done
6606IFS=$as_save_IFS
6607
6608  ;;
6609esac
6610fi
6611CP=$ac_cv_path_CP
6612if test -n "$CP"; then
6613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6614$as_echo "$CP" >&6; }
6615else
6616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6617$as_echo "no" >&6; }
6618fi
6619
6620
6621          if test "x$CP" = x; then
6622            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6623          fi
6624        else
6625          # Otherwise we believe it is a complete path. Use it as it is.
6626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6627$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6628          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6629$as_echo_n "checking for CP... " >&6; }
6630          if test ! -x "$tool_specified"; then
6631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6632$as_echo "not found" >&6; }
6633            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6634          fi
6635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6636$as_echo "$tool_specified" >&6; }
6637        fi
6638      fi
6639    fi
6640
6641  fi
6642
6643
6644
6645  if test "x$CP" = x; then
6646    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6647  fi
6648
6649
6650
6651
6652
6653  # Publish this variable in the help.
6654
6655
6656  if [ -z "${CUT+x}" ]; then
6657    # The variable is not set by user, try to locate tool using the code snippet
6658    for ac_prog in cut
6659do
6660  # Extract the first word of "$ac_prog", so it can be a program name with args.
6661set dummy $ac_prog; ac_word=$2
6662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6663$as_echo_n "checking for $ac_word... " >&6; }
6664if ${ac_cv_path_CUT+:} false; then :
6665  $as_echo_n "(cached) " >&6
6666else
6667  case $CUT in
6668  [\\/]* | ?:[\\/]*)
6669  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6670  ;;
6671  *)
6672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6673for as_dir in $PATH
6674do
6675  IFS=$as_save_IFS
6676  test -z "$as_dir" && as_dir=.
6677    for ac_exec_ext in '' $ac_executable_extensions; do
6678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6679    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6681    break 2
6682  fi
6683done
6684  done
6685IFS=$as_save_IFS
6686
6687  ;;
6688esac
6689fi
6690CUT=$ac_cv_path_CUT
6691if test -n "$CUT"; then
6692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6693$as_echo "$CUT" >&6; }
6694else
6695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6696$as_echo "no" >&6; }
6697fi
6698
6699
6700  test -n "$CUT" && break
6701done
6702
6703  else
6704    # The variable is set, but is it from the command line or the environment?
6705
6706    # Try to remove the string !CUT! from our list.
6707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6709      # If it failed, the variable was not from the command line. Ignore it,
6710      # but warn the user (except for BASH, which is always set by the calling BASH).
6711      if test "xCUT" != xBASH; then
6712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6713$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6714      fi
6715      # Try to locate tool using the code snippet
6716      for ac_prog in cut
6717do
6718  # Extract the first word of "$ac_prog", so it can be a program name with args.
6719set dummy $ac_prog; ac_word=$2
6720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6721$as_echo_n "checking for $ac_word... " >&6; }
6722if ${ac_cv_path_CUT+:} false; then :
6723  $as_echo_n "(cached) " >&6
6724else
6725  case $CUT in
6726  [\\/]* | ?:[\\/]*)
6727  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6728  ;;
6729  *)
6730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6731for as_dir in $PATH
6732do
6733  IFS=$as_save_IFS
6734  test -z "$as_dir" && as_dir=.
6735    for ac_exec_ext in '' $ac_executable_extensions; do
6736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6737    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6739    break 2
6740  fi
6741done
6742  done
6743IFS=$as_save_IFS
6744
6745  ;;
6746esac
6747fi
6748CUT=$ac_cv_path_CUT
6749if test -n "$CUT"; then
6750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6751$as_echo "$CUT" >&6; }
6752else
6753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6754$as_echo "no" >&6; }
6755fi
6756
6757
6758  test -n "$CUT" && break
6759done
6760
6761    else
6762      # If it succeeded, then it was overridden by the user. We will use it
6763      # for the tool.
6764
6765      # First remove it from the list of overridden variables, so we can test
6766      # for unknown variables in the end.
6767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6768
6769      # Check if we try to supply an empty value
6770      if test "x$CUT" = x; then
6771        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6772$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6774$as_echo_n "checking for CUT... " >&6; }
6775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6776$as_echo "disabled" >&6; }
6777      else
6778        # Check if the provided tool contains a complete path.
6779        tool_specified="$CUT"
6780        tool_basename="${tool_specified##*/}"
6781        if test "x$tool_basename" = "x$tool_specified"; then
6782          # A command without a complete path is provided, search $PATH.
6783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6784$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6785          # Extract the first word of "$tool_basename", so it can be a program name with args.
6786set dummy $tool_basename; ac_word=$2
6787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6788$as_echo_n "checking for $ac_word... " >&6; }
6789if ${ac_cv_path_CUT+:} false; then :
6790  $as_echo_n "(cached) " >&6
6791else
6792  case $CUT in
6793  [\\/]* | ?:[\\/]*)
6794  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6795  ;;
6796  *)
6797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6798for as_dir in $PATH
6799do
6800  IFS=$as_save_IFS
6801  test -z "$as_dir" && as_dir=.
6802    for ac_exec_ext in '' $ac_executable_extensions; do
6803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6804    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6806    break 2
6807  fi
6808done
6809  done
6810IFS=$as_save_IFS
6811
6812  ;;
6813esac
6814fi
6815CUT=$ac_cv_path_CUT
6816if test -n "$CUT"; then
6817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6818$as_echo "$CUT" >&6; }
6819else
6820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6821$as_echo "no" >&6; }
6822fi
6823
6824
6825          if test "x$CUT" = x; then
6826            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6827          fi
6828        else
6829          # Otherwise we believe it is a complete path. Use it as it is.
6830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6831$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6833$as_echo_n "checking for CUT... " >&6; }
6834          if test ! -x "$tool_specified"; then
6835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6836$as_echo "not found" >&6; }
6837            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6838          fi
6839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6840$as_echo "$tool_specified" >&6; }
6841        fi
6842      fi
6843    fi
6844
6845  fi
6846
6847
6848
6849  if test "x$CUT" = x; then
6850    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6851  fi
6852
6853
6854
6855
6856
6857  # Publish this variable in the help.
6858
6859
6860  if [ -z "${DATE+x}" ]; then
6861    # The variable is not set by user, try to locate tool using the code snippet
6862    for ac_prog in date
6863do
6864  # Extract the first word of "$ac_prog", so it can be a program name with args.
6865set dummy $ac_prog; ac_word=$2
6866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6867$as_echo_n "checking for $ac_word... " >&6; }
6868if ${ac_cv_path_DATE+:} false; then :
6869  $as_echo_n "(cached) " >&6
6870else
6871  case $DATE in
6872  [\\/]* | ?:[\\/]*)
6873  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6874  ;;
6875  *)
6876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6877for as_dir in $PATH
6878do
6879  IFS=$as_save_IFS
6880  test -z "$as_dir" && as_dir=.
6881    for ac_exec_ext in '' $ac_executable_extensions; do
6882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6883    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6885    break 2
6886  fi
6887done
6888  done
6889IFS=$as_save_IFS
6890
6891  ;;
6892esac
6893fi
6894DATE=$ac_cv_path_DATE
6895if test -n "$DATE"; then
6896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6897$as_echo "$DATE" >&6; }
6898else
6899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6900$as_echo "no" >&6; }
6901fi
6902
6903
6904  test -n "$DATE" && break
6905done
6906
6907  else
6908    # The variable is set, but is it from the command line or the environment?
6909
6910    # Try to remove the string !DATE! from our list.
6911    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6912    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6913      # If it failed, the variable was not from the command line. Ignore it,
6914      # but warn the user (except for BASH, which is always set by the calling BASH).
6915      if test "xDATE" != xBASH; then
6916        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6917$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6918      fi
6919      # Try to locate tool using the code snippet
6920      for ac_prog in date
6921do
6922  # Extract the first word of "$ac_prog", so it can be a program name with args.
6923set dummy $ac_prog; ac_word=$2
6924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6925$as_echo_n "checking for $ac_word... " >&6; }
6926if ${ac_cv_path_DATE+:} false; then :
6927  $as_echo_n "(cached) " >&6
6928else
6929  case $DATE in
6930  [\\/]* | ?:[\\/]*)
6931  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6932  ;;
6933  *)
6934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6935for as_dir in $PATH
6936do
6937  IFS=$as_save_IFS
6938  test -z "$as_dir" && as_dir=.
6939    for ac_exec_ext in '' $ac_executable_extensions; do
6940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6941    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6943    break 2
6944  fi
6945done
6946  done
6947IFS=$as_save_IFS
6948
6949  ;;
6950esac
6951fi
6952DATE=$ac_cv_path_DATE
6953if test -n "$DATE"; then
6954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6955$as_echo "$DATE" >&6; }
6956else
6957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6958$as_echo "no" >&6; }
6959fi
6960
6961
6962  test -n "$DATE" && break
6963done
6964
6965    else
6966      # If it succeeded, then it was overridden by the user. We will use it
6967      # for the tool.
6968
6969      # First remove it from the list of overridden variables, so we can test
6970      # for unknown variables in the end.
6971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6972
6973      # Check if we try to supply an empty value
6974      if test "x$DATE" = x; then
6975        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6976$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6978$as_echo_n "checking for DATE... " >&6; }
6979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6980$as_echo "disabled" >&6; }
6981      else
6982        # Check if the provided tool contains a complete path.
6983        tool_specified="$DATE"
6984        tool_basename="${tool_specified##*/}"
6985        if test "x$tool_basename" = "x$tool_specified"; then
6986          # A command without a complete path is provided, search $PATH.
6987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6988$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6989          # Extract the first word of "$tool_basename", so it can be a program name with args.
6990set dummy $tool_basename; ac_word=$2
6991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6992$as_echo_n "checking for $ac_word... " >&6; }
6993if ${ac_cv_path_DATE+:} false; then :
6994  $as_echo_n "(cached) " >&6
6995else
6996  case $DATE in
6997  [\\/]* | ?:[\\/]*)
6998  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6999  ;;
7000  *)
7001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7002for as_dir in $PATH
7003do
7004  IFS=$as_save_IFS
7005  test -z "$as_dir" && as_dir=.
7006    for ac_exec_ext in '' $ac_executable_extensions; do
7007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7008    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7010    break 2
7011  fi
7012done
7013  done
7014IFS=$as_save_IFS
7015
7016  ;;
7017esac
7018fi
7019DATE=$ac_cv_path_DATE
7020if test -n "$DATE"; then
7021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7022$as_echo "$DATE" >&6; }
7023else
7024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7025$as_echo "no" >&6; }
7026fi
7027
7028
7029          if test "x$DATE" = x; then
7030            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7031          fi
7032        else
7033          # Otherwise we believe it is a complete path. Use it as it is.
7034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7035$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7036          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7037$as_echo_n "checking for DATE... " >&6; }
7038          if test ! -x "$tool_specified"; then
7039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7040$as_echo "not found" >&6; }
7041            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7042          fi
7043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7044$as_echo "$tool_specified" >&6; }
7045        fi
7046      fi
7047    fi
7048
7049  fi
7050
7051
7052
7053  if test "x$DATE" = x; then
7054    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7055  fi
7056
7057
7058
7059
7060
7061  # Publish this variable in the help.
7062
7063
7064  if [ -z "${DIFF+x}" ]; then
7065    # The variable is not set by user, try to locate tool using the code snippet
7066    for ac_prog in gdiff diff
7067do
7068  # Extract the first word of "$ac_prog", so it can be a program name with args.
7069set dummy $ac_prog; ac_word=$2
7070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7071$as_echo_n "checking for $ac_word... " >&6; }
7072if ${ac_cv_path_DIFF+:} false; then :
7073  $as_echo_n "(cached) " >&6
7074else
7075  case $DIFF in
7076  [\\/]* | ?:[\\/]*)
7077  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7078  ;;
7079  *)
7080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7081for as_dir in $PATH
7082do
7083  IFS=$as_save_IFS
7084  test -z "$as_dir" && as_dir=.
7085    for ac_exec_ext in '' $ac_executable_extensions; do
7086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7087    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7089    break 2
7090  fi
7091done
7092  done
7093IFS=$as_save_IFS
7094
7095  ;;
7096esac
7097fi
7098DIFF=$ac_cv_path_DIFF
7099if test -n "$DIFF"; then
7100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7101$as_echo "$DIFF" >&6; }
7102else
7103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7104$as_echo "no" >&6; }
7105fi
7106
7107
7108  test -n "$DIFF" && break
7109done
7110
7111  else
7112    # The variable is set, but is it from the command line or the environment?
7113
7114    # Try to remove the string !DIFF! from our list.
7115    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7116    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7117      # If it failed, the variable was not from the command line. Ignore it,
7118      # but warn the user (except for BASH, which is always set by the calling BASH).
7119      if test "xDIFF" != xBASH; then
7120        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7121$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7122      fi
7123      # Try to locate tool using the code snippet
7124      for ac_prog in gdiff diff
7125do
7126  # Extract the first word of "$ac_prog", so it can be a program name with args.
7127set dummy $ac_prog; ac_word=$2
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7129$as_echo_n "checking for $ac_word... " >&6; }
7130if ${ac_cv_path_DIFF+:} false; then :
7131  $as_echo_n "(cached) " >&6
7132else
7133  case $DIFF in
7134  [\\/]* | ?:[\\/]*)
7135  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7136  ;;
7137  *)
7138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7139for as_dir in $PATH
7140do
7141  IFS=$as_save_IFS
7142  test -z "$as_dir" && as_dir=.
7143    for ac_exec_ext in '' $ac_executable_extensions; do
7144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7145    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7147    break 2
7148  fi
7149done
7150  done
7151IFS=$as_save_IFS
7152
7153  ;;
7154esac
7155fi
7156DIFF=$ac_cv_path_DIFF
7157if test -n "$DIFF"; then
7158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7159$as_echo "$DIFF" >&6; }
7160else
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162$as_echo "no" >&6; }
7163fi
7164
7165
7166  test -n "$DIFF" && break
7167done
7168
7169    else
7170      # If it succeeded, then it was overridden by the user. We will use it
7171      # for the tool.
7172
7173      # First remove it from the list of overridden variables, so we can test
7174      # for unknown variables in the end.
7175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7176
7177      # Check if we try to supply an empty value
7178      if test "x$DIFF" = x; then
7179        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7180$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7182$as_echo_n "checking for DIFF... " >&6; }
7183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7184$as_echo "disabled" >&6; }
7185      else
7186        # Check if the provided tool contains a complete path.
7187        tool_specified="$DIFF"
7188        tool_basename="${tool_specified##*/}"
7189        if test "x$tool_basename" = "x$tool_specified"; then
7190          # A command without a complete path is provided, search $PATH.
7191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7192$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7193          # Extract the first word of "$tool_basename", so it can be a program name with args.
7194set dummy $tool_basename; ac_word=$2
7195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7196$as_echo_n "checking for $ac_word... " >&6; }
7197if ${ac_cv_path_DIFF+:} false; then :
7198  $as_echo_n "(cached) " >&6
7199else
7200  case $DIFF in
7201  [\\/]* | ?:[\\/]*)
7202  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7203  ;;
7204  *)
7205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7206for as_dir in $PATH
7207do
7208  IFS=$as_save_IFS
7209  test -z "$as_dir" && as_dir=.
7210    for ac_exec_ext in '' $ac_executable_extensions; do
7211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7212    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7214    break 2
7215  fi
7216done
7217  done
7218IFS=$as_save_IFS
7219
7220  ;;
7221esac
7222fi
7223DIFF=$ac_cv_path_DIFF
7224if test -n "$DIFF"; then
7225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7226$as_echo "$DIFF" >&6; }
7227else
7228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7229$as_echo "no" >&6; }
7230fi
7231
7232
7233          if test "x$DIFF" = x; then
7234            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7235          fi
7236        else
7237          # Otherwise we believe it is a complete path. Use it as it is.
7238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7239$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7240          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7241$as_echo_n "checking for DIFF... " >&6; }
7242          if test ! -x "$tool_specified"; then
7243            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7244$as_echo "not found" >&6; }
7245            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7246          fi
7247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7248$as_echo "$tool_specified" >&6; }
7249        fi
7250      fi
7251    fi
7252
7253  fi
7254
7255
7256
7257  if test "x$DIFF" = x; then
7258    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7259  fi
7260
7261
7262
7263
7264
7265  # Publish this variable in the help.
7266
7267
7268  if [ -z "${DIRNAME+x}" ]; then
7269    # The variable is not set by user, try to locate tool using the code snippet
7270    for ac_prog in dirname
7271do
7272  # Extract the first word of "$ac_prog", so it can be a program name with args.
7273set dummy $ac_prog; ac_word=$2
7274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7275$as_echo_n "checking for $ac_word... " >&6; }
7276if ${ac_cv_path_DIRNAME+:} false; then :
7277  $as_echo_n "(cached) " >&6
7278else
7279  case $DIRNAME in
7280  [\\/]* | ?:[\\/]*)
7281  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7282  ;;
7283  *)
7284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7285for as_dir in $PATH
7286do
7287  IFS=$as_save_IFS
7288  test -z "$as_dir" && as_dir=.
7289    for ac_exec_ext in '' $ac_executable_extensions; do
7290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7291    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7293    break 2
7294  fi
7295done
7296  done
7297IFS=$as_save_IFS
7298
7299  ;;
7300esac
7301fi
7302DIRNAME=$ac_cv_path_DIRNAME
7303if test -n "$DIRNAME"; then
7304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7305$as_echo "$DIRNAME" >&6; }
7306else
7307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7308$as_echo "no" >&6; }
7309fi
7310
7311
7312  test -n "$DIRNAME" && break
7313done
7314
7315  else
7316    # The variable is set, but is it from the command line or the environment?
7317
7318    # Try to remove the string !DIRNAME! from our list.
7319    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7320    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7321      # If it failed, the variable was not from the command line. Ignore it,
7322      # but warn the user (except for BASH, which is always set by the calling BASH).
7323      if test "xDIRNAME" != xBASH; then
7324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7325$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7326      fi
7327      # Try to locate tool using the code snippet
7328      for ac_prog in dirname
7329do
7330  # Extract the first word of "$ac_prog", so it can be a program name with args.
7331set dummy $ac_prog; ac_word=$2
7332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7333$as_echo_n "checking for $ac_word... " >&6; }
7334if ${ac_cv_path_DIRNAME+:} false; then :
7335  $as_echo_n "(cached) " >&6
7336else
7337  case $DIRNAME in
7338  [\\/]* | ?:[\\/]*)
7339  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7340  ;;
7341  *)
7342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7343for as_dir in $PATH
7344do
7345  IFS=$as_save_IFS
7346  test -z "$as_dir" && as_dir=.
7347    for ac_exec_ext in '' $ac_executable_extensions; do
7348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7349    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7351    break 2
7352  fi
7353done
7354  done
7355IFS=$as_save_IFS
7356
7357  ;;
7358esac
7359fi
7360DIRNAME=$ac_cv_path_DIRNAME
7361if test -n "$DIRNAME"; then
7362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7363$as_echo "$DIRNAME" >&6; }
7364else
7365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366$as_echo "no" >&6; }
7367fi
7368
7369
7370  test -n "$DIRNAME" && break
7371done
7372
7373    else
7374      # If it succeeded, then it was overridden by the user. We will use it
7375      # for the tool.
7376
7377      # First remove it from the list of overridden variables, so we can test
7378      # for unknown variables in the end.
7379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7380
7381      # Check if we try to supply an empty value
7382      if test "x$DIRNAME" = x; then
7383        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7384$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7386$as_echo_n "checking for DIRNAME... " >&6; }
7387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7388$as_echo "disabled" >&6; }
7389      else
7390        # Check if the provided tool contains a complete path.
7391        tool_specified="$DIRNAME"
7392        tool_basename="${tool_specified##*/}"
7393        if test "x$tool_basename" = "x$tool_specified"; then
7394          # A command without a complete path is provided, search $PATH.
7395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7396$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7397          # Extract the first word of "$tool_basename", so it can be a program name with args.
7398set dummy $tool_basename; ac_word=$2
7399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7400$as_echo_n "checking for $ac_word... " >&6; }
7401if ${ac_cv_path_DIRNAME+:} false; then :
7402  $as_echo_n "(cached) " >&6
7403else
7404  case $DIRNAME in
7405  [\\/]* | ?:[\\/]*)
7406  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7407  ;;
7408  *)
7409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7410for as_dir in $PATH
7411do
7412  IFS=$as_save_IFS
7413  test -z "$as_dir" && as_dir=.
7414    for ac_exec_ext in '' $ac_executable_extensions; do
7415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7416    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7418    break 2
7419  fi
7420done
7421  done
7422IFS=$as_save_IFS
7423
7424  ;;
7425esac
7426fi
7427DIRNAME=$ac_cv_path_DIRNAME
7428if test -n "$DIRNAME"; then
7429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7430$as_echo "$DIRNAME" >&6; }
7431else
7432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433$as_echo "no" >&6; }
7434fi
7435
7436
7437          if test "x$DIRNAME" = x; then
7438            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7439          fi
7440        else
7441          # Otherwise we believe it is a complete path. Use it as it is.
7442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7443$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7444          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7445$as_echo_n "checking for DIRNAME... " >&6; }
7446          if test ! -x "$tool_specified"; then
7447            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7448$as_echo "not found" >&6; }
7449            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7450          fi
7451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7452$as_echo "$tool_specified" >&6; }
7453        fi
7454      fi
7455    fi
7456
7457  fi
7458
7459
7460
7461  if test "x$DIRNAME" = x; then
7462    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7463  fi
7464
7465
7466
7467
7468
7469  # Publish this variable in the help.
7470
7471
7472  if [ -z "${ECHO+x}" ]; then
7473    # The variable is not set by user, try to locate tool using the code snippet
7474    for ac_prog in echo
7475do
7476  # Extract the first word of "$ac_prog", so it can be a program name with args.
7477set dummy $ac_prog; ac_word=$2
7478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7479$as_echo_n "checking for $ac_word... " >&6; }
7480if ${ac_cv_path_ECHO+:} false; then :
7481  $as_echo_n "(cached) " >&6
7482else
7483  case $ECHO in
7484  [\\/]* | ?:[\\/]*)
7485  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7486  ;;
7487  *)
7488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7489for as_dir in $PATH
7490do
7491  IFS=$as_save_IFS
7492  test -z "$as_dir" && as_dir=.
7493    for ac_exec_ext in '' $ac_executable_extensions; do
7494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7495    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7497    break 2
7498  fi
7499done
7500  done
7501IFS=$as_save_IFS
7502
7503  ;;
7504esac
7505fi
7506ECHO=$ac_cv_path_ECHO
7507if test -n "$ECHO"; then
7508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7509$as_echo "$ECHO" >&6; }
7510else
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7512$as_echo "no" >&6; }
7513fi
7514
7515
7516  test -n "$ECHO" && break
7517done
7518
7519  else
7520    # The variable is set, but is it from the command line or the environment?
7521
7522    # Try to remove the string !ECHO! from our list.
7523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7525      # If it failed, the variable was not from the command line. Ignore it,
7526      # but warn the user (except for BASH, which is always set by the calling BASH).
7527      if test "xECHO" != xBASH; then
7528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7529$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7530      fi
7531      # Try to locate tool using the code snippet
7532      for ac_prog in echo
7533do
7534  # Extract the first word of "$ac_prog", so it can be a program name with args.
7535set dummy $ac_prog; ac_word=$2
7536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7537$as_echo_n "checking for $ac_word... " >&6; }
7538if ${ac_cv_path_ECHO+:} false; then :
7539  $as_echo_n "(cached) " >&6
7540else
7541  case $ECHO in
7542  [\\/]* | ?:[\\/]*)
7543  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7544  ;;
7545  *)
7546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547for as_dir in $PATH
7548do
7549  IFS=$as_save_IFS
7550  test -z "$as_dir" && as_dir=.
7551    for ac_exec_ext in '' $ac_executable_extensions; do
7552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7553    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7555    break 2
7556  fi
7557done
7558  done
7559IFS=$as_save_IFS
7560
7561  ;;
7562esac
7563fi
7564ECHO=$ac_cv_path_ECHO
7565if test -n "$ECHO"; then
7566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7567$as_echo "$ECHO" >&6; }
7568else
7569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7570$as_echo "no" >&6; }
7571fi
7572
7573
7574  test -n "$ECHO" && break
7575done
7576
7577    else
7578      # If it succeeded, then it was overridden by the user. We will use it
7579      # for the tool.
7580
7581      # First remove it from the list of overridden variables, so we can test
7582      # for unknown variables in the end.
7583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7584
7585      # Check if we try to supply an empty value
7586      if test "x$ECHO" = x; then
7587        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7588$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7589        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7590$as_echo_n "checking for ECHO... " >&6; }
7591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7592$as_echo "disabled" >&6; }
7593      else
7594        # Check if the provided tool contains a complete path.
7595        tool_specified="$ECHO"
7596        tool_basename="${tool_specified##*/}"
7597        if test "x$tool_basename" = "x$tool_specified"; then
7598          # A command without a complete path is provided, search $PATH.
7599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7600$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7601          # Extract the first word of "$tool_basename", so it can be a program name with args.
7602set dummy $tool_basename; ac_word=$2
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7604$as_echo_n "checking for $ac_word... " >&6; }
7605if ${ac_cv_path_ECHO+:} false; then :
7606  $as_echo_n "(cached) " >&6
7607else
7608  case $ECHO in
7609  [\\/]* | ?:[\\/]*)
7610  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7611  ;;
7612  *)
7613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7614for as_dir in $PATH
7615do
7616  IFS=$as_save_IFS
7617  test -z "$as_dir" && as_dir=.
7618    for ac_exec_ext in '' $ac_executable_extensions; do
7619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7620    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7622    break 2
7623  fi
7624done
7625  done
7626IFS=$as_save_IFS
7627
7628  ;;
7629esac
7630fi
7631ECHO=$ac_cv_path_ECHO
7632if test -n "$ECHO"; then
7633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7634$as_echo "$ECHO" >&6; }
7635else
7636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7637$as_echo "no" >&6; }
7638fi
7639
7640
7641          if test "x$ECHO" = x; then
7642            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7643          fi
7644        else
7645          # Otherwise we believe it is a complete path. Use it as it is.
7646          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7647$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7648          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7649$as_echo_n "checking for ECHO... " >&6; }
7650          if test ! -x "$tool_specified"; then
7651            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7652$as_echo "not found" >&6; }
7653            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7654          fi
7655          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7656$as_echo "$tool_specified" >&6; }
7657        fi
7658      fi
7659    fi
7660
7661  fi
7662
7663
7664
7665  if test "x$ECHO" = x; then
7666    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7667  fi
7668
7669
7670
7671
7672
7673  # Publish this variable in the help.
7674
7675
7676  if [ -z "${EXPR+x}" ]; then
7677    # The variable is not set by user, try to locate tool using the code snippet
7678    for ac_prog in expr
7679do
7680  # Extract the first word of "$ac_prog", so it can be a program name with args.
7681set dummy $ac_prog; ac_word=$2
7682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7683$as_echo_n "checking for $ac_word... " >&6; }
7684if ${ac_cv_path_EXPR+:} false; then :
7685  $as_echo_n "(cached) " >&6
7686else
7687  case $EXPR in
7688  [\\/]* | ?:[\\/]*)
7689  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7690  ;;
7691  *)
7692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7693for as_dir in $PATH
7694do
7695  IFS=$as_save_IFS
7696  test -z "$as_dir" && as_dir=.
7697    for ac_exec_ext in '' $ac_executable_extensions; do
7698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7699    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7701    break 2
7702  fi
7703done
7704  done
7705IFS=$as_save_IFS
7706
7707  ;;
7708esac
7709fi
7710EXPR=$ac_cv_path_EXPR
7711if test -n "$EXPR"; then
7712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7713$as_echo "$EXPR" >&6; }
7714else
7715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7716$as_echo "no" >&6; }
7717fi
7718
7719
7720  test -n "$EXPR" && break
7721done
7722
7723  else
7724    # The variable is set, but is it from the command line or the environment?
7725
7726    # Try to remove the string !EXPR! from our list.
7727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7729      # If it failed, the variable was not from the command line. Ignore it,
7730      # but warn the user (except for BASH, which is always set by the calling BASH).
7731      if test "xEXPR" != xBASH; then
7732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7733$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7734      fi
7735      # Try to locate tool using the code snippet
7736      for ac_prog in expr
7737do
7738  # Extract the first word of "$ac_prog", so it can be a program name with args.
7739set dummy $ac_prog; ac_word=$2
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7741$as_echo_n "checking for $ac_word... " >&6; }
7742if ${ac_cv_path_EXPR+:} false; then :
7743  $as_echo_n "(cached) " >&6
7744else
7745  case $EXPR in
7746  [\\/]* | ?:[\\/]*)
7747  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7748  ;;
7749  *)
7750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7751for as_dir in $PATH
7752do
7753  IFS=$as_save_IFS
7754  test -z "$as_dir" && as_dir=.
7755    for ac_exec_ext in '' $ac_executable_extensions; do
7756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7757    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7759    break 2
7760  fi
7761done
7762  done
7763IFS=$as_save_IFS
7764
7765  ;;
7766esac
7767fi
7768EXPR=$ac_cv_path_EXPR
7769if test -n "$EXPR"; then
7770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7771$as_echo "$EXPR" >&6; }
7772else
7773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7774$as_echo "no" >&6; }
7775fi
7776
7777
7778  test -n "$EXPR" && break
7779done
7780
7781    else
7782      # If it succeeded, then it was overridden by the user. We will use it
7783      # for the tool.
7784
7785      # First remove it from the list of overridden variables, so we can test
7786      # for unknown variables in the end.
7787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7788
7789      # Check if we try to supply an empty value
7790      if test "x$EXPR" = x; then
7791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7792$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7794$as_echo_n "checking for EXPR... " >&6; }
7795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7796$as_echo "disabled" >&6; }
7797      else
7798        # Check if the provided tool contains a complete path.
7799        tool_specified="$EXPR"
7800        tool_basename="${tool_specified##*/}"
7801        if test "x$tool_basename" = "x$tool_specified"; then
7802          # A command without a complete path is provided, search $PATH.
7803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7804$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7805          # Extract the first word of "$tool_basename", so it can be a program name with args.
7806set dummy $tool_basename; ac_word=$2
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7808$as_echo_n "checking for $ac_word... " >&6; }
7809if ${ac_cv_path_EXPR+:} false; then :
7810  $as_echo_n "(cached) " >&6
7811else
7812  case $EXPR in
7813  [\\/]* | ?:[\\/]*)
7814  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7815  ;;
7816  *)
7817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7818for as_dir in $PATH
7819do
7820  IFS=$as_save_IFS
7821  test -z "$as_dir" && as_dir=.
7822    for ac_exec_ext in '' $ac_executable_extensions; do
7823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7824    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7826    break 2
7827  fi
7828done
7829  done
7830IFS=$as_save_IFS
7831
7832  ;;
7833esac
7834fi
7835EXPR=$ac_cv_path_EXPR
7836if test -n "$EXPR"; then
7837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7838$as_echo "$EXPR" >&6; }
7839else
7840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7841$as_echo "no" >&6; }
7842fi
7843
7844
7845          if test "x$EXPR" = x; then
7846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7847          fi
7848        else
7849          # Otherwise we believe it is a complete path. Use it as it is.
7850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7851$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7853$as_echo_n "checking for EXPR... " >&6; }
7854          if test ! -x "$tool_specified"; then
7855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7856$as_echo "not found" >&6; }
7857            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7858          fi
7859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7860$as_echo "$tool_specified" >&6; }
7861        fi
7862      fi
7863    fi
7864
7865  fi
7866
7867
7868
7869  if test "x$EXPR" = x; then
7870    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7871  fi
7872
7873
7874
7875
7876
7877  # Publish this variable in the help.
7878
7879
7880  if [ -z "${FILE+x}" ]; then
7881    # The variable is not set by user, try to locate tool using the code snippet
7882    for ac_prog in file
7883do
7884  # Extract the first word of "$ac_prog", so it can be a program name with args.
7885set dummy $ac_prog; ac_word=$2
7886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7887$as_echo_n "checking for $ac_word... " >&6; }
7888if ${ac_cv_path_FILE+:} false; then :
7889  $as_echo_n "(cached) " >&6
7890else
7891  case $FILE in
7892  [\\/]* | ?:[\\/]*)
7893  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7894  ;;
7895  *)
7896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7897for as_dir in $PATH
7898do
7899  IFS=$as_save_IFS
7900  test -z "$as_dir" && as_dir=.
7901    for ac_exec_ext in '' $ac_executable_extensions; do
7902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7903    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7905    break 2
7906  fi
7907done
7908  done
7909IFS=$as_save_IFS
7910
7911  ;;
7912esac
7913fi
7914FILE=$ac_cv_path_FILE
7915if test -n "$FILE"; then
7916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7917$as_echo "$FILE" >&6; }
7918else
7919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7920$as_echo "no" >&6; }
7921fi
7922
7923
7924  test -n "$FILE" && break
7925done
7926
7927  else
7928    # The variable is set, but is it from the command line or the environment?
7929
7930    # Try to remove the string !FILE! from our list.
7931    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7932    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7933      # If it failed, the variable was not from the command line. Ignore it,
7934      # but warn the user (except for BASH, which is always set by the calling BASH).
7935      if test "xFILE" != xBASH; then
7936        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7937$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7938      fi
7939      # Try to locate tool using the code snippet
7940      for ac_prog in file
7941do
7942  # Extract the first word of "$ac_prog", so it can be a program name with args.
7943set dummy $ac_prog; ac_word=$2
7944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7945$as_echo_n "checking for $ac_word... " >&6; }
7946if ${ac_cv_path_FILE+:} false; then :
7947  $as_echo_n "(cached) " >&6
7948else
7949  case $FILE in
7950  [\\/]* | ?:[\\/]*)
7951  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7952  ;;
7953  *)
7954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7955for as_dir in $PATH
7956do
7957  IFS=$as_save_IFS
7958  test -z "$as_dir" && as_dir=.
7959    for ac_exec_ext in '' $ac_executable_extensions; do
7960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7961    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7963    break 2
7964  fi
7965done
7966  done
7967IFS=$as_save_IFS
7968
7969  ;;
7970esac
7971fi
7972FILE=$ac_cv_path_FILE
7973if test -n "$FILE"; then
7974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7975$as_echo "$FILE" >&6; }
7976else
7977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7978$as_echo "no" >&6; }
7979fi
7980
7981
7982  test -n "$FILE" && break
7983done
7984
7985    else
7986      # If it succeeded, then it was overridden by the user. We will use it
7987      # for the tool.
7988
7989      # First remove it from the list of overridden variables, so we can test
7990      # for unknown variables in the end.
7991      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7992
7993      # Check if we try to supply an empty value
7994      if test "x$FILE" = x; then
7995        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7996$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7998$as_echo_n "checking for FILE... " >&6; }
7999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8000$as_echo "disabled" >&6; }
8001      else
8002        # Check if the provided tool contains a complete path.
8003        tool_specified="$FILE"
8004        tool_basename="${tool_specified##*/}"
8005        if test "x$tool_basename" = "x$tool_specified"; then
8006          # A command without a complete path is provided, search $PATH.
8007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8008$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8009          # Extract the first word of "$tool_basename", so it can be a program name with args.
8010set dummy $tool_basename; ac_word=$2
8011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8012$as_echo_n "checking for $ac_word... " >&6; }
8013if ${ac_cv_path_FILE+:} false; then :
8014  $as_echo_n "(cached) " >&6
8015else
8016  case $FILE in
8017  [\\/]* | ?:[\\/]*)
8018  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8019  ;;
8020  *)
8021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8022for as_dir in $PATH
8023do
8024  IFS=$as_save_IFS
8025  test -z "$as_dir" && as_dir=.
8026    for ac_exec_ext in '' $ac_executable_extensions; do
8027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8028    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8030    break 2
8031  fi
8032done
8033  done
8034IFS=$as_save_IFS
8035
8036  ;;
8037esac
8038fi
8039FILE=$ac_cv_path_FILE
8040if test -n "$FILE"; then
8041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8042$as_echo "$FILE" >&6; }
8043else
8044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045$as_echo "no" >&6; }
8046fi
8047
8048
8049          if test "x$FILE" = x; then
8050            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8051          fi
8052        else
8053          # Otherwise we believe it is a complete path. Use it as it is.
8054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8055$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8056          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8057$as_echo_n "checking for FILE... " >&6; }
8058          if test ! -x "$tool_specified"; then
8059            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8060$as_echo "not found" >&6; }
8061            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8062          fi
8063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8064$as_echo "$tool_specified" >&6; }
8065        fi
8066      fi
8067    fi
8068
8069  fi
8070
8071
8072
8073  if test "x$FILE" = x; then
8074    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8075  fi
8076
8077
8078
8079
8080
8081  # Publish this variable in the help.
8082
8083
8084  if [ -z "${FIND+x}" ]; then
8085    # The variable is not set by user, try to locate tool using the code snippet
8086    for ac_prog in find
8087do
8088  # Extract the first word of "$ac_prog", so it can be a program name with args.
8089set dummy $ac_prog; ac_word=$2
8090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8091$as_echo_n "checking for $ac_word... " >&6; }
8092if ${ac_cv_path_FIND+:} false; then :
8093  $as_echo_n "(cached) " >&6
8094else
8095  case $FIND in
8096  [\\/]* | ?:[\\/]*)
8097  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8098  ;;
8099  *)
8100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8101for as_dir in $PATH
8102do
8103  IFS=$as_save_IFS
8104  test -z "$as_dir" && as_dir=.
8105    for ac_exec_ext in '' $ac_executable_extensions; do
8106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8107    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8109    break 2
8110  fi
8111done
8112  done
8113IFS=$as_save_IFS
8114
8115  ;;
8116esac
8117fi
8118FIND=$ac_cv_path_FIND
8119if test -n "$FIND"; then
8120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8121$as_echo "$FIND" >&6; }
8122else
8123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8124$as_echo "no" >&6; }
8125fi
8126
8127
8128  test -n "$FIND" && break
8129done
8130
8131  else
8132    # The variable is set, but is it from the command line or the environment?
8133
8134    # Try to remove the string !FIND! from our list.
8135    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8136    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8137      # If it failed, the variable was not from the command line. Ignore it,
8138      # but warn the user (except for BASH, which is always set by the calling BASH).
8139      if test "xFIND" != xBASH; then
8140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8141$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8142      fi
8143      # Try to locate tool using the code snippet
8144      for ac_prog in find
8145do
8146  # Extract the first word of "$ac_prog", so it can be a program name with args.
8147set dummy $ac_prog; ac_word=$2
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8149$as_echo_n "checking for $ac_word... " >&6; }
8150if ${ac_cv_path_FIND+:} false; then :
8151  $as_echo_n "(cached) " >&6
8152else
8153  case $FIND in
8154  [\\/]* | ?:[\\/]*)
8155  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8156  ;;
8157  *)
8158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8159for as_dir in $PATH
8160do
8161  IFS=$as_save_IFS
8162  test -z "$as_dir" && as_dir=.
8163    for ac_exec_ext in '' $ac_executable_extensions; do
8164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8165    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8167    break 2
8168  fi
8169done
8170  done
8171IFS=$as_save_IFS
8172
8173  ;;
8174esac
8175fi
8176FIND=$ac_cv_path_FIND
8177if test -n "$FIND"; then
8178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8179$as_echo "$FIND" >&6; }
8180else
8181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8182$as_echo "no" >&6; }
8183fi
8184
8185
8186  test -n "$FIND" && break
8187done
8188
8189    else
8190      # If it succeeded, then it was overridden by the user. We will use it
8191      # for the tool.
8192
8193      # First remove it from the list of overridden variables, so we can test
8194      # for unknown variables in the end.
8195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8196
8197      # Check if we try to supply an empty value
8198      if test "x$FIND" = x; then
8199        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8200$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8202$as_echo_n "checking for FIND... " >&6; }
8203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8204$as_echo "disabled" >&6; }
8205      else
8206        # Check if the provided tool contains a complete path.
8207        tool_specified="$FIND"
8208        tool_basename="${tool_specified##*/}"
8209        if test "x$tool_basename" = "x$tool_specified"; then
8210          # A command without a complete path is provided, search $PATH.
8211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8212$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8213          # Extract the first word of "$tool_basename", so it can be a program name with args.
8214set dummy $tool_basename; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if ${ac_cv_path_FIND+:} false; then :
8218  $as_echo_n "(cached) " >&6
8219else
8220  case $FIND in
8221  [\\/]* | ?:[\\/]*)
8222  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8223  ;;
8224  *)
8225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226for as_dir in $PATH
8227do
8228  IFS=$as_save_IFS
8229  test -z "$as_dir" && as_dir=.
8230    for ac_exec_ext in '' $ac_executable_extensions; do
8231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8232    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8234    break 2
8235  fi
8236done
8237  done
8238IFS=$as_save_IFS
8239
8240  ;;
8241esac
8242fi
8243FIND=$ac_cv_path_FIND
8244if test -n "$FIND"; then
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8246$as_echo "$FIND" >&6; }
8247else
8248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8249$as_echo "no" >&6; }
8250fi
8251
8252
8253          if test "x$FIND" = x; then
8254            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8255          fi
8256        else
8257          # Otherwise we believe it is a complete path. Use it as it is.
8258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8259$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8260          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8261$as_echo_n "checking for FIND... " >&6; }
8262          if test ! -x "$tool_specified"; then
8263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8264$as_echo "not found" >&6; }
8265            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8266          fi
8267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8268$as_echo "$tool_specified" >&6; }
8269        fi
8270      fi
8271    fi
8272
8273  fi
8274
8275
8276
8277  if test "x$FIND" = x; then
8278    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8279  fi
8280
8281
8282
8283
8284
8285  # Publish this variable in the help.
8286
8287
8288  if [ -z "${HEAD+x}" ]; then
8289    # The variable is not set by user, try to locate tool using the code snippet
8290    for ac_prog in head
8291do
8292  # Extract the first word of "$ac_prog", so it can be a program name with args.
8293set dummy $ac_prog; ac_word=$2
8294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8295$as_echo_n "checking for $ac_word... " >&6; }
8296if ${ac_cv_path_HEAD+:} false; then :
8297  $as_echo_n "(cached) " >&6
8298else
8299  case $HEAD in
8300  [\\/]* | ?:[\\/]*)
8301  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8302  ;;
8303  *)
8304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305for as_dir in $PATH
8306do
8307  IFS=$as_save_IFS
8308  test -z "$as_dir" && as_dir=.
8309    for ac_exec_ext in '' $ac_executable_extensions; do
8310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8311    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8313    break 2
8314  fi
8315done
8316  done
8317IFS=$as_save_IFS
8318
8319  ;;
8320esac
8321fi
8322HEAD=$ac_cv_path_HEAD
8323if test -n "$HEAD"; then
8324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8325$as_echo "$HEAD" >&6; }
8326else
8327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8328$as_echo "no" >&6; }
8329fi
8330
8331
8332  test -n "$HEAD" && break
8333done
8334
8335  else
8336    # The variable is set, but is it from the command line or the environment?
8337
8338    # Try to remove the string !HEAD! from our list.
8339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8341      # If it failed, the variable was not from the command line. Ignore it,
8342      # but warn the user (except for BASH, which is always set by the calling BASH).
8343      if test "xHEAD" != xBASH; then
8344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8345$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8346      fi
8347      # Try to locate tool using the code snippet
8348      for ac_prog in head
8349do
8350  # Extract the first word of "$ac_prog", so it can be a program name with args.
8351set dummy $ac_prog; ac_word=$2
8352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353$as_echo_n "checking for $ac_word... " >&6; }
8354if ${ac_cv_path_HEAD+:} false; then :
8355  $as_echo_n "(cached) " >&6
8356else
8357  case $HEAD in
8358  [\\/]* | ?:[\\/]*)
8359  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8360  ;;
8361  *)
8362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363for as_dir in $PATH
8364do
8365  IFS=$as_save_IFS
8366  test -z "$as_dir" && as_dir=.
8367    for ac_exec_ext in '' $ac_executable_extensions; do
8368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8369    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8371    break 2
8372  fi
8373done
8374  done
8375IFS=$as_save_IFS
8376
8377  ;;
8378esac
8379fi
8380HEAD=$ac_cv_path_HEAD
8381if test -n "$HEAD"; then
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8383$as_echo "$HEAD" >&6; }
8384else
8385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
8387fi
8388
8389
8390  test -n "$HEAD" && break
8391done
8392
8393    else
8394      # If it succeeded, then it was overridden by the user. We will use it
8395      # for the tool.
8396
8397      # First remove it from the list of overridden variables, so we can test
8398      # for unknown variables in the end.
8399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8400
8401      # Check if we try to supply an empty value
8402      if test "x$HEAD" = x; then
8403        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8404$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8406$as_echo_n "checking for HEAD... " >&6; }
8407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8408$as_echo "disabled" >&6; }
8409      else
8410        # Check if the provided tool contains a complete path.
8411        tool_specified="$HEAD"
8412        tool_basename="${tool_specified##*/}"
8413        if test "x$tool_basename" = "x$tool_specified"; then
8414          # A command without a complete path is provided, search $PATH.
8415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8416$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8417          # Extract the first word of "$tool_basename", so it can be a program name with args.
8418set dummy $tool_basename; ac_word=$2
8419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8420$as_echo_n "checking for $ac_word... " >&6; }
8421if ${ac_cv_path_HEAD+:} false; then :
8422  $as_echo_n "(cached) " >&6
8423else
8424  case $HEAD in
8425  [\\/]* | ?:[\\/]*)
8426  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8427  ;;
8428  *)
8429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8430for as_dir in $PATH
8431do
8432  IFS=$as_save_IFS
8433  test -z "$as_dir" && as_dir=.
8434    for ac_exec_ext in '' $ac_executable_extensions; do
8435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8436    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8438    break 2
8439  fi
8440done
8441  done
8442IFS=$as_save_IFS
8443
8444  ;;
8445esac
8446fi
8447HEAD=$ac_cv_path_HEAD
8448if test -n "$HEAD"; then
8449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8450$as_echo "$HEAD" >&6; }
8451else
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453$as_echo "no" >&6; }
8454fi
8455
8456
8457          if test "x$HEAD" = x; then
8458            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8459          fi
8460        else
8461          # Otherwise we believe it is a complete path. Use it as it is.
8462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8463$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8464          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8465$as_echo_n "checking for HEAD... " >&6; }
8466          if test ! -x "$tool_specified"; then
8467            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8468$as_echo "not found" >&6; }
8469            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8470          fi
8471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8472$as_echo "$tool_specified" >&6; }
8473        fi
8474      fi
8475    fi
8476
8477  fi
8478
8479
8480
8481  if test "x$HEAD" = x; then
8482    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8483  fi
8484
8485
8486
8487
8488
8489  # Publish this variable in the help.
8490
8491
8492  if [ -z "${GUNZIP+x}" ]; then
8493    # The variable is not set by user, try to locate tool using the code snippet
8494    for ac_prog in gunzip
8495do
8496  # Extract the first word of "$ac_prog", so it can be a program name with args.
8497set dummy $ac_prog; ac_word=$2
8498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8499$as_echo_n "checking for $ac_word... " >&6; }
8500if ${ac_cv_path_GUNZIP+:} false; then :
8501  $as_echo_n "(cached) " >&6
8502else
8503  case $GUNZIP in
8504  [\\/]* | ?:[\\/]*)
8505  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8506  ;;
8507  *)
8508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8509for as_dir in $PATH
8510do
8511  IFS=$as_save_IFS
8512  test -z "$as_dir" && as_dir=.
8513    for ac_exec_ext in '' $ac_executable_extensions; do
8514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8515    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8517    break 2
8518  fi
8519done
8520  done
8521IFS=$as_save_IFS
8522
8523  ;;
8524esac
8525fi
8526GUNZIP=$ac_cv_path_GUNZIP
8527if test -n "$GUNZIP"; then
8528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8529$as_echo "$GUNZIP" >&6; }
8530else
8531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8532$as_echo "no" >&6; }
8533fi
8534
8535
8536  test -n "$GUNZIP" && break
8537done
8538
8539  else
8540    # The variable is set, but is it from the command line or the environment?
8541
8542    # Try to remove the string !GUNZIP! from our list.
8543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8545      # If it failed, the variable was not from the command line. Ignore it,
8546      # but warn the user (except for BASH, which is always set by the calling BASH).
8547      if test "xGUNZIP" != xBASH; then
8548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8549$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8550      fi
8551      # Try to locate tool using the code snippet
8552      for ac_prog in gunzip
8553do
8554  # Extract the first word of "$ac_prog", so it can be a program name with args.
8555set dummy $ac_prog; ac_word=$2
8556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8557$as_echo_n "checking for $ac_word... " >&6; }
8558if ${ac_cv_path_GUNZIP+:} false; then :
8559  $as_echo_n "(cached) " >&6
8560else
8561  case $GUNZIP in
8562  [\\/]* | ?:[\\/]*)
8563  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8564  ;;
8565  *)
8566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569  IFS=$as_save_IFS
8570  test -z "$as_dir" && as_dir=.
8571    for ac_exec_ext in '' $ac_executable_extensions; do
8572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8573    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8575    break 2
8576  fi
8577done
8578  done
8579IFS=$as_save_IFS
8580
8581  ;;
8582esac
8583fi
8584GUNZIP=$ac_cv_path_GUNZIP
8585if test -n "$GUNZIP"; then
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8587$as_echo "$GUNZIP" >&6; }
8588else
8589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
8591fi
8592
8593
8594  test -n "$GUNZIP" && break
8595done
8596
8597    else
8598      # If it succeeded, then it was overridden by the user. We will use it
8599      # for the tool.
8600
8601      # First remove it from the list of overridden variables, so we can test
8602      # for unknown variables in the end.
8603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8604
8605      # Check if we try to supply an empty value
8606      if test "x$GUNZIP" = x; then
8607        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8608$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8610$as_echo_n "checking for GUNZIP... " >&6; }
8611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8612$as_echo "disabled" >&6; }
8613      else
8614        # Check if the provided tool contains a complete path.
8615        tool_specified="$GUNZIP"
8616        tool_basename="${tool_specified##*/}"
8617        if test "x$tool_basename" = "x$tool_specified"; then
8618          # A command without a complete path is provided, search $PATH.
8619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8620$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8621          # Extract the first word of "$tool_basename", so it can be a program name with args.
8622set dummy $tool_basename; ac_word=$2
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8624$as_echo_n "checking for $ac_word... " >&6; }
8625if ${ac_cv_path_GUNZIP+:} false; then :
8626  $as_echo_n "(cached) " >&6
8627else
8628  case $GUNZIP in
8629  [\\/]* | ?:[\\/]*)
8630  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8631  ;;
8632  *)
8633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634for as_dir in $PATH
8635do
8636  IFS=$as_save_IFS
8637  test -z "$as_dir" && as_dir=.
8638    for ac_exec_ext in '' $ac_executable_extensions; do
8639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8640    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8642    break 2
8643  fi
8644done
8645  done
8646IFS=$as_save_IFS
8647
8648  ;;
8649esac
8650fi
8651GUNZIP=$ac_cv_path_GUNZIP
8652if test -n "$GUNZIP"; then
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8654$as_echo "$GUNZIP" >&6; }
8655else
8656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657$as_echo "no" >&6; }
8658fi
8659
8660
8661          if test "x$GUNZIP" = x; then
8662            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8663          fi
8664        else
8665          # Otherwise we believe it is a complete path. Use it as it is.
8666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8667$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8668          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8669$as_echo_n "checking for GUNZIP... " >&6; }
8670          if test ! -x "$tool_specified"; then
8671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8672$as_echo "not found" >&6; }
8673            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8674          fi
8675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8676$as_echo "$tool_specified" >&6; }
8677        fi
8678      fi
8679    fi
8680
8681  fi
8682
8683
8684
8685  if test "x$GUNZIP" = x; then
8686    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8687  fi
8688
8689
8690
8691
8692
8693  # Publish this variable in the help.
8694
8695
8696  if [ -z "${GZIP+x}" ]; then
8697    # The variable is not set by user, try to locate tool using the code snippet
8698    for ac_prog in pigz gzip
8699do
8700  # Extract the first word of "$ac_prog", so it can be a program name with args.
8701set dummy $ac_prog; ac_word=$2
8702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8703$as_echo_n "checking for $ac_word... " >&6; }
8704if ${ac_cv_path_GZIP+:} false; then :
8705  $as_echo_n "(cached) " >&6
8706else
8707  case $GZIP in
8708  [\\/]* | ?:[\\/]*)
8709  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8710  ;;
8711  *)
8712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8713for as_dir in $PATH
8714do
8715  IFS=$as_save_IFS
8716  test -z "$as_dir" && as_dir=.
8717    for ac_exec_ext in '' $ac_executable_extensions; do
8718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8719    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8721    break 2
8722  fi
8723done
8724  done
8725IFS=$as_save_IFS
8726
8727  ;;
8728esac
8729fi
8730GZIP=$ac_cv_path_GZIP
8731if test -n "$GZIP"; then
8732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8733$as_echo "$GZIP" >&6; }
8734else
8735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8736$as_echo "no" >&6; }
8737fi
8738
8739
8740  test -n "$GZIP" && break
8741done
8742
8743  else
8744    # The variable is set, but is it from the command line or the environment?
8745
8746    # Try to remove the string !GZIP! from our list.
8747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8749      # If it failed, the variable was not from the command line. Ignore it,
8750      # but warn the user (except for BASH, which is always set by the calling BASH).
8751      if test "xGZIP" != xBASH; then
8752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8753$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8754      fi
8755      # Try to locate tool using the code snippet
8756      for ac_prog in pigz gzip
8757do
8758  # Extract the first word of "$ac_prog", so it can be a program name with args.
8759set dummy $ac_prog; ac_word=$2
8760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8761$as_echo_n "checking for $ac_word... " >&6; }
8762if ${ac_cv_path_GZIP+:} false; then :
8763  $as_echo_n "(cached) " >&6
8764else
8765  case $GZIP in
8766  [\\/]* | ?:[\\/]*)
8767  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8768  ;;
8769  *)
8770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8771for as_dir in $PATH
8772do
8773  IFS=$as_save_IFS
8774  test -z "$as_dir" && as_dir=.
8775    for ac_exec_ext in '' $ac_executable_extensions; do
8776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8777    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8779    break 2
8780  fi
8781done
8782  done
8783IFS=$as_save_IFS
8784
8785  ;;
8786esac
8787fi
8788GZIP=$ac_cv_path_GZIP
8789if test -n "$GZIP"; then
8790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8791$as_echo "$GZIP" >&6; }
8792else
8793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
8795fi
8796
8797
8798  test -n "$GZIP" && break
8799done
8800
8801    else
8802      # If it succeeded, then it was overridden by the user. We will use it
8803      # for the tool.
8804
8805      # First remove it from the list of overridden variables, so we can test
8806      # for unknown variables in the end.
8807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8808
8809      # Check if we try to supply an empty value
8810      if test "x$GZIP" = x; then
8811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8812$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8814$as_echo_n "checking for GZIP... " >&6; }
8815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8816$as_echo "disabled" >&6; }
8817      else
8818        # Check if the provided tool contains a complete path.
8819        tool_specified="$GZIP"
8820        tool_basename="${tool_specified##*/}"
8821        if test "x$tool_basename" = "x$tool_specified"; then
8822          # A command without a complete path is provided, search $PATH.
8823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8824$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8825          # Extract the first word of "$tool_basename", so it can be a program name with args.
8826set dummy $tool_basename; ac_word=$2
8827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8828$as_echo_n "checking for $ac_word... " >&6; }
8829if ${ac_cv_path_GZIP+:} false; then :
8830  $as_echo_n "(cached) " >&6
8831else
8832  case $GZIP in
8833  [\\/]* | ?:[\\/]*)
8834  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8835  ;;
8836  *)
8837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8838for as_dir in $PATH
8839do
8840  IFS=$as_save_IFS
8841  test -z "$as_dir" && as_dir=.
8842    for ac_exec_ext in '' $ac_executable_extensions; do
8843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8844    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8846    break 2
8847  fi
8848done
8849  done
8850IFS=$as_save_IFS
8851
8852  ;;
8853esac
8854fi
8855GZIP=$ac_cv_path_GZIP
8856if test -n "$GZIP"; then
8857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8858$as_echo "$GZIP" >&6; }
8859else
8860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8861$as_echo "no" >&6; }
8862fi
8863
8864
8865          if test "x$GZIP" = x; then
8866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8867          fi
8868        else
8869          # Otherwise we believe it is a complete path. Use it as it is.
8870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8871$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8873$as_echo_n "checking for GZIP... " >&6; }
8874          if test ! -x "$tool_specified"; then
8875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8876$as_echo "not found" >&6; }
8877            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8878          fi
8879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8880$as_echo "$tool_specified" >&6; }
8881        fi
8882      fi
8883    fi
8884
8885  fi
8886
8887
8888
8889  if test "x$GZIP" = x; then
8890    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8891  fi
8892
8893
8894
8895
8896
8897  # Publish this variable in the help.
8898
8899
8900  if [ -z "${LN+x}" ]; then
8901    # The variable is not set by user, try to locate tool using the code snippet
8902    for ac_prog in ln
8903do
8904  # Extract the first word of "$ac_prog", so it can be a program name with args.
8905set dummy $ac_prog; ac_word=$2
8906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8907$as_echo_n "checking for $ac_word... " >&6; }
8908if ${ac_cv_path_LN+:} false; then :
8909  $as_echo_n "(cached) " >&6
8910else
8911  case $LN in
8912  [\\/]* | ?:[\\/]*)
8913  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8914  ;;
8915  *)
8916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8917for as_dir in $PATH
8918do
8919  IFS=$as_save_IFS
8920  test -z "$as_dir" && as_dir=.
8921    for ac_exec_ext in '' $ac_executable_extensions; do
8922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8923    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8925    break 2
8926  fi
8927done
8928  done
8929IFS=$as_save_IFS
8930
8931  ;;
8932esac
8933fi
8934LN=$ac_cv_path_LN
8935if test -n "$LN"; then
8936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8937$as_echo "$LN" >&6; }
8938else
8939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8940$as_echo "no" >&6; }
8941fi
8942
8943
8944  test -n "$LN" && break
8945done
8946
8947  else
8948    # The variable is set, but is it from the command line or the environment?
8949
8950    # Try to remove the string !LN! from our list.
8951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8953      # If it failed, the variable was not from the command line. Ignore it,
8954      # but warn the user (except for BASH, which is always set by the calling BASH).
8955      if test "xLN" != xBASH; then
8956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8957$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8958      fi
8959      # Try to locate tool using the code snippet
8960      for ac_prog in ln
8961do
8962  # Extract the first word of "$ac_prog", so it can be a program name with args.
8963set dummy $ac_prog; ac_word=$2
8964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8965$as_echo_n "checking for $ac_word... " >&6; }
8966if ${ac_cv_path_LN+:} false; then :
8967  $as_echo_n "(cached) " >&6
8968else
8969  case $LN in
8970  [\\/]* | ?:[\\/]*)
8971  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8972  ;;
8973  *)
8974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8975for as_dir in $PATH
8976do
8977  IFS=$as_save_IFS
8978  test -z "$as_dir" && as_dir=.
8979    for ac_exec_ext in '' $ac_executable_extensions; do
8980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8981    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8983    break 2
8984  fi
8985done
8986  done
8987IFS=$as_save_IFS
8988
8989  ;;
8990esac
8991fi
8992LN=$ac_cv_path_LN
8993if test -n "$LN"; then
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8995$as_echo "$LN" >&6; }
8996else
8997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998$as_echo "no" >&6; }
8999fi
9000
9001
9002  test -n "$LN" && break
9003done
9004
9005    else
9006      # If it succeeded, then it was overridden by the user. We will use it
9007      # for the tool.
9008
9009      # First remove it from the list of overridden variables, so we can test
9010      # for unknown variables in the end.
9011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9012
9013      # Check if we try to supply an empty value
9014      if test "x$LN" = x; then
9015        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9016$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9018$as_echo_n "checking for LN... " >&6; }
9019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9020$as_echo "disabled" >&6; }
9021      else
9022        # Check if the provided tool contains a complete path.
9023        tool_specified="$LN"
9024        tool_basename="${tool_specified##*/}"
9025        if test "x$tool_basename" = "x$tool_specified"; then
9026          # A command without a complete path is provided, search $PATH.
9027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9028$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9029          # Extract the first word of "$tool_basename", so it can be a program name with args.
9030set dummy $tool_basename; ac_word=$2
9031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9032$as_echo_n "checking for $ac_word... " >&6; }
9033if ${ac_cv_path_LN+:} false; then :
9034  $as_echo_n "(cached) " >&6
9035else
9036  case $LN in
9037  [\\/]* | ?:[\\/]*)
9038  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9039  ;;
9040  *)
9041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9042for as_dir in $PATH
9043do
9044  IFS=$as_save_IFS
9045  test -z "$as_dir" && as_dir=.
9046    for ac_exec_ext in '' $ac_executable_extensions; do
9047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9048    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9050    break 2
9051  fi
9052done
9053  done
9054IFS=$as_save_IFS
9055
9056  ;;
9057esac
9058fi
9059LN=$ac_cv_path_LN
9060if test -n "$LN"; then
9061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9062$as_echo "$LN" >&6; }
9063else
9064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9065$as_echo "no" >&6; }
9066fi
9067
9068
9069          if test "x$LN" = x; then
9070            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9071          fi
9072        else
9073          # Otherwise we believe it is a complete path. Use it as it is.
9074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9075$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9076          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9077$as_echo_n "checking for LN... " >&6; }
9078          if test ! -x "$tool_specified"; then
9079            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9080$as_echo "not found" >&6; }
9081            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9082          fi
9083          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9084$as_echo "$tool_specified" >&6; }
9085        fi
9086      fi
9087    fi
9088
9089  fi
9090
9091
9092
9093  if test "x$LN" = x; then
9094    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9095  fi
9096
9097
9098
9099
9100
9101  # Publish this variable in the help.
9102
9103
9104  if [ -z "${LS+x}" ]; then
9105    # The variable is not set by user, try to locate tool using the code snippet
9106    for ac_prog in ls
9107do
9108  # Extract the first word of "$ac_prog", so it can be a program name with args.
9109set dummy $ac_prog; ac_word=$2
9110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9111$as_echo_n "checking for $ac_word... " >&6; }
9112if ${ac_cv_path_LS+:} false; then :
9113  $as_echo_n "(cached) " >&6
9114else
9115  case $LS in
9116  [\\/]* | ?:[\\/]*)
9117  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9118  ;;
9119  *)
9120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9121for as_dir in $PATH
9122do
9123  IFS=$as_save_IFS
9124  test -z "$as_dir" && as_dir=.
9125    for ac_exec_ext in '' $ac_executable_extensions; do
9126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9127    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9129    break 2
9130  fi
9131done
9132  done
9133IFS=$as_save_IFS
9134
9135  ;;
9136esac
9137fi
9138LS=$ac_cv_path_LS
9139if test -n "$LS"; then
9140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9141$as_echo "$LS" >&6; }
9142else
9143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9144$as_echo "no" >&6; }
9145fi
9146
9147
9148  test -n "$LS" && break
9149done
9150
9151  else
9152    # The variable is set, but is it from the command line or the environment?
9153
9154    # Try to remove the string !LS! from our list.
9155    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9156    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9157      # If it failed, the variable was not from the command line. Ignore it,
9158      # but warn the user (except for BASH, which is always set by the calling BASH).
9159      if test "xLS" != xBASH; then
9160        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9161$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9162      fi
9163      # Try to locate tool using the code snippet
9164      for ac_prog in ls
9165do
9166  # Extract the first word of "$ac_prog", so it can be a program name with args.
9167set dummy $ac_prog; ac_word=$2
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9169$as_echo_n "checking for $ac_word... " >&6; }
9170if ${ac_cv_path_LS+:} false; then :
9171  $as_echo_n "(cached) " >&6
9172else
9173  case $LS in
9174  [\\/]* | ?:[\\/]*)
9175  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9176  ;;
9177  *)
9178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9179for as_dir in $PATH
9180do
9181  IFS=$as_save_IFS
9182  test -z "$as_dir" && as_dir=.
9183    for ac_exec_ext in '' $ac_executable_extensions; do
9184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9185    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9187    break 2
9188  fi
9189done
9190  done
9191IFS=$as_save_IFS
9192
9193  ;;
9194esac
9195fi
9196LS=$ac_cv_path_LS
9197if test -n "$LS"; then
9198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9199$as_echo "$LS" >&6; }
9200else
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9202$as_echo "no" >&6; }
9203fi
9204
9205
9206  test -n "$LS" && break
9207done
9208
9209    else
9210      # If it succeeded, then it was overridden by the user. We will use it
9211      # for the tool.
9212
9213      # First remove it from the list of overridden variables, so we can test
9214      # for unknown variables in the end.
9215      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9216
9217      # Check if we try to supply an empty value
9218      if test "x$LS" = x; then
9219        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9220$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9222$as_echo_n "checking for LS... " >&6; }
9223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9224$as_echo "disabled" >&6; }
9225      else
9226        # Check if the provided tool contains a complete path.
9227        tool_specified="$LS"
9228        tool_basename="${tool_specified##*/}"
9229        if test "x$tool_basename" = "x$tool_specified"; then
9230          # A command without a complete path is provided, search $PATH.
9231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9232$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9233          # Extract the first word of "$tool_basename", so it can be a program name with args.
9234set dummy $tool_basename; ac_word=$2
9235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9236$as_echo_n "checking for $ac_word... " >&6; }
9237if ${ac_cv_path_LS+:} false; then :
9238  $as_echo_n "(cached) " >&6
9239else
9240  case $LS in
9241  [\\/]* | ?:[\\/]*)
9242  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9243  ;;
9244  *)
9245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9246for as_dir in $PATH
9247do
9248  IFS=$as_save_IFS
9249  test -z "$as_dir" && as_dir=.
9250    for ac_exec_ext in '' $ac_executable_extensions; do
9251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9252    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9254    break 2
9255  fi
9256done
9257  done
9258IFS=$as_save_IFS
9259
9260  ;;
9261esac
9262fi
9263LS=$ac_cv_path_LS
9264if test -n "$LS"; then
9265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9266$as_echo "$LS" >&6; }
9267else
9268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9269$as_echo "no" >&6; }
9270fi
9271
9272
9273          if test "x$LS" = x; then
9274            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9275          fi
9276        else
9277          # Otherwise we believe it is a complete path. Use it as it is.
9278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9279$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9280          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9281$as_echo_n "checking for LS... " >&6; }
9282          if test ! -x "$tool_specified"; then
9283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9284$as_echo "not found" >&6; }
9285            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9286          fi
9287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9288$as_echo "$tool_specified" >&6; }
9289        fi
9290      fi
9291    fi
9292
9293  fi
9294
9295
9296
9297  if test "x$LS" = x; then
9298    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9299  fi
9300
9301
9302
9303
9304
9305  # Publish this variable in the help.
9306
9307
9308  if [ -z "${MKDIR+x}" ]; then
9309    # The variable is not set by user, try to locate tool using the code snippet
9310    for ac_prog in mkdir
9311do
9312  # Extract the first word of "$ac_prog", so it can be a program name with args.
9313set dummy $ac_prog; ac_word=$2
9314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9315$as_echo_n "checking for $ac_word... " >&6; }
9316if ${ac_cv_path_MKDIR+:} false; then :
9317  $as_echo_n "(cached) " >&6
9318else
9319  case $MKDIR in
9320  [\\/]* | ?:[\\/]*)
9321  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9322  ;;
9323  *)
9324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9325for as_dir in $PATH
9326do
9327  IFS=$as_save_IFS
9328  test -z "$as_dir" && as_dir=.
9329    for ac_exec_ext in '' $ac_executable_extensions; do
9330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9331    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9333    break 2
9334  fi
9335done
9336  done
9337IFS=$as_save_IFS
9338
9339  ;;
9340esac
9341fi
9342MKDIR=$ac_cv_path_MKDIR
9343if test -n "$MKDIR"; then
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9345$as_echo "$MKDIR" >&6; }
9346else
9347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348$as_echo "no" >&6; }
9349fi
9350
9351
9352  test -n "$MKDIR" && break
9353done
9354
9355  else
9356    # The variable is set, but is it from the command line or the environment?
9357
9358    # Try to remove the string !MKDIR! from our list.
9359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9361      # If it failed, the variable was not from the command line. Ignore it,
9362      # but warn the user (except for BASH, which is always set by the calling BASH).
9363      if test "xMKDIR" != xBASH; then
9364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9365$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9366      fi
9367      # Try to locate tool using the code snippet
9368      for ac_prog in mkdir
9369do
9370  # Extract the first word of "$ac_prog", so it can be a program name with args.
9371set dummy $ac_prog; ac_word=$2
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373$as_echo_n "checking for $ac_word... " >&6; }
9374if ${ac_cv_path_MKDIR+:} false; then :
9375  $as_echo_n "(cached) " >&6
9376else
9377  case $MKDIR in
9378  [\\/]* | ?:[\\/]*)
9379  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9380  ;;
9381  *)
9382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383for as_dir in $PATH
9384do
9385  IFS=$as_save_IFS
9386  test -z "$as_dir" && as_dir=.
9387    for ac_exec_ext in '' $ac_executable_extensions; do
9388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391    break 2
9392  fi
9393done
9394  done
9395IFS=$as_save_IFS
9396
9397  ;;
9398esac
9399fi
9400MKDIR=$ac_cv_path_MKDIR
9401if test -n "$MKDIR"; then
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9403$as_echo "$MKDIR" >&6; }
9404else
9405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
9407fi
9408
9409
9410  test -n "$MKDIR" && break
9411done
9412
9413    else
9414      # If it succeeded, then it was overridden by the user. We will use it
9415      # for the tool.
9416
9417      # First remove it from the list of overridden variables, so we can test
9418      # for unknown variables in the end.
9419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9420
9421      # Check if we try to supply an empty value
9422      if test "x$MKDIR" = x; then
9423        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9424$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9425        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9426$as_echo_n "checking for MKDIR... " >&6; }
9427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9428$as_echo "disabled" >&6; }
9429      else
9430        # Check if the provided tool contains a complete path.
9431        tool_specified="$MKDIR"
9432        tool_basename="${tool_specified##*/}"
9433        if test "x$tool_basename" = "x$tool_specified"; then
9434          # A command without a complete path is provided, search $PATH.
9435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9436$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9437          # Extract the first word of "$tool_basename", so it can be a program name with args.
9438set dummy $tool_basename; ac_word=$2
9439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9440$as_echo_n "checking for $ac_word... " >&6; }
9441if ${ac_cv_path_MKDIR+:} false; then :
9442  $as_echo_n "(cached) " >&6
9443else
9444  case $MKDIR in
9445  [\\/]* | ?:[\\/]*)
9446  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9447  ;;
9448  *)
9449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9450for as_dir in $PATH
9451do
9452  IFS=$as_save_IFS
9453  test -z "$as_dir" && as_dir=.
9454    for ac_exec_ext in '' $ac_executable_extensions; do
9455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9456    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9458    break 2
9459  fi
9460done
9461  done
9462IFS=$as_save_IFS
9463
9464  ;;
9465esac
9466fi
9467MKDIR=$ac_cv_path_MKDIR
9468if test -n "$MKDIR"; then
9469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9470$as_echo "$MKDIR" >&6; }
9471else
9472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9473$as_echo "no" >&6; }
9474fi
9475
9476
9477          if test "x$MKDIR" = x; then
9478            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9479          fi
9480        else
9481          # Otherwise we believe it is a complete path. Use it as it is.
9482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9483$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9484          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9485$as_echo_n "checking for MKDIR... " >&6; }
9486          if test ! -x "$tool_specified"; then
9487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9488$as_echo "not found" >&6; }
9489            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9490          fi
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9492$as_echo "$tool_specified" >&6; }
9493        fi
9494      fi
9495    fi
9496
9497  fi
9498
9499
9500
9501  if test "x$MKDIR" = x; then
9502    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9503  fi
9504
9505
9506
9507
9508
9509  # Publish this variable in the help.
9510
9511
9512  if [ -z "${MKTEMP+x}" ]; then
9513    # The variable is not set by user, try to locate tool using the code snippet
9514    for ac_prog in mktemp
9515do
9516  # Extract the first word of "$ac_prog", so it can be a program name with args.
9517set dummy $ac_prog; ac_word=$2
9518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9519$as_echo_n "checking for $ac_word... " >&6; }
9520if ${ac_cv_path_MKTEMP+:} false; then :
9521  $as_echo_n "(cached) " >&6
9522else
9523  case $MKTEMP in
9524  [\\/]* | ?:[\\/]*)
9525  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9526  ;;
9527  *)
9528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9529for as_dir in $PATH
9530do
9531  IFS=$as_save_IFS
9532  test -z "$as_dir" && as_dir=.
9533    for ac_exec_ext in '' $ac_executable_extensions; do
9534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9535    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9537    break 2
9538  fi
9539done
9540  done
9541IFS=$as_save_IFS
9542
9543  ;;
9544esac
9545fi
9546MKTEMP=$ac_cv_path_MKTEMP
9547if test -n "$MKTEMP"; then
9548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9549$as_echo "$MKTEMP" >&6; }
9550else
9551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
9553fi
9554
9555
9556  test -n "$MKTEMP" && break
9557done
9558
9559  else
9560    # The variable is set, but is it from the command line or the environment?
9561
9562    # Try to remove the string !MKTEMP! from our list.
9563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9565      # If it failed, the variable was not from the command line. Ignore it,
9566      # but warn the user (except for BASH, which is always set by the calling BASH).
9567      if test "xMKTEMP" != xBASH; then
9568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9569$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9570      fi
9571      # Try to locate tool using the code snippet
9572      for ac_prog in mktemp
9573do
9574  # Extract the first word of "$ac_prog", so it can be a program name with args.
9575set dummy $ac_prog; ac_word=$2
9576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9577$as_echo_n "checking for $ac_word... " >&6; }
9578if ${ac_cv_path_MKTEMP+:} false; then :
9579  $as_echo_n "(cached) " >&6
9580else
9581  case $MKTEMP in
9582  [\\/]* | ?:[\\/]*)
9583  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9584  ;;
9585  *)
9586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9587for as_dir in $PATH
9588do
9589  IFS=$as_save_IFS
9590  test -z "$as_dir" && as_dir=.
9591    for ac_exec_ext in '' $ac_executable_extensions; do
9592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9593    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9595    break 2
9596  fi
9597done
9598  done
9599IFS=$as_save_IFS
9600
9601  ;;
9602esac
9603fi
9604MKTEMP=$ac_cv_path_MKTEMP
9605if test -n "$MKTEMP"; then
9606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9607$as_echo "$MKTEMP" >&6; }
9608else
9609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9610$as_echo "no" >&6; }
9611fi
9612
9613
9614  test -n "$MKTEMP" && break
9615done
9616
9617    else
9618      # If it succeeded, then it was overridden by the user. We will use it
9619      # for the tool.
9620
9621      # First remove it from the list of overridden variables, so we can test
9622      # for unknown variables in the end.
9623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9624
9625      # Check if we try to supply an empty value
9626      if test "x$MKTEMP" = x; then
9627        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9628$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9630$as_echo_n "checking for MKTEMP... " >&6; }
9631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9632$as_echo "disabled" >&6; }
9633      else
9634        # Check if the provided tool contains a complete path.
9635        tool_specified="$MKTEMP"
9636        tool_basename="${tool_specified##*/}"
9637        if test "x$tool_basename" = "x$tool_specified"; then
9638          # A command without a complete path is provided, search $PATH.
9639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9640$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9641          # Extract the first word of "$tool_basename", so it can be a program name with args.
9642set dummy $tool_basename; ac_word=$2
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9644$as_echo_n "checking for $ac_word... " >&6; }
9645if ${ac_cv_path_MKTEMP+:} false; then :
9646  $as_echo_n "(cached) " >&6
9647else
9648  case $MKTEMP in
9649  [\\/]* | ?:[\\/]*)
9650  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9651  ;;
9652  *)
9653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9654for as_dir in $PATH
9655do
9656  IFS=$as_save_IFS
9657  test -z "$as_dir" && as_dir=.
9658    for ac_exec_ext in '' $ac_executable_extensions; do
9659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9660    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9662    break 2
9663  fi
9664done
9665  done
9666IFS=$as_save_IFS
9667
9668  ;;
9669esac
9670fi
9671MKTEMP=$ac_cv_path_MKTEMP
9672if test -n "$MKTEMP"; then
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9674$as_echo "$MKTEMP" >&6; }
9675else
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678fi
9679
9680
9681          if test "x$MKTEMP" = x; then
9682            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9683          fi
9684        else
9685          # Otherwise we believe it is a complete path. Use it as it is.
9686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9687$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9688          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9689$as_echo_n "checking for MKTEMP... " >&6; }
9690          if test ! -x "$tool_specified"; then
9691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9692$as_echo "not found" >&6; }
9693            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9694          fi
9695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9696$as_echo "$tool_specified" >&6; }
9697        fi
9698      fi
9699    fi
9700
9701  fi
9702
9703
9704
9705  if test "x$MKTEMP" = x; then
9706    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9707  fi
9708
9709
9710
9711
9712
9713  # Publish this variable in the help.
9714
9715
9716  if [ -z "${MV+x}" ]; then
9717    # The variable is not set by user, try to locate tool using the code snippet
9718    for ac_prog in mv
9719do
9720  # Extract the first word of "$ac_prog", so it can be a program name with args.
9721set dummy $ac_prog; ac_word=$2
9722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9723$as_echo_n "checking for $ac_word... " >&6; }
9724if ${ac_cv_path_MV+:} false; then :
9725  $as_echo_n "(cached) " >&6
9726else
9727  case $MV in
9728  [\\/]* | ?:[\\/]*)
9729  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9730  ;;
9731  *)
9732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9733for as_dir in $PATH
9734do
9735  IFS=$as_save_IFS
9736  test -z "$as_dir" && as_dir=.
9737    for ac_exec_ext in '' $ac_executable_extensions; do
9738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9739    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9741    break 2
9742  fi
9743done
9744  done
9745IFS=$as_save_IFS
9746
9747  ;;
9748esac
9749fi
9750MV=$ac_cv_path_MV
9751if test -n "$MV"; then
9752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9753$as_echo "$MV" >&6; }
9754else
9755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756$as_echo "no" >&6; }
9757fi
9758
9759
9760  test -n "$MV" && break
9761done
9762
9763  else
9764    # The variable is set, but is it from the command line or the environment?
9765
9766    # Try to remove the string !MV! from our list.
9767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9769      # If it failed, the variable was not from the command line. Ignore it,
9770      # but warn the user (except for BASH, which is always set by the calling BASH).
9771      if test "xMV" != xBASH; then
9772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9773$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9774      fi
9775      # Try to locate tool using the code snippet
9776      for ac_prog in mv
9777do
9778  # Extract the first word of "$ac_prog", so it can be a program name with args.
9779set dummy $ac_prog; ac_word=$2
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9781$as_echo_n "checking for $ac_word... " >&6; }
9782if ${ac_cv_path_MV+:} false; then :
9783  $as_echo_n "(cached) " >&6
9784else
9785  case $MV in
9786  [\\/]* | ?:[\\/]*)
9787  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9788  ;;
9789  *)
9790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791for as_dir in $PATH
9792do
9793  IFS=$as_save_IFS
9794  test -z "$as_dir" && as_dir=.
9795    for ac_exec_ext in '' $ac_executable_extensions; do
9796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9797    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9799    break 2
9800  fi
9801done
9802  done
9803IFS=$as_save_IFS
9804
9805  ;;
9806esac
9807fi
9808MV=$ac_cv_path_MV
9809if test -n "$MV"; then
9810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9811$as_echo "$MV" >&6; }
9812else
9813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
9815fi
9816
9817
9818  test -n "$MV" && break
9819done
9820
9821    else
9822      # If it succeeded, then it was overridden by the user. We will use it
9823      # for the tool.
9824
9825      # First remove it from the list of overridden variables, so we can test
9826      # for unknown variables in the end.
9827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9828
9829      # Check if we try to supply an empty value
9830      if test "x$MV" = x; then
9831        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9832$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9834$as_echo_n "checking for MV... " >&6; }
9835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9836$as_echo "disabled" >&6; }
9837      else
9838        # Check if the provided tool contains a complete path.
9839        tool_specified="$MV"
9840        tool_basename="${tool_specified##*/}"
9841        if test "x$tool_basename" = "x$tool_specified"; then
9842          # A command without a complete path is provided, search $PATH.
9843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9844$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9845          # Extract the first word of "$tool_basename", so it can be a program name with args.
9846set dummy $tool_basename; ac_word=$2
9847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9848$as_echo_n "checking for $ac_word... " >&6; }
9849if ${ac_cv_path_MV+:} false; then :
9850  $as_echo_n "(cached) " >&6
9851else
9852  case $MV in
9853  [\\/]* | ?:[\\/]*)
9854  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9855  ;;
9856  *)
9857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9858for as_dir in $PATH
9859do
9860  IFS=$as_save_IFS
9861  test -z "$as_dir" && as_dir=.
9862    for ac_exec_ext in '' $ac_executable_extensions; do
9863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9864    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9866    break 2
9867  fi
9868done
9869  done
9870IFS=$as_save_IFS
9871
9872  ;;
9873esac
9874fi
9875MV=$ac_cv_path_MV
9876if test -n "$MV"; then
9877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9878$as_echo "$MV" >&6; }
9879else
9880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
9882fi
9883
9884
9885          if test "x$MV" = x; then
9886            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9887          fi
9888        else
9889          # Otherwise we believe it is a complete path. Use it as it is.
9890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9891$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9892          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9893$as_echo_n "checking for MV... " >&6; }
9894          if test ! -x "$tool_specified"; then
9895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9896$as_echo "not found" >&6; }
9897            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9898          fi
9899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9900$as_echo "$tool_specified" >&6; }
9901        fi
9902      fi
9903    fi
9904
9905  fi
9906
9907
9908
9909  if test "x$MV" = x; then
9910    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9911  fi
9912
9913
9914
9915
9916
9917  # Publish this variable in the help.
9918
9919
9920  if [ -z "${NAWK+x}" ]; then
9921    # The variable is not set by user, try to locate tool using the code snippet
9922    for ac_prog in nawk gawk awk
9923do
9924  # Extract the first word of "$ac_prog", so it can be a program name with args.
9925set dummy $ac_prog; ac_word=$2
9926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9927$as_echo_n "checking for $ac_word... " >&6; }
9928if ${ac_cv_path_NAWK+:} false; then :
9929  $as_echo_n "(cached) " >&6
9930else
9931  case $NAWK in
9932  [\\/]* | ?:[\\/]*)
9933  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9934  ;;
9935  *)
9936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9937for as_dir in $PATH
9938do
9939  IFS=$as_save_IFS
9940  test -z "$as_dir" && as_dir=.
9941    for ac_exec_ext in '' $ac_executable_extensions; do
9942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9943    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9945    break 2
9946  fi
9947done
9948  done
9949IFS=$as_save_IFS
9950
9951  ;;
9952esac
9953fi
9954NAWK=$ac_cv_path_NAWK
9955if test -n "$NAWK"; then
9956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9957$as_echo "$NAWK" >&6; }
9958else
9959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9960$as_echo "no" >&6; }
9961fi
9962
9963
9964  test -n "$NAWK" && break
9965done
9966
9967  else
9968    # The variable is set, but is it from the command line or the environment?
9969
9970    # Try to remove the string !NAWK! from our list.
9971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9973      # If it failed, the variable was not from the command line. Ignore it,
9974      # but warn the user (except for BASH, which is always set by the calling BASH).
9975      if test "xNAWK" != xBASH; then
9976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9977$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9978      fi
9979      # Try to locate tool using the code snippet
9980      for ac_prog in nawk gawk awk
9981do
9982  # Extract the first word of "$ac_prog", so it can be a program name with args.
9983set dummy $ac_prog; ac_word=$2
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9985$as_echo_n "checking for $ac_word... " >&6; }
9986if ${ac_cv_path_NAWK+:} false; then :
9987  $as_echo_n "(cached) " >&6
9988else
9989  case $NAWK in
9990  [\\/]* | ?:[\\/]*)
9991  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9992  ;;
9993  *)
9994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9995for as_dir in $PATH
9996do
9997  IFS=$as_save_IFS
9998  test -z "$as_dir" && as_dir=.
9999    for ac_exec_ext in '' $ac_executable_extensions; do
10000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10001    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10003    break 2
10004  fi
10005done
10006  done
10007IFS=$as_save_IFS
10008
10009  ;;
10010esac
10011fi
10012NAWK=$ac_cv_path_NAWK
10013if test -n "$NAWK"; then
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10015$as_echo "$NAWK" >&6; }
10016else
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
10019fi
10020
10021
10022  test -n "$NAWK" && break
10023done
10024
10025    else
10026      # If it succeeded, then it was overridden by the user. We will use it
10027      # for the tool.
10028
10029      # First remove it from the list of overridden variables, so we can test
10030      # for unknown variables in the end.
10031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10032
10033      # Check if we try to supply an empty value
10034      if test "x$NAWK" = x; then
10035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10036$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10038$as_echo_n "checking for NAWK... " >&6; }
10039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10040$as_echo "disabled" >&6; }
10041      else
10042        # Check if the provided tool contains a complete path.
10043        tool_specified="$NAWK"
10044        tool_basename="${tool_specified##*/}"
10045        if test "x$tool_basename" = "x$tool_specified"; then
10046          # A command without a complete path is provided, search $PATH.
10047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10048$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10049          # Extract the first word of "$tool_basename", so it can be a program name with args.
10050set dummy $tool_basename; ac_word=$2
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10052$as_echo_n "checking for $ac_word... " >&6; }
10053if ${ac_cv_path_NAWK+:} false; then :
10054  $as_echo_n "(cached) " >&6
10055else
10056  case $NAWK in
10057  [\\/]* | ?:[\\/]*)
10058  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10059  ;;
10060  *)
10061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10062for as_dir in $PATH
10063do
10064  IFS=$as_save_IFS
10065  test -z "$as_dir" && as_dir=.
10066    for ac_exec_ext in '' $ac_executable_extensions; do
10067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10068    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10070    break 2
10071  fi
10072done
10073  done
10074IFS=$as_save_IFS
10075
10076  ;;
10077esac
10078fi
10079NAWK=$ac_cv_path_NAWK
10080if test -n "$NAWK"; then
10081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10082$as_echo "$NAWK" >&6; }
10083else
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088
10089          if test "x$NAWK" = x; then
10090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10091          fi
10092        else
10093          # Otherwise we believe it is a complete path. Use it as it is.
10094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10095$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10097$as_echo_n "checking for NAWK... " >&6; }
10098          if test ! -x "$tool_specified"; then
10099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10100$as_echo "not found" >&6; }
10101            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10102          fi
10103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10104$as_echo "$tool_specified" >&6; }
10105        fi
10106      fi
10107    fi
10108
10109  fi
10110
10111
10112
10113  if test "x$NAWK" = x; then
10114    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10115  fi
10116
10117
10118
10119
10120
10121  # Publish this variable in the help.
10122
10123
10124  if [ -z "${PRINTF+x}" ]; then
10125    # The variable is not set by user, try to locate tool using the code snippet
10126    for ac_prog in printf
10127do
10128  # Extract the first word of "$ac_prog", so it can be a program name with args.
10129set dummy $ac_prog; ac_word=$2
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10131$as_echo_n "checking for $ac_word... " >&6; }
10132if ${ac_cv_path_PRINTF+:} false; then :
10133  $as_echo_n "(cached) " >&6
10134else
10135  case $PRINTF in
10136  [\\/]* | ?:[\\/]*)
10137  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10138  ;;
10139  *)
10140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10141for as_dir in $PATH
10142do
10143  IFS=$as_save_IFS
10144  test -z "$as_dir" && as_dir=.
10145    for ac_exec_ext in '' $ac_executable_extensions; do
10146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10147    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10149    break 2
10150  fi
10151done
10152  done
10153IFS=$as_save_IFS
10154
10155  ;;
10156esac
10157fi
10158PRINTF=$ac_cv_path_PRINTF
10159if test -n "$PRINTF"; then
10160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10161$as_echo "$PRINTF" >&6; }
10162else
10163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10164$as_echo "no" >&6; }
10165fi
10166
10167
10168  test -n "$PRINTF" && break
10169done
10170
10171  else
10172    # The variable is set, but is it from the command line or the environment?
10173
10174    # Try to remove the string !PRINTF! from our list.
10175    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10176    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10177      # If it failed, the variable was not from the command line. Ignore it,
10178      # but warn the user (except for BASH, which is always set by the calling BASH).
10179      if test "xPRINTF" != xBASH; then
10180        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10181$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10182      fi
10183      # Try to locate tool using the code snippet
10184      for ac_prog in printf
10185do
10186  # Extract the first word of "$ac_prog", so it can be a program name with args.
10187set dummy $ac_prog; ac_word=$2
10188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10189$as_echo_n "checking for $ac_word... " >&6; }
10190if ${ac_cv_path_PRINTF+:} false; then :
10191  $as_echo_n "(cached) " >&6
10192else
10193  case $PRINTF in
10194  [\\/]* | ?:[\\/]*)
10195  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10196  ;;
10197  *)
10198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10199for as_dir in $PATH
10200do
10201  IFS=$as_save_IFS
10202  test -z "$as_dir" && as_dir=.
10203    for ac_exec_ext in '' $ac_executable_extensions; do
10204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10205    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10207    break 2
10208  fi
10209done
10210  done
10211IFS=$as_save_IFS
10212
10213  ;;
10214esac
10215fi
10216PRINTF=$ac_cv_path_PRINTF
10217if test -n "$PRINTF"; then
10218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10219$as_echo "$PRINTF" >&6; }
10220else
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
10223fi
10224
10225
10226  test -n "$PRINTF" && break
10227done
10228
10229    else
10230      # If it succeeded, then it was overridden by the user. We will use it
10231      # for the tool.
10232
10233      # First remove it from the list of overridden variables, so we can test
10234      # for unknown variables in the end.
10235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10236
10237      # Check if we try to supply an empty value
10238      if test "x$PRINTF" = x; then
10239        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10240$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10242$as_echo_n "checking for PRINTF... " >&6; }
10243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10244$as_echo "disabled" >&6; }
10245      else
10246        # Check if the provided tool contains a complete path.
10247        tool_specified="$PRINTF"
10248        tool_basename="${tool_specified##*/}"
10249        if test "x$tool_basename" = "x$tool_specified"; then
10250          # A command without a complete path is provided, search $PATH.
10251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10252$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10253          # Extract the first word of "$tool_basename", so it can be a program name with args.
10254set dummy $tool_basename; ac_word=$2
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10256$as_echo_n "checking for $ac_word... " >&6; }
10257if ${ac_cv_path_PRINTF+:} false; then :
10258  $as_echo_n "(cached) " >&6
10259else
10260  case $PRINTF in
10261  [\\/]* | ?:[\\/]*)
10262  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10263  ;;
10264  *)
10265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10266for as_dir in $PATH
10267do
10268  IFS=$as_save_IFS
10269  test -z "$as_dir" && as_dir=.
10270    for ac_exec_ext in '' $ac_executable_extensions; do
10271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10272    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10274    break 2
10275  fi
10276done
10277  done
10278IFS=$as_save_IFS
10279
10280  ;;
10281esac
10282fi
10283PRINTF=$ac_cv_path_PRINTF
10284if test -n "$PRINTF"; then
10285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10286$as_echo "$PRINTF" >&6; }
10287else
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
10290fi
10291
10292
10293          if test "x$PRINTF" = x; then
10294            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10295          fi
10296        else
10297          # Otherwise we believe it is a complete path. Use it as it is.
10298          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10299$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10300          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10301$as_echo_n "checking for PRINTF... " >&6; }
10302          if test ! -x "$tool_specified"; then
10303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10304$as_echo "not found" >&6; }
10305            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10306          fi
10307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10308$as_echo "$tool_specified" >&6; }
10309        fi
10310      fi
10311    fi
10312
10313  fi
10314
10315
10316
10317  if test "x$PRINTF" = x; then
10318    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10319  fi
10320
10321
10322
10323
10324
10325  # Publish this variable in the help.
10326
10327
10328  if [ -z "${RM+x}" ]; then
10329    # The variable is not set by user, try to locate tool using the code snippet
10330    for ac_prog in rm
10331do
10332  # Extract the first word of "$ac_prog", so it can be a program name with args.
10333set dummy $ac_prog; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if ${ac_cv_path_RM+:} false; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  case $RM in
10340  [\\/]* | ?:[\\/]*)
10341  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10342  ;;
10343  *)
10344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10345for as_dir in $PATH
10346do
10347  IFS=$as_save_IFS
10348  test -z "$as_dir" && as_dir=.
10349    for ac_exec_ext in '' $ac_executable_extensions; do
10350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10351    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10353    break 2
10354  fi
10355done
10356  done
10357IFS=$as_save_IFS
10358
10359  ;;
10360esac
10361fi
10362RM=$ac_cv_path_RM
10363if test -n "$RM"; then
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10365$as_echo "$RM" >&6; }
10366else
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369fi
10370
10371
10372  test -n "$RM" && break
10373done
10374
10375  else
10376    # The variable is set, but is it from the command line or the environment?
10377
10378    # Try to remove the string !RM! from our list.
10379    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10380    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10381      # If it failed, the variable was not from the command line. Ignore it,
10382      # but warn the user (except for BASH, which is always set by the calling BASH).
10383      if test "xRM" != xBASH; then
10384        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10385$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10386      fi
10387      # Try to locate tool using the code snippet
10388      for ac_prog in rm
10389do
10390  # Extract the first word of "$ac_prog", so it can be a program name with args.
10391set dummy $ac_prog; ac_word=$2
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10393$as_echo_n "checking for $ac_word... " >&6; }
10394if ${ac_cv_path_RM+:} false; then :
10395  $as_echo_n "(cached) " >&6
10396else
10397  case $RM in
10398  [\\/]* | ?:[\\/]*)
10399  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10400  ;;
10401  *)
10402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10403for as_dir in $PATH
10404do
10405  IFS=$as_save_IFS
10406  test -z "$as_dir" && as_dir=.
10407    for ac_exec_ext in '' $ac_executable_extensions; do
10408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10409    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10411    break 2
10412  fi
10413done
10414  done
10415IFS=$as_save_IFS
10416
10417  ;;
10418esac
10419fi
10420RM=$ac_cv_path_RM
10421if test -n "$RM"; then
10422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10423$as_echo "$RM" >&6; }
10424else
10425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427fi
10428
10429
10430  test -n "$RM" && break
10431done
10432
10433    else
10434      # If it succeeded, then it was overridden by the user. We will use it
10435      # for the tool.
10436
10437      # First remove it from the list of overridden variables, so we can test
10438      # for unknown variables in the end.
10439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10440
10441      # Check if we try to supply an empty value
10442      if test "x$RM" = x; then
10443        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10444$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10446$as_echo_n "checking for RM... " >&6; }
10447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10448$as_echo "disabled" >&6; }
10449      else
10450        # Check if the provided tool contains a complete path.
10451        tool_specified="$RM"
10452        tool_basename="${tool_specified##*/}"
10453        if test "x$tool_basename" = "x$tool_specified"; then
10454          # A command without a complete path is provided, search $PATH.
10455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10456$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10457          # Extract the first word of "$tool_basename", so it can be a program name with args.
10458set dummy $tool_basename; ac_word=$2
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10460$as_echo_n "checking for $ac_word... " >&6; }
10461if ${ac_cv_path_RM+:} false; then :
10462  $as_echo_n "(cached) " >&6
10463else
10464  case $RM in
10465  [\\/]* | ?:[\\/]*)
10466  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10467  ;;
10468  *)
10469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10470for as_dir in $PATH
10471do
10472  IFS=$as_save_IFS
10473  test -z "$as_dir" && as_dir=.
10474    for ac_exec_ext in '' $ac_executable_extensions; do
10475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10476    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10478    break 2
10479  fi
10480done
10481  done
10482IFS=$as_save_IFS
10483
10484  ;;
10485esac
10486fi
10487RM=$ac_cv_path_RM
10488if test -n "$RM"; then
10489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10490$as_echo "$RM" >&6; }
10491else
10492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
10494fi
10495
10496
10497          if test "x$RM" = x; then
10498            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10499          fi
10500        else
10501          # Otherwise we believe it is a complete path. Use it as it is.
10502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10503$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10504          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10505$as_echo_n "checking for RM... " >&6; }
10506          if test ! -x "$tool_specified"; then
10507            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10508$as_echo "not found" >&6; }
10509            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10510          fi
10511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10512$as_echo "$tool_specified" >&6; }
10513        fi
10514      fi
10515    fi
10516
10517  fi
10518
10519
10520
10521  if test "x$RM" = x; then
10522    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10523  fi
10524
10525
10526
10527
10528
10529  # Publish this variable in the help.
10530
10531
10532  if [ -z "${RMDIR+x}" ]; then
10533    # The variable is not set by user, try to locate tool using the code snippet
10534    for ac_prog in rmdir
10535do
10536  # Extract the first word of "$ac_prog", so it can be a program name with args.
10537set dummy $ac_prog; ac_word=$2
10538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10539$as_echo_n "checking for $ac_word... " >&6; }
10540if ${ac_cv_path_RMDIR+:} false; then :
10541  $as_echo_n "(cached) " >&6
10542else
10543  case $RMDIR in
10544  [\\/]* | ?:[\\/]*)
10545  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10546  ;;
10547  *)
10548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10549for as_dir in $PATH
10550do
10551  IFS=$as_save_IFS
10552  test -z "$as_dir" && as_dir=.
10553    for ac_exec_ext in '' $ac_executable_extensions; do
10554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10555    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10557    break 2
10558  fi
10559done
10560  done
10561IFS=$as_save_IFS
10562
10563  ;;
10564esac
10565fi
10566RMDIR=$ac_cv_path_RMDIR
10567if test -n "$RMDIR"; then
10568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10569$as_echo "$RMDIR" >&6; }
10570else
10571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572$as_echo "no" >&6; }
10573fi
10574
10575
10576  test -n "$RMDIR" && break
10577done
10578
10579  else
10580    # The variable is set, but is it from the command line or the environment?
10581
10582    # Try to remove the string !RMDIR! from our list.
10583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10585      # If it failed, the variable was not from the command line. Ignore it,
10586      # but warn the user (except for BASH, which is always set by the calling BASH).
10587      if test "xRMDIR" != xBASH; then
10588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10589$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10590      fi
10591      # Try to locate tool using the code snippet
10592      for ac_prog in rmdir
10593do
10594  # Extract the first word of "$ac_prog", so it can be a program name with args.
10595set dummy $ac_prog; ac_word=$2
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10597$as_echo_n "checking for $ac_word... " >&6; }
10598if ${ac_cv_path_RMDIR+:} false; then :
10599  $as_echo_n "(cached) " >&6
10600else
10601  case $RMDIR in
10602  [\\/]* | ?:[\\/]*)
10603  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10604  ;;
10605  *)
10606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10607for as_dir in $PATH
10608do
10609  IFS=$as_save_IFS
10610  test -z "$as_dir" && as_dir=.
10611    for ac_exec_ext in '' $ac_executable_extensions; do
10612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10613    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10615    break 2
10616  fi
10617done
10618  done
10619IFS=$as_save_IFS
10620
10621  ;;
10622esac
10623fi
10624RMDIR=$ac_cv_path_RMDIR
10625if test -n "$RMDIR"; then
10626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10627$as_echo "$RMDIR" >&6; }
10628else
10629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630$as_echo "no" >&6; }
10631fi
10632
10633
10634  test -n "$RMDIR" && break
10635done
10636
10637    else
10638      # If it succeeded, then it was overridden by the user. We will use it
10639      # for the tool.
10640
10641      # First remove it from the list of overridden variables, so we can test
10642      # for unknown variables in the end.
10643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10644
10645      # Check if we try to supply an empty value
10646      if test "x$RMDIR" = x; then
10647        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10648$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10650$as_echo_n "checking for RMDIR... " >&6; }
10651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10652$as_echo "disabled" >&6; }
10653      else
10654        # Check if the provided tool contains a complete path.
10655        tool_specified="$RMDIR"
10656        tool_basename="${tool_specified##*/}"
10657        if test "x$tool_basename" = "x$tool_specified"; then
10658          # A command without a complete path is provided, search $PATH.
10659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10660$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10661          # Extract the first word of "$tool_basename", so it can be a program name with args.
10662set dummy $tool_basename; ac_word=$2
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
10665if ${ac_cv_path_RMDIR+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $RMDIR in
10669  [\\/]* | ?:[\\/]*)
10670  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10671  ;;
10672  *)
10673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10674for as_dir in $PATH
10675do
10676  IFS=$as_save_IFS
10677  test -z "$as_dir" && as_dir=.
10678    for ac_exec_ext in '' $ac_executable_extensions; do
10679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10680    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10682    break 2
10683  fi
10684done
10685  done
10686IFS=$as_save_IFS
10687
10688  ;;
10689esac
10690fi
10691RMDIR=$ac_cv_path_RMDIR
10692if test -n "$RMDIR"; then
10693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10694$as_echo "$RMDIR" >&6; }
10695else
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698fi
10699
10700
10701          if test "x$RMDIR" = x; then
10702            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10703          fi
10704        else
10705          # Otherwise we believe it is a complete path. Use it as it is.
10706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10707$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10709$as_echo_n "checking for RMDIR... " >&6; }
10710          if test ! -x "$tool_specified"; then
10711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10712$as_echo "not found" >&6; }
10713            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10714          fi
10715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10716$as_echo "$tool_specified" >&6; }
10717        fi
10718      fi
10719    fi
10720
10721  fi
10722
10723
10724
10725  if test "x$RMDIR" = x; then
10726    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10727  fi
10728
10729
10730
10731
10732
10733  # Publish this variable in the help.
10734
10735
10736  if [ -z "${SH+x}" ]; then
10737    # The variable is not set by user, try to locate tool using the code snippet
10738    for ac_prog in sh
10739do
10740  # Extract the first word of "$ac_prog", so it can be a program name with args.
10741set dummy $ac_prog; ac_word=$2
10742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10743$as_echo_n "checking for $ac_word... " >&6; }
10744if ${ac_cv_path_SH+:} false; then :
10745  $as_echo_n "(cached) " >&6
10746else
10747  case $SH in
10748  [\\/]* | ?:[\\/]*)
10749  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10750  ;;
10751  *)
10752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10753for as_dir in $PATH
10754do
10755  IFS=$as_save_IFS
10756  test -z "$as_dir" && as_dir=.
10757    for ac_exec_ext in '' $ac_executable_extensions; do
10758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10759    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10761    break 2
10762  fi
10763done
10764  done
10765IFS=$as_save_IFS
10766
10767  ;;
10768esac
10769fi
10770SH=$ac_cv_path_SH
10771if test -n "$SH"; then
10772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10773$as_echo "$SH" >&6; }
10774else
10775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
10777fi
10778
10779
10780  test -n "$SH" && break
10781done
10782
10783  else
10784    # The variable is set, but is it from the command line or the environment?
10785
10786    # Try to remove the string !SH! from our list.
10787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10789      # If it failed, the variable was not from the command line. Ignore it,
10790      # but warn the user (except for BASH, which is always set by the calling BASH).
10791      if test "xSH" != xBASH; then
10792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10793$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10794      fi
10795      # Try to locate tool using the code snippet
10796      for ac_prog in sh
10797do
10798  # Extract the first word of "$ac_prog", so it can be a program name with args.
10799set dummy $ac_prog; ac_word=$2
10800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10801$as_echo_n "checking for $ac_word... " >&6; }
10802if ${ac_cv_path_SH+:} false; then :
10803  $as_echo_n "(cached) " >&6
10804else
10805  case $SH in
10806  [\\/]* | ?:[\\/]*)
10807  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10808  ;;
10809  *)
10810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10811for as_dir in $PATH
10812do
10813  IFS=$as_save_IFS
10814  test -z "$as_dir" && as_dir=.
10815    for ac_exec_ext in '' $ac_executable_extensions; do
10816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10817    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10819    break 2
10820  fi
10821done
10822  done
10823IFS=$as_save_IFS
10824
10825  ;;
10826esac
10827fi
10828SH=$ac_cv_path_SH
10829if test -n "$SH"; then
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10831$as_echo "$SH" >&6; }
10832else
10833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834$as_echo "no" >&6; }
10835fi
10836
10837
10838  test -n "$SH" && break
10839done
10840
10841    else
10842      # If it succeeded, then it was overridden by the user. We will use it
10843      # for the tool.
10844
10845      # First remove it from the list of overridden variables, so we can test
10846      # for unknown variables in the end.
10847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10848
10849      # Check if we try to supply an empty value
10850      if test "x$SH" = x; then
10851        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10852$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10854$as_echo_n "checking for SH... " >&6; }
10855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10856$as_echo "disabled" >&6; }
10857      else
10858        # Check if the provided tool contains a complete path.
10859        tool_specified="$SH"
10860        tool_basename="${tool_specified##*/}"
10861        if test "x$tool_basename" = "x$tool_specified"; then
10862          # A command without a complete path is provided, search $PATH.
10863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10864$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10865          # Extract the first word of "$tool_basename", so it can be a program name with args.
10866set dummy $tool_basename; ac_word=$2
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10868$as_echo_n "checking for $ac_word... " >&6; }
10869if ${ac_cv_path_SH+:} false; then :
10870  $as_echo_n "(cached) " >&6
10871else
10872  case $SH in
10873  [\\/]* | ?:[\\/]*)
10874  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10875  ;;
10876  *)
10877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10878for as_dir in $PATH
10879do
10880  IFS=$as_save_IFS
10881  test -z "$as_dir" && as_dir=.
10882    for ac_exec_ext in '' $ac_executable_extensions; do
10883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10884    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10886    break 2
10887  fi
10888done
10889  done
10890IFS=$as_save_IFS
10891
10892  ;;
10893esac
10894fi
10895SH=$ac_cv_path_SH
10896if test -n "$SH"; then
10897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10898$as_echo "$SH" >&6; }
10899else
10900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
10902fi
10903
10904
10905          if test "x$SH" = x; then
10906            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10907          fi
10908        else
10909          # Otherwise we believe it is a complete path. Use it as it is.
10910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10911$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10913$as_echo_n "checking for SH... " >&6; }
10914          if test ! -x "$tool_specified"; then
10915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10916$as_echo "not found" >&6; }
10917            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10918          fi
10919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10920$as_echo "$tool_specified" >&6; }
10921        fi
10922      fi
10923    fi
10924
10925  fi
10926
10927
10928
10929  if test "x$SH" = x; then
10930    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10931  fi
10932
10933
10934
10935
10936
10937  # Publish this variable in the help.
10938
10939
10940  if [ -z "${SORT+x}" ]; then
10941    # The variable is not set by user, try to locate tool using the code snippet
10942    for ac_prog in sort
10943do
10944  # Extract the first word of "$ac_prog", so it can be a program name with args.
10945set dummy $ac_prog; ac_word=$2
10946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10947$as_echo_n "checking for $ac_word... " >&6; }
10948if ${ac_cv_path_SORT+:} false; then :
10949  $as_echo_n "(cached) " >&6
10950else
10951  case $SORT in
10952  [\\/]* | ?:[\\/]*)
10953  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10954  ;;
10955  *)
10956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10957for as_dir in $PATH
10958do
10959  IFS=$as_save_IFS
10960  test -z "$as_dir" && as_dir=.
10961    for ac_exec_ext in '' $ac_executable_extensions; do
10962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10963    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10965    break 2
10966  fi
10967done
10968  done
10969IFS=$as_save_IFS
10970
10971  ;;
10972esac
10973fi
10974SORT=$ac_cv_path_SORT
10975if test -n "$SORT"; then
10976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10977$as_echo "$SORT" >&6; }
10978else
10979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980$as_echo "no" >&6; }
10981fi
10982
10983
10984  test -n "$SORT" && break
10985done
10986
10987  else
10988    # The variable is set, but is it from the command line or the environment?
10989
10990    # Try to remove the string !SORT! from our list.
10991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10993      # If it failed, the variable was not from the command line. Ignore it,
10994      # but warn the user (except for BASH, which is always set by the calling BASH).
10995      if test "xSORT" != xBASH; then
10996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10997$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10998      fi
10999      # Try to locate tool using the code snippet
11000      for ac_prog in sort
11001do
11002  # Extract the first word of "$ac_prog", so it can be a program name with args.
11003set dummy $ac_prog; ac_word=$2
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11005$as_echo_n "checking for $ac_word... " >&6; }
11006if ${ac_cv_path_SORT+:} false; then :
11007  $as_echo_n "(cached) " >&6
11008else
11009  case $SORT in
11010  [\\/]* | ?:[\\/]*)
11011  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11012  ;;
11013  *)
11014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11015for as_dir in $PATH
11016do
11017  IFS=$as_save_IFS
11018  test -z "$as_dir" && as_dir=.
11019    for ac_exec_ext in '' $ac_executable_extensions; do
11020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11021    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11023    break 2
11024  fi
11025done
11026  done
11027IFS=$as_save_IFS
11028
11029  ;;
11030esac
11031fi
11032SORT=$ac_cv_path_SORT
11033if test -n "$SORT"; then
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11035$as_echo "$SORT" >&6; }
11036else
11037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
11039fi
11040
11041
11042  test -n "$SORT" && break
11043done
11044
11045    else
11046      # If it succeeded, then it was overridden by the user. We will use it
11047      # for the tool.
11048
11049      # First remove it from the list of overridden variables, so we can test
11050      # for unknown variables in the end.
11051      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11052
11053      # Check if we try to supply an empty value
11054      if test "x$SORT" = x; then
11055        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11056$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11057        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11058$as_echo_n "checking for SORT... " >&6; }
11059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11060$as_echo "disabled" >&6; }
11061      else
11062        # Check if the provided tool contains a complete path.
11063        tool_specified="$SORT"
11064        tool_basename="${tool_specified##*/}"
11065        if test "x$tool_basename" = "x$tool_specified"; then
11066          # A command without a complete path is provided, search $PATH.
11067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11068$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11069          # Extract the first word of "$tool_basename", so it can be a program name with args.
11070set dummy $tool_basename; ac_word=$2
11071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11072$as_echo_n "checking for $ac_word... " >&6; }
11073if ${ac_cv_path_SORT+:} false; then :
11074  $as_echo_n "(cached) " >&6
11075else
11076  case $SORT in
11077  [\\/]* | ?:[\\/]*)
11078  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11079  ;;
11080  *)
11081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11082for as_dir in $PATH
11083do
11084  IFS=$as_save_IFS
11085  test -z "$as_dir" && as_dir=.
11086    for ac_exec_ext in '' $ac_executable_extensions; do
11087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11088    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11090    break 2
11091  fi
11092done
11093  done
11094IFS=$as_save_IFS
11095
11096  ;;
11097esac
11098fi
11099SORT=$ac_cv_path_SORT
11100if test -n "$SORT"; then
11101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11102$as_echo "$SORT" >&6; }
11103else
11104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11105$as_echo "no" >&6; }
11106fi
11107
11108
11109          if test "x$SORT" = x; then
11110            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11111          fi
11112        else
11113          # Otherwise we believe it is a complete path. Use it as it is.
11114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11115$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11116          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11117$as_echo_n "checking for SORT... " >&6; }
11118          if test ! -x "$tool_specified"; then
11119            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11120$as_echo "not found" >&6; }
11121            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11122          fi
11123          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11124$as_echo "$tool_specified" >&6; }
11125        fi
11126      fi
11127    fi
11128
11129  fi
11130
11131
11132
11133  if test "x$SORT" = x; then
11134    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11135  fi
11136
11137
11138
11139
11140
11141  # Publish this variable in the help.
11142
11143
11144  if [ -z "${TAIL+x}" ]; then
11145    # The variable is not set by user, try to locate tool using the code snippet
11146    for ac_prog in tail
11147do
11148  # Extract the first word of "$ac_prog", so it can be a program name with args.
11149set dummy $ac_prog; ac_word=$2
11150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11151$as_echo_n "checking for $ac_word... " >&6; }
11152if ${ac_cv_path_TAIL+:} false; then :
11153  $as_echo_n "(cached) " >&6
11154else
11155  case $TAIL in
11156  [\\/]* | ?:[\\/]*)
11157  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11158  ;;
11159  *)
11160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11161for as_dir in $PATH
11162do
11163  IFS=$as_save_IFS
11164  test -z "$as_dir" && as_dir=.
11165    for ac_exec_ext in '' $ac_executable_extensions; do
11166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11167    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11169    break 2
11170  fi
11171done
11172  done
11173IFS=$as_save_IFS
11174
11175  ;;
11176esac
11177fi
11178TAIL=$ac_cv_path_TAIL
11179if test -n "$TAIL"; then
11180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11181$as_echo "$TAIL" >&6; }
11182else
11183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11184$as_echo "no" >&6; }
11185fi
11186
11187
11188  test -n "$TAIL" && break
11189done
11190
11191  else
11192    # The variable is set, but is it from the command line or the environment?
11193
11194    # Try to remove the string !TAIL! from our list.
11195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11197      # If it failed, the variable was not from the command line. Ignore it,
11198      # but warn the user (except for BASH, which is always set by the calling BASH).
11199      if test "xTAIL" != xBASH; then
11200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11201$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11202      fi
11203      # Try to locate tool using the code snippet
11204      for ac_prog in tail
11205do
11206  # Extract the first word of "$ac_prog", so it can be a program name with args.
11207set dummy $ac_prog; ac_word=$2
11208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11209$as_echo_n "checking for $ac_word... " >&6; }
11210if ${ac_cv_path_TAIL+:} false; then :
11211  $as_echo_n "(cached) " >&6
11212else
11213  case $TAIL in
11214  [\\/]* | ?:[\\/]*)
11215  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11216  ;;
11217  *)
11218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11219for as_dir in $PATH
11220do
11221  IFS=$as_save_IFS
11222  test -z "$as_dir" && as_dir=.
11223    for ac_exec_ext in '' $ac_executable_extensions; do
11224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11225    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11227    break 2
11228  fi
11229done
11230  done
11231IFS=$as_save_IFS
11232
11233  ;;
11234esac
11235fi
11236TAIL=$ac_cv_path_TAIL
11237if test -n "$TAIL"; then
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11239$as_echo "$TAIL" >&6; }
11240else
11241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242$as_echo "no" >&6; }
11243fi
11244
11245
11246  test -n "$TAIL" && break
11247done
11248
11249    else
11250      # If it succeeded, then it was overridden by the user. We will use it
11251      # for the tool.
11252
11253      # First remove it from the list of overridden variables, so we can test
11254      # for unknown variables in the end.
11255      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11256
11257      # Check if we try to supply an empty value
11258      if test "x$TAIL" = x; then
11259        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11260$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11262$as_echo_n "checking for TAIL... " >&6; }
11263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11264$as_echo "disabled" >&6; }
11265      else
11266        # Check if the provided tool contains a complete path.
11267        tool_specified="$TAIL"
11268        tool_basename="${tool_specified##*/}"
11269        if test "x$tool_basename" = "x$tool_specified"; then
11270          # A command without a complete path is provided, search $PATH.
11271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11272$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11273          # Extract the first word of "$tool_basename", so it can be a program name with args.
11274set dummy $tool_basename; ac_word=$2
11275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11276$as_echo_n "checking for $ac_word... " >&6; }
11277if ${ac_cv_path_TAIL+:} false; then :
11278  $as_echo_n "(cached) " >&6
11279else
11280  case $TAIL in
11281  [\\/]* | ?:[\\/]*)
11282  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11283  ;;
11284  *)
11285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11286for as_dir in $PATH
11287do
11288  IFS=$as_save_IFS
11289  test -z "$as_dir" && as_dir=.
11290    for ac_exec_ext in '' $ac_executable_extensions; do
11291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11292    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11294    break 2
11295  fi
11296done
11297  done
11298IFS=$as_save_IFS
11299
11300  ;;
11301esac
11302fi
11303TAIL=$ac_cv_path_TAIL
11304if test -n "$TAIL"; then
11305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11306$as_echo "$TAIL" >&6; }
11307else
11308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
11310fi
11311
11312
11313          if test "x$TAIL" = x; then
11314            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11315          fi
11316        else
11317          # Otherwise we believe it is a complete path. Use it as it is.
11318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11319$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11320          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11321$as_echo_n "checking for TAIL... " >&6; }
11322          if test ! -x "$tool_specified"; then
11323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11324$as_echo "not found" >&6; }
11325            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11326          fi
11327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11328$as_echo "$tool_specified" >&6; }
11329        fi
11330      fi
11331    fi
11332
11333  fi
11334
11335
11336
11337  if test "x$TAIL" = x; then
11338    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11339  fi
11340
11341
11342
11343
11344
11345  # Publish this variable in the help.
11346
11347
11348  if [ -z "${TAR+x}" ]; then
11349    # The variable is not set by user, try to locate tool using the code snippet
11350    for ac_prog in gtar tar
11351do
11352  # Extract the first word of "$ac_prog", so it can be a program name with args.
11353set dummy $ac_prog; ac_word=$2
11354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11355$as_echo_n "checking for $ac_word... " >&6; }
11356if ${ac_cv_path_TAR+:} false; then :
11357  $as_echo_n "(cached) " >&6
11358else
11359  case $TAR in
11360  [\\/]* | ?:[\\/]*)
11361  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11362  ;;
11363  *)
11364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11365for as_dir in $PATH
11366do
11367  IFS=$as_save_IFS
11368  test -z "$as_dir" && as_dir=.
11369    for ac_exec_ext in '' $ac_executable_extensions; do
11370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11371    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11373    break 2
11374  fi
11375done
11376  done
11377IFS=$as_save_IFS
11378
11379  ;;
11380esac
11381fi
11382TAR=$ac_cv_path_TAR
11383if test -n "$TAR"; then
11384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11385$as_echo "$TAR" >&6; }
11386else
11387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388$as_echo "no" >&6; }
11389fi
11390
11391
11392  test -n "$TAR" && break
11393done
11394
11395  else
11396    # The variable is set, but is it from the command line or the environment?
11397
11398    # Try to remove the string !TAR! from our list.
11399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11401      # If it failed, the variable was not from the command line. Ignore it,
11402      # but warn the user (except for BASH, which is always set by the calling BASH).
11403      if test "xTAR" != xBASH; then
11404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11405$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11406      fi
11407      # Try to locate tool using the code snippet
11408      for ac_prog in gtar tar
11409do
11410  # Extract the first word of "$ac_prog", so it can be a program name with args.
11411set dummy $ac_prog; ac_word=$2
11412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11413$as_echo_n "checking for $ac_word... " >&6; }
11414if ${ac_cv_path_TAR+:} false; then :
11415  $as_echo_n "(cached) " >&6
11416else
11417  case $TAR in
11418  [\\/]* | ?:[\\/]*)
11419  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11420  ;;
11421  *)
11422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11423for as_dir in $PATH
11424do
11425  IFS=$as_save_IFS
11426  test -z "$as_dir" && as_dir=.
11427    for ac_exec_ext in '' $ac_executable_extensions; do
11428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11429    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11431    break 2
11432  fi
11433done
11434  done
11435IFS=$as_save_IFS
11436
11437  ;;
11438esac
11439fi
11440TAR=$ac_cv_path_TAR
11441if test -n "$TAR"; then
11442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11443$as_echo "$TAR" >&6; }
11444else
11445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
11447fi
11448
11449
11450  test -n "$TAR" && break
11451done
11452
11453    else
11454      # If it succeeded, then it was overridden by the user. We will use it
11455      # for the tool.
11456
11457      # First remove it from the list of overridden variables, so we can test
11458      # for unknown variables in the end.
11459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11460
11461      # Check if we try to supply an empty value
11462      if test "x$TAR" = x; then
11463        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11464$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11465        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11466$as_echo_n "checking for TAR... " >&6; }
11467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11468$as_echo "disabled" >&6; }
11469      else
11470        # Check if the provided tool contains a complete path.
11471        tool_specified="$TAR"
11472        tool_basename="${tool_specified##*/}"
11473        if test "x$tool_basename" = "x$tool_specified"; then
11474          # A command without a complete path is provided, search $PATH.
11475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11476$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11477          # Extract the first word of "$tool_basename", so it can be a program name with args.
11478set dummy $tool_basename; ac_word=$2
11479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11480$as_echo_n "checking for $ac_word... " >&6; }
11481if ${ac_cv_path_TAR+:} false; then :
11482  $as_echo_n "(cached) " >&6
11483else
11484  case $TAR in
11485  [\\/]* | ?:[\\/]*)
11486  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11487  ;;
11488  *)
11489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11490for as_dir in $PATH
11491do
11492  IFS=$as_save_IFS
11493  test -z "$as_dir" && as_dir=.
11494    for ac_exec_ext in '' $ac_executable_extensions; do
11495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11496    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11498    break 2
11499  fi
11500done
11501  done
11502IFS=$as_save_IFS
11503
11504  ;;
11505esac
11506fi
11507TAR=$ac_cv_path_TAR
11508if test -n "$TAR"; then
11509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11510$as_echo "$TAR" >&6; }
11511else
11512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11513$as_echo "no" >&6; }
11514fi
11515
11516
11517          if test "x$TAR" = x; then
11518            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11519          fi
11520        else
11521          # Otherwise we believe it is a complete path. Use it as it is.
11522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11523$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11524          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11525$as_echo_n "checking for TAR... " >&6; }
11526          if test ! -x "$tool_specified"; then
11527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11528$as_echo "not found" >&6; }
11529            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11530          fi
11531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11532$as_echo "$tool_specified" >&6; }
11533        fi
11534      fi
11535    fi
11536
11537  fi
11538
11539
11540
11541  if test "x$TAR" = x; then
11542    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11543  fi
11544
11545
11546
11547
11548
11549  # Publish this variable in the help.
11550
11551
11552  if [ -z "${TEE+x}" ]; then
11553    # The variable is not set by user, try to locate tool using the code snippet
11554    for ac_prog in tee
11555do
11556  # Extract the first word of "$ac_prog", so it can be a program name with args.
11557set dummy $ac_prog; ac_word=$2
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11559$as_echo_n "checking for $ac_word... " >&6; }
11560if ${ac_cv_path_TEE+:} false; then :
11561  $as_echo_n "(cached) " >&6
11562else
11563  case $TEE in
11564  [\\/]* | ?:[\\/]*)
11565  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11566  ;;
11567  *)
11568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569for as_dir in $PATH
11570do
11571  IFS=$as_save_IFS
11572  test -z "$as_dir" && as_dir=.
11573    for ac_exec_ext in '' $ac_executable_extensions; do
11574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11575    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11577    break 2
11578  fi
11579done
11580  done
11581IFS=$as_save_IFS
11582
11583  ;;
11584esac
11585fi
11586TEE=$ac_cv_path_TEE
11587if test -n "$TEE"; then
11588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11589$as_echo "$TEE" >&6; }
11590else
11591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
11593fi
11594
11595
11596  test -n "$TEE" && break
11597done
11598
11599  else
11600    # The variable is set, but is it from the command line or the environment?
11601
11602    # Try to remove the string !TEE! from our list.
11603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11605      # If it failed, the variable was not from the command line. Ignore it,
11606      # but warn the user (except for BASH, which is always set by the calling BASH).
11607      if test "xTEE" != xBASH; then
11608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11609$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11610      fi
11611      # Try to locate tool using the code snippet
11612      for ac_prog in tee
11613do
11614  # Extract the first word of "$ac_prog", so it can be a program name with args.
11615set dummy $ac_prog; ac_word=$2
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11617$as_echo_n "checking for $ac_word... " >&6; }
11618if ${ac_cv_path_TEE+:} false; then :
11619  $as_echo_n "(cached) " >&6
11620else
11621  case $TEE in
11622  [\\/]* | ?:[\\/]*)
11623  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11624  ;;
11625  *)
11626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11627for as_dir in $PATH
11628do
11629  IFS=$as_save_IFS
11630  test -z "$as_dir" && as_dir=.
11631    for ac_exec_ext in '' $ac_executable_extensions; do
11632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11633    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11635    break 2
11636  fi
11637done
11638  done
11639IFS=$as_save_IFS
11640
11641  ;;
11642esac
11643fi
11644TEE=$ac_cv_path_TEE
11645if test -n "$TEE"; then
11646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11647$as_echo "$TEE" >&6; }
11648else
11649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
11651fi
11652
11653
11654  test -n "$TEE" && break
11655done
11656
11657    else
11658      # If it succeeded, then it was overridden by the user. We will use it
11659      # for the tool.
11660
11661      # First remove it from the list of overridden variables, so we can test
11662      # for unknown variables in the end.
11663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11664
11665      # Check if we try to supply an empty value
11666      if test "x$TEE" = x; then
11667        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11668$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11669        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11670$as_echo_n "checking for TEE... " >&6; }
11671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11672$as_echo "disabled" >&6; }
11673      else
11674        # Check if the provided tool contains a complete path.
11675        tool_specified="$TEE"
11676        tool_basename="${tool_specified##*/}"
11677        if test "x$tool_basename" = "x$tool_specified"; then
11678          # A command without a complete path is provided, search $PATH.
11679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11680$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11681          # Extract the first word of "$tool_basename", so it can be a program name with args.
11682set dummy $tool_basename; ac_word=$2
11683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11684$as_echo_n "checking for $ac_word... " >&6; }
11685if ${ac_cv_path_TEE+:} false; then :
11686  $as_echo_n "(cached) " >&6
11687else
11688  case $TEE in
11689  [\\/]* | ?:[\\/]*)
11690  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11691  ;;
11692  *)
11693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11694for as_dir in $PATH
11695do
11696  IFS=$as_save_IFS
11697  test -z "$as_dir" && as_dir=.
11698    for ac_exec_ext in '' $ac_executable_extensions; do
11699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11700    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11702    break 2
11703  fi
11704done
11705  done
11706IFS=$as_save_IFS
11707
11708  ;;
11709esac
11710fi
11711TEE=$ac_cv_path_TEE
11712if test -n "$TEE"; then
11713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11714$as_echo "$TEE" >&6; }
11715else
11716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717$as_echo "no" >&6; }
11718fi
11719
11720
11721          if test "x$TEE" = x; then
11722            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11723          fi
11724        else
11725          # Otherwise we believe it is a complete path. Use it as it is.
11726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11727$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11728          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11729$as_echo_n "checking for TEE... " >&6; }
11730          if test ! -x "$tool_specified"; then
11731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11732$as_echo "not found" >&6; }
11733            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11734          fi
11735          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11736$as_echo "$tool_specified" >&6; }
11737        fi
11738      fi
11739    fi
11740
11741  fi
11742
11743
11744
11745  if test "x$TEE" = x; then
11746    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11747  fi
11748
11749
11750
11751
11752
11753  # Publish this variable in the help.
11754
11755
11756  if [ -z "${TOUCH+x}" ]; then
11757    # The variable is not set by user, try to locate tool using the code snippet
11758    for ac_prog in touch
11759do
11760  # Extract the first word of "$ac_prog", so it can be a program name with args.
11761set dummy $ac_prog; ac_word=$2
11762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11763$as_echo_n "checking for $ac_word... " >&6; }
11764if ${ac_cv_path_TOUCH+:} false; then :
11765  $as_echo_n "(cached) " >&6
11766else
11767  case $TOUCH in
11768  [\\/]* | ?:[\\/]*)
11769  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11770  ;;
11771  *)
11772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11773for as_dir in $PATH
11774do
11775  IFS=$as_save_IFS
11776  test -z "$as_dir" && as_dir=.
11777    for ac_exec_ext in '' $ac_executable_extensions; do
11778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11779    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11781    break 2
11782  fi
11783done
11784  done
11785IFS=$as_save_IFS
11786
11787  ;;
11788esac
11789fi
11790TOUCH=$ac_cv_path_TOUCH
11791if test -n "$TOUCH"; then
11792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11793$as_echo "$TOUCH" >&6; }
11794else
11795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11796$as_echo "no" >&6; }
11797fi
11798
11799
11800  test -n "$TOUCH" && break
11801done
11802
11803  else
11804    # The variable is set, but is it from the command line or the environment?
11805
11806    # Try to remove the string !TOUCH! from our list.
11807    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11808    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11809      # If it failed, the variable was not from the command line. Ignore it,
11810      # but warn the user (except for BASH, which is always set by the calling BASH).
11811      if test "xTOUCH" != xBASH; then
11812        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11813$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11814      fi
11815      # Try to locate tool using the code snippet
11816      for ac_prog in touch
11817do
11818  # Extract the first word of "$ac_prog", so it can be a program name with args.
11819set dummy $ac_prog; ac_word=$2
11820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11821$as_echo_n "checking for $ac_word... " >&6; }
11822if ${ac_cv_path_TOUCH+:} false; then :
11823  $as_echo_n "(cached) " >&6
11824else
11825  case $TOUCH in
11826  [\\/]* | ?:[\\/]*)
11827  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11828  ;;
11829  *)
11830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11831for as_dir in $PATH
11832do
11833  IFS=$as_save_IFS
11834  test -z "$as_dir" && as_dir=.
11835    for ac_exec_ext in '' $ac_executable_extensions; do
11836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11837    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11839    break 2
11840  fi
11841done
11842  done
11843IFS=$as_save_IFS
11844
11845  ;;
11846esac
11847fi
11848TOUCH=$ac_cv_path_TOUCH
11849if test -n "$TOUCH"; then
11850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11851$as_echo "$TOUCH" >&6; }
11852else
11853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11854$as_echo "no" >&6; }
11855fi
11856
11857
11858  test -n "$TOUCH" && break
11859done
11860
11861    else
11862      # If it succeeded, then it was overridden by the user. We will use it
11863      # for the tool.
11864
11865      # First remove it from the list of overridden variables, so we can test
11866      # for unknown variables in the end.
11867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11868
11869      # Check if we try to supply an empty value
11870      if test "x$TOUCH" = x; then
11871        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11872$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11874$as_echo_n "checking for TOUCH... " >&6; }
11875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11876$as_echo "disabled" >&6; }
11877      else
11878        # Check if the provided tool contains a complete path.
11879        tool_specified="$TOUCH"
11880        tool_basename="${tool_specified##*/}"
11881        if test "x$tool_basename" = "x$tool_specified"; then
11882          # A command without a complete path is provided, search $PATH.
11883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11884$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11885          # Extract the first word of "$tool_basename", so it can be a program name with args.
11886set dummy $tool_basename; ac_word=$2
11887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11888$as_echo_n "checking for $ac_word... " >&6; }
11889if ${ac_cv_path_TOUCH+:} false; then :
11890  $as_echo_n "(cached) " >&6
11891else
11892  case $TOUCH in
11893  [\\/]* | ?:[\\/]*)
11894  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11895  ;;
11896  *)
11897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11898for as_dir in $PATH
11899do
11900  IFS=$as_save_IFS
11901  test -z "$as_dir" && as_dir=.
11902    for ac_exec_ext in '' $ac_executable_extensions; do
11903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11904    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11906    break 2
11907  fi
11908done
11909  done
11910IFS=$as_save_IFS
11911
11912  ;;
11913esac
11914fi
11915TOUCH=$ac_cv_path_TOUCH
11916if test -n "$TOUCH"; then
11917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11918$as_echo "$TOUCH" >&6; }
11919else
11920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11921$as_echo "no" >&6; }
11922fi
11923
11924
11925          if test "x$TOUCH" = x; then
11926            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11927          fi
11928        else
11929          # Otherwise we believe it is a complete path. Use it as it is.
11930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11931$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11932          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11933$as_echo_n "checking for TOUCH... " >&6; }
11934          if test ! -x "$tool_specified"; then
11935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11936$as_echo "not found" >&6; }
11937            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11938          fi
11939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11940$as_echo "$tool_specified" >&6; }
11941        fi
11942      fi
11943    fi
11944
11945  fi
11946
11947
11948
11949  if test "x$TOUCH" = x; then
11950    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11951  fi
11952
11953
11954
11955
11956
11957  # Publish this variable in the help.
11958
11959
11960  if [ -z "${TR+x}" ]; then
11961    # The variable is not set by user, try to locate tool using the code snippet
11962    for ac_prog in tr
11963do
11964  # Extract the first word of "$ac_prog", so it can be a program name with args.
11965set dummy $ac_prog; ac_word=$2
11966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11967$as_echo_n "checking for $ac_word... " >&6; }
11968if ${ac_cv_path_TR+:} false; then :
11969  $as_echo_n "(cached) " >&6
11970else
11971  case $TR in
11972  [\\/]* | ?:[\\/]*)
11973  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11974  ;;
11975  *)
11976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11977for as_dir in $PATH
11978do
11979  IFS=$as_save_IFS
11980  test -z "$as_dir" && as_dir=.
11981    for ac_exec_ext in '' $ac_executable_extensions; do
11982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11983    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11985    break 2
11986  fi
11987done
11988  done
11989IFS=$as_save_IFS
11990
11991  ;;
11992esac
11993fi
11994TR=$ac_cv_path_TR
11995if test -n "$TR"; then
11996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11997$as_echo "$TR" >&6; }
11998else
11999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12000$as_echo "no" >&6; }
12001fi
12002
12003
12004  test -n "$TR" && break
12005done
12006
12007  else
12008    # The variable is set, but is it from the command line or the environment?
12009
12010    # Try to remove the string !TR! from our list.
12011    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12012    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12013      # If it failed, the variable was not from the command line. Ignore it,
12014      # but warn the user (except for BASH, which is always set by the calling BASH).
12015      if test "xTR" != xBASH; then
12016        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12017$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12018      fi
12019      # Try to locate tool using the code snippet
12020      for ac_prog in tr
12021do
12022  # Extract the first word of "$ac_prog", so it can be a program name with args.
12023set dummy $ac_prog; ac_word=$2
12024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12025$as_echo_n "checking for $ac_word... " >&6; }
12026if ${ac_cv_path_TR+:} false; then :
12027  $as_echo_n "(cached) " >&6
12028else
12029  case $TR in
12030  [\\/]* | ?:[\\/]*)
12031  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12032  ;;
12033  *)
12034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035for as_dir in $PATH
12036do
12037  IFS=$as_save_IFS
12038  test -z "$as_dir" && as_dir=.
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12041    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12043    break 2
12044  fi
12045done
12046  done
12047IFS=$as_save_IFS
12048
12049  ;;
12050esac
12051fi
12052TR=$ac_cv_path_TR
12053if test -n "$TR"; then
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12055$as_echo "$TR" >&6; }
12056else
12057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
12059fi
12060
12061
12062  test -n "$TR" && break
12063done
12064
12065    else
12066      # If it succeeded, then it was overridden by the user. We will use it
12067      # for the tool.
12068
12069      # First remove it from the list of overridden variables, so we can test
12070      # for unknown variables in the end.
12071      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12072
12073      # Check if we try to supply an empty value
12074      if test "x$TR" = x; then
12075        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12076$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12078$as_echo_n "checking for TR... " >&6; }
12079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12080$as_echo "disabled" >&6; }
12081      else
12082        # Check if the provided tool contains a complete path.
12083        tool_specified="$TR"
12084        tool_basename="${tool_specified##*/}"
12085        if test "x$tool_basename" = "x$tool_specified"; then
12086          # A command without a complete path is provided, search $PATH.
12087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12088$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12089          # Extract the first word of "$tool_basename", so it can be a program name with args.
12090set dummy $tool_basename; ac_word=$2
12091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12092$as_echo_n "checking for $ac_word... " >&6; }
12093if ${ac_cv_path_TR+:} false; then :
12094  $as_echo_n "(cached) " >&6
12095else
12096  case $TR in
12097  [\\/]* | ?:[\\/]*)
12098  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12099  ;;
12100  *)
12101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12102for as_dir in $PATH
12103do
12104  IFS=$as_save_IFS
12105  test -z "$as_dir" && as_dir=.
12106    for ac_exec_ext in '' $ac_executable_extensions; do
12107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12108    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12110    break 2
12111  fi
12112done
12113  done
12114IFS=$as_save_IFS
12115
12116  ;;
12117esac
12118fi
12119TR=$ac_cv_path_TR
12120if test -n "$TR"; then
12121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12122$as_echo "$TR" >&6; }
12123else
12124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12125$as_echo "no" >&6; }
12126fi
12127
12128
12129          if test "x$TR" = x; then
12130            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12131          fi
12132        else
12133          # Otherwise we believe it is a complete path. Use it as it is.
12134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12135$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12136          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12137$as_echo_n "checking for TR... " >&6; }
12138          if test ! -x "$tool_specified"; then
12139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12140$as_echo "not found" >&6; }
12141            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12142          fi
12143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12144$as_echo "$tool_specified" >&6; }
12145        fi
12146      fi
12147    fi
12148
12149  fi
12150
12151
12152
12153  if test "x$TR" = x; then
12154    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12155  fi
12156
12157
12158
12159
12160
12161  # Publish this variable in the help.
12162
12163
12164  if [ -z "${UNAME+x}" ]; then
12165    # The variable is not set by user, try to locate tool using the code snippet
12166    for ac_prog in uname
12167do
12168  # Extract the first word of "$ac_prog", so it can be a program name with args.
12169set dummy $ac_prog; ac_word=$2
12170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12171$as_echo_n "checking for $ac_word... " >&6; }
12172if ${ac_cv_path_UNAME+:} false; then :
12173  $as_echo_n "(cached) " >&6
12174else
12175  case $UNAME in
12176  [\\/]* | ?:[\\/]*)
12177  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12178  ;;
12179  *)
12180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12181for as_dir in $PATH
12182do
12183  IFS=$as_save_IFS
12184  test -z "$as_dir" && as_dir=.
12185    for ac_exec_ext in '' $ac_executable_extensions; do
12186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12187    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12189    break 2
12190  fi
12191done
12192  done
12193IFS=$as_save_IFS
12194
12195  ;;
12196esac
12197fi
12198UNAME=$ac_cv_path_UNAME
12199if test -n "$UNAME"; then
12200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12201$as_echo "$UNAME" >&6; }
12202else
12203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12204$as_echo "no" >&6; }
12205fi
12206
12207
12208  test -n "$UNAME" && break
12209done
12210
12211  else
12212    # The variable is set, but is it from the command line or the environment?
12213
12214    # Try to remove the string !UNAME! from our list.
12215    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12216    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12217      # If it failed, the variable was not from the command line. Ignore it,
12218      # but warn the user (except for BASH, which is always set by the calling BASH).
12219      if test "xUNAME" != xBASH; then
12220        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12221$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12222      fi
12223      # Try to locate tool using the code snippet
12224      for ac_prog in uname
12225do
12226  # Extract the first word of "$ac_prog", so it can be a program name with args.
12227set dummy $ac_prog; ac_word=$2
12228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12229$as_echo_n "checking for $ac_word... " >&6; }
12230if ${ac_cv_path_UNAME+:} false; then :
12231  $as_echo_n "(cached) " >&6
12232else
12233  case $UNAME in
12234  [\\/]* | ?:[\\/]*)
12235  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12236  ;;
12237  *)
12238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12239for as_dir in $PATH
12240do
12241  IFS=$as_save_IFS
12242  test -z "$as_dir" && as_dir=.
12243    for ac_exec_ext in '' $ac_executable_extensions; do
12244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12245    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12247    break 2
12248  fi
12249done
12250  done
12251IFS=$as_save_IFS
12252
12253  ;;
12254esac
12255fi
12256UNAME=$ac_cv_path_UNAME
12257if test -n "$UNAME"; then
12258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12259$as_echo "$UNAME" >&6; }
12260else
12261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262$as_echo "no" >&6; }
12263fi
12264
12265
12266  test -n "$UNAME" && break
12267done
12268
12269    else
12270      # If it succeeded, then it was overridden by the user. We will use it
12271      # for the tool.
12272
12273      # First remove it from the list of overridden variables, so we can test
12274      # for unknown variables in the end.
12275      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12276
12277      # Check if we try to supply an empty value
12278      if test "x$UNAME" = x; then
12279        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12280$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12281        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12282$as_echo_n "checking for UNAME... " >&6; }
12283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12284$as_echo "disabled" >&6; }
12285      else
12286        # Check if the provided tool contains a complete path.
12287        tool_specified="$UNAME"
12288        tool_basename="${tool_specified##*/}"
12289        if test "x$tool_basename" = "x$tool_specified"; then
12290          # A command without a complete path is provided, search $PATH.
12291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12292$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12293          # Extract the first word of "$tool_basename", so it can be a program name with args.
12294set dummy $tool_basename; ac_word=$2
12295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12296$as_echo_n "checking for $ac_word... " >&6; }
12297if ${ac_cv_path_UNAME+:} false; then :
12298  $as_echo_n "(cached) " >&6
12299else
12300  case $UNAME in
12301  [\\/]* | ?:[\\/]*)
12302  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12303  ;;
12304  *)
12305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12306for as_dir in $PATH
12307do
12308  IFS=$as_save_IFS
12309  test -z "$as_dir" && as_dir=.
12310    for ac_exec_ext in '' $ac_executable_extensions; do
12311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12312    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12314    break 2
12315  fi
12316done
12317  done
12318IFS=$as_save_IFS
12319
12320  ;;
12321esac
12322fi
12323UNAME=$ac_cv_path_UNAME
12324if test -n "$UNAME"; then
12325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12326$as_echo "$UNAME" >&6; }
12327else
12328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12329$as_echo "no" >&6; }
12330fi
12331
12332
12333          if test "x$UNAME" = x; then
12334            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12335          fi
12336        else
12337          # Otherwise we believe it is a complete path. Use it as it is.
12338          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12339$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12340          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12341$as_echo_n "checking for UNAME... " >&6; }
12342          if test ! -x "$tool_specified"; then
12343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12344$as_echo "not found" >&6; }
12345            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12346          fi
12347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12348$as_echo "$tool_specified" >&6; }
12349        fi
12350      fi
12351    fi
12352
12353  fi
12354
12355
12356
12357  if test "x$UNAME" = x; then
12358    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12359  fi
12360
12361
12362
12363
12364
12365  # Publish this variable in the help.
12366
12367
12368  if [ -z "${UNIQ+x}" ]; then
12369    # The variable is not set by user, try to locate tool using the code snippet
12370    for ac_prog in uniq
12371do
12372  # Extract the first word of "$ac_prog", so it can be a program name with args.
12373set dummy $ac_prog; ac_word=$2
12374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12375$as_echo_n "checking for $ac_word... " >&6; }
12376if ${ac_cv_path_UNIQ+:} false; then :
12377  $as_echo_n "(cached) " >&6
12378else
12379  case $UNIQ in
12380  [\\/]* | ?:[\\/]*)
12381  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12382  ;;
12383  *)
12384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12385for as_dir in $PATH
12386do
12387  IFS=$as_save_IFS
12388  test -z "$as_dir" && as_dir=.
12389    for ac_exec_ext in '' $ac_executable_extensions; do
12390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12391    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12393    break 2
12394  fi
12395done
12396  done
12397IFS=$as_save_IFS
12398
12399  ;;
12400esac
12401fi
12402UNIQ=$ac_cv_path_UNIQ
12403if test -n "$UNIQ"; then
12404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12405$as_echo "$UNIQ" >&6; }
12406else
12407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12408$as_echo "no" >&6; }
12409fi
12410
12411
12412  test -n "$UNIQ" && break
12413done
12414
12415  else
12416    # The variable is set, but is it from the command line or the environment?
12417
12418    # Try to remove the string !UNIQ! from our list.
12419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12421      # If it failed, the variable was not from the command line. Ignore it,
12422      # but warn the user (except for BASH, which is always set by the calling BASH).
12423      if test "xUNIQ" != xBASH; then
12424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12425$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12426      fi
12427      # Try to locate tool using the code snippet
12428      for ac_prog in uniq
12429do
12430  # Extract the first word of "$ac_prog", so it can be a program name with args.
12431set dummy $ac_prog; ac_word=$2
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12433$as_echo_n "checking for $ac_word... " >&6; }
12434if ${ac_cv_path_UNIQ+:} false; then :
12435  $as_echo_n "(cached) " >&6
12436else
12437  case $UNIQ in
12438  [\\/]* | ?:[\\/]*)
12439  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12440  ;;
12441  *)
12442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12443for as_dir in $PATH
12444do
12445  IFS=$as_save_IFS
12446  test -z "$as_dir" && as_dir=.
12447    for ac_exec_ext in '' $ac_executable_extensions; do
12448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12449    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12451    break 2
12452  fi
12453done
12454  done
12455IFS=$as_save_IFS
12456
12457  ;;
12458esac
12459fi
12460UNIQ=$ac_cv_path_UNIQ
12461if test -n "$UNIQ"; then
12462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12463$as_echo "$UNIQ" >&6; }
12464else
12465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12466$as_echo "no" >&6; }
12467fi
12468
12469
12470  test -n "$UNIQ" && break
12471done
12472
12473    else
12474      # If it succeeded, then it was overridden by the user. We will use it
12475      # for the tool.
12476
12477      # First remove it from the list of overridden variables, so we can test
12478      # for unknown variables in the end.
12479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12480
12481      # Check if we try to supply an empty value
12482      if test "x$UNIQ" = x; then
12483        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12484$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12486$as_echo_n "checking for UNIQ... " >&6; }
12487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12488$as_echo "disabled" >&6; }
12489      else
12490        # Check if the provided tool contains a complete path.
12491        tool_specified="$UNIQ"
12492        tool_basename="${tool_specified##*/}"
12493        if test "x$tool_basename" = "x$tool_specified"; then
12494          # A command without a complete path is provided, search $PATH.
12495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12496$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12497          # Extract the first word of "$tool_basename", so it can be a program name with args.
12498set dummy $tool_basename; ac_word=$2
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12500$as_echo_n "checking for $ac_word... " >&6; }
12501if ${ac_cv_path_UNIQ+:} false; then :
12502  $as_echo_n "(cached) " >&6
12503else
12504  case $UNIQ in
12505  [\\/]* | ?:[\\/]*)
12506  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12507  ;;
12508  *)
12509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12510for as_dir in $PATH
12511do
12512  IFS=$as_save_IFS
12513  test -z "$as_dir" && as_dir=.
12514    for ac_exec_ext in '' $ac_executable_extensions; do
12515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12516    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12518    break 2
12519  fi
12520done
12521  done
12522IFS=$as_save_IFS
12523
12524  ;;
12525esac
12526fi
12527UNIQ=$ac_cv_path_UNIQ
12528if test -n "$UNIQ"; then
12529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12530$as_echo "$UNIQ" >&6; }
12531else
12532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12533$as_echo "no" >&6; }
12534fi
12535
12536
12537          if test "x$UNIQ" = x; then
12538            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12539          fi
12540        else
12541          # Otherwise we believe it is a complete path. Use it as it is.
12542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12543$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12544          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12545$as_echo_n "checking for UNIQ... " >&6; }
12546          if test ! -x "$tool_specified"; then
12547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12548$as_echo "not found" >&6; }
12549            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12550          fi
12551          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12552$as_echo "$tool_specified" >&6; }
12553        fi
12554      fi
12555    fi
12556
12557  fi
12558
12559
12560
12561  if test "x$UNIQ" = x; then
12562    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12563  fi
12564
12565
12566
12567
12568
12569  # Publish this variable in the help.
12570
12571
12572  if [ -z "${WC+x}" ]; then
12573    # The variable is not set by user, try to locate tool using the code snippet
12574    for ac_prog in wc
12575do
12576  # Extract the first word of "$ac_prog", so it can be a program name with args.
12577set dummy $ac_prog; ac_word=$2
12578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12579$as_echo_n "checking for $ac_word... " >&6; }
12580if ${ac_cv_path_WC+:} false; then :
12581  $as_echo_n "(cached) " >&6
12582else
12583  case $WC in
12584  [\\/]* | ?:[\\/]*)
12585  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12586  ;;
12587  *)
12588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12589for as_dir in $PATH
12590do
12591  IFS=$as_save_IFS
12592  test -z "$as_dir" && as_dir=.
12593    for ac_exec_ext in '' $ac_executable_extensions; do
12594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12595    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12597    break 2
12598  fi
12599done
12600  done
12601IFS=$as_save_IFS
12602
12603  ;;
12604esac
12605fi
12606WC=$ac_cv_path_WC
12607if test -n "$WC"; then
12608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12609$as_echo "$WC" >&6; }
12610else
12611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612$as_echo "no" >&6; }
12613fi
12614
12615
12616  test -n "$WC" && break
12617done
12618
12619  else
12620    # The variable is set, but is it from the command line or the environment?
12621
12622    # Try to remove the string !WC! from our list.
12623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12625      # If it failed, the variable was not from the command line. Ignore it,
12626      # but warn the user (except for BASH, which is always set by the calling BASH).
12627      if test "xWC" != xBASH; then
12628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12629$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12630      fi
12631      # Try to locate tool using the code snippet
12632      for ac_prog in wc
12633do
12634  # Extract the first word of "$ac_prog", so it can be a program name with args.
12635set dummy $ac_prog; ac_word=$2
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637$as_echo_n "checking for $ac_word... " >&6; }
12638if ${ac_cv_path_WC+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  case $WC in
12642  [\\/]* | ?:[\\/]*)
12643  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12644  ;;
12645  *)
12646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647for as_dir in $PATH
12648do
12649  IFS=$as_save_IFS
12650  test -z "$as_dir" && as_dir=.
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655    break 2
12656  fi
12657done
12658  done
12659IFS=$as_save_IFS
12660
12661  ;;
12662esac
12663fi
12664WC=$ac_cv_path_WC
12665if test -n "$WC"; then
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12667$as_echo "$WC" >&6; }
12668else
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671fi
12672
12673
12674  test -n "$WC" && break
12675done
12676
12677    else
12678      # If it succeeded, then it was overridden by the user. We will use it
12679      # for the tool.
12680
12681      # First remove it from the list of overridden variables, so we can test
12682      # for unknown variables in the end.
12683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12684
12685      # Check if we try to supply an empty value
12686      if test "x$WC" = x; then
12687        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12688$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12690$as_echo_n "checking for WC... " >&6; }
12691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12692$as_echo "disabled" >&6; }
12693      else
12694        # Check if the provided tool contains a complete path.
12695        tool_specified="$WC"
12696        tool_basename="${tool_specified##*/}"
12697        if test "x$tool_basename" = "x$tool_specified"; then
12698          # A command without a complete path is provided, search $PATH.
12699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12700$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12701          # Extract the first word of "$tool_basename", so it can be a program name with args.
12702set dummy $tool_basename; ac_word=$2
12703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12704$as_echo_n "checking for $ac_word... " >&6; }
12705if ${ac_cv_path_WC+:} false; then :
12706  $as_echo_n "(cached) " >&6
12707else
12708  case $WC in
12709  [\\/]* | ?:[\\/]*)
12710  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12711  ;;
12712  *)
12713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12714for as_dir in $PATH
12715do
12716  IFS=$as_save_IFS
12717  test -z "$as_dir" && as_dir=.
12718    for ac_exec_ext in '' $ac_executable_extensions; do
12719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12720    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12722    break 2
12723  fi
12724done
12725  done
12726IFS=$as_save_IFS
12727
12728  ;;
12729esac
12730fi
12731WC=$ac_cv_path_WC
12732if test -n "$WC"; then
12733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12734$as_echo "$WC" >&6; }
12735else
12736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12737$as_echo "no" >&6; }
12738fi
12739
12740
12741          if test "x$WC" = x; then
12742            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12743          fi
12744        else
12745          # Otherwise we believe it is a complete path. Use it as it is.
12746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12747$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12748          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12749$as_echo_n "checking for WC... " >&6; }
12750          if test ! -x "$tool_specified"; then
12751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12752$as_echo "not found" >&6; }
12753            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12754          fi
12755          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12756$as_echo "$tool_specified" >&6; }
12757        fi
12758      fi
12759    fi
12760
12761  fi
12762
12763
12764
12765  if test "x$WC" = x; then
12766    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12767  fi
12768
12769
12770
12771
12772
12773  # Publish this variable in the help.
12774
12775
12776  if [ -z "${WHICH+x}" ]; then
12777    # The variable is not set by user, try to locate tool using the code snippet
12778    for ac_prog in which
12779do
12780  # Extract the first word of "$ac_prog", so it can be a program name with args.
12781set dummy $ac_prog; ac_word=$2
12782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12783$as_echo_n "checking for $ac_word... " >&6; }
12784if ${ac_cv_path_WHICH+:} false; then :
12785  $as_echo_n "(cached) " >&6
12786else
12787  case $WHICH in
12788  [\\/]* | ?:[\\/]*)
12789  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12790  ;;
12791  *)
12792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12793for as_dir in $PATH
12794do
12795  IFS=$as_save_IFS
12796  test -z "$as_dir" && as_dir=.
12797    for ac_exec_ext in '' $ac_executable_extensions; do
12798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12799    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12801    break 2
12802  fi
12803done
12804  done
12805IFS=$as_save_IFS
12806
12807  ;;
12808esac
12809fi
12810WHICH=$ac_cv_path_WHICH
12811if test -n "$WHICH"; then
12812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12813$as_echo "$WHICH" >&6; }
12814else
12815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12816$as_echo "no" >&6; }
12817fi
12818
12819
12820  test -n "$WHICH" && break
12821done
12822
12823  else
12824    # The variable is set, but is it from the command line or the environment?
12825
12826    # Try to remove the string !WHICH! from our list.
12827    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12828    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12829      # If it failed, the variable was not from the command line. Ignore it,
12830      # but warn the user (except for BASH, which is always set by the calling BASH).
12831      if test "xWHICH" != xBASH; then
12832        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12833$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12834      fi
12835      # Try to locate tool using the code snippet
12836      for ac_prog in which
12837do
12838  # Extract the first word of "$ac_prog", so it can be a program name with args.
12839set dummy $ac_prog; ac_word=$2
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12841$as_echo_n "checking for $ac_word... " >&6; }
12842if ${ac_cv_path_WHICH+:} false; then :
12843  $as_echo_n "(cached) " >&6
12844else
12845  case $WHICH in
12846  [\\/]* | ?:[\\/]*)
12847  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12848  ;;
12849  *)
12850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12851for as_dir in $PATH
12852do
12853  IFS=$as_save_IFS
12854  test -z "$as_dir" && as_dir=.
12855    for ac_exec_ext in '' $ac_executable_extensions; do
12856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12857    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12859    break 2
12860  fi
12861done
12862  done
12863IFS=$as_save_IFS
12864
12865  ;;
12866esac
12867fi
12868WHICH=$ac_cv_path_WHICH
12869if test -n "$WHICH"; then
12870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12871$as_echo "$WHICH" >&6; }
12872else
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874$as_echo "no" >&6; }
12875fi
12876
12877
12878  test -n "$WHICH" && break
12879done
12880
12881    else
12882      # If it succeeded, then it was overridden by the user. We will use it
12883      # for the tool.
12884
12885      # First remove it from the list of overridden variables, so we can test
12886      # for unknown variables in the end.
12887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12888
12889      # Check if we try to supply an empty value
12890      if test "x$WHICH" = x; then
12891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12892$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12894$as_echo_n "checking for WHICH... " >&6; }
12895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12896$as_echo "disabled" >&6; }
12897      else
12898        # Check if the provided tool contains a complete path.
12899        tool_specified="$WHICH"
12900        tool_basename="${tool_specified##*/}"
12901        if test "x$tool_basename" = "x$tool_specified"; then
12902          # A command without a complete path is provided, search $PATH.
12903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12904$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12905          # Extract the first word of "$tool_basename", so it can be a program name with args.
12906set dummy $tool_basename; ac_word=$2
12907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12908$as_echo_n "checking for $ac_word... " >&6; }
12909if ${ac_cv_path_WHICH+:} false; then :
12910  $as_echo_n "(cached) " >&6
12911else
12912  case $WHICH in
12913  [\\/]* | ?:[\\/]*)
12914  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12915  ;;
12916  *)
12917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12918for as_dir in $PATH
12919do
12920  IFS=$as_save_IFS
12921  test -z "$as_dir" && as_dir=.
12922    for ac_exec_ext in '' $ac_executable_extensions; do
12923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12924    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12926    break 2
12927  fi
12928done
12929  done
12930IFS=$as_save_IFS
12931
12932  ;;
12933esac
12934fi
12935WHICH=$ac_cv_path_WHICH
12936if test -n "$WHICH"; then
12937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12938$as_echo "$WHICH" >&6; }
12939else
12940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12941$as_echo "no" >&6; }
12942fi
12943
12944
12945          if test "x$WHICH" = x; then
12946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12947          fi
12948        else
12949          # Otherwise we believe it is a complete path. Use it as it is.
12950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12951$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12953$as_echo_n "checking for WHICH... " >&6; }
12954          if test ! -x "$tool_specified"; then
12955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12956$as_echo "not found" >&6; }
12957            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12958          fi
12959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12960$as_echo "$tool_specified" >&6; }
12961        fi
12962      fi
12963    fi
12964
12965  fi
12966
12967
12968
12969  if test "x$WHICH" = x; then
12970    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12971  fi
12972
12973
12974
12975
12976
12977  # Publish this variable in the help.
12978
12979
12980  if [ -z "${XARGS+x}" ]; then
12981    # The variable is not set by user, try to locate tool using the code snippet
12982    for ac_prog in xargs
12983do
12984  # Extract the first word of "$ac_prog", so it can be a program name with args.
12985set dummy $ac_prog; ac_word=$2
12986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12987$as_echo_n "checking for $ac_word... " >&6; }
12988if ${ac_cv_path_XARGS+:} false; then :
12989  $as_echo_n "(cached) " >&6
12990else
12991  case $XARGS in
12992  [\\/]* | ?:[\\/]*)
12993  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12994  ;;
12995  *)
12996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12997for as_dir in $PATH
12998do
12999  IFS=$as_save_IFS
13000  test -z "$as_dir" && as_dir=.
13001    for ac_exec_ext in '' $ac_executable_extensions; do
13002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13003    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13005    break 2
13006  fi
13007done
13008  done
13009IFS=$as_save_IFS
13010
13011  ;;
13012esac
13013fi
13014XARGS=$ac_cv_path_XARGS
13015if test -n "$XARGS"; then
13016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13017$as_echo "$XARGS" >&6; }
13018else
13019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13020$as_echo "no" >&6; }
13021fi
13022
13023
13024  test -n "$XARGS" && break
13025done
13026
13027  else
13028    # The variable is set, but is it from the command line or the environment?
13029
13030    # Try to remove the string !XARGS! from our list.
13031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13033      # If it failed, the variable was not from the command line. Ignore it,
13034      # but warn the user (except for BASH, which is always set by the calling BASH).
13035      if test "xXARGS" != xBASH; then
13036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13037$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13038      fi
13039      # Try to locate tool using the code snippet
13040      for ac_prog in xargs
13041do
13042  # Extract the first word of "$ac_prog", so it can be a program name with args.
13043set dummy $ac_prog; ac_word=$2
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13045$as_echo_n "checking for $ac_word... " >&6; }
13046if ${ac_cv_path_XARGS+:} false; then :
13047  $as_echo_n "(cached) " >&6
13048else
13049  case $XARGS in
13050  [\\/]* | ?:[\\/]*)
13051  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13052  ;;
13053  *)
13054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13055for as_dir in $PATH
13056do
13057  IFS=$as_save_IFS
13058  test -z "$as_dir" && as_dir=.
13059    for ac_exec_ext in '' $ac_executable_extensions; do
13060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13061    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13063    break 2
13064  fi
13065done
13066  done
13067IFS=$as_save_IFS
13068
13069  ;;
13070esac
13071fi
13072XARGS=$ac_cv_path_XARGS
13073if test -n "$XARGS"; then
13074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13075$as_echo "$XARGS" >&6; }
13076else
13077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13078$as_echo "no" >&6; }
13079fi
13080
13081
13082  test -n "$XARGS" && break
13083done
13084
13085    else
13086      # If it succeeded, then it was overridden by the user. We will use it
13087      # for the tool.
13088
13089      # First remove it from the list of overridden variables, so we can test
13090      # for unknown variables in the end.
13091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13092
13093      # Check if we try to supply an empty value
13094      if test "x$XARGS" = x; then
13095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13096$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13098$as_echo_n "checking for XARGS... " >&6; }
13099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13100$as_echo "disabled" >&6; }
13101      else
13102        # Check if the provided tool contains a complete path.
13103        tool_specified="$XARGS"
13104        tool_basename="${tool_specified##*/}"
13105        if test "x$tool_basename" = "x$tool_specified"; then
13106          # A command without a complete path is provided, search $PATH.
13107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13108$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13109          # Extract the first word of "$tool_basename", so it can be a program name with args.
13110set dummy $tool_basename; ac_word=$2
13111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13112$as_echo_n "checking for $ac_word... " >&6; }
13113if ${ac_cv_path_XARGS+:} false; then :
13114  $as_echo_n "(cached) " >&6
13115else
13116  case $XARGS in
13117  [\\/]* | ?:[\\/]*)
13118  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13119  ;;
13120  *)
13121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13122for as_dir in $PATH
13123do
13124  IFS=$as_save_IFS
13125  test -z "$as_dir" && as_dir=.
13126    for ac_exec_ext in '' $ac_executable_extensions; do
13127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13128    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13130    break 2
13131  fi
13132done
13133  done
13134IFS=$as_save_IFS
13135
13136  ;;
13137esac
13138fi
13139XARGS=$ac_cv_path_XARGS
13140if test -n "$XARGS"; then
13141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13142$as_echo "$XARGS" >&6; }
13143else
13144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13145$as_echo "no" >&6; }
13146fi
13147
13148
13149          if test "x$XARGS" = x; then
13150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13151          fi
13152        else
13153          # Otherwise we believe it is a complete path. Use it as it is.
13154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13155$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13157$as_echo_n "checking for XARGS... " >&6; }
13158          if test ! -x "$tool_specified"; then
13159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13160$as_echo "not found" >&6; }
13161            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13162          fi
13163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13164$as_echo "$tool_specified" >&6; }
13165        fi
13166      fi
13167    fi
13168
13169  fi
13170
13171
13172
13173  if test "x$XARGS" = x; then
13174    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13175  fi
13176
13177
13178
13179  # Then required tools that require some special treatment.
13180
13181
13182  # Publish this variable in the help.
13183
13184
13185  if [ -z "${AWK+x}" ]; then
13186    # The variable is not set by user, try to locate tool using the code snippet
13187    for ac_prog in gawk mawk nawk awk
13188do
13189  # Extract the first word of "$ac_prog", so it can be a program name with args.
13190set dummy $ac_prog; ac_word=$2
13191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13192$as_echo_n "checking for $ac_word... " >&6; }
13193if ${ac_cv_prog_AWK+:} false; then :
13194  $as_echo_n "(cached) " >&6
13195else
13196  if test -n "$AWK"; then
13197  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13198else
13199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13200for as_dir in $PATH
13201do
13202  IFS=$as_save_IFS
13203  test -z "$as_dir" && as_dir=.
13204    for ac_exec_ext in '' $ac_executable_extensions; do
13205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13206    ac_cv_prog_AWK="$ac_prog"
13207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13208    break 2
13209  fi
13210done
13211  done
13212IFS=$as_save_IFS
13213
13214fi
13215fi
13216AWK=$ac_cv_prog_AWK
13217if test -n "$AWK"; then
13218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13219$as_echo "$AWK" >&6; }
13220else
13221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13222$as_echo "no" >&6; }
13223fi
13224
13225
13226  test -n "$AWK" && break
13227done
13228
13229  else
13230    # The variable is set, but is it from the command line or the environment?
13231
13232    # Try to remove the string !AWK! from our list.
13233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13235      # If it failed, the variable was not from the command line. Ignore it,
13236      # but warn the user (except for BASH, which is always set by the calling BASH).
13237      if test "xAWK" != xBASH; then
13238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13239$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13240      fi
13241      # Try to locate tool using the code snippet
13242      for ac_prog in gawk mawk nawk awk
13243do
13244  # Extract the first word of "$ac_prog", so it can be a program name with args.
13245set dummy $ac_prog; ac_word=$2
13246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13247$as_echo_n "checking for $ac_word... " >&6; }
13248if ${ac_cv_prog_AWK+:} false; then :
13249  $as_echo_n "(cached) " >&6
13250else
13251  if test -n "$AWK"; then
13252  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13253else
13254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13255for as_dir in $PATH
13256do
13257  IFS=$as_save_IFS
13258  test -z "$as_dir" && as_dir=.
13259    for ac_exec_ext in '' $ac_executable_extensions; do
13260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13261    ac_cv_prog_AWK="$ac_prog"
13262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13263    break 2
13264  fi
13265done
13266  done
13267IFS=$as_save_IFS
13268
13269fi
13270fi
13271AWK=$ac_cv_prog_AWK
13272if test -n "$AWK"; then
13273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13274$as_echo "$AWK" >&6; }
13275else
13276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13277$as_echo "no" >&6; }
13278fi
13279
13280
13281  test -n "$AWK" && break
13282done
13283
13284    else
13285      # If it succeeded, then it was overridden by the user. We will use it
13286      # for the tool.
13287
13288      # First remove it from the list of overridden variables, so we can test
13289      # for unknown variables in the end.
13290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13291
13292      # Check if we try to supply an empty value
13293      if test "x$AWK" = x; then
13294        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13295$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13297$as_echo_n "checking for AWK... " >&6; }
13298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13299$as_echo "disabled" >&6; }
13300      else
13301        # Check if the provided tool contains a complete path.
13302        tool_specified="$AWK"
13303        tool_basename="${tool_specified##*/}"
13304        if test "x$tool_basename" = "x$tool_specified"; then
13305          # A command without a complete path is provided, search $PATH.
13306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13307$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13308          # Extract the first word of "$tool_basename", so it can be a program name with args.
13309set dummy $tool_basename; ac_word=$2
13310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13311$as_echo_n "checking for $ac_word... " >&6; }
13312if ${ac_cv_path_AWK+:} false; then :
13313  $as_echo_n "(cached) " >&6
13314else
13315  case $AWK in
13316  [\\/]* | ?:[\\/]*)
13317  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13318  ;;
13319  *)
13320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13321for as_dir in $PATH
13322do
13323  IFS=$as_save_IFS
13324  test -z "$as_dir" && as_dir=.
13325    for ac_exec_ext in '' $ac_executable_extensions; do
13326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13327    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13329    break 2
13330  fi
13331done
13332  done
13333IFS=$as_save_IFS
13334
13335  ;;
13336esac
13337fi
13338AWK=$ac_cv_path_AWK
13339if test -n "$AWK"; then
13340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13341$as_echo "$AWK" >&6; }
13342else
13343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13344$as_echo "no" >&6; }
13345fi
13346
13347
13348          if test "x$AWK" = x; then
13349            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13350          fi
13351        else
13352          # Otherwise we believe it is a complete path. Use it as it is.
13353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13354$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13356$as_echo_n "checking for AWK... " >&6; }
13357          if test ! -x "$tool_specified"; then
13358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13359$as_echo "not found" >&6; }
13360            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13361          fi
13362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13363$as_echo "$tool_specified" >&6; }
13364        fi
13365      fi
13366    fi
13367
13368  fi
13369
13370
13371  if test "x$AWK" = x; then
13372    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13373  fi
13374
13375
13376
13377
13378  # Publish this variable in the help.
13379
13380
13381  if [ -z "${GREP+x}" ]; then
13382    # The variable is not set by user, try to locate tool using the code snippet
13383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13384$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13385if ${ac_cv_path_GREP+:} false; then :
13386  $as_echo_n "(cached) " >&6
13387else
13388  if test -z "$GREP"; then
13389  ac_path_GREP_found=false
13390  # Loop through the user's path and test for each of PROGNAME-LIST
13391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13392for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13393do
13394  IFS=$as_save_IFS
13395  test -z "$as_dir" && as_dir=.
13396    for ac_prog in grep ggrep; do
13397    for ac_exec_ext in '' $ac_executable_extensions; do
13398      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13399      as_fn_executable_p "$ac_path_GREP" || continue
13400# Check for GNU ac_path_GREP and select it if it is found.
13401  # Check for GNU $ac_path_GREP
13402case `"$ac_path_GREP" --version 2>&1` in
13403*GNU*)
13404  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13405*)
13406  ac_count=0
13407  $as_echo_n 0123456789 >"conftest.in"
13408  while :
13409  do
13410    cat "conftest.in" "conftest.in" >"conftest.tmp"
13411    mv "conftest.tmp" "conftest.in"
13412    cp "conftest.in" "conftest.nl"
13413    $as_echo 'GREP' >> "conftest.nl"
13414    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13415    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13416    as_fn_arith $ac_count + 1 && ac_count=$as_val
13417    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13418      # Best one so far, save it but keep looking for a better one
13419      ac_cv_path_GREP="$ac_path_GREP"
13420      ac_path_GREP_max=$ac_count
13421    fi
13422    # 10*(2^10) chars as input seems more than enough
13423    test $ac_count -gt 10 && break
13424  done
13425  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13426esac
13427
13428      $ac_path_GREP_found && break 3
13429    done
13430  done
13431  done
13432IFS=$as_save_IFS
13433  if test -z "$ac_cv_path_GREP"; then
13434    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13435  fi
13436else
13437  ac_cv_path_GREP=$GREP
13438fi
13439
13440fi
13441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13442$as_echo "$ac_cv_path_GREP" >&6; }
13443 GREP="$ac_cv_path_GREP"
13444
13445
13446  else
13447    # The variable is set, but is it from the command line or the environment?
13448
13449    # Try to remove the string !GREP! from our list.
13450    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13451    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13452      # If it failed, the variable was not from the command line. Ignore it,
13453      # but warn the user (except for BASH, which is always set by the calling BASH).
13454      if test "xGREP" != xBASH; then
13455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13456$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13457      fi
13458      # Try to locate tool using the code snippet
13459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13460$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13461if ${ac_cv_path_GREP+:} false; then :
13462  $as_echo_n "(cached) " >&6
13463else
13464  if test -z "$GREP"; then
13465  ac_path_GREP_found=false
13466  # Loop through the user's path and test for each of PROGNAME-LIST
13467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13468for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13469do
13470  IFS=$as_save_IFS
13471  test -z "$as_dir" && as_dir=.
13472    for ac_prog in grep ggrep; do
13473    for ac_exec_ext in '' $ac_executable_extensions; do
13474      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13475      as_fn_executable_p "$ac_path_GREP" || continue
13476# Check for GNU ac_path_GREP and select it if it is found.
13477  # Check for GNU $ac_path_GREP
13478case `"$ac_path_GREP" --version 2>&1` in
13479*GNU*)
13480  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13481*)
13482  ac_count=0
13483  $as_echo_n 0123456789 >"conftest.in"
13484  while :
13485  do
13486    cat "conftest.in" "conftest.in" >"conftest.tmp"
13487    mv "conftest.tmp" "conftest.in"
13488    cp "conftest.in" "conftest.nl"
13489    $as_echo 'GREP' >> "conftest.nl"
13490    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13491    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13492    as_fn_arith $ac_count + 1 && ac_count=$as_val
13493    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13494      # Best one so far, save it but keep looking for a better one
13495      ac_cv_path_GREP="$ac_path_GREP"
13496      ac_path_GREP_max=$ac_count
13497    fi
13498    # 10*(2^10) chars as input seems more than enough
13499    test $ac_count -gt 10 && break
13500  done
13501  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13502esac
13503
13504      $ac_path_GREP_found && break 3
13505    done
13506  done
13507  done
13508IFS=$as_save_IFS
13509  if test -z "$ac_cv_path_GREP"; then
13510    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13511  fi
13512else
13513  ac_cv_path_GREP=$GREP
13514fi
13515
13516fi
13517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13518$as_echo "$ac_cv_path_GREP" >&6; }
13519 GREP="$ac_cv_path_GREP"
13520
13521
13522    else
13523      # If it succeeded, then it was overridden by the user. We will use it
13524      # for the tool.
13525
13526      # First remove it from the list of overridden variables, so we can test
13527      # for unknown variables in the end.
13528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13529
13530      # Check if we try to supply an empty value
13531      if test "x$GREP" = x; then
13532        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13533$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13535$as_echo_n "checking for GREP... " >&6; }
13536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13537$as_echo "disabled" >&6; }
13538      else
13539        # Check if the provided tool contains a complete path.
13540        tool_specified="$GREP"
13541        tool_basename="${tool_specified##*/}"
13542        if test "x$tool_basename" = "x$tool_specified"; then
13543          # A command without a complete path is provided, search $PATH.
13544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13545$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13546          # Extract the first word of "$tool_basename", so it can be a program name with args.
13547set dummy $tool_basename; ac_word=$2
13548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13549$as_echo_n "checking for $ac_word... " >&6; }
13550if ${ac_cv_path_GREP+:} false; then :
13551  $as_echo_n "(cached) " >&6
13552else
13553  case $GREP in
13554  [\\/]* | ?:[\\/]*)
13555  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13556  ;;
13557  *)
13558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13559for as_dir in $PATH
13560do
13561  IFS=$as_save_IFS
13562  test -z "$as_dir" && as_dir=.
13563    for ac_exec_ext in '' $ac_executable_extensions; do
13564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13565    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13567    break 2
13568  fi
13569done
13570  done
13571IFS=$as_save_IFS
13572
13573  ;;
13574esac
13575fi
13576GREP=$ac_cv_path_GREP
13577if test -n "$GREP"; then
13578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13579$as_echo "$GREP" >&6; }
13580else
13581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13582$as_echo "no" >&6; }
13583fi
13584
13585
13586          if test "x$GREP" = x; then
13587            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13588          fi
13589        else
13590          # Otherwise we believe it is a complete path. Use it as it is.
13591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13592$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13593          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13594$as_echo_n "checking for GREP... " >&6; }
13595          if test ! -x "$tool_specified"; then
13596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13597$as_echo "not found" >&6; }
13598            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13599          fi
13600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13601$as_echo "$tool_specified" >&6; }
13602        fi
13603      fi
13604    fi
13605
13606  fi
13607
13608
13609  if test "x$GREP" = x; then
13610    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13611  fi
13612
13613
13614
13615
13616  # Publish this variable in the help.
13617
13618
13619  if [ -z "${EGREP+x}" ]; then
13620    # The variable is not set by user, try to locate tool using the code snippet
13621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13622$as_echo_n "checking for egrep... " >&6; }
13623if ${ac_cv_path_EGREP+:} false; then :
13624  $as_echo_n "(cached) " >&6
13625else
13626  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13627   then ac_cv_path_EGREP="$GREP -E"
13628   else
13629     if test -z "$EGREP"; then
13630  ac_path_EGREP_found=false
13631  # Loop through the user's path and test for each of PROGNAME-LIST
13632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13633for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13634do
13635  IFS=$as_save_IFS
13636  test -z "$as_dir" && as_dir=.
13637    for ac_prog in egrep; do
13638    for ac_exec_ext in '' $ac_executable_extensions; do
13639      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13640      as_fn_executable_p "$ac_path_EGREP" || continue
13641# Check for GNU ac_path_EGREP and select it if it is found.
13642  # Check for GNU $ac_path_EGREP
13643case `"$ac_path_EGREP" --version 2>&1` in
13644*GNU*)
13645  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13646*)
13647  ac_count=0
13648  $as_echo_n 0123456789 >"conftest.in"
13649  while :
13650  do
13651    cat "conftest.in" "conftest.in" >"conftest.tmp"
13652    mv "conftest.tmp" "conftest.in"
13653    cp "conftest.in" "conftest.nl"
13654    $as_echo 'EGREP' >> "conftest.nl"
13655    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13656    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13657    as_fn_arith $ac_count + 1 && ac_count=$as_val
13658    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13659      # Best one so far, save it but keep looking for a better one
13660      ac_cv_path_EGREP="$ac_path_EGREP"
13661      ac_path_EGREP_max=$ac_count
13662    fi
13663    # 10*(2^10) chars as input seems more than enough
13664    test $ac_count -gt 10 && break
13665  done
13666  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13667esac
13668
13669      $ac_path_EGREP_found && break 3
13670    done
13671  done
13672  done
13673IFS=$as_save_IFS
13674  if test -z "$ac_cv_path_EGREP"; then
13675    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13676  fi
13677else
13678  ac_cv_path_EGREP=$EGREP
13679fi
13680
13681   fi
13682fi
13683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13684$as_echo "$ac_cv_path_EGREP" >&6; }
13685 EGREP="$ac_cv_path_EGREP"
13686
13687
13688  else
13689    # The variable is set, but is it from the command line or the environment?
13690
13691    # Try to remove the string !EGREP! from our list.
13692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13694      # If it failed, the variable was not from the command line. Ignore it,
13695      # but warn the user (except for BASH, which is always set by the calling BASH).
13696      if test "xEGREP" != xBASH; then
13697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13698$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13699      fi
13700      # Try to locate tool using the code snippet
13701      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13702$as_echo_n "checking for egrep... " >&6; }
13703if ${ac_cv_path_EGREP+:} false; then :
13704  $as_echo_n "(cached) " >&6
13705else
13706  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13707   then ac_cv_path_EGREP="$GREP -E"
13708   else
13709     if test -z "$EGREP"; then
13710  ac_path_EGREP_found=false
13711  # Loop through the user's path and test for each of PROGNAME-LIST
13712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13713for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13714do
13715  IFS=$as_save_IFS
13716  test -z "$as_dir" && as_dir=.
13717    for ac_prog in egrep; do
13718    for ac_exec_ext in '' $ac_executable_extensions; do
13719      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13720      as_fn_executable_p "$ac_path_EGREP" || continue
13721# Check for GNU ac_path_EGREP and select it if it is found.
13722  # Check for GNU $ac_path_EGREP
13723case `"$ac_path_EGREP" --version 2>&1` in
13724*GNU*)
13725  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13726*)
13727  ac_count=0
13728  $as_echo_n 0123456789 >"conftest.in"
13729  while :
13730  do
13731    cat "conftest.in" "conftest.in" >"conftest.tmp"
13732    mv "conftest.tmp" "conftest.in"
13733    cp "conftest.in" "conftest.nl"
13734    $as_echo 'EGREP' >> "conftest.nl"
13735    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13736    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13737    as_fn_arith $ac_count + 1 && ac_count=$as_val
13738    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13739      # Best one so far, save it but keep looking for a better one
13740      ac_cv_path_EGREP="$ac_path_EGREP"
13741      ac_path_EGREP_max=$ac_count
13742    fi
13743    # 10*(2^10) chars as input seems more than enough
13744    test $ac_count -gt 10 && break
13745  done
13746  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13747esac
13748
13749      $ac_path_EGREP_found && break 3
13750    done
13751  done
13752  done
13753IFS=$as_save_IFS
13754  if test -z "$ac_cv_path_EGREP"; then
13755    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13756  fi
13757else
13758  ac_cv_path_EGREP=$EGREP
13759fi
13760
13761   fi
13762fi
13763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13764$as_echo "$ac_cv_path_EGREP" >&6; }
13765 EGREP="$ac_cv_path_EGREP"
13766
13767
13768    else
13769      # If it succeeded, then it was overridden by the user. We will use it
13770      # for the tool.
13771
13772      # First remove it from the list of overridden variables, so we can test
13773      # for unknown variables in the end.
13774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13775
13776      # Check if we try to supply an empty value
13777      if test "x$EGREP" = x; then
13778        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13779$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13781$as_echo_n "checking for EGREP... " >&6; }
13782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13783$as_echo "disabled" >&6; }
13784      else
13785        # Check if the provided tool contains a complete path.
13786        tool_specified="$EGREP"
13787        tool_basename="${tool_specified##*/}"
13788        if test "x$tool_basename" = "x$tool_specified"; then
13789          # A command without a complete path is provided, search $PATH.
13790          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13791$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13792          # Extract the first word of "$tool_basename", so it can be a program name with args.
13793set dummy $tool_basename; ac_word=$2
13794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13795$as_echo_n "checking for $ac_word... " >&6; }
13796if ${ac_cv_path_EGREP+:} false; then :
13797  $as_echo_n "(cached) " >&6
13798else
13799  case $EGREP in
13800  [\\/]* | ?:[\\/]*)
13801  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13802  ;;
13803  *)
13804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13805for as_dir in $PATH
13806do
13807  IFS=$as_save_IFS
13808  test -z "$as_dir" && as_dir=.
13809    for ac_exec_ext in '' $ac_executable_extensions; do
13810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13811    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13813    break 2
13814  fi
13815done
13816  done
13817IFS=$as_save_IFS
13818
13819  ;;
13820esac
13821fi
13822EGREP=$ac_cv_path_EGREP
13823if test -n "$EGREP"; then
13824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13825$as_echo "$EGREP" >&6; }
13826else
13827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13828$as_echo "no" >&6; }
13829fi
13830
13831
13832          if test "x$EGREP" = x; then
13833            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13834          fi
13835        else
13836          # Otherwise we believe it is a complete path. Use it as it is.
13837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13838$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13839          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13840$as_echo_n "checking for EGREP... " >&6; }
13841          if test ! -x "$tool_specified"; then
13842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13843$as_echo "not found" >&6; }
13844            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13845          fi
13846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13847$as_echo "$tool_specified" >&6; }
13848        fi
13849      fi
13850    fi
13851
13852  fi
13853
13854
13855  if test "x$EGREP" = x; then
13856    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13857  fi
13858
13859
13860
13861
13862  # Publish this variable in the help.
13863
13864
13865  if [ -z "${FGREP+x}" ]; then
13866    # The variable is not set by user, try to locate tool using the code snippet
13867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13868$as_echo_n "checking for fgrep... " >&6; }
13869if ${ac_cv_path_FGREP+:} false; then :
13870  $as_echo_n "(cached) " >&6
13871else
13872  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13873   then ac_cv_path_FGREP="$GREP -F"
13874   else
13875     if test -z "$FGREP"; then
13876  ac_path_FGREP_found=false
13877  # Loop through the user's path and test for each of PROGNAME-LIST
13878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13879for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13880do
13881  IFS=$as_save_IFS
13882  test -z "$as_dir" && as_dir=.
13883    for ac_prog in fgrep; do
13884    for ac_exec_ext in '' $ac_executable_extensions; do
13885      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13886      as_fn_executable_p "$ac_path_FGREP" || continue
13887# Check for GNU ac_path_FGREP and select it if it is found.
13888  # Check for GNU $ac_path_FGREP
13889case `"$ac_path_FGREP" --version 2>&1` in
13890*GNU*)
13891  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13892*)
13893  ac_count=0
13894  $as_echo_n 0123456789 >"conftest.in"
13895  while :
13896  do
13897    cat "conftest.in" "conftest.in" >"conftest.tmp"
13898    mv "conftest.tmp" "conftest.in"
13899    cp "conftest.in" "conftest.nl"
13900    $as_echo 'FGREP' >> "conftest.nl"
13901    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13902    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13903    as_fn_arith $ac_count + 1 && ac_count=$as_val
13904    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13905      # Best one so far, save it but keep looking for a better one
13906      ac_cv_path_FGREP="$ac_path_FGREP"
13907      ac_path_FGREP_max=$ac_count
13908    fi
13909    # 10*(2^10) chars as input seems more than enough
13910    test $ac_count -gt 10 && break
13911  done
13912  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13913esac
13914
13915      $ac_path_FGREP_found && break 3
13916    done
13917  done
13918  done
13919IFS=$as_save_IFS
13920  if test -z "$ac_cv_path_FGREP"; then
13921    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13922  fi
13923else
13924  ac_cv_path_FGREP=$FGREP
13925fi
13926
13927   fi
13928fi
13929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13930$as_echo "$ac_cv_path_FGREP" >&6; }
13931 FGREP="$ac_cv_path_FGREP"
13932
13933
13934  else
13935    # The variable is set, but is it from the command line or the environment?
13936
13937    # Try to remove the string !FGREP! from our list.
13938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13940      # If it failed, the variable was not from the command line. Ignore it,
13941      # but warn the user (except for BASH, which is always set by the calling BASH).
13942      if test "xFGREP" != xBASH; then
13943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13944$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13945      fi
13946      # Try to locate tool using the code snippet
13947      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13948$as_echo_n "checking for fgrep... " >&6; }
13949if ${ac_cv_path_FGREP+:} false; then :
13950  $as_echo_n "(cached) " >&6
13951else
13952  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13953   then ac_cv_path_FGREP="$GREP -F"
13954   else
13955     if test -z "$FGREP"; then
13956  ac_path_FGREP_found=false
13957  # Loop through the user's path and test for each of PROGNAME-LIST
13958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13959for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13960do
13961  IFS=$as_save_IFS
13962  test -z "$as_dir" && as_dir=.
13963    for ac_prog in fgrep; do
13964    for ac_exec_ext in '' $ac_executable_extensions; do
13965      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13966      as_fn_executable_p "$ac_path_FGREP" || continue
13967# Check for GNU ac_path_FGREP and select it if it is found.
13968  # Check for GNU $ac_path_FGREP
13969case `"$ac_path_FGREP" --version 2>&1` in
13970*GNU*)
13971  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13972*)
13973  ac_count=0
13974  $as_echo_n 0123456789 >"conftest.in"
13975  while :
13976  do
13977    cat "conftest.in" "conftest.in" >"conftest.tmp"
13978    mv "conftest.tmp" "conftest.in"
13979    cp "conftest.in" "conftest.nl"
13980    $as_echo 'FGREP' >> "conftest.nl"
13981    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13982    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13983    as_fn_arith $ac_count + 1 && ac_count=$as_val
13984    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13985      # Best one so far, save it but keep looking for a better one
13986      ac_cv_path_FGREP="$ac_path_FGREP"
13987      ac_path_FGREP_max=$ac_count
13988    fi
13989    # 10*(2^10) chars as input seems more than enough
13990    test $ac_count -gt 10 && break
13991  done
13992  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13993esac
13994
13995      $ac_path_FGREP_found && break 3
13996    done
13997  done
13998  done
13999IFS=$as_save_IFS
14000  if test -z "$ac_cv_path_FGREP"; then
14001    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14002  fi
14003else
14004  ac_cv_path_FGREP=$FGREP
14005fi
14006
14007   fi
14008fi
14009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14010$as_echo "$ac_cv_path_FGREP" >&6; }
14011 FGREP="$ac_cv_path_FGREP"
14012
14013
14014    else
14015      # If it succeeded, then it was overridden by the user. We will use it
14016      # for the tool.
14017
14018      # First remove it from the list of overridden variables, so we can test
14019      # for unknown variables in the end.
14020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14021
14022      # Check if we try to supply an empty value
14023      if test "x$FGREP" = x; then
14024        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14025$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14027$as_echo_n "checking for FGREP... " >&6; }
14028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14029$as_echo "disabled" >&6; }
14030      else
14031        # Check if the provided tool contains a complete path.
14032        tool_specified="$FGREP"
14033        tool_basename="${tool_specified##*/}"
14034        if test "x$tool_basename" = "x$tool_specified"; then
14035          # A command without a complete path is provided, search $PATH.
14036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14037$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14038          # Extract the first word of "$tool_basename", so it can be a program name with args.
14039set dummy $tool_basename; ac_word=$2
14040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14041$as_echo_n "checking for $ac_word... " >&6; }
14042if ${ac_cv_path_FGREP+:} false; then :
14043  $as_echo_n "(cached) " >&6
14044else
14045  case $FGREP in
14046  [\\/]* | ?:[\\/]*)
14047  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14048  ;;
14049  *)
14050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14051for as_dir in $PATH
14052do
14053  IFS=$as_save_IFS
14054  test -z "$as_dir" && as_dir=.
14055    for ac_exec_ext in '' $ac_executable_extensions; do
14056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14057    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14059    break 2
14060  fi
14061done
14062  done
14063IFS=$as_save_IFS
14064
14065  ;;
14066esac
14067fi
14068FGREP=$ac_cv_path_FGREP
14069if test -n "$FGREP"; then
14070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14071$as_echo "$FGREP" >&6; }
14072else
14073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14074$as_echo "no" >&6; }
14075fi
14076
14077
14078          if test "x$FGREP" = x; then
14079            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14080          fi
14081        else
14082          # Otherwise we believe it is a complete path. Use it as it is.
14083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14084$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14085          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14086$as_echo_n "checking for FGREP... " >&6; }
14087          if test ! -x "$tool_specified"; then
14088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14089$as_echo "not found" >&6; }
14090            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14091          fi
14092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14093$as_echo "$tool_specified" >&6; }
14094        fi
14095      fi
14096    fi
14097
14098  fi
14099
14100
14101  if test "x$FGREP" = x; then
14102    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14103  fi
14104
14105
14106
14107
14108  # Publish this variable in the help.
14109
14110
14111  if [ -z "${SED+x}" ]; then
14112    # The variable is not set by user, try to locate tool using the code snippet
14113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14114$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14115if ${ac_cv_path_SED+:} false; then :
14116  $as_echo_n "(cached) " >&6
14117else
14118            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14119     for ac_i in 1 2 3 4 5 6 7; do
14120       ac_script="$ac_script$as_nl$ac_script"
14121     done
14122     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14123     { ac_script=; unset ac_script;}
14124     if test -z "$SED"; then
14125  ac_path_SED_found=false
14126  # Loop through the user's path and test for each of PROGNAME-LIST
14127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14128for as_dir in $PATH
14129do
14130  IFS=$as_save_IFS
14131  test -z "$as_dir" && as_dir=.
14132    for ac_prog in sed gsed; do
14133    for ac_exec_ext in '' $ac_executable_extensions; do
14134      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14135      as_fn_executable_p "$ac_path_SED" || continue
14136# Check for GNU ac_path_SED and select it if it is found.
14137  # Check for GNU $ac_path_SED
14138case `"$ac_path_SED" --version 2>&1` in
14139*GNU*)
14140  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14141*)
14142  ac_count=0
14143  $as_echo_n 0123456789 >"conftest.in"
14144  while :
14145  do
14146    cat "conftest.in" "conftest.in" >"conftest.tmp"
14147    mv "conftest.tmp" "conftest.in"
14148    cp "conftest.in" "conftest.nl"
14149    $as_echo '' >> "conftest.nl"
14150    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14151    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14152    as_fn_arith $ac_count + 1 && ac_count=$as_val
14153    if test $ac_count -gt ${ac_path_SED_max-0}; then
14154      # Best one so far, save it but keep looking for a better one
14155      ac_cv_path_SED="$ac_path_SED"
14156      ac_path_SED_max=$ac_count
14157    fi
14158    # 10*(2^10) chars as input seems more than enough
14159    test $ac_count -gt 10 && break
14160  done
14161  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14162esac
14163
14164      $ac_path_SED_found && break 3
14165    done
14166  done
14167  done
14168IFS=$as_save_IFS
14169  if test -z "$ac_cv_path_SED"; then
14170    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14171  fi
14172else
14173  ac_cv_path_SED=$SED
14174fi
14175
14176fi
14177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14178$as_echo "$ac_cv_path_SED" >&6; }
14179 SED="$ac_cv_path_SED"
14180  rm -f conftest.sed
14181
14182  else
14183    # The variable is set, but is it from the command line or the environment?
14184
14185    # Try to remove the string !SED! from our list.
14186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14188      # If it failed, the variable was not from the command line. Ignore it,
14189      # but warn the user (except for BASH, which is always set by the calling BASH).
14190      if test "xSED" != xBASH; then
14191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14192$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14193      fi
14194      # Try to locate tool using the code snippet
14195      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14196$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14197if ${ac_cv_path_SED+:} false; then :
14198  $as_echo_n "(cached) " >&6
14199else
14200            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14201     for ac_i in 1 2 3 4 5 6 7; do
14202       ac_script="$ac_script$as_nl$ac_script"
14203     done
14204     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14205     { ac_script=; unset ac_script;}
14206     if test -z "$SED"; then
14207  ac_path_SED_found=false
14208  # Loop through the user's path and test for each of PROGNAME-LIST
14209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14210for as_dir in $PATH
14211do
14212  IFS=$as_save_IFS
14213  test -z "$as_dir" && as_dir=.
14214    for ac_prog in sed gsed; do
14215    for ac_exec_ext in '' $ac_executable_extensions; do
14216      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14217      as_fn_executable_p "$ac_path_SED" || continue
14218# Check for GNU ac_path_SED and select it if it is found.
14219  # Check for GNU $ac_path_SED
14220case `"$ac_path_SED" --version 2>&1` in
14221*GNU*)
14222  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14223*)
14224  ac_count=0
14225  $as_echo_n 0123456789 >"conftest.in"
14226  while :
14227  do
14228    cat "conftest.in" "conftest.in" >"conftest.tmp"
14229    mv "conftest.tmp" "conftest.in"
14230    cp "conftest.in" "conftest.nl"
14231    $as_echo '' >> "conftest.nl"
14232    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14233    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14234    as_fn_arith $ac_count + 1 && ac_count=$as_val
14235    if test $ac_count -gt ${ac_path_SED_max-0}; then
14236      # Best one so far, save it but keep looking for a better one
14237      ac_cv_path_SED="$ac_path_SED"
14238      ac_path_SED_max=$ac_count
14239    fi
14240    # 10*(2^10) chars as input seems more than enough
14241    test $ac_count -gt 10 && break
14242  done
14243  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14244esac
14245
14246      $ac_path_SED_found && break 3
14247    done
14248  done
14249  done
14250IFS=$as_save_IFS
14251  if test -z "$ac_cv_path_SED"; then
14252    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14253  fi
14254else
14255  ac_cv_path_SED=$SED
14256fi
14257
14258fi
14259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14260$as_echo "$ac_cv_path_SED" >&6; }
14261 SED="$ac_cv_path_SED"
14262  rm -f conftest.sed
14263
14264    else
14265      # If it succeeded, then it was overridden by the user. We will use it
14266      # for the tool.
14267
14268      # First remove it from the list of overridden variables, so we can test
14269      # for unknown variables in the end.
14270      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14271
14272      # Check if we try to supply an empty value
14273      if test "x$SED" = x; then
14274        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14275$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14276        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14277$as_echo_n "checking for SED... " >&6; }
14278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14279$as_echo "disabled" >&6; }
14280      else
14281        # Check if the provided tool contains a complete path.
14282        tool_specified="$SED"
14283        tool_basename="${tool_specified##*/}"
14284        if test "x$tool_basename" = "x$tool_specified"; then
14285          # A command without a complete path is provided, search $PATH.
14286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14287$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14288          # Extract the first word of "$tool_basename", so it can be a program name with args.
14289set dummy $tool_basename; ac_word=$2
14290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14291$as_echo_n "checking for $ac_word... " >&6; }
14292if ${ac_cv_path_SED+:} false; then :
14293  $as_echo_n "(cached) " >&6
14294else
14295  case $SED in
14296  [\\/]* | ?:[\\/]*)
14297  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14298  ;;
14299  *)
14300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14301for as_dir in $PATH
14302do
14303  IFS=$as_save_IFS
14304  test -z "$as_dir" && as_dir=.
14305    for ac_exec_ext in '' $ac_executable_extensions; do
14306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14307    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14309    break 2
14310  fi
14311done
14312  done
14313IFS=$as_save_IFS
14314
14315  ;;
14316esac
14317fi
14318SED=$ac_cv_path_SED
14319if test -n "$SED"; then
14320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14321$as_echo "$SED" >&6; }
14322else
14323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14324$as_echo "no" >&6; }
14325fi
14326
14327
14328          if test "x$SED" = x; then
14329            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14330          fi
14331        else
14332          # Otherwise we believe it is a complete path. Use it as it is.
14333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14334$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14335          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14336$as_echo_n "checking for SED... " >&6; }
14337          if test ! -x "$tool_specified"; then
14338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14339$as_echo "not found" >&6; }
14340            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14341          fi
14342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14343$as_echo "$tool_specified" >&6; }
14344        fi
14345      fi
14346    fi
14347
14348  fi
14349
14350
14351  if test "x$SED" = x; then
14352    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14353  fi
14354
14355
14356
14357  # Always force rm.
14358  RM="$RM -f"
14359
14360  # pwd behaves differently on various platforms and some don't support the -L flag.
14361  # Always use the bash builtin pwd to get uniform behavior.
14362  THEPWDCMD=pwd
14363
14364  # These are not required on all platforms
14365
14366
14367  # Publish this variable in the help.
14368
14369
14370  if [ -z "${CYGPATH+x}" ]; then
14371    # The variable is not set by user, try to locate tool using the code snippet
14372    for ac_prog in cygpath
14373do
14374  # Extract the first word of "$ac_prog", so it can be a program name with args.
14375set dummy $ac_prog; ac_word=$2
14376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14377$as_echo_n "checking for $ac_word... " >&6; }
14378if ${ac_cv_path_CYGPATH+:} false; then :
14379  $as_echo_n "(cached) " >&6
14380else
14381  case $CYGPATH in
14382  [\\/]* | ?:[\\/]*)
14383  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14384  ;;
14385  *)
14386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14387for as_dir in $PATH
14388do
14389  IFS=$as_save_IFS
14390  test -z "$as_dir" && as_dir=.
14391    for ac_exec_ext in '' $ac_executable_extensions; do
14392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14393    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14395    break 2
14396  fi
14397done
14398  done
14399IFS=$as_save_IFS
14400
14401  ;;
14402esac
14403fi
14404CYGPATH=$ac_cv_path_CYGPATH
14405if test -n "$CYGPATH"; then
14406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14407$as_echo "$CYGPATH" >&6; }
14408else
14409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14410$as_echo "no" >&6; }
14411fi
14412
14413
14414  test -n "$CYGPATH" && break
14415done
14416
14417  else
14418    # The variable is set, but is it from the command line or the environment?
14419
14420    # Try to remove the string !CYGPATH! from our list.
14421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14423      # If it failed, the variable was not from the command line. Ignore it,
14424      # but warn the user (except for BASH, which is always set by the calling BASH).
14425      if test "xCYGPATH" != xBASH; then
14426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14427$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14428      fi
14429      # Try to locate tool using the code snippet
14430      for ac_prog in cygpath
14431do
14432  # Extract the first word of "$ac_prog", so it can be a program name with args.
14433set dummy $ac_prog; ac_word=$2
14434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14435$as_echo_n "checking for $ac_word... " >&6; }
14436if ${ac_cv_path_CYGPATH+:} false; then :
14437  $as_echo_n "(cached) " >&6
14438else
14439  case $CYGPATH in
14440  [\\/]* | ?:[\\/]*)
14441  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14442  ;;
14443  *)
14444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14445for as_dir in $PATH
14446do
14447  IFS=$as_save_IFS
14448  test -z "$as_dir" && as_dir=.
14449    for ac_exec_ext in '' $ac_executable_extensions; do
14450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14451    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14453    break 2
14454  fi
14455done
14456  done
14457IFS=$as_save_IFS
14458
14459  ;;
14460esac
14461fi
14462CYGPATH=$ac_cv_path_CYGPATH
14463if test -n "$CYGPATH"; then
14464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14465$as_echo "$CYGPATH" >&6; }
14466else
14467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14468$as_echo "no" >&6; }
14469fi
14470
14471
14472  test -n "$CYGPATH" && break
14473done
14474
14475    else
14476      # If it succeeded, then it was overridden by the user. We will use it
14477      # for the tool.
14478
14479      # First remove it from the list of overridden variables, so we can test
14480      # for unknown variables in the end.
14481      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14482
14483      # Check if we try to supply an empty value
14484      if test "x$CYGPATH" = x; then
14485        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14486$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14488$as_echo_n "checking for CYGPATH... " >&6; }
14489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14490$as_echo "disabled" >&6; }
14491      else
14492        # Check if the provided tool contains a complete path.
14493        tool_specified="$CYGPATH"
14494        tool_basename="${tool_specified##*/}"
14495        if test "x$tool_basename" = "x$tool_specified"; then
14496          # A command without a complete path is provided, search $PATH.
14497          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14498$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14499          # Extract the first word of "$tool_basename", so it can be a program name with args.
14500set dummy $tool_basename; ac_word=$2
14501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14502$as_echo_n "checking for $ac_word... " >&6; }
14503if ${ac_cv_path_CYGPATH+:} false; then :
14504  $as_echo_n "(cached) " >&6
14505else
14506  case $CYGPATH in
14507  [\\/]* | ?:[\\/]*)
14508  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14509  ;;
14510  *)
14511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14512for as_dir in $PATH
14513do
14514  IFS=$as_save_IFS
14515  test -z "$as_dir" && as_dir=.
14516    for ac_exec_ext in '' $ac_executable_extensions; do
14517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14518    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14520    break 2
14521  fi
14522done
14523  done
14524IFS=$as_save_IFS
14525
14526  ;;
14527esac
14528fi
14529CYGPATH=$ac_cv_path_CYGPATH
14530if test -n "$CYGPATH"; then
14531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14532$as_echo "$CYGPATH" >&6; }
14533else
14534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14535$as_echo "no" >&6; }
14536fi
14537
14538
14539          if test "x$CYGPATH" = x; then
14540            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14541          fi
14542        else
14543          # Otherwise we believe it is a complete path. Use it as it is.
14544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14545$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14546          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14547$as_echo_n "checking for CYGPATH... " >&6; }
14548          if test ! -x "$tool_specified"; then
14549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14550$as_echo "not found" >&6; }
14551            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14552          fi
14553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14554$as_echo "$tool_specified" >&6; }
14555        fi
14556      fi
14557    fi
14558
14559  fi
14560
14561
14562
14563
14564  # Publish this variable in the help.
14565
14566
14567  if [ -z "${READLINK+x}" ]; then
14568    # The variable is not set by user, try to locate tool using the code snippet
14569    for ac_prog in greadlink readlink
14570do
14571  # Extract the first word of "$ac_prog", so it can be a program name with args.
14572set dummy $ac_prog; ac_word=$2
14573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14574$as_echo_n "checking for $ac_word... " >&6; }
14575if ${ac_cv_path_READLINK+:} false; then :
14576  $as_echo_n "(cached) " >&6
14577else
14578  case $READLINK in
14579  [\\/]* | ?:[\\/]*)
14580  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14581  ;;
14582  *)
14583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14584for as_dir in $PATH
14585do
14586  IFS=$as_save_IFS
14587  test -z "$as_dir" && as_dir=.
14588    for ac_exec_ext in '' $ac_executable_extensions; do
14589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14590    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14592    break 2
14593  fi
14594done
14595  done
14596IFS=$as_save_IFS
14597
14598  ;;
14599esac
14600fi
14601READLINK=$ac_cv_path_READLINK
14602if test -n "$READLINK"; then
14603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14604$as_echo "$READLINK" >&6; }
14605else
14606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14607$as_echo "no" >&6; }
14608fi
14609
14610
14611  test -n "$READLINK" && break
14612done
14613
14614  else
14615    # The variable is set, but is it from the command line or the environment?
14616
14617    # Try to remove the string !READLINK! from our list.
14618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14620      # If it failed, the variable was not from the command line. Ignore it,
14621      # but warn the user (except for BASH, which is always set by the calling BASH).
14622      if test "xREADLINK" != xBASH; then
14623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14624$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14625      fi
14626      # Try to locate tool using the code snippet
14627      for ac_prog in greadlink readlink
14628do
14629  # Extract the first word of "$ac_prog", so it can be a program name with args.
14630set dummy $ac_prog; ac_word=$2
14631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14632$as_echo_n "checking for $ac_word... " >&6; }
14633if ${ac_cv_path_READLINK+:} false; then :
14634  $as_echo_n "(cached) " >&6
14635else
14636  case $READLINK in
14637  [\\/]* | ?:[\\/]*)
14638  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14639  ;;
14640  *)
14641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14642for as_dir in $PATH
14643do
14644  IFS=$as_save_IFS
14645  test -z "$as_dir" && as_dir=.
14646    for ac_exec_ext in '' $ac_executable_extensions; do
14647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14648    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14650    break 2
14651  fi
14652done
14653  done
14654IFS=$as_save_IFS
14655
14656  ;;
14657esac
14658fi
14659READLINK=$ac_cv_path_READLINK
14660if test -n "$READLINK"; then
14661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14662$as_echo "$READLINK" >&6; }
14663else
14664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14665$as_echo "no" >&6; }
14666fi
14667
14668
14669  test -n "$READLINK" && break
14670done
14671
14672    else
14673      # If it succeeded, then it was overridden by the user. We will use it
14674      # for the tool.
14675
14676      # First remove it from the list of overridden variables, so we can test
14677      # for unknown variables in the end.
14678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14679
14680      # Check if we try to supply an empty value
14681      if test "x$READLINK" = x; then
14682        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14683$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14685$as_echo_n "checking for READLINK... " >&6; }
14686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14687$as_echo "disabled" >&6; }
14688      else
14689        # Check if the provided tool contains a complete path.
14690        tool_specified="$READLINK"
14691        tool_basename="${tool_specified##*/}"
14692        if test "x$tool_basename" = "x$tool_specified"; then
14693          # A command without a complete path is provided, search $PATH.
14694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14695$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14696          # Extract the first word of "$tool_basename", so it can be a program name with args.
14697set dummy $tool_basename; ac_word=$2
14698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14699$as_echo_n "checking for $ac_word... " >&6; }
14700if ${ac_cv_path_READLINK+:} false; then :
14701  $as_echo_n "(cached) " >&6
14702else
14703  case $READLINK in
14704  [\\/]* | ?:[\\/]*)
14705  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14706  ;;
14707  *)
14708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14709for as_dir in $PATH
14710do
14711  IFS=$as_save_IFS
14712  test -z "$as_dir" && as_dir=.
14713    for ac_exec_ext in '' $ac_executable_extensions; do
14714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14715    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14717    break 2
14718  fi
14719done
14720  done
14721IFS=$as_save_IFS
14722
14723  ;;
14724esac
14725fi
14726READLINK=$ac_cv_path_READLINK
14727if test -n "$READLINK"; then
14728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14729$as_echo "$READLINK" >&6; }
14730else
14731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14732$as_echo "no" >&6; }
14733fi
14734
14735
14736          if test "x$READLINK" = x; then
14737            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14738          fi
14739        else
14740          # Otherwise we believe it is a complete path. Use it as it is.
14741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14742$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14743          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14744$as_echo_n "checking for READLINK... " >&6; }
14745          if test ! -x "$tool_specified"; then
14746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14747$as_echo "not found" >&6; }
14748            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14749          fi
14750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14751$as_echo "$tool_specified" >&6; }
14752        fi
14753      fi
14754    fi
14755
14756  fi
14757
14758
14759
14760
14761  # Publish this variable in the help.
14762
14763
14764  if [ -z "${DF+x}" ]; then
14765    # The variable is not set by user, try to locate tool using the code snippet
14766    for ac_prog in df
14767do
14768  # Extract the first word of "$ac_prog", so it can be a program name with args.
14769set dummy $ac_prog; ac_word=$2
14770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14771$as_echo_n "checking for $ac_word... " >&6; }
14772if ${ac_cv_path_DF+:} false; then :
14773  $as_echo_n "(cached) " >&6
14774else
14775  case $DF in
14776  [\\/]* | ?:[\\/]*)
14777  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14778  ;;
14779  *)
14780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14781for as_dir in $PATH
14782do
14783  IFS=$as_save_IFS
14784  test -z "$as_dir" && as_dir=.
14785    for ac_exec_ext in '' $ac_executable_extensions; do
14786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14787    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14789    break 2
14790  fi
14791done
14792  done
14793IFS=$as_save_IFS
14794
14795  ;;
14796esac
14797fi
14798DF=$ac_cv_path_DF
14799if test -n "$DF"; then
14800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14801$as_echo "$DF" >&6; }
14802else
14803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14804$as_echo "no" >&6; }
14805fi
14806
14807
14808  test -n "$DF" && break
14809done
14810
14811  else
14812    # The variable is set, but is it from the command line or the environment?
14813
14814    # Try to remove the string !DF! from our list.
14815    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14816    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14817      # If it failed, the variable was not from the command line. Ignore it,
14818      # but warn the user (except for BASH, which is always set by the calling BASH).
14819      if test "xDF" != xBASH; then
14820        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14821$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14822      fi
14823      # Try to locate tool using the code snippet
14824      for ac_prog in df
14825do
14826  # Extract the first word of "$ac_prog", so it can be a program name with args.
14827set dummy $ac_prog; ac_word=$2
14828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14829$as_echo_n "checking for $ac_word... " >&6; }
14830if ${ac_cv_path_DF+:} false; then :
14831  $as_echo_n "(cached) " >&6
14832else
14833  case $DF in
14834  [\\/]* | ?:[\\/]*)
14835  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14836  ;;
14837  *)
14838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14839for as_dir in $PATH
14840do
14841  IFS=$as_save_IFS
14842  test -z "$as_dir" && as_dir=.
14843    for ac_exec_ext in '' $ac_executable_extensions; do
14844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14845    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14847    break 2
14848  fi
14849done
14850  done
14851IFS=$as_save_IFS
14852
14853  ;;
14854esac
14855fi
14856DF=$ac_cv_path_DF
14857if test -n "$DF"; then
14858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14859$as_echo "$DF" >&6; }
14860else
14861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14862$as_echo "no" >&6; }
14863fi
14864
14865
14866  test -n "$DF" && break
14867done
14868
14869    else
14870      # If it succeeded, then it was overridden by the user. We will use it
14871      # for the tool.
14872
14873      # First remove it from the list of overridden variables, so we can test
14874      # for unknown variables in the end.
14875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14876
14877      # Check if we try to supply an empty value
14878      if test "x$DF" = x; then
14879        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14880$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14882$as_echo_n "checking for DF... " >&6; }
14883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14884$as_echo "disabled" >&6; }
14885      else
14886        # Check if the provided tool contains a complete path.
14887        tool_specified="$DF"
14888        tool_basename="${tool_specified##*/}"
14889        if test "x$tool_basename" = "x$tool_specified"; then
14890          # A command without a complete path is provided, search $PATH.
14891          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14892$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14893          # Extract the first word of "$tool_basename", so it can be a program name with args.
14894set dummy $tool_basename; ac_word=$2
14895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14896$as_echo_n "checking for $ac_word... " >&6; }
14897if ${ac_cv_path_DF+:} false; then :
14898  $as_echo_n "(cached) " >&6
14899else
14900  case $DF in
14901  [\\/]* | ?:[\\/]*)
14902  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14903  ;;
14904  *)
14905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14906for as_dir in $PATH
14907do
14908  IFS=$as_save_IFS
14909  test -z "$as_dir" && as_dir=.
14910    for ac_exec_ext in '' $ac_executable_extensions; do
14911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14912    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14914    break 2
14915  fi
14916done
14917  done
14918IFS=$as_save_IFS
14919
14920  ;;
14921esac
14922fi
14923DF=$ac_cv_path_DF
14924if test -n "$DF"; then
14925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14926$as_echo "$DF" >&6; }
14927else
14928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14929$as_echo "no" >&6; }
14930fi
14931
14932
14933          if test "x$DF" = x; then
14934            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14935          fi
14936        else
14937          # Otherwise we believe it is a complete path. Use it as it is.
14938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14939$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14940          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14941$as_echo_n "checking for DF... " >&6; }
14942          if test ! -x "$tool_specified"; then
14943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14944$as_echo "not found" >&6; }
14945            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14946          fi
14947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14948$as_echo "$tool_specified" >&6; }
14949        fi
14950      fi
14951    fi
14952
14953  fi
14954
14955
14956
14957
14958  # Publish this variable in the help.
14959
14960
14961  if [ -z "${CPIO+x}" ]; then
14962    # The variable is not set by user, try to locate tool using the code snippet
14963    for ac_prog in cpio bsdcpio
14964do
14965  # Extract the first word of "$ac_prog", so it can be a program name with args.
14966set dummy $ac_prog; ac_word=$2
14967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14968$as_echo_n "checking for $ac_word... " >&6; }
14969if ${ac_cv_path_CPIO+:} false; then :
14970  $as_echo_n "(cached) " >&6
14971else
14972  case $CPIO in
14973  [\\/]* | ?:[\\/]*)
14974  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14975  ;;
14976  *)
14977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14978for as_dir in $PATH
14979do
14980  IFS=$as_save_IFS
14981  test -z "$as_dir" && as_dir=.
14982    for ac_exec_ext in '' $ac_executable_extensions; do
14983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14984    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14986    break 2
14987  fi
14988done
14989  done
14990IFS=$as_save_IFS
14991
14992  ;;
14993esac
14994fi
14995CPIO=$ac_cv_path_CPIO
14996if test -n "$CPIO"; then
14997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14998$as_echo "$CPIO" >&6; }
14999else
15000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15001$as_echo "no" >&6; }
15002fi
15003
15004
15005  test -n "$CPIO" && break
15006done
15007
15008  else
15009    # The variable is set, but is it from the command line or the environment?
15010
15011    # Try to remove the string !CPIO! from our list.
15012    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15013    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15014      # If it failed, the variable was not from the command line. Ignore it,
15015      # but warn the user (except for BASH, which is always set by the calling BASH).
15016      if test "xCPIO" != xBASH; then
15017        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15018$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15019      fi
15020      # Try to locate tool using the code snippet
15021      for ac_prog in cpio bsdcpio
15022do
15023  # Extract the first word of "$ac_prog", so it can be a program name with args.
15024set dummy $ac_prog; ac_word=$2
15025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15026$as_echo_n "checking for $ac_word... " >&6; }
15027if ${ac_cv_path_CPIO+:} false; then :
15028  $as_echo_n "(cached) " >&6
15029else
15030  case $CPIO in
15031  [\\/]* | ?:[\\/]*)
15032  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15033  ;;
15034  *)
15035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15036for as_dir in $PATH
15037do
15038  IFS=$as_save_IFS
15039  test -z "$as_dir" && as_dir=.
15040    for ac_exec_ext in '' $ac_executable_extensions; do
15041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15042    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15044    break 2
15045  fi
15046done
15047  done
15048IFS=$as_save_IFS
15049
15050  ;;
15051esac
15052fi
15053CPIO=$ac_cv_path_CPIO
15054if test -n "$CPIO"; then
15055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15056$as_echo "$CPIO" >&6; }
15057else
15058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15059$as_echo "no" >&6; }
15060fi
15061
15062
15063  test -n "$CPIO" && break
15064done
15065
15066    else
15067      # If it succeeded, then it was overridden by the user. We will use it
15068      # for the tool.
15069
15070      # First remove it from the list of overridden variables, so we can test
15071      # for unknown variables in the end.
15072      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15073
15074      # Check if we try to supply an empty value
15075      if test "x$CPIO" = x; then
15076        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15077$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15078        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15079$as_echo_n "checking for CPIO... " >&6; }
15080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15081$as_echo "disabled" >&6; }
15082      else
15083        # Check if the provided tool contains a complete path.
15084        tool_specified="$CPIO"
15085        tool_basename="${tool_specified##*/}"
15086        if test "x$tool_basename" = "x$tool_specified"; then
15087          # A command without a complete path is provided, search $PATH.
15088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15089$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15090          # Extract the first word of "$tool_basename", so it can be a program name with args.
15091set dummy $tool_basename; ac_word=$2
15092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15093$as_echo_n "checking for $ac_word... " >&6; }
15094if ${ac_cv_path_CPIO+:} false; then :
15095  $as_echo_n "(cached) " >&6
15096else
15097  case $CPIO in
15098  [\\/]* | ?:[\\/]*)
15099  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15100  ;;
15101  *)
15102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15103for as_dir in $PATH
15104do
15105  IFS=$as_save_IFS
15106  test -z "$as_dir" && as_dir=.
15107    for ac_exec_ext in '' $ac_executable_extensions; do
15108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15109    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15111    break 2
15112  fi
15113done
15114  done
15115IFS=$as_save_IFS
15116
15117  ;;
15118esac
15119fi
15120CPIO=$ac_cv_path_CPIO
15121if test -n "$CPIO"; then
15122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15123$as_echo "$CPIO" >&6; }
15124else
15125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15126$as_echo "no" >&6; }
15127fi
15128
15129
15130          if test "x$CPIO" = x; then
15131            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15132          fi
15133        else
15134          # Otherwise we believe it is a complete path. Use it as it is.
15135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15136$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15137          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15138$as_echo_n "checking for CPIO... " >&6; }
15139          if test ! -x "$tool_specified"; then
15140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15141$as_echo "not found" >&6; }
15142            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15143          fi
15144          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15145$as_echo "$tool_specified" >&6; }
15146        fi
15147      fi
15148    fi
15149
15150  fi
15151
15152
15153
15154
15155  # Publish this variable in the help.
15156
15157
15158  if [ -z "${NICE+x}" ]; then
15159    # The variable is not set by user, try to locate tool using the code snippet
15160    for ac_prog in nice
15161do
15162  # Extract the first word of "$ac_prog", so it can be a program name with args.
15163set dummy $ac_prog; ac_word=$2
15164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15165$as_echo_n "checking for $ac_word... " >&6; }
15166if ${ac_cv_path_NICE+:} false; then :
15167  $as_echo_n "(cached) " >&6
15168else
15169  case $NICE in
15170  [\\/]* | ?:[\\/]*)
15171  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15172  ;;
15173  *)
15174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15175for as_dir in $PATH
15176do
15177  IFS=$as_save_IFS
15178  test -z "$as_dir" && as_dir=.
15179    for ac_exec_ext in '' $ac_executable_extensions; do
15180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15181    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15183    break 2
15184  fi
15185done
15186  done
15187IFS=$as_save_IFS
15188
15189  ;;
15190esac
15191fi
15192NICE=$ac_cv_path_NICE
15193if test -n "$NICE"; then
15194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15195$as_echo "$NICE" >&6; }
15196else
15197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15198$as_echo "no" >&6; }
15199fi
15200
15201
15202  test -n "$NICE" && break
15203done
15204
15205  else
15206    # The variable is set, but is it from the command line or the environment?
15207
15208    # Try to remove the string !NICE! from our list.
15209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15211      # If it failed, the variable was not from the command line. Ignore it,
15212      # but warn the user (except for BASH, which is always set by the calling BASH).
15213      if test "xNICE" != xBASH; then
15214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15215$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15216      fi
15217      # Try to locate tool using the code snippet
15218      for ac_prog in nice
15219do
15220  # Extract the first word of "$ac_prog", so it can be a program name with args.
15221set dummy $ac_prog; ac_word=$2
15222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15223$as_echo_n "checking for $ac_word... " >&6; }
15224if ${ac_cv_path_NICE+:} false; then :
15225  $as_echo_n "(cached) " >&6
15226else
15227  case $NICE in
15228  [\\/]* | ?:[\\/]*)
15229  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15230  ;;
15231  *)
15232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15233for as_dir in $PATH
15234do
15235  IFS=$as_save_IFS
15236  test -z "$as_dir" && as_dir=.
15237    for ac_exec_ext in '' $ac_executable_extensions; do
15238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15239    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15241    break 2
15242  fi
15243done
15244  done
15245IFS=$as_save_IFS
15246
15247  ;;
15248esac
15249fi
15250NICE=$ac_cv_path_NICE
15251if test -n "$NICE"; then
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15253$as_echo "$NICE" >&6; }
15254else
15255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15256$as_echo "no" >&6; }
15257fi
15258
15259
15260  test -n "$NICE" && break
15261done
15262
15263    else
15264      # If it succeeded, then it was overridden by the user. We will use it
15265      # for the tool.
15266
15267      # First remove it from the list of overridden variables, so we can test
15268      # for unknown variables in the end.
15269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15270
15271      # Check if we try to supply an empty value
15272      if test "x$NICE" = x; then
15273        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15274$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15276$as_echo_n "checking for NICE... " >&6; }
15277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15278$as_echo "disabled" >&6; }
15279      else
15280        # Check if the provided tool contains a complete path.
15281        tool_specified="$NICE"
15282        tool_basename="${tool_specified##*/}"
15283        if test "x$tool_basename" = "x$tool_specified"; then
15284          # A command without a complete path is provided, search $PATH.
15285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15286$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15287          # Extract the first word of "$tool_basename", so it can be a program name with args.
15288set dummy $tool_basename; ac_word=$2
15289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15290$as_echo_n "checking for $ac_word... " >&6; }
15291if ${ac_cv_path_NICE+:} false; then :
15292  $as_echo_n "(cached) " >&6
15293else
15294  case $NICE in
15295  [\\/]* | ?:[\\/]*)
15296  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15297  ;;
15298  *)
15299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15300for as_dir in $PATH
15301do
15302  IFS=$as_save_IFS
15303  test -z "$as_dir" && as_dir=.
15304    for ac_exec_ext in '' $ac_executable_extensions; do
15305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15306    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15308    break 2
15309  fi
15310done
15311  done
15312IFS=$as_save_IFS
15313
15314  ;;
15315esac
15316fi
15317NICE=$ac_cv_path_NICE
15318if test -n "$NICE"; then
15319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15320$as_echo "$NICE" >&6; }
15321else
15322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15323$as_echo "no" >&6; }
15324fi
15325
15326
15327          if test "x$NICE" = x; then
15328            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15329          fi
15330        else
15331          # Otherwise we believe it is a complete path. Use it as it is.
15332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15333$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15334          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15335$as_echo_n "checking for NICE... " >&6; }
15336          if test ! -x "$tool_specified"; then
15337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15338$as_echo "not found" >&6; }
15339            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15340          fi
15341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15342$as_echo "$tool_specified" >&6; }
15343        fi
15344      fi
15345    fi
15346
15347  fi
15348
15349
15350
15351
15352  # Publish this variable in the help.
15353
15354
15355  if [ -z "${PANDOC+x}" ]; then
15356    # The variable is not set by user, try to locate tool using the code snippet
15357    for ac_prog in pandoc
15358do
15359  # Extract the first word of "$ac_prog", so it can be a program name with args.
15360set dummy $ac_prog; ac_word=$2
15361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15362$as_echo_n "checking for $ac_word... " >&6; }
15363if ${ac_cv_path_PANDOC+:} false; then :
15364  $as_echo_n "(cached) " >&6
15365else
15366  case $PANDOC in
15367  [\\/]* | ?:[\\/]*)
15368  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15369  ;;
15370  *)
15371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15372for as_dir in $PATH
15373do
15374  IFS=$as_save_IFS
15375  test -z "$as_dir" && as_dir=.
15376    for ac_exec_ext in '' $ac_executable_extensions; do
15377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15378    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15380    break 2
15381  fi
15382done
15383  done
15384IFS=$as_save_IFS
15385
15386  ;;
15387esac
15388fi
15389PANDOC=$ac_cv_path_PANDOC
15390if test -n "$PANDOC"; then
15391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15392$as_echo "$PANDOC" >&6; }
15393else
15394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15395$as_echo "no" >&6; }
15396fi
15397
15398
15399  test -n "$PANDOC" && break
15400done
15401
15402  else
15403    # The variable is set, but is it from the command line or the environment?
15404
15405    # Try to remove the string !PANDOC! from our list.
15406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15408      # If it failed, the variable was not from the command line. Ignore it,
15409      # but warn the user (except for BASH, which is always set by the calling BASH).
15410      if test "xPANDOC" != xBASH; then
15411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15412$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15413      fi
15414      # Try to locate tool using the code snippet
15415      for ac_prog in pandoc
15416do
15417  # Extract the first word of "$ac_prog", so it can be a program name with args.
15418set dummy $ac_prog; ac_word=$2
15419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15420$as_echo_n "checking for $ac_word... " >&6; }
15421if ${ac_cv_path_PANDOC+:} false; then :
15422  $as_echo_n "(cached) " >&6
15423else
15424  case $PANDOC in
15425  [\\/]* | ?:[\\/]*)
15426  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15427  ;;
15428  *)
15429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15430for as_dir in $PATH
15431do
15432  IFS=$as_save_IFS
15433  test -z "$as_dir" && as_dir=.
15434    for ac_exec_ext in '' $ac_executable_extensions; do
15435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15436    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15438    break 2
15439  fi
15440done
15441  done
15442IFS=$as_save_IFS
15443
15444  ;;
15445esac
15446fi
15447PANDOC=$ac_cv_path_PANDOC
15448if test -n "$PANDOC"; then
15449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15450$as_echo "$PANDOC" >&6; }
15451else
15452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15453$as_echo "no" >&6; }
15454fi
15455
15456
15457  test -n "$PANDOC" && break
15458done
15459
15460    else
15461      # If it succeeded, then it was overridden by the user. We will use it
15462      # for the tool.
15463
15464      # First remove it from the list of overridden variables, so we can test
15465      # for unknown variables in the end.
15466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15467
15468      # Check if we try to supply an empty value
15469      if test "x$PANDOC" = x; then
15470        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15471$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15473$as_echo_n "checking for PANDOC... " >&6; }
15474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15475$as_echo "disabled" >&6; }
15476      else
15477        # Check if the provided tool contains a complete path.
15478        tool_specified="$PANDOC"
15479        tool_basename="${tool_specified##*/}"
15480        if test "x$tool_basename" = "x$tool_specified"; then
15481          # A command without a complete path is provided, search $PATH.
15482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15483$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15484          # Extract the first word of "$tool_basename", so it can be a program name with args.
15485set dummy $tool_basename; ac_word=$2
15486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15487$as_echo_n "checking for $ac_word... " >&6; }
15488if ${ac_cv_path_PANDOC+:} false; then :
15489  $as_echo_n "(cached) " >&6
15490else
15491  case $PANDOC in
15492  [\\/]* | ?:[\\/]*)
15493  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15494  ;;
15495  *)
15496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15497for as_dir in $PATH
15498do
15499  IFS=$as_save_IFS
15500  test -z "$as_dir" && as_dir=.
15501    for ac_exec_ext in '' $ac_executable_extensions; do
15502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15503    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15505    break 2
15506  fi
15507done
15508  done
15509IFS=$as_save_IFS
15510
15511  ;;
15512esac
15513fi
15514PANDOC=$ac_cv_path_PANDOC
15515if test -n "$PANDOC"; then
15516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15517$as_echo "$PANDOC" >&6; }
15518else
15519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15520$as_echo "no" >&6; }
15521fi
15522
15523
15524          if test "x$PANDOC" = x; then
15525            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15526          fi
15527        else
15528          # Otherwise we believe it is a complete path. Use it as it is.
15529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15530$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15531          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15532$as_echo_n "checking for PANDOC... " >&6; }
15533          if test ! -x "$tool_specified"; then
15534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15535$as_echo "not found" >&6; }
15536            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15537          fi
15538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15539$as_echo "$tool_specified" >&6; }
15540        fi
15541      fi
15542    fi
15543
15544  fi
15545
15546
15547
15548
15549# Now we can determine OpenJDK build and target platforms. This is required to
15550# have early on.
15551# Make sure we can run config.sub.
15552$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15553  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15554
15555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15556$as_echo_n "checking build system type... " >&6; }
15557if ${ac_cv_build+:} false; then :
15558  $as_echo_n "(cached) " >&6
15559else
15560  ac_build_alias=$build_alias
15561test "x$ac_build_alias" = x &&
15562  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15563test "x$ac_build_alias" = x &&
15564  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15565ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15566  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15567
15568fi
15569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15570$as_echo "$ac_cv_build" >&6; }
15571case $ac_cv_build in
15572*-*-*) ;;
15573*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15574esac
15575build=$ac_cv_build
15576ac_save_IFS=$IFS; IFS='-'
15577set x $ac_cv_build
15578shift
15579build_cpu=$1
15580build_vendor=$2
15581shift; shift
15582# Remember, the first character of IFS is used to create $*,
15583# except with old shells:
15584build_os=$*
15585IFS=$ac_save_IFS
15586case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15587
15588
15589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15590$as_echo_n "checking host system type... " >&6; }
15591if ${ac_cv_host+:} false; then :
15592  $as_echo_n "(cached) " >&6
15593else
15594  if test "x$host_alias" = x; then
15595  ac_cv_host=$ac_cv_build
15596else
15597  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15598    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15599fi
15600
15601fi
15602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15603$as_echo "$ac_cv_host" >&6; }
15604case $ac_cv_host in
15605*-*-*) ;;
15606*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15607esac
15608host=$ac_cv_host
15609ac_save_IFS=$IFS; IFS='-'
15610set x $ac_cv_host
15611shift
15612host_cpu=$1
15613host_vendor=$2
15614shift; shift
15615# Remember, the first character of IFS is used to create $*,
15616# except with old shells:
15617host_os=$*
15618IFS=$ac_save_IFS
15619case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15620
15621
15622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15623$as_echo_n "checking target system type... " >&6; }
15624if ${ac_cv_target+:} false; then :
15625  $as_echo_n "(cached) " >&6
15626else
15627  if test "x$target_alias" = x; then
15628  ac_cv_target=$ac_cv_host
15629else
15630  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15631    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15632fi
15633
15634fi
15635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15636$as_echo "$ac_cv_target" >&6; }
15637case $ac_cv_target in
15638*-*-*) ;;
15639*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15640esac
15641target=$ac_cv_target
15642ac_save_IFS=$IFS; IFS='-'
15643set x $ac_cv_target
15644shift
15645target_cpu=$1
15646target_vendor=$2
15647shift; shift
15648# Remember, the first character of IFS is used to create $*,
15649# except with old shells:
15650target_os=$*
15651IFS=$ac_save_IFS
15652case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15653
15654
15655# The aliases save the names the user supplied, while $host etc.
15656# will get canonicalized.
15657test -n "$target_alias" &&
15658  test "$program_prefix$program_suffix$program_transform_name" = \
15659    NONENONEs,x,x, &&
15660  program_prefix=${target_alias}-
15661
15662  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15663  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15664  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15665  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15666  # to use the configure naming style.
15667
15668
15669
15670
15671
15672  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15673  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15674  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15675  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15676  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15677  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15678
15679
15680
15681  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15682
15683  case "$build_os" in
15684    *linux*)
15685      VAR_OS=linux
15686      VAR_OS_TYPE=unix
15687      ;;
15688    *solaris*)
15689      VAR_OS=solaris
15690      VAR_OS_TYPE=unix
15691      ;;
15692    *darwin*)
15693      VAR_OS=macosx
15694      VAR_OS_TYPE=unix
15695      ;;
15696    *bsd*)
15697      VAR_OS=bsd
15698      VAR_OS_TYPE=unix
15699      ;;
15700    *cygwin*)
15701      VAR_OS=windows
15702      VAR_OS_ENV=windows.cygwin
15703      ;;
15704    *mingw*)
15705      VAR_OS=windows
15706      VAR_OS_ENV=windows.msys
15707      ;;
15708    *aix*)
15709      VAR_OS=aix
15710      VAR_OS_TYPE=unix
15711      ;;
15712    *)
15713      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15714      ;;
15715  esac
15716
15717
15718  # First argument is the cpu name from the trip/quad
15719  case "$build_cpu" in
15720    x86_64)
15721      VAR_CPU=x86_64
15722      VAR_CPU_ARCH=x86
15723      VAR_CPU_BITS=64
15724      VAR_CPU_ENDIAN=little
15725      ;;
15726    i?86)
15727      VAR_CPU=x86
15728      VAR_CPU_ARCH=x86
15729      VAR_CPU_BITS=32
15730      VAR_CPU_ENDIAN=little
15731      ;;
15732    alpha*)
15733      VAR_CPU=alpha
15734      VAR_CPU_ARCH=alpha
15735      VAR_CPU_BITS=64
15736      VAR_CPU_ENDIAN=little
15737      ;;
15738    arm*)
15739      VAR_CPU=arm
15740      VAR_CPU_ARCH=arm
15741      VAR_CPU_BITS=32
15742      VAR_CPU_ENDIAN=little
15743      ;;
15744    aarch64)
15745      VAR_CPU=aarch64
15746      VAR_CPU_ARCH=aarch64
15747      VAR_CPU_BITS=64
15748      VAR_CPU_ENDIAN=little
15749      ;;
15750    m68k)
15751      VAR_CPU=m68k
15752      VAR_CPU_ARCH=m68k
15753      VAR_CPU_BITS=32
15754      VAR_CPU_ENDIAN=big
15755      ;;
15756    mips)
15757      VAR_CPU=mips
15758      VAR_CPU_ARCH=mips
15759      VAR_CPU_BITS=32
15760      VAR_CPU_ENDIAN=big
15761      ;;
15762    mipsel)
15763      VAR_CPU=mipsel
15764      VAR_CPU_ARCH=mipsel
15765      VAR_CPU_BITS=32
15766      VAR_CPU_ENDIAN=little
15767      ;;
15768    mips64)
15769      VAR_CPU=mips64
15770      VAR_CPU_ARCH=mips64
15771      VAR_CPU_BITS=64
15772      VAR_CPU_ENDIAN=big
15773      ;;
15774    mips64el)
15775      VAR_CPU=mips64el
15776      VAR_CPU_ARCH=mips64el
15777      VAR_CPU_BITS=64
15778      VAR_CPU_ENDIAN=little
15779      ;;
15780    powerpc)
15781      VAR_CPU=ppc
15782      VAR_CPU_ARCH=ppc
15783      VAR_CPU_BITS=32
15784      VAR_CPU_ENDIAN=big
15785      ;;
15786    powerpc64)
15787      VAR_CPU=ppc64
15788      VAR_CPU_ARCH=ppc
15789      VAR_CPU_BITS=64
15790      VAR_CPU_ENDIAN=big
15791      ;;
15792    powerpc64le)
15793      VAR_CPU=ppc64le
15794      VAR_CPU_ARCH=ppc
15795      VAR_CPU_BITS=64
15796      VAR_CPU_ENDIAN=little
15797      ;;
15798    s390)
15799      VAR_CPU=s390
15800      VAR_CPU_ARCH=s390
15801      VAR_CPU_BITS=32
15802      VAR_CPU_ENDIAN=big
15803      ;;
15804    s390x)
15805      VAR_CPU=s390x
15806      VAR_CPU_ARCH=s390
15807      VAR_CPU_BITS=64
15808      VAR_CPU_ENDIAN=big
15809      ;;
15810    sh*eb)
15811      VAR_CPU=sh
15812      VAR_CPU_ARCH=sh
15813      VAR_CPU_BITS=32
15814      VAR_CPU_ENDIAN=big
15815      ;;
15816    sh*)
15817      VAR_CPU=sh
15818      VAR_CPU_ARCH=sh
15819      VAR_CPU_BITS=32
15820      VAR_CPU_ENDIAN=little
15821      ;;
15822    sparc)
15823      VAR_CPU=sparc
15824      VAR_CPU_ARCH=sparc
15825      VAR_CPU_BITS=32
15826      VAR_CPU_ENDIAN=big
15827      ;;
15828    sparcv9|sparc64)
15829      VAR_CPU=sparcv9
15830      VAR_CPU_ARCH=sparc
15831      VAR_CPU_BITS=64
15832      VAR_CPU_ENDIAN=big
15833      ;;
15834    *)
15835      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15836      ;;
15837  esac
15838
15839  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15840  OPENJDK_BUILD_OS="$VAR_OS"
15841  if test "x$VAR_OS_TYPE" != x; then
15842    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15843  else
15844    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15845  fi
15846  if test "x$VAR_OS_ENV" != x; then
15847    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15848  else
15849    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15850  fi
15851  OPENJDK_BUILD_CPU="$VAR_CPU"
15852  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15853  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15854  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15855
15856
15857
15858
15859
15860
15861
15862
15863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15864$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15866$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15867
15868  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15869
15870  case "$host_os" in
15871    *linux*)
15872      VAR_OS=linux
15873      VAR_OS_TYPE=unix
15874      ;;
15875    *solaris*)
15876      VAR_OS=solaris
15877      VAR_OS_TYPE=unix
15878      ;;
15879    *darwin*)
15880      VAR_OS=macosx
15881      VAR_OS_TYPE=unix
15882      ;;
15883    *bsd*)
15884      VAR_OS=bsd
15885      VAR_OS_TYPE=unix
15886      ;;
15887    *cygwin*)
15888      VAR_OS=windows
15889      VAR_OS_ENV=windows.cygwin
15890      ;;
15891    *mingw*)
15892      VAR_OS=windows
15893      VAR_OS_ENV=windows.msys
15894      ;;
15895    *aix*)
15896      VAR_OS=aix
15897      VAR_OS_TYPE=unix
15898      ;;
15899    *)
15900      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15901      ;;
15902  esac
15903
15904
15905  # First argument is the cpu name from the trip/quad
15906  case "$host_cpu" in
15907    x86_64)
15908      VAR_CPU=x86_64
15909      VAR_CPU_ARCH=x86
15910      VAR_CPU_BITS=64
15911      VAR_CPU_ENDIAN=little
15912      ;;
15913    i?86)
15914      VAR_CPU=x86
15915      VAR_CPU_ARCH=x86
15916      VAR_CPU_BITS=32
15917      VAR_CPU_ENDIAN=little
15918      ;;
15919    alpha*)
15920      VAR_CPU=alpha
15921      VAR_CPU_ARCH=alpha
15922      VAR_CPU_BITS=64
15923      VAR_CPU_ENDIAN=little
15924      ;;
15925    arm*)
15926      VAR_CPU=arm
15927      VAR_CPU_ARCH=arm
15928      VAR_CPU_BITS=32
15929      VAR_CPU_ENDIAN=little
15930      ;;
15931    aarch64)
15932      VAR_CPU=aarch64
15933      VAR_CPU_ARCH=aarch64
15934      VAR_CPU_BITS=64
15935      VAR_CPU_ENDIAN=little
15936      ;;
15937    m68k)
15938      VAR_CPU=m68k
15939      VAR_CPU_ARCH=m68k
15940      VAR_CPU_BITS=32
15941      VAR_CPU_ENDIAN=big
15942      ;;
15943    mips)
15944      VAR_CPU=mips
15945      VAR_CPU_ARCH=mips
15946      VAR_CPU_BITS=32
15947      VAR_CPU_ENDIAN=big
15948      ;;
15949    mipsel)
15950      VAR_CPU=mipsel
15951      VAR_CPU_ARCH=mipsel
15952      VAR_CPU_BITS=32
15953      VAR_CPU_ENDIAN=little
15954      ;;
15955    mips64)
15956      VAR_CPU=mips64
15957      VAR_CPU_ARCH=mips64
15958      VAR_CPU_BITS=64
15959      VAR_CPU_ENDIAN=big
15960      ;;
15961    mips64el)
15962      VAR_CPU=mips64el
15963      VAR_CPU_ARCH=mips64el
15964      VAR_CPU_BITS=64
15965      VAR_CPU_ENDIAN=little
15966      ;;
15967    powerpc)
15968      VAR_CPU=ppc
15969      VAR_CPU_ARCH=ppc
15970      VAR_CPU_BITS=32
15971      VAR_CPU_ENDIAN=big
15972      ;;
15973    powerpc64)
15974      VAR_CPU=ppc64
15975      VAR_CPU_ARCH=ppc
15976      VAR_CPU_BITS=64
15977      VAR_CPU_ENDIAN=big
15978      ;;
15979    powerpc64le)
15980      VAR_CPU=ppc64le
15981      VAR_CPU_ARCH=ppc
15982      VAR_CPU_BITS=64
15983      VAR_CPU_ENDIAN=little
15984      ;;
15985    s390)
15986      VAR_CPU=s390
15987      VAR_CPU_ARCH=s390
15988      VAR_CPU_BITS=32
15989      VAR_CPU_ENDIAN=big
15990      ;;
15991    s390x)
15992      VAR_CPU=s390x
15993      VAR_CPU_ARCH=s390
15994      VAR_CPU_BITS=64
15995      VAR_CPU_ENDIAN=big
15996      ;;
15997    sh*eb)
15998      VAR_CPU=sh
15999      VAR_CPU_ARCH=sh
16000      VAR_CPU_BITS=32
16001      VAR_CPU_ENDIAN=big
16002      ;;
16003    sh*)
16004      VAR_CPU=sh
16005      VAR_CPU_ARCH=sh
16006      VAR_CPU_BITS=32
16007      VAR_CPU_ENDIAN=little
16008      ;;
16009    sparc)
16010      VAR_CPU=sparc
16011      VAR_CPU_ARCH=sparc
16012      VAR_CPU_BITS=32
16013      VAR_CPU_ENDIAN=big
16014      ;;
16015    sparcv9|sparc64)
16016      VAR_CPU=sparcv9
16017      VAR_CPU_ARCH=sparc
16018      VAR_CPU_BITS=64
16019      VAR_CPU_ENDIAN=big
16020      ;;
16021    *)
16022      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
16023      ;;
16024  esac
16025
16026  # ... and setup our own variables. (Do this explicitly to facilitate searching)
16027  OPENJDK_TARGET_OS="$VAR_OS"
16028  if test "x$VAR_OS_TYPE" != x; then
16029    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
16030  else
16031    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
16032  fi
16033  if test "x$VAR_OS_ENV" != x; then
16034    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
16035  else
16036    OPENJDK_TARGET_OS_ENV="$VAR_OS"
16037  fi
16038  OPENJDK_TARGET_CPU="$VAR_CPU"
16039  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
16040  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
16041  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
16042
16043
16044
16045
16046
16047
16048
16049
16050  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
16051$as_echo_n "checking openjdk-target os-cpu... " >&6; }
16052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
16053$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
16054
16055
16056
16057# Check whether --with-target-bits was given.
16058if test "${with_target_bits+set}" = set; then :
16059  withval=$with_target_bits;
16060fi
16061
16062
16063  # We have three types of compiles:
16064  # native  == normal compilation, target system == build system
16065  # cross   == traditional cross compilation, target system != build system; special toolchain needed
16066  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
16067  #
16068  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
16069    # We're doing a proper cross-compilation
16070    COMPILE_TYPE="cross"
16071  else
16072    COMPILE_TYPE="native"
16073  fi
16074
16075  if test "x$with_target_bits" != x; then
16076    if test "x$COMPILE_TYPE" = "xcross"; then
16077      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16078    fi
16079
16080    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16081      # A reduced build is requested
16082      COMPILE_TYPE="reduced"
16083      OPENJDK_TARGET_CPU_BITS=32
16084      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16085        OPENJDK_TARGET_CPU=x86
16086      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16087        OPENJDK_TARGET_CPU=sparc
16088      else
16089        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16090      fi
16091    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16092      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
16093    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16094      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16095$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16096    else
16097      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16098    fi
16099  fi
16100
16101
16102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16103$as_echo_n "checking compilation type... " >&6; }
16104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16105$as_echo "$COMPILE_TYPE" >&6; }
16106
16107
16108  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16109    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16110  else
16111    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16112  fi
16113
16114  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16115    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16116  else
16117    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16118  fi
16119
16120  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16121
16122
16123
16124  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16125    RELEASE_FILE_OS_NAME=SunOS
16126  fi
16127  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16128    RELEASE_FILE_OS_NAME=Linux
16129  fi
16130  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16131    RELEASE_FILE_OS_NAME=Windows
16132  fi
16133  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16134    RELEASE_FILE_OS_NAME="Darwin"
16135  fi
16136  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16137    RELEASE_FILE_OS_NAME="AIX"
16138  fi
16139  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16140
16141
16142
16143
16144
16145
16146  # Also store the legacy naming of the cpu.
16147  # Ie i586 and amd64 instead of x86 and x86_64
16148  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16149  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16150    OPENJDK_TARGET_CPU_LEGACY="i586"
16151  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16152    # On all platforms except MacOSX replace x86_64 with amd64.
16153    OPENJDK_TARGET_CPU_LEGACY="amd64"
16154  elif test "x$OPENJDK_TARGET_CPU" = xalpha; then
16155    # Avoid name collisions with variables named alpha
16156    OPENJDK_TARGET_CPU_LEGACY="_alpha_"
16157  elif test "x$OPENJDK_TARGET_CPU" = xsh; then
16158    # Avoid name collisions with variables named sh
16159    OPENJDK_TARGET_CPU_LEGACY="_sh_"
16160  fi
16161
16162
16163  # And the second legacy naming of the cpu.
16164  # Ie i386 and amd64 instead of x86 and x86_64.
16165  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16166  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16167    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16168  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16169    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16170  fi
16171
16172
16173  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16174  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16175  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16176  OPENJDK_TARGET_CPU_ISADIR=""
16177  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16178    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16179      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16180    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16181      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16182    fi
16183  fi
16184
16185
16186  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16187  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16188  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16189    # On linux only, we replace x86 with i386.
16190    OPENJDK_TARGET_CPU_OSARCH="i386"
16191  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16192    # On all platforms except macosx, we replace x86_64 with amd64.
16193    OPENJDK_TARGET_CPU_OSARCH="amd64"
16194  fi
16195
16196
16197  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16198  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16199    OPENJDK_TARGET_CPU_JLI="i386"
16200  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16201    # On all platforms except macosx, we replace x86_64 with amd64.
16202    OPENJDK_TARGET_CPU_JLI="amd64"
16203  fi
16204
16205  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16206      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16207  else
16208      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16209  fi
16210
16211
16212  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16213  # Macosx is osx and x86_64 is x64
16214  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16215    OPENJDK_TARGET_OS_BUNDLE="osx"
16216  else
16217    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16218  fi
16219  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16220    OPENJDK_TARGET_CPU_BUNDLE="x64"
16221  else
16222    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16223  fi
16224  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16225
16226
16227  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16228    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16229    # unpack200.exe. This variable is used in
16230    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16231    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16232      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16233    fi
16234  fi
16235
16236  if test "x$COMPILE_TYPE" = "xcross"; then
16237    # FIXME: ... or should this include reduced builds..?
16238    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16239  else
16240    DEFINE_CROSS_COMPILE_ARCH=""
16241  fi
16242
16243
16244  # Convert openjdk platform names to hotspot names
16245
16246  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16247  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16248    HOTSPOT_TARGET_OS=bsd
16249  fi
16250
16251
16252  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16253  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16254    HOTSPOT_TARGET_OS_TYPE=posix
16255  fi
16256
16257
16258  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16259  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16260    HOTSPOT_TARGET_CPU=x86_32
16261  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16262    HOTSPOT_TARGET_CPU=sparc
16263  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16264    HOTSPOT_TARGET_CPU=ppc_64
16265  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16266    HOTSPOT_TARGET_CPU=ppc_64
16267  fi
16268
16269
16270  # This is identical with OPENJDK_*, but define anyway for consistency.
16271  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16272
16273
16274  # Setup HOTSPOT_TARGET_CPU_DEFINE
16275  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16276    HOTSPOT_TARGET_CPU_DEFINE=IA32
16277  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16278    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16279  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16280    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16281  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16282    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16283  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16284    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16285  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16286    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16287
16288  # The cpu defines below are for zero, we don't support them directly.
16289  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16290    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16291  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16292    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16293  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16294    HOTSPOT_TARGET_CPU_DEFINE=S390
16295  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16296    HOTSPOT_TARGET_CPU_DEFINE=S390
16297  elif test "x$OPENJDK_TARGET_CPU" != x; then
16298    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16299  fi
16300
16301
16302
16303
16304  # Also store the legacy naming of the cpu.
16305  # Ie i586 and amd64 instead of x86 and x86_64
16306  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16307  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16308    OPENJDK_BUILD_CPU_LEGACY="i586"
16309  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16310    # On all platforms except MacOSX replace x86_64 with amd64.
16311    OPENJDK_BUILD_CPU_LEGACY="amd64"
16312  elif test "x$OPENJDK_BUILD_CPU" = xalpha; then
16313    # Avoid name collisions with variables named alpha
16314    OPENJDK_BUILD_CPU_LEGACY="_alpha_"
16315  elif test "x$OPENJDK_BUILD_CPU" = xsh; then
16316    # Avoid name collisions with variables named sh
16317    OPENJDK_BUILD_CPU_LEGACY="_sh_"
16318  fi
16319
16320
16321  # And the second legacy naming of the cpu.
16322  # Ie i386 and amd64 instead of x86 and x86_64.
16323  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16324  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16325    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16326  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16327    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16328  fi
16329
16330
16331  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16332  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16333  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16334  OPENJDK_BUILD_CPU_ISADIR=""
16335  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16336    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16337      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16338    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16339      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16340    fi
16341  fi
16342
16343
16344  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16345  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16346  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16347    # On linux only, we replace x86 with i386.
16348    OPENJDK_BUILD_CPU_OSARCH="i386"
16349  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16350    # On all platforms except macosx, we replace x86_64 with amd64.
16351    OPENJDK_BUILD_CPU_OSARCH="amd64"
16352  fi
16353
16354
16355  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16356  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16357    OPENJDK_BUILD_CPU_JLI="i386"
16358  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16359    # On all platforms except macosx, we replace x86_64 with amd64.
16360    OPENJDK_BUILD_CPU_JLI="amd64"
16361  fi
16362
16363  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16364      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16365  else
16366      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16367  fi
16368
16369
16370  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16371  # Macosx is osx and x86_64 is x64
16372  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16373    OPENJDK_BUILD_OS_BUNDLE="osx"
16374  else
16375    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16376  fi
16377  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16378    OPENJDK_BUILD_CPU_BUNDLE="x64"
16379  else
16380    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16381  fi
16382  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16383
16384
16385  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16386    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16387    # unpack200.exe. This variable is used in
16388    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16389    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16390      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16391    fi
16392  fi
16393
16394  if test "x$COMPILE_TYPE" = "xcross"; then
16395    # FIXME: ... or should this include reduced builds..?
16396    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16397  else
16398    DEFINE_CROSS_COMPILE_ARCH=""
16399  fi
16400
16401
16402  # Convert openjdk platform names to hotspot names
16403
16404  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16405  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16406    HOTSPOT_BUILD_OS=bsd
16407  fi
16408
16409
16410  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16411  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16412    HOTSPOT_BUILD_OS_TYPE=posix
16413  fi
16414
16415
16416  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16417  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16418    HOTSPOT_BUILD_CPU=x86_32
16419  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16420    HOTSPOT_BUILD_CPU=sparc
16421  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16422    HOTSPOT_BUILD_CPU=ppc_64
16423  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16424    HOTSPOT_BUILD_CPU=ppc_64
16425  fi
16426
16427
16428  # This is identical with OPENJDK_*, but define anyway for consistency.
16429  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16430
16431
16432  # Setup HOTSPOT_BUILD_CPU_DEFINE
16433  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16434    HOTSPOT_BUILD_CPU_DEFINE=IA32
16435  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16436    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16437  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16438    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16439  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16440    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16441  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16442    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16443  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16444    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16445
16446  # The cpu defines below are for zero, we don't support them directly.
16447  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16448    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16449  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16450    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16451  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16452    HOTSPOT_BUILD_CPU_DEFINE=S390
16453  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16454    HOTSPOT_BUILD_CPU_DEFINE=S390
16455  elif test "x$OPENJDK_BUILD_CPU" != x; then
16456    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16457  fi
16458
16459
16460
16461
16462
16463
16464# Continue setting up basic stuff. Most remaining code require fundamental tools.
16465
16466  # Save the current directory this script was started from
16467  CURDIR="$PWD"
16468
16469  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16470  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16471  # was not available at that time.
16472  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16473  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16474    ORIGINAL_PATH="$REWRITTEN_PATH"
16475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16476$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16477  fi
16478
16479  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16480    PATH_SEP=";"
16481
16482  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16483  if test $SRC_ROOT_LENGTH -gt 100; then
16484    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16485  fi
16486
16487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16489$as_echo_n "checking cygwin release... " >&6; }
16490    CYGWIN_VERSION=`$UNAME -r`
16491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16492$as_echo "$CYGWIN_VERSION" >&6; }
16493    WINDOWS_ENV_VENDOR='cygwin'
16494    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16495
16496    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16497    if test "x$CYGWIN_VERSION_OLD" != x; then
16498      { $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
16499$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;}
16500      as_fn_error $? "Cannot continue" "$LINENO" 5
16501    fi
16502    if test "x$CYGPATH" = x; then
16503      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16504    fi
16505    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16506$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16507    # The cmd output ends with Windows line endings (CR/LF)
16508    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16509    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16510    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16512$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16513    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16514    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16515    if test "x$test_cygdrive_prefix" = x; then
16516      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16517    fi
16518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16520$as_echo_n "checking msys release... " >&6; }
16521    MSYS_VERSION=`$UNAME -r`
16522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16523$as_echo "$MSYS_VERSION" >&6; }
16524
16525    WINDOWS_ENV_VENDOR='msys'
16526    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16527
16528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16529$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16530    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16531    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16532
16533  windows_path="$MSYS_ROOT_PATH"
16534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16535    unix_path=`$CYGPATH -u "$windows_path"`
16536    MSYS_ROOT_PATH="$unix_path"
16537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16539    MSYS_ROOT_PATH="$unix_path"
16540  fi
16541
16542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16543$as_echo "$MSYS_ROOT_PATH" >&6; }
16544    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16545  else
16546    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16547  fi
16548
16549  # Test if windows or unix (cygwin/msys) find is first in path.
16550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16551$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16552  FIND_BINARY_OUTPUT=`find --version 2>&1`
16553  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16555$as_echo "unix style" >&6; }
16556  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16558$as_echo "Windows" >&6; }
16559    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16560$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16561    { $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
16562$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16563    as_fn_error $? "Cannot continue" "$LINENO" 5
16564  else
16565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16566$as_echo "unknown" >&6; }
16567    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16568$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16569  fi
16570
16571  else
16572    PATH_SEP=":"
16573  fi
16574
16575
16576  # We get the top-level directory from the supporting wrappers.
16577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16578$as_echo_n "checking for top-level directory... " >&6; }
16579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16580$as_echo "$TOPDIR" >&6; }
16581
16582
16583  # Save the original version of TOPDIR for string comparisons
16584  ORIGINAL_TOPDIR="$TOPDIR"
16585
16586
16587  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16588
16589  # Only process if variable expands to non-empty
16590
16591  if test "x$CURDIR" != x; then
16592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16593
16594  # Input might be given as Windows format, start by converting to
16595  # unix format.
16596  path="$CURDIR"
16597  new_path=`$CYGPATH -u "$path"`
16598
16599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16602  # "foo.exe" is OK but "foo" is an error.
16603  #
16604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16605  # It is also a way to make sure we got the proper file name for the real test later on.
16606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16607  if test "x$test_shortpath" = x; then
16608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16609$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16610    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16611  fi
16612
16613  # Call helper function which possibly converts this using DOS-style short mode.
16614  # If so, the updated path is stored in $new_path.
16615
16616  input_path="$new_path"
16617  # Check if we need to convert this using DOS-style short mode. If the path
16618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16619  # take no chances and rewrite it.
16620  # Note: m4 eats our [], so we need to use [ and ] instead.
16621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16622  if test "x$has_forbidden_chars" != x; then
16623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16627      # Going to short mode and back again did indeed matter. Since short mode is
16628      # case insensitive, let's make it lowercase to improve readability.
16629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16630      # Now convert it back to Unix-style (cygpath)
16631      input_path=`$CYGPATH -u "$shortmode_path"`
16632      new_path="$input_path"
16633    fi
16634  fi
16635
16636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16637  if test "x$test_cygdrive_prefix" = x; then
16638    # As a simple fix, exclude /usr/bin since it's not a real path.
16639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16641      # a path prefixed by /cygdrive for fixpath to work.
16642      new_path="$CYGWIN_ROOT_PATH$input_path"
16643    fi
16644  fi
16645
16646
16647  if test "x$path" != "x$new_path"; then
16648    CURDIR="$new_path"
16649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16650$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16651  fi
16652
16653    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16654
16655  path="$CURDIR"
16656  has_colon=`$ECHO $path | $GREP ^.:`
16657  new_path="$path"
16658  if test "x$has_colon" = x; then
16659    # Not in mixed or Windows style, start by that.
16660    new_path=`cmd //c echo $path`
16661  fi
16662
16663
16664  input_path="$new_path"
16665  # Check if we need to convert this using DOS-style short mode. If the path
16666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16667  # take no chances and rewrite it.
16668  # Note: m4 eats our [], so we need to use [ and ] instead.
16669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16670  if test "x$has_forbidden_chars" != x; then
16671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16673  fi
16674
16675
16676  windows_path="$new_path"
16677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16678    unix_path=`$CYGPATH -u "$windows_path"`
16679    new_path="$unix_path"
16680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16682    new_path="$unix_path"
16683  fi
16684
16685  if test "x$path" != "x$new_path"; then
16686    CURDIR="$new_path"
16687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16688$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16689  fi
16690
16691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16693
16694    else
16695      # We're on a unix platform. Hooray! :)
16696      path="$CURDIR"
16697      has_space=`$ECHO "$path" | $GREP " "`
16698      if test "x$has_space" != x; then
16699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16700$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16701        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16702      fi
16703
16704      # Use eval to expand a potential ~
16705      eval path="$path"
16706      if test ! -f "$path" && test ! -d "$path"; then
16707        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16708      fi
16709
16710      if test -d "$path"; then
16711        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16712      else
16713        dir="`$DIRNAME "$path"`"
16714        base="`$BASENAME "$path"`"
16715        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16716      fi
16717    fi
16718  fi
16719
16720
16721  # Only process if variable expands to non-empty
16722
16723  if test "x$TOPDIR" != x; then
16724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16725
16726  # Input might be given as Windows format, start by converting to
16727  # unix format.
16728  path="$TOPDIR"
16729  new_path=`$CYGPATH -u "$path"`
16730
16731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16734  # "foo.exe" is OK but "foo" is an error.
16735  #
16736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16737  # It is also a way to make sure we got the proper file name for the real test later on.
16738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16739  if test "x$test_shortpath" = x; then
16740    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16741$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16742    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16743  fi
16744
16745  # Call helper function which possibly converts this using DOS-style short mode.
16746  # If so, the updated path is stored in $new_path.
16747
16748  input_path="$new_path"
16749  # Check if we need to convert this using DOS-style short mode. If the path
16750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16751  # take no chances and rewrite it.
16752  # Note: m4 eats our [], so we need to use [ and ] instead.
16753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16754  if test "x$has_forbidden_chars" != x; then
16755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16759      # Going to short mode and back again did indeed matter. Since short mode is
16760      # case insensitive, let's make it lowercase to improve readability.
16761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16762      # Now convert it back to Unix-style (cygpath)
16763      input_path=`$CYGPATH -u "$shortmode_path"`
16764      new_path="$input_path"
16765    fi
16766  fi
16767
16768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16769  if test "x$test_cygdrive_prefix" = x; then
16770    # As a simple fix, exclude /usr/bin since it's not a real path.
16771    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16773      # a path prefixed by /cygdrive for fixpath to work.
16774      new_path="$CYGWIN_ROOT_PATH$input_path"
16775    fi
16776  fi
16777
16778
16779  if test "x$path" != "x$new_path"; then
16780    TOPDIR="$new_path"
16781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16782$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16783  fi
16784
16785    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16786
16787  path="$TOPDIR"
16788  has_colon=`$ECHO $path | $GREP ^.:`
16789  new_path="$path"
16790  if test "x$has_colon" = x; then
16791    # Not in mixed or Windows style, start by that.
16792    new_path=`cmd //c echo $path`
16793  fi
16794
16795
16796  input_path="$new_path"
16797  # Check if we need to convert this using DOS-style short mode. If the path
16798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16799  # take no chances and rewrite it.
16800  # Note: m4 eats our [], so we need to use [ and ] instead.
16801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16802  if test "x$has_forbidden_chars" != x; then
16803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16805  fi
16806
16807
16808  windows_path="$new_path"
16809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16810    unix_path=`$CYGPATH -u "$windows_path"`
16811    new_path="$unix_path"
16812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16814    new_path="$unix_path"
16815  fi
16816
16817  if test "x$path" != "x$new_path"; then
16818    TOPDIR="$new_path"
16819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16820$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16821  fi
16822
16823  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16824  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16825
16826    else
16827      # We're on a unix platform. Hooray! :)
16828      path="$TOPDIR"
16829      has_space=`$ECHO "$path" | $GREP " "`
16830      if test "x$has_space" != x; then
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16832$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16833        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16834      fi
16835
16836      # Use eval to expand a potential ~
16837      eval path="$path"
16838      if test ! -f "$path" && test ! -d "$path"; then
16839        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16840      fi
16841
16842      if test -d "$path"; then
16843        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16844      else
16845        dir="`$DIRNAME "$path"`"
16846        base="`$BASENAME "$path"`"
16847        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16848      fi
16849    fi
16850  fi
16851
16852  # SRC_ROOT is a traditional alias for TOPDIR.
16853  SRC_ROOT=$TOPDIR
16854
16855  # Calculate a canonical version of TOPDIR for string comparisons
16856  CANONICAL_TOPDIR=$TOPDIR
16857
16858  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16859    # Follow a chain of symbolic links. Use readlink
16860    # where it exists, else fall back to horribly
16861    # complicated shell code.
16862    if test "x$READLINK_TESTED" != yes; then
16863      # On MacOSX there is a readlink tool with a different
16864      # purpose than the GNU readlink tool. Check the found readlink.
16865      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16866      if test "x$ISGNU" = x; then
16867        # A readlink that we do not know how to use.
16868        # Are there other non-GNU readlinks out there?
16869        READLINK_TESTED=yes
16870        READLINK=
16871      fi
16872    fi
16873
16874    if test "x$READLINK" != x; then
16875      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16876    else
16877      # Save the current directory for restoring afterwards
16878      STARTDIR=$PWD
16879      COUNTER=0
16880      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16881      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16882      cd $sym_link_dir
16883      # Use -P flag to resolve symlinks in directories.
16884      cd `$THEPWDCMD -P`
16885      sym_link_dir=`$THEPWDCMD -P`
16886      # Resolve file symlinks
16887      while test $COUNTER -lt 20; do
16888        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16889        if test "x$ISLINK" == x; then
16890          # This is not a symbolic link! We are done!
16891          break
16892        fi
16893        # Again resolve directory symlinks since the target of the just found
16894        # link could be in a different directory
16895        cd `$DIRNAME $ISLINK`
16896        sym_link_dir=`$THEPWDCMD -P`
16897        sym_link_file=`$BASENAME $ISLINK`
16898        let COUNTER=COUNTER+1
16899      done
16900      cd $STARTDIR
16901      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16902    fi
16903  fi
16904
16905
16906
16907  # Locate the directory of this script.
16908  AUTOCONF_DIR=$TOPDIR/common/autoconf
16909
16910  # Setup username (for use in adhoc version strings etc)
16911  # Outer [ ] to quote m4.
16912   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16913
16914
16915
16916# Check if it's a pure open build or if custom sources are to be used.
16917
16918  # Check whether --enable-openjdk-only was given.
16919if test "${enable_openjdk_only+set}" = set; then :
16920  enableval=$enable_openjdk_only;
16921else
16922  enable_openjdk_only="no"
16923fi
16924
16925
16926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16927$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16929$as_echo "$enable_openjdk_only" >&6; }
16930  if test "x$enable_openjdk_only" = "xyes"; then
16931    SUPPRESS_CUSTOM_EXTENSIONS="true"
16932  elif test "x$enable_openjdk_only" = "xno"; then
16933    SUPPRESS_CUSTOM_EXTENSIONS="false"
16934  else
16935    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16936  fi
16937
16938  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16939  # the IncludeCustomExtension macro.
16940
16941
16942# Check whether --with-custom-make-dir was given.
16943if test "${with_custom_make_dir+set}" = set; then :
16944  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
16945$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16946fi
16947
16948
16949
16950
16951# These are needed to be able to create a configuration name (and thus the output directory)
16952
16953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16954$as_echo_n "checking which variant of the JDK to build... " >&6; }
16955
16956# Check whether --with-jdk-variant was given.
16957if test "${with_jdk_variant+set}" = set; then :
16958  withval=$with_jdk_variant;
16959fi
16960
16961
16962  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16963    JDK_VARIANT="normal"
16964  else
16965    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16966  fi
16967
16968
16969
16970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16971$as_echo "$JDK_VARIANT" >&6; }
16972
16973
16974  DEBUG_LEVEL="release"
16975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16976$as_echo_n "checking which debug level to use... " >&6; }
16977  # Check whether --enable-debug was given.
16978if test "${enable_debug+set}" = set; then :
16979  enableval=$enable_debug;
16980        ENABLE_DEBUG="${enableval}"
16981        DEBUG_LEVEL="fastdebug"
16982
16983else
16984  ENABLE_DEBUG="no"
16985fi
16986
16987
16988
16989# Check whether --with-debug-level was given.
16990if test "${with_debug_level+set}" = set; then :
16991  withval=$with_debug_level;
16992        DEBUG_LEVEL="${withval}"
16993        if test "x$ENABLE_DEBUG" = xyes; then
16994          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16995        fi
16996
16997fi
16998
16999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
17000$as_echo "$DEBUG_LEVEL" >&6; }
17001
17002  if test "x$DEBUG_LEVEL" != xrelease && \
17003      test "x$DEBUG_LEVEL" != xoptimized && \
17004      test "x$DEBUG_LEVEL" != xfastdebug && \
17005      test "x$DEBUG_LEVEL" != xslowdebug; then
17006    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
17007  fi
17008
17009  # Translate DEBUG_LEVEL to debug level used by Hotspot
17010  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
17011  if test "x$DEBUG_LEVEL" = xrelease; then
17012    HOTSPOT_DEBUG_LEVEL="product"
17013  elif test "x$DEBUG_LEVEL" = xslowdebug; then
17014    HOTSPOT_DEBUG_LEVEL="debug"
17015  fi
17016
17017  if test "x$DEBUG_LEVEL" = xoptimized; then
17018    # The debug level 'optimized' is a little special because it is currently only
17019    # applicable to the HotSpot build where it means to build a completely
17020    # optimized version of the VM without any debugging code (like for the
17021    # 'release' debug level which is called 'product' in the HotSpot build) but
17022    # with the exception that it can contain additional code which is otherwise
17023    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
17024    # test new and/or experimental features which are not intended for customer
17025    # shipment. Because these new features need to be tested and benchmarked in
17026    # real world scenarios, we want to build the containing JDK at the 'release'
17027    # debug level.
17028    DEBUG_LEVEL="release"
17029  fi
17030
17031
17032
17033
17034
17035
17036# Check whether --with-jvm-variants was given.
17037if test "${with_jvm_variants+set}" = set; then :
17038  withval=$with_jvm_variants;
17039fi
17040
17041
17042
17043
17044# Check whether --with-cpu-port was given.
17045if test "${with_cpu_port+set}" = set; then :
17046  withval=$with_cpu_port;
17047fi
17048
17049
17050  if test "x$with_cpu_port" != x; then
17051    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
17052      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
17053    fi
17054    if test "x$with_cpu_port" != xarm64 && \
17055        test "x$with_cpu_port" != xaarch64; then
17056      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
17057    fi
17058    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
17059  fi
17060
17061
17062  if test "x$with_jvm_variants" = x; then
17063    with_jvm_variants="server"
17064  fi
17065  JVM_VARIANTS_OPT="$with_jvm_variants"
17066
17067  # Has the user listed more than one variant?
17068  # Additional [] needed to keep m4 from mangling shell constructs.
17069  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
17070    BUILDING_MULTIPLE_JVM_VARIANTS=true
17071  else
17072    BUILDING_MULTIPLE_JVM_VARIANTS=false
17073  fi
17074  # Replace the commas with AND for use in the build directory name.
17075  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
17076
17077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
17078$as_echo_n "checking which variants of the JVM to build... " >&6; }
17079  # JVM_VARIANTS is a space-separated list.
17080  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
17081  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
17082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
17083$as_echo "$JVM_VARIANTS" >&6; }
17084
17085  # Check that the selected variants are valid
17086
17087  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17088  # Notice that the original variant failes on SLES 10 and 11
17089  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17090  STACK=${JVM_VARIANTS// /$'\n'}
17091  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17092  if test "x$INVALID_VARIANTS" != x; then
17093    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17094$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17095    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17096  fi
17097
17098  # All "special" variants share the same output directory ("server")
17099  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17100  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17101  STACK=${JVM_VARIANTS// /$'\n'}
17102  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17103  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17104    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17105  fi
17106
17107  # The "main" variant is the one used by other libs to link against during the
17108  # build.
17109  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17110    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17111    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17112      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17113        JVM_VARIANT_MAIN="$variant"
17114        break
17115      fi
17116    done
17117  else
17118    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17119  fi
17120
17121
17122
17123
17124
17125  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17126    # zero behaves as a platform and rewrites these values. This is really weird. :(
17127    # We are guaranteed that we do not build any other variants when building zero.
17128    HOTSPOT_TARGET_CPU=zero
17129    HOTSPOT_TARGET_CPU_ARCH=zero
17130  fi
17131
17132
17133# With basic setup done, call the custom early hook.
17134
17135
17136# Check if we have devkits, extra paths or sysroot set.
17137
17138
17139# Check whether --with-devkit was given.
17140if test "${with_devkit+set}" = set; then :
17141  withval=$with_devkit;
17142
17143  # Only process if variable expands to non-empty
17144
17145  if test "x$with_devkit" != x; then
17146    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17147
17148  # Input might be given as Windows format, start by converting to
17149  # unix format.
17150  path="$with_devkit"
17151  new_path=`$CYGPATH -u "$path"`
17152
17153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17156  # "foo.exe" is OK but "foo" is an error.
17157  #
17158  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17159  # It is also a way to make sure we got the proper file name for the real test later on.
17160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17161  if test "x$test_shortpath" = x; then
17162    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17163$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17164    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17165  fi
17166
17167  # Call helper function which possibly converts this using DOS-style short mode.
17168  # If so, the updated path is stored in $new_path.
17169
17170  input_path="$new_path"
17171  # Check if we need to convert this using DOS-style short mode. If the path
17172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17173  # take no chances and rewrite it.
17174  # Note: m4 eats our [], so we need to use [ and ] instead.
17175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17176  if test "x$has_forbidden_chars" != x; then
17177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17178    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17179    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17180    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17181      # Going to short mode and back again did indeed matter. Since short mode is
17182      # case insensitive, let's make it lowercase to improve readability.
17183      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17184      # Now convert it back to Unix-style (cygpath)
17185      input_path=`$CYGPATH -u "$shortmode_path"`
17186      new_path="$input_path"
17187    fi
17188  fi
17189
17190  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17191  if test "x$test_cygdrive_prefix" = x; then
17192    # As a simple fix, exclude /usr/bin since it's not a real path.
17193    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17194      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17195      # a path prefixed by /cygdrive for fixpath to work.
17196      new_path="$CYGWIN_ROOT_PATH$input_path"
17197    fi
17198  fi
17199
17200
17201  if test "x$path" != "x$new_path"; then
17202    with_devkit="$new_path"
17203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17204$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17205  fi
17206
17207    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17208
17209  path="$with_devkit"
17210  has_colon=`$ECHO $path | $GREP ^.:`
17211  new_path="$path"
17212  if test "x$has_colon" = x; then
17213    # Not in mixed or Windows style, start by that.
17214    new_path=`cmd //c echo $path`
17215  fi
17216
17217
17218  input_path="$new_path"
17219  # Check if we need to convert this using DOS-style short mode. If the path
17220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17221  # take no chances and rewrite it.
17222  # Note: m4 eats our [], so we need to use [ and ] instead.
17223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17224  if test "x$has_forbidden_chars" != x; then
17225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17227  fi
17228
17229
17230  windows_path="$new_path"
17231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17232    unix_path=`$CYGPATH -u "$windows_path"`
17233    new_path="$unix_path"
17234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17236    new_path="$unix_path"
17237  fi
17238
17239  if test "x$path" != "x$new_path"; then
17240    with_devkit="$new_path"
17241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17242$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17243  fi
17244
17245  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17246  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17247
17248    else
17249      # We're on a unix platform. Hooray! :)
17250      path="$with_devkit"
17251      has_space=`$ECHO "$path" | $GREP " "`
17252      if test "x$has_space" != x; then
17253        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17254$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17255        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17256      fi
17257
17258      # Use eval to expand a potential ~
17259      eval path="$path"
17260      if test ! -f "$path" && test ! -d "$path"; then
17261        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17262      fi
17263
17264      if test -d "$path"; then
17265        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17266      else
17267        dir="`$DIRNAME "$path"`"
17268        base="`$BASENAME "$path"`"
17269        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17270      fi
17271    fi
17272  fi
17273
17274        DEVKIT_ROOT="$with_devkit"
17275        # Check for a meta data info file in the root of the devkit
17276        if test -f "$DEVKIT_ROOT/devkit.info"; then
17277          . $DEVKIT_ROOT/devkit.info
17278          # This potentially sets the following:
17279          # A descriptive name of the devkit
17280
17281  if test "x$DEVKIT_NAME" = x; then
17282    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17283  fi
17284
17285          # Corresponds to --with-extra-path
17286
17287  if test "x$DEVKIT_EXTRA_PATH" = x; then
17288    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17289  fi
17290
17291          # Corresponds to --with-toolchain-path
17292
17293  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17294    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17295  fi
17296
17297          # Corresponds to --with-sysroot
17298
17299  if test "x$DEVKIT_SYSROOT" = x; then
17300    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17301  fi
17302
17303
17304          # Identifies the Visual Studio version in the devkit
17305
17306  if test "x$DEVKIT_VS_VERSION" = x; then
17307    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17308  fi
17309
17310          # The Visual Studio include environment variable
17311
17312  if test "x$DEVKIT_VS_INCLUDE" = x; then
17313    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17314  fi
17315
17316          # The Visual Studio lib environment variable
17317
17318  if test "x$DEVKIT_VS_LIB" = x; then
17319    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17320  fi
17321
17322          # Corresponds to --with-msvcr-dll
17323
17324  if test "x$DEVKIT_MSVCR_DLL" = x; then
17325    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17326  fi
17327
17328          # Corresponds to --with-msvcp-dll
17329
17330  if test "x$DEVKIT_MSVCP_DLL" = x; then
17331    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17332  fi
17333
17334        fi
17335
17336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17337$as_echo_n "checking for devkit... " >&6; }
17338        if test "x$DEVKIT_NAME" != x; then
17339          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17340$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17341        else
17342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17343$as_echo "$DEVKIT_ROOT" >&6; }
17344        fi
17345
17346
17347  if test "x$DEVKIT_EXTRA_PATH" != x; then
17348    if test "x$EXTRA_PATH" = x; then
17349      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17350    else
17351      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17352    fi
17353  fi
17354
17355
17356        # Fallback default of just /bin if DEVKIT_PATH is not defined
17357        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17358          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17359        fi
17360
17361  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17362    if test "x$TOOLCHAIN_PATH" = x; then
17363      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17364    else
17365      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17366    fi
17367  fi
17368
17369
17370        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17371        # places for backwards compatiblity.
17372        if test "x$DEVKIT_SYSROOT" != x; then
17373          SYSROOT="$DEVKIT_SYSROOT"
17374        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17375          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17376        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17377          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17378        fi
17379
17380
17381fi
17382
17383
17384  # You can force the sysroot if the sysroot encoded into the compiler tools
17385  # is not correct.
17386
17387# Check whether --with-sys-root was given.
17388if test "${with_sys_root+set}" = set; then :
17389  withval=$with_sys_root; SYSROOT=$with_sys_root
17390
17391fi
17392
17393
17394
17395# Check whether --with-sysroot was given.
17396if test "${with_sysroot+set}" = set; then :
17397  withval=$with_sysroot; SYSROOT=$with_sysroot
17398
17399fi
17400
17401
17402
17403# Check whether --with-tools-dir was given.
17404if test "${with_tools_dir+set}" = set; then :
17405  withval=$with_tools_dir;
17406  if test "x$with_tools_dir" != x; then
17407    if test "x$TOOLCHAIN_PATH" = x; then
17408      TOOLCHAIN_PATH="$with_tools_dir"
17409    else
17410      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17411    fi
17412  fi
17413
17414
17415fi
17416
17417
17418
17419# Check whether --with-toolchain-path was given.
17420if test "${with_toolchain_path+set}" = set; then :
17421  withval=$with_toolchain_path;
17422  if test "x$with_toolchain_path" != x; then
17423    if test "x$TOOLCHAIN_PATH" = x; then
17424      TOOLCHAIN_PATH="$with_toolchain_path"
17425    else
17426      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17427    fi
17428  fi
17429
17430
17431fi
17432
17433
17434
17435# Check whether --with-extra-path was given.
17436if test "${with_extra_path+set}" = set; then :
17437  withval=$with_extra_path;
17438  if test "x$with_extra_path" != x; then
17439    if test "x$EXTRA_PATH" = x; then
17440      EXTRA_PATH="$with_extra_path"
17441    else
17442      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17443    fi
17444  fi
17445
17446
17447fi
17448
17449
17450  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17451    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17452    # If not, detect if Xcode is installed by running xcodebuild -version
17453    # if no Xcode installed, xcodebuild exits with 1
17454    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17455    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17456      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17457      # fall back on the stub binary in /usr/bin/xcodebuild
17458      # Extract the first word of "xcodebuild", so it can be a program name with args.
17459set dummy xcodebuild; ac_word=$2
17460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17461$as_echo_n "checking for $ac_word... " >&6; }
17462if ${ac_cv_path_XCODEBUILD+:} false; then :
17463  $as_echo_n "(cached) " >&6
17464else
17465  case $XCODEBUILD in
17466  [\\/]* | ?:[\\/]*)
17467  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17468  ;;
17469  *)
17470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17471for as_dir in $TOOLCHAIN_PATH
17472do
17473  IFS=$as_save_IFS
17474  test -z "$as_dir" && as_dir=.
17475    for ac_exec_ext in '' $ac_executable_extensions; do
17476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17477    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17479    break 2
17480  fi
17481done
17482  done
17483IFS=$as_save_IFS
17484
17485  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17486  ;;
17487esac
17488fi
17489XCODEBUILD=$ac_cv_path_XCODEBUILD
17490if test -n "$XCODEBUILD"; then
17491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17492$as_echo "$XCODEBUILD" >&6; }
17493else
17494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17495$as_echo "no" >&6; }
17496fi
17497
17498
17499    else
17500      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17501      # when only the command line tools are installed there are no SDKs, so headers
17502      # are copied into the system frameworks
17503      XCODEBUILD=
17504
17505    fi
17506
17507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17508$as_echo_n "checking for sdk name... " >&6; }
17509
17510# Check whether --with-sdk-name was given.
17511if test "${with_sdk_name+set}" = set; then :
17512  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17513
17514fi
17515
17516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17517$as_echo "$SDKNAME" >&6; }
17518
17519    # if toolchain path is specified then don't rely on system headers, they may not compile
17520    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17521    test -z "$TOOLCHAIN_PATH" && \
17522      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17523
17524    if test -z "$SYSROOT"; then
17525      if test -n "$XCODEBUILD"; then
17526        # if we don't have system headers, use default SDK name (last resort)
17527        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17528          SDKNAME=${SDKNAME:-macosx}
17529        fi
17530
17531        if test -n "$SDKNAME"; then
17532          # Call xcodebuild to determine SYSROOT
17533          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17534        fi
17535      else
17536        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17537          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
17538        fi
17539      fi
17540    else
17541      # warn user if --with-sdk-name was also set
17542      if test -n "$with_sdk_name"; then
17543        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17544$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17545      fi
17546    fi
17547
17548    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17549      # If no system framework headers, then SYSROOT must be set, or we won't build
17550      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
17551    fi
17552
17553    # Perform a basic sanity test
17554    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17555      if test -z "$SYSROOT"; then
17556        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
17557      else
17558        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17559      fi
17560    fi
17561
17562    # set SDKROOT too, Xcode tools will pick it up
17563    SDKROOT="$SYSROOT"
17564
17565  fi
17566
17567  # Prepend the extra path to the global path
17568
17569  if test "x$EXTRA_PATH" != x; then
17570    if test "x$PATH" = x; then
17571      PATH="$EXTRA_PATH"
17572    else
17573      PATH="$EXTRA_PATH:$PATH"
17574    fi
17575  fi
17576
17577
17578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17579$as_echo_n "checking for sysroot... " >&6; }
17580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17581$as_echo "$SYSROOT" >&6; }
17582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17583$as_echo_n "checking for toolchain path... " >&6; }
17584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17585$as_echo "$TOOLCHAIN_PATH" >&6; }
17586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17587$as_echo_n "checking for extra path... " >&6; }
17588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17589$as_echo "$EXTRA_PATH" >&6; }
17590
17591
17592# To properly create a configuration name, we need to have the OpenJDK target
17593# and options (variants and debug level) parsed.
17594
17595
17596
17597# Check whether --with-conf-name was given.
17598if test "${with_conf_name+set}" = set; then :
17599  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17600fi
17601
17602
17603  # Test from where we are running configure, in or outside of src root.
17604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17605$as_echo_n "checking where to store configuration... " >&6; }
17606  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17607      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17608      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17609    # We are running configure from the src root.
17610    # Create a default ./build/target-variant-debuglevel output root.
17611    if test "x${CONF_NAME}" = x; then
17612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17613$as_echo "in default location" >&6; }
17614      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17615    else
17616      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17617$as_echo "in build directory with custom name" >&6; }
17618    fi
17619    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17620    $MKDIR -p "$OUTPUT_ROOT"
17621    if test ! -d "$OUTPUT_ROOT"; then
17622      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17623    fi
17624  else
17625    # We are running configure from outside of the src dir.
17626    # Then use the current directory as output dir!
17627    # If configuration is situated in normal build directory, just use the build
17628    # directory name as configuration name, otherwise use the complete path.
17629    if test "x${CONF_NAME}" = x; then
17630      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17631    fi
17632    OUTPUT_ROOT="$CURDIR"
17633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17634$as_echo "in current directory" >&6; }
17635
17636    # WARNING: This might be a bad thing to do. You need to be sure you want to
17637    # have a configuration in this directory. Do some sanity checks!
17638
17639    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17640      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17641      # other files
17642      files_present=`$LS $OUTPUT_ROOT`
17643      # Configure has already touched config.log and confdefs.h in the current dir when this check
17644      # is performed.
17645      filtered_files=`$ECHO "$files_present" \
17646          | $SED -e 's/config.log//g' \
17647              -e 's/configure.log//g' \
17648              -e 's/confdefs.h//g' \
17649              -e 's/ //g' \
17650          | $TR -d '\n'`
17651      if test "x$filtered_files" != x; then
17652        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17653$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17654        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17655$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17656        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17657$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17658        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17659$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17660        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17661$as_echo "$as_me: seriously mess up just about everything." >&6;}
17662        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17663$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17664        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17665$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17666        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17667      fi
17668    fi
17669  fi
17670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17671$as_echo_n "checking what configuration name to use... " >&6; }
17672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17673$as_echo "$CONF_NAME" >&6; }
17674
17675
17676  # Only process if variable expands to non-empty
17677
17678  if test "x$OUTPUT_ROOT" != x; then
17679    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17680
17681  # Input might be given as Windows format, start by converting to
17682  # unix format.
17683  path="$OUTPUT_ROOT"
17684  new_path=`$CYGPATH -u "$path"`
17685
17686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17689  # "foo.exe" is OK but "foo" is an error.
17690  #
17691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17692  # It is also a way to make sure we got the proper file name for the real test later on.
17693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17694  if test "x$test_shortpath" = x; then
17695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17696$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17697    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17698  fi
17699
17700  # Call helper function which possibly converts this using DOS-style short mode.
17701  # If so, the updated path is stored in $new_path.
17702
17703  input_path="$new_path"
17704  # Check if we need to convert this using DOS-style short mode. If the path
17705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17706  # take no chances and rewrite it.
17707  # Note: m4 eats our [], so we need to use [ and ] instead.
17708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17709  if test "x$has_forbidden_chars" != x; then
17710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17714      # Going to short mode and back again did indeed matter. Since short mode is
17715      # case insensitive, let's make it lowercase to improve readability.
17716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17717      # Now convert it back to Unix-style (cygpath)
17718      input_path=`$CYGPATH -u "$shortmode_path"`
17719      new_path="$input_path"
17720    fi
17721  fi
17722
17723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17724  if test "x$test_cygdrive_prefix" = x; then
17725    # As a simple fix, exclude /usr/bin since it's not a real path.
17726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17728      # a path prefixed by /cygdrive for fixpath to work.
17729      new_path="$CYGWIN_ROOT_PATH$input_path"
17730    fi
17731  fi
17732
17733
17734  if test "x$path" != "x$new_path"; then
17735    OUTPUT_ROOT="$new_path"
17736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17737$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17738  fi
17739
17740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17741
17742  path="$OUTPUT_ROOT"
17743  has_colon=`$ECHO $path | $GREP ^.:`
17744  new_path="$path"
17745  if test "x$has_colon" = x; then
17746    # Not in mixed or Windows style, start by that.
17747    new_path=`cmd //c echo $path`
17748  fi
17749
17750
17751  input_path="$new_path"
17752  # Check if we need to convert this using DOS-style short mode. If the path
17753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17754  # take no chances and rewrite it.
17755  # Note: m4 eats our [], so we need to use [ and ] instead.
17756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17757  if test "x$has_forbidden_chars" != x; then
17758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17760  fi
17761
17762
17763  windows_path="$new_path"
17764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17765    unix_path=`$CYGPATH -u "$windows_path"`
17766    new_path="$unix_path"
17767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17769    new_path="$unix_path"
17770  fi
17771
17772  if test "x$path" != "x$new_path"; then
17773    OUTPUT_ROOT="$new_path"
17774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17775$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17776  fi
17777
17778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17780
17781    else
17782      # We're on a unix platform. Hooray! :)
17783      path="$OUTPUT_ROOT"
17784      has_space=`$ECHO "$path" | $GREP " "`
17785      if test "x$has_space" != x; then
17786        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17787$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17788        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17789      fi
17790
17791      # Use eval to expand a potential ~
17792      eval path="$path"
17793      if test ! -f "$path" && test ! -d "$path"; then
17794        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17795      fi
17796
17797      if test -d "$path"; then
17798        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17799      else
17800        dir="`$DIRNAME "$path"`"
17801        base="`$BASENAME "$path"`"
17802        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17803      fi
17804    fi
17805  fi
17806
17807
17808  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17809  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17810
17811  SPEC="$OUTPUT_ROOT/spec.gmk"
17812
17813
17814
17815
17816
17817  # The spec.gmk file contains all variables for the make system.
17818  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17819
17820  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17821  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17822
17823  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17824  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17825
17826  # The compare.sh is used to compare the build output to other builds.
17827  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17828
17829  # The generated Makefile knows where the spec.gmk is and where the source is.
17830  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17831  # which will look for generated configurations
17832  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17833
17834
17835
17836# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17837
17838  for ac_prog in apt-get yum brew port pkgutil pkgadd
17839do
17840  # Extract the first word of "$ac_prog", so it can be a program name with args.
17841set dummy $ac_prog; ac_word=$2
17842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17843$as_echo_n "checking for $ac_word... " >&6; }
17844if ${ac_cv_prog_PKGHANDLER+:} false; then :
17845  $as_echo_n "(cached) " >&6
17846else
17847  if test -n "$PKGHANDLER"; then
17848  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17849else
17850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17851for as_dir in $PATH
17852do
17853  IFS=$as_save_IFS
17854  test -z "$as_dir" && as_dir=.
17855    for ac_exec_ext in '' $ac_executable_extensions; do
17856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17857    ac_cv_prog_PKGHANDLER="$ac_prog"
17858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17859    break 2
17860  fi
17861done
17862  done
17863IFS=$as_save_IFS
17864
17865fi
17866fi
17867PKGHANDLER=$ac_cv_prog_PKGHANDLER
17868if test -n "$PKGHANDLER"; then
17869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17870$as_echo "$PKGHANDLER" >&6; }
17871else
17872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17873$as_echo "no" >&6; }
17874fi
17875
17876
17877  test -n "$PKGHANDLER" && break
17878done
17879
17880
17881
17882# Setup tools that requires more complex handling, or that is not needed by the configure script.
17883
17884
17885
17886  # Publish this variable in the help.
17887
17888
17889  if [ -z "${MAKE+x}" ]; then
17890    # The variable is not set by user, try to locate tool using the code snippet
17891
17892    # Try our hardest to locate a correct version of GNU make
17893    for ac_prog in gmake
17894do
17895  # Extract the first word of "$ac_prog", so it can be a program name with args.
17896set dummy $ac_prog; ac_word=$2
17897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17898$as_echo_n "checking for $ac_word... " >&6; }
17899if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17900  $as_echo_n "(cached) " >&6
17901else
17902  case $CHECK_GMAKE in
17903  [\\/]* | ?:[\\/]*)
17904  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17905  ;;
17906  *)
17907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17908for as_dir in $PATH
17909do
17910  IFS=$as_save_IFS
17911  test -z "$as_dir" && as_dir=.
17912    for ac_exec_ext in '' $ac_executable_extensions; do
17913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17914    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17916    break 2
17917  fi
17918done
17919  done
17920IFS=$as_save_IFS
17921
17922  ;;
17923esac
17924fi
17925CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17926if test -n "$CHECK_GMAKE"; then
17927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17928$as_echo "$CHECK_GMAKE" >&6; }
17929else
17930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17931$as_echo "no" >&6; }
17932fi
17933
17934
17935  test -n "$CHECK_GMAKE" && break
17936done
17937
17938
17939  MAKE_CANDIDATE=""$CHECK_GMAKE""
17940  DESCRIPTION="gmake in PATH"
17941
17942  # On Cygwin, we require a newer version of make than on other platforms
17943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17944    MAKE_VERSION_EXPR="-e 4\."
17945    MAKE_REQUIRED_VERSION="4.0"
17946   else
17947    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17948    MAKE_REQUIRED_VERSION="3.81"
17949  fi
17950
17951  if test "x$MAKE_CANDIDATE" != x; then
17952    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17953$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17954    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17955    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17956    if test "x$IS_GNU_MAKE" = x; then
17957      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17958$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17959    else
17960      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17961      if test "x$IS_MODERN_MAKE" = x; then
17962        { $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
17963$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;}
17964      else
17965        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17966          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17967            MAKE_EXPECTED_ENV='cygwin'
17968          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17969            MAKE_EXPECTED_ENV='msys'
17970          else
17971            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17972          fi
17973          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17974          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17975        else
17976          # Not relevant for non-Windows
17977          IS_MAKE_CORRECT_ENV=true
17978        fi
17979        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17980          { $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
17981$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;}
17982        else
17983          FOUND_MAKE=$MAKE_CANDIDATE
17984
17985  # Only process if variable expands to non-empty
17986
17987  if test "x$FOUND_MAKE" != x; then
17988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17989
17990  # First separate the path from the arguments. This will split at the first
17991  # space.
17992  complete="$FOUND_MAKE"
17993  path="${complete%% *}"
17994  tmp="$complete EOL"
17995  arguments="${tmp#* }"
17996
17997  # Input might be given as Windows format, start by converting to
17998  # unix format.
17999  new_path=`$CYGPATH -u "$path"`
18000
18001  # Now try to locate executable using which
18002  new_path=`$WHICH "$new_path" 2> /dev/null`
18003  # bat and cmd files are not always considered executable in cygwin causing which
18004  # to not find them
18005  if test "x$new_path" = x \
18006      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18007      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18008    new_path=`$CYGPATH -u "$path"`
18009  fi
18010  if test "x$new_path" = x; then
18011    # Oops. Which didn't find the executable.
18012    # The splitting of arguments from the executable at a space might have been incorrect,
18013    # since paths with space are more likely in Windows. Give it another try with the whole
18014    # argument.
18015    path="$complete"
18016    arguments="EOL"
18017    new_path=`$CYGPATH -u "$path"`
18018    new_path=`$WHICH "$new_path" 2> /dev/null`
18019    # bat and cmd files are not always considered executable in cygwin causing which
18020    # to not find them
18021    if test "x$new_path" = x \
18022        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18023        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18024      new_path=`$CYGPATH -u "$path"`
18025    fi
18026    if test "x$new_path" = x; then
18027      # It's still not found. Now this is an unrecoverable error.
18028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18029$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18030      has_space=`$ECHO "$complete" | $GREP " "`
18031      if test "x$has_space" != x; then
18032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18034      fi
18035      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18036    fi
18037  fi
18038
18039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18042  # "foo.exe" is OK but "foo" is an error.
18043  #
18044  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18045  # It is also a way to make sure we got the proper file name for the real test later on.
18046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18047  if test "x$test_shortpath" = x; then
18048    # Short path failed, file does not exist as specified.
18049    # Try adding .exe or .cmd
18050    if test -f "${new_path}.exe"; then
18051      input_to_shortpath="${new_path}.exe"
18052    elif test -f "${new_path}.cmd"; then
18053      input_to_shortpath="${new_path}.cmd"
18054    else
18055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18056$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18057      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18058$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18059      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18060    fi
18061  else
18062    input_to_shortpath="$new_path"
18063  fi
18064
18065  # Call helper function which possibly converts this using DOS-style short mode.
18066  # If so, the updated path is stored in $new_path.
18067  new_path="$input_to_shortpath"
18068
18069  input_path="$input_to_shortpath"
18070  # Check if we need to convert this using DOS-style short mode. If the path
18071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18072  # take no chances and rewrite it.
18073  # Note: m4 eats our [], so we need to use [ and ] instead.
18074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18075  if test "x$has_forbidden_chars" != x; then
18076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18080      # Going to short mode and back again did indeed matter. Since short mode is
18081      # case insensitive, let's make it lowercase to improve readability.
18082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18083      # Now convert it back to Unix-style (cygpath)
18084      input_path=`$CYGPATH -u "$shortmode_path"`
18085      new_path="$input_path"
18086    fi
18087  fi
18088
18089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18090  if test "x$test_cygdrive_prefix" = x; then
18091    # As a simple fix, exclude /usr/bin since it's not a real path.
18092    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18094      # a path prefixed by /cygdrive for fixpath to work.
18095      new_path="$CYGWIN_ROOT_PATH$input_path"
18096    fi
18097  fi
18098
18099  # remove trailing .exe if any
18100  new_path="${new_path/%.exe/}"
18101
18102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18103
18104  # First separate the path from the arguments. This will split at the first
18105  # space.
18106  complete="$FOUND_MAKE"
18107  path="${complete%% *}"
18108  tmp="$complete EOL"
18109  arguments="${tmp#* }"
18110
18111  # Input might be given as Windows format, start by converting to
18112  # unix format.
18113  new_path="$path"
18114
18115  windows_path="$new_path"
18116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18117    unix_path=`$CYGPATH -u "$windows_path"`
18118    new_path="$unix_path"
18119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18121    new_path="$unix_path"
18122  fi
18123
18124
18125  # Now try to locate executable using which
18126  new_path=`$WHICH "$new_path" 2> /dev/null`
18127
18128  if test "x$new_path" = x; then
18129    # Oops. Which didn't find the executable.
18130    # The splitting of arguments from the executable at a space might have been incorrect,
18131    # since paths with space are more likely in Windows. Give it another try with the whole
18132    # argument.
18133    path="$complete"
18134    arguments="EOL"
18135    new_path="$path"
18136
18137  windows_path="$new_path"
18138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18139    unix_path=`$CYGPATH -u "$windows_path"`
18140    new_path="$unix_path"
18141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18143    new_path="$unix_path"
18144  fi
18145
18146
18147    new_path=`$WHICH "$new_path" 2> /dev/null`
18148    # bat and cmd files are not always considered executable in MSYS causing which
18149    # to not find them
18150    if test "x$new_path" = x \
18151        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18152        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18153      new_path="$path"
18154
18155  windows_path="$new_path"
18156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18157    unix_path=`$CYGPATH -u "$windows_path"`
18158    new_path="$unix_path"
18159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18161    new_path="$unix_path"
18162  fi
18163
18164    fi
18165
18166    if test "x$new_path" = x; then
18167      # It's still not found. Now this is an unrecoverable error.
18168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18169$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18170      has_space=`$ECHO "$complete" | $GREP " "`
18171      if test "x$has_space" != x; then
18172        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18173$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18174      fi
18175      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18176    fi
18177  fi
18178
18179  # Now new_path has a complete unix path to the binary
18180  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18181    # Keep paths in /bin as-is, but remove trailing .exe if any
18182    new_path="${new_path/%.exe/}"
18183    # Do not save /bin paths to all_fixpath_prefixes!
18184  else
18185    # Not in mixed or Windows style, start by that.
18186    new_path=`cmd //c echo $new_path`
18187
18188  input_path="$new_path"
18189  # Check if we need to convert this using DOS-style short mode. If the path
18190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18191  # take no chances and rewrite it.
18192  # Note: m4 eats our [], so we need to use [ and ] instead.
18193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18194  if test "x$has_forbidden_chars" != x; then
18195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18197  fi
18198
18199    # Output is in $new_path
18200
18201  windows_path="$new_path"
18202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18203    unix_path=`$CYGPATH -u "$windows_path"`
18204    new_path="$unix_path"
18205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18207    new_path="$unix_path"
18208  fi
18209
18210    # remove trailing .exe if any
18211    new_path="${new_path/%.exe/}"
18212
18213    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18214    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18215  fi
18216
18217    else
18218      # We're on a unix platform. Hooray! :)
18219      # First separate the path from the arguments. This will split at the first
18220      # space.
18221      complete="$FOUND_MAKE"
18222      path="${complete%% *}"
18223      tmp="$complete EOL"
18224      arguments="${tmp#* }"
18225
18226      # Cannot rely on the command "which" here since it doesn't always work.
18227      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18228      if test -z "$is_absolute_path"; then
18229        # Path to executable is not absolute. Find it.
18230        IFS_save="$IFS"
18231        IFS=:
18232        for p in $PATH; do
18233          if test -f "$p/$path" && test -x "$p/$path"; then
18234            new_path="$p/$path"
18235            break
18236          fi
18237        done
18238        IFS="$IFS_save"
18239      else
18240        # This is an absolute path, we can use it without further modifications.
18241        new_path="$path"
18242      fi
18243
18244      if test "x$new_path" = x; then
18245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18246$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18247        has_space=`$ECHO "$complete" | $GREP " "`
18248        if test "x$has_space" != x; then
18249          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18250$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18251        fi
18252        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18253      fi
18254    fi
18255
18256    # Now join together the path and the arguments once again
18257    if test "x$arguments" != xEOL; then
18258      new_complete="$new_path ${arguments% *}"
18259    else
18260      new_complete="$new_path"
18261    fi
18262
18263    if test "x$complete" != "x$new_complete"; then
18264      FOUND_MAKE="$new_complete"
18265      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18266$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18267    fi
18268  fi
18269
18270        fi
18271      fi
18272    fi
18273  fi
18274
18275
18276    if test "x$FOUND_MAKE" = x; then
18277      for ac_prog in make
18278do
18279  # Extract the first word of "$ac_prog", so it can be a program name with args.
18280set dummy $ac_prog; ac_word=$2
18281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18282$as_echo_n "checking for $ac_word... " >&6; }
18283if ${ac_cv_path_CHECK_MAKE+:} false; then :
18284  $as_echo_n "(cached) " >&6
18285else
18286  case $CHECK_MAKE in
18287  [\\/]* | ?:[\\/]*)
18288  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18289  ;;
18290  *)
18291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18292for as_dir in $PATH
18293do
18294  IFS=$as_save_IFS
18295  test -z "$as_dir" && as_dir=.
18296    for ac_exec_ext in '' $ac_executable_extensions; do
18297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18298    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18300    break 2
18301  fi
18302done
18303  done
18304IFS=$as_save_IFS
18305
18306  ;;
18307esac
18308fi
18309CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18310if test -n "$CHECK_MAKE"; then
18311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18312$as_echo "$CHECK_MAKE" >&6; }
18313else
18314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18315$as_echo "no" >&6; }
18316fi
18317
18318
18319  test -n "$CHECK_MAKE" && break
18320done
18321
18322
18323  MAKE_CANDIDATE=""$CHECK_MAKE""
18324  DESCRIPTION="make in PATH"
18325
18326  # On Cygwin, we require a newer version of make than on other platforms
18327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18328    MAKE_VERSION_EXPR="-e 4\."
18329    MAKE_REQUIRED_VERSION="4.0"
18330   else
18331    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18332    MAKE_REQUIRED_VERSION="3.81"
18333  fi
18334
18335  if test "x$MAKE_CANDIDATE" != x; then
18336    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18337$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18338    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18339    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18340    if test "x$IS_GNU_MAKE" = x; then
18341      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18342$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18343    else
18344      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18345      if test "x$IS_MODERN_MAKE" = x; then
18346        { $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
18347$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;}
18348      else
18349        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18350          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18351            MAKE_EXPECTED_ENV='cygwin'
18352          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18353            MAKE_EXPECTED_ENV='msys'
18354          else
18355            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18356          fi
18357          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18358          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18359        else
18360          # Not relevant for non-Windows
18361          IS_MAKE_CORRECT_ENV=true
18362        fi
18363        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18364          { $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
18365$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;}
18366        else
18367          FOUND_MAKE=$MAKE_CANDIDATE
18368
18369  # Only process if variable expands to non-empty
18370
18371  if test "x$FOUND_MAKE" != x; then
18372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18373
18374  # First separate the path from the arguments. This will split at the first
18375  # space.
18376  complete="$FOUND_MAKE"
18377  path="${complete%% *}"
18378  tmp="$complete EOL"
18379  arguments="${tmp#* }"
18380
18381  # Input might be given as Windows format, start by converting to
18382  # unix format.
18383  new_path=`$CYGPATH -u "$path"`
18384
18385  # Now try to locate executable using which
18386  new_path=`$WHICH "$new_path" 2> /dev/null`
18387  # bat and cmd files are not always considered executable in cygwin causing which
18388  # to not find them
18389  if test "x$new_path" = x \
18390      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18391      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18392    new_path=`$CYGPATH -u "$path"`
18393  fi
18394  if test "x$new_path" = x; then
18395    # Oops. Which didn't find the executable.
18396    # The splitting of arguments from the executable at a space might have been incorrect,
18397    # since paths with space are more likely in Windows. Give it another try with the whole
18398    # argument.
18399    path="$complete"
18400    arguments="EOL"
18401    new_path=`$CYGPATH -u "$path"`
18402    new_path=`$WHICH "$new_path" 2> /dev/null`
18403    # bat and cmd files are not always considered executable in cygwin causing which
18404    # to not find them
18405    if test "x$new_path" = x \
18406        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18407        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18408      new_path=`$CYGPATH -u "$path"`
18409    fi
18410    if test "x$new_path" = x; then
18411      # It's still not found. Now this is an unrecoverable error.
18412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18413$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18414      has_space=`$ECHO "$complete" | $GREP " "`
18415      if test "x$has_space" != x; then
18416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18418      fi
18419      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18420    fi
18421  fi
18422
18423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18426  # "foo.exe" is OK but "foo" is an error.
18427  #
18428  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18429  # It is also a way to make sure we got the proper file name for the real test later on.
18430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18431  if test "x$test_shortpath" = x; then
18432    # Short path failed, file does not exist as specified.
18433    # Try adding .exe or .cmd
18434    if test -f "${new_path}.exe"; then
18435      input_to_shortpath="${new_path}.exe"
18436    elif test -f "${new_path}.cmd"; then
18437      input_to_shortpath="${new_path}.cmd"
18438    else
18439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18440$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18441      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18442$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18443      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18444    fi
18445  else
18446    input_to_shortpath="$new_path"
18447  fi
18448
18449  # Call helper function which possibly converts this using DOS-style short mode.
18450  # If so, the updated path is stored in $new_path.
18451  new_path="$input_to_shortpath"
18452
18453  input_path="$input_to_shortpath"
18454  # Check if we need to convert this using DOS-style short mode. If the path
18455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18456  # take no chances and rewrite it.
18457  # Note: m4 eats our [], so we need to use [ and ] instead.
18458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18459  if test "x$has_forbidden_chars" != x; then
18460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18464      # Going to short mode and back again did indeed matter. Since short mode is
18465      # case insensitive, let's make it lowercase to improve readability.
18466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18467      # Now convert it back to Unix-style (cygpath)
18468      input_path=`$CYGPATH -u "$shortmode_path"`
18469      new_path="$input_path"
18470    fi
18471  fi
18472
18473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18474  if test "x$test_cygdrive_prefix" = x; then
18475    # As a simple fix, exclude /usr/bin since it's not a real path.
18476    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18478      # a path prefixed by /cygdrive for fixpath to work.
18479      new_path="$CYGWIN_ROOT_PATH$input_path"
18480    fi
18481  fi
18482
18483  # remove trailing .exe if any
18484  new_path="${new_path/%.exe/}"
18485
18486    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18487
18488  # First separate the path from the arguments. This will split at the first
18489  # space.
18490  complete="$FOUND_MAKE"
18491  path="${complete%% *}"
18492  tmp="$complete EOL"
18493  arguments="${tmp#* }"
18494
18495  # Input might be given as Windows format, start by converting to
18496  # unix format.
18497  new_path="$path"
18498
18499  windows_path="$new_path"
18500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18501    unix_path=`$CYGPATH -u "$windows_path"`
18502    new_path="$unix_path"
18503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18505    new_path="$unix_path"
18506  fi
18507
18508
18509  # Now try to locate executable using which
18510  new_path=`$WHICH "$new_path" 2> /dev/null`
18511
18512  if test "x$new_path" = x; then
18513    # Oops. Which didn't find the executable.
18514    # The splitting of arguments from the executable at a space might have been incorrect,
18515    # since paths with space are more likely in Windows. Give it another try with the whole
18516    # argument.
18517    path="$complete"
18518    arguments="EOL"
18519    new_path="$path"
18520
18521  windows_path="$new_path"
18522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18523    unix_path=`$CYGPATH -u "$windows_path"`
18524    new_path="$unix_path"
18525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18527    new_path="$unix_path"
18528  fi
18529
18530
18531    new_path=`$WHICH "$new_path" 2> /dev/null`
18532    # bat and cmd files are not always considered executable in MSYS causing which
18533    # to not find them
18534    if test "x$new_path" = x \
18535        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18536        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18537      new_path="$path"
18538
18539  windows_path="$new_path"
18540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18541    unix_path=`$CYGPATH -u "$windows_path"`
18542    new_path="$unix_path"
18543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18545    new_path="$unix_path"
18546  fi
18547
18548    fi
18549
18550    if test "x$new_path" = x; then
18551      # It's still not found. Now this is an unrecoverable error.
18552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18553$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18554      has_space=`$ECHO "$complete" | $GREP " "`
18555      if test "x$has_space" != x; then
18556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18558      fi
18559      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18560    fi
18561  fi
18562
18563  # Now new_path has a complete unix path to the binary
18564  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18565    # Keep paths in /bin as-is, but remove trailing .exe if any
18566    new_path="${new_path/%.exe/}"
18567    # Do not save /bin paths to all_fixpath_prefixes!
18568  else
18569    # Not in mixed or Windows style, start by that.
18570    new_path=`cmd //c echo $new_path`
18571
18572  input_path="$new_path"
18573  # Check if we need to convert this using DOS-style short mode. If the path
18574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18575  # take no chances and rewrite it.
18576  # Note: m4 eats our [], so we need to use [ and ] instead.
18577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18578  if test "x$has_forbidden_chars" != x; then
18579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18581  fi
18582
18583    # Output is in $new_path
18584
18585  windows_path="$new_path"
18586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18587    unix_path=`$CYGPATH -u "$windows_path"`
18588    new_path="$unix_path"
18589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18591    new_path="$unix_path"
18592  fi
18593
18594    # remove trailing .exe if any
18595    new_path="${new_path/%.exe/}"
18596
18597    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18598    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18599  fi
18600
18601    else
18602      # We're on a unix platform. Hooray! :)
18603      # First separate the path from the arguments. This will split at the first
18604      # space.
18605      complete="$FOUND_MAKE"
18606      path="${complete%% *}"
18607      tmp="$complete EOL"
18608      arguments="${tmp#* }"
18609
18610      # Cannot rely on the command "which" here since it doesn't always work.
18611      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18612      if test -z "$is_absolute_path"; then
18613        # Path to executable is not absolute. Find it.
18614        IFS_save="$IFS"
18615        IFS=:
18616        for p in $PATH; do
18617          if test -f "$p/$path" && test -x "$p/$path"; then
18618            new_path="$p/$path"
18619            break
18620          fi
18621        done
18622        IFS="$IFS_save"
18623      else
18624        # This is an absolute path, we can use it without further modifications.
18625        new_path="$path"
18626      fi
18627
18628      if test "x$new_path" = x; then
18629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18630$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18631        has_space=`$ECHO "$complete" | $GREP " "`
18632        if test "x$has_space" != x; then
18633          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18634$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18635        fi
18636        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18637      fi
18638    fi
18639
18640    # Now join together the path and the arguments once again
18641    if test "x$arguments" != xEOL; then
18642      new_complete="$new_path ${arguments% *}"
18643    else
18644      new_complete="$new_path"
18645    fi
18646
18647    if test "x$complete" != "x$new_complete"; then
18648      FOUND_MAKE="$new_complete"
18649      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18650$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18651    fi
18652  fi
18653
18654        fi
18655      fi
18656    fi
18657  fi
18658
18659    fi
18660
18661    if test "x$FOUND_MAKE" = x; then
18662      if test "x$TOOLCHAIN_PATH" != x; then
18663        # We have a toolchain path, check that as well before giving up.
18664        OLD_PATH=$PATH
18665        PATH=$TOOLCHAIN_PATH:$PATH
18666        for ac_prog in gmake
18667do
18668  # Extract the first word of "$ac_prog", so it can be a program name with args.
18669set dummy $ac_prog; ac_word=$2
18670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18671$as_echo_n "checking for $ac_word... " >&6; }
18672if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18673  $as_echo_n "(cached) " >&6
18674else
18675  case $CHECK_TOOLSDIR_GMAKE in
18676  [\\/]* | ?:[\\/]*)
18677  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18678  ;;
18679  *)
18680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18681for as_dir in $PATH
18682do
18683  IFS=$as_save_IFS
18684  test -z "$as_dir" && as_dir=.
18685    for ac_exec_ext in '' $ac_executable_extensions; do
18686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18687    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18689    break 2
18690  fi
18691done
18692  done
18693IFS=$as_save_IFS
18694
18695  ;;
18696esac
18697fi
18698CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18699if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18701$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18702else
18703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18704$as_echo "no" >&6; }
18705fi
18706
18707
18708  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18709done
18710
18711
18712  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18713  DESCRIPTION="gmake in tools-dir"
18714
18715  # On Cygwin, we require a newer version of make than on other platforms
18716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18717    MAKE_VERSION_EXPR="-e 4\."
18718    MAKE_REQUIRED_VERSION="4.0"
18719   else
18720    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18721    MAKE_REQUIRED_VERSION="3.81"
18722  fi
18723
18724  if test "x$MAKE_CANDIDATE" != x; then
18725    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18726$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18727    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18728    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18729    if test "x$IS_GNU_MAKE" = x; then
18730      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18731$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18732    else
18733      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18734      if test "x$IS_MODERN_MAKE" = x; then
18735        { $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
18736$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;}
18737      else
18738        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18739          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18740            MAKE_EXPECTED_ENV='cygwin'
18741          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18742            MAKE_EXPECTED_ENV='msys'
18743          else
18744            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18745          fi
18746          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18747          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18748        else
18749          # Not relevant for non-Windows
18750          IS_MAKE_CORRECT_ENV=true
18751        fi
18752        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18753          { $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
18754$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;}
18755        else
18756          FOUND_MAKE=$MAKE_CANDIDATE
18757
18758  # Only process if variable expands to non-empty
18759
18760  if test "x$FOUND_MAKE" != x; then
18761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18762
18763  # First separate the path from the arguments. This will split at the first
18764  # space.
18765  complete="$FOUND_MAKE"
18766  path="${complete%% *}"
18767  tmp="$complete EOL"
18768  arguments="${tmp#* }"
18769
18770  # Input might be given as Windows format, start by converting to
18771  # unix format.
18772  new_path=`$CYGPATH -u "$path"`
18773
18774  # Now try to locate executable using which
18775  new_path=`$WHICH "$new_path" 2> /dev/null`
18776  # bat and cmd files are not always considered executable in cygwin causing which
18777  # to not find them
18778  if test "x$new_path" = x \
18779      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18780      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18781    new_path=`$CYGPATH -u "$path"`
18782  fi
18783  if test "x$new_path" = x; then
18784    # Oops. Which didn't find the executable.
18785    # The splitting of arguments from the executable at a space might have been incorrect,
18786    # since paths with space are more likely in Windows. Give it another try with the whole
18787    # argument.
18788    path="$complete"
18789    arguments="EOL"
18790    new_path=`$CYGPATH -u "$path"`
18791    new_path=`$WHICH "$new_path" 2> /dev/null`
18792    # bat and cmd files are not always considered executable in cygwin causing which
18793    # to not find them
18794    if test "x$new_path" = x \
18795        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18796        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18797      new_path=`$CYGPATH -u "$path"`
18798    fi
18799    if test "x$new_path" = x; then
18800      # It's still not found. Now this is an unrecoverable error.
18801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18802$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18803      has_space=`$ECHO "$complete" | $GREP " "`
18804      if test "x$has_space" != x; then
18805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18807      fi
18808      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18809    fi
18810  fi
18811
18812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18815  # "foo.exe" is OK but "foo" is an error.
18816  #
18817  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18818  # It is also a way to make sure we got the proper file name for the real test later on.
18819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18820  if test "x$test_shortpath" = x; then
18821    # Short path failed, file does not exist as specified.
18822    # Try adding .exe or .cmd
18823    if test -f "${new_path}.exe"; then
18824      input_to_shortpath="${new_path}.exe"
18825    elif test -f "${new_path}.cmd"; then
18826      input_to_shortpath="${new_path}.cmd"
18827    else
18828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18829$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18830      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18831$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18832      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18833    fi
18834  else
18835    input_to_shortpath="$new_path"
18836  fi
18837
18838  # Call helper function which possibly converts this using DOS-style short mode.
18839  # If so, the updated path is stored in $new_path.
18840  new_path="$input_to_shortpath"
18841
18842  input_path="$input_to_shortpath"
18843  # Check if we need to convert this using DOS-style short mode. If the path
18844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18845  # take no chances and rewrite it.
18846  # Note: m4 eats our [], so we need to use [ and ] instead.
18847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18848  if test "x$has_forbidden_chars" != x; then
18849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18853      # Going to short mode and back again did indeed matter. Since short mode is
18854      # case insensitive, let's make it lowercase to improve readability.
18855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18856      # Now convert it back to Unix-style (cygpath)
18857      input_path=`$CYGPATH -u "$shortmode_path"`
18858      new_path="$input_path"
18859    fi
18860  fi
18861
18862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18863  if test "x$test_cygdrive_prefix" = x; then
18864    # As a simple fix, exclude /usr/bin since it's not a real path.
18865    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18867      # a path prefixed by /cygdrive for fixpath to work.
18868      new_path="$CYGWIN_ROOT_PATH$input_path"
18869    fi
18870  fi
18871
18872  # remove trailing .exe if any
18873  new_path="${new_path/%.exe/}"
18874
18875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18876
18877  # First separate the path from the arguments. This will split at the first
18878  # space.
18879  complete="$FOUND_MAKE"
18880  path="${complete%% *}"
18881  tmp="$complete EOL"
18882  arguments="${tmp#* }"
18883
18884  # Input might be given as Windows format, start by converting to
18885  # unix format.
18886  new_path="$path"
18887
18888  windows_path="$new_path"
18889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18890    unix_path=`$CYGPATH -u "$windows_path"`
18891    new_path="$unix_path"
18892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18894    new_path="$unix_path"
18895  fi
18896
18897
18898  # Now try to locate executable using which
18899  new_path=`$WHICH "$new_path" 2> /dev/null`
18900
18901  if test "x$new_path" = x; then
18902    # Oops. Which didn't find the executable.
18903    # The splitting of arguments from the executable at a space might have been incorrect,
18904    # since paths with space are more likely in Windows. Give it another try with the whole
18905    # argument.
18906    path="$complete"
18907    arguments="EOL"
18908    new_path="$path"
18909
18910  windows_path="$new_path"
18911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18912    unix_path=`$CYGPATH -u "$windows_path"`
18913    new_path="$unix_path"
18914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18916    new_path="$unix_path"
18917  fi
18918
18919
18920    new_path=`$WHICH "$new_path" 2> /dev/null`
18921    # bat and cmd files are not always considered executable in MSYS causing which
18922    # to not find them
18923    if test "x$new_path" = x \
18924        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18925        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18926      new_path="$path"
18927
18928  windows_path="$new_path"
18929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18930    unix_path=`$CYGPATH -u "$windows_path"`
18931    new_path="$unix_path"
18932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18934    new_path="$unix_path"
18935  fi
18936
18937    fi
18938
18939    if test "x$new_path" = x; then
18940      # It's still not found. Now this is an unrecoverable error.
18941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18942$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18943      has_space=`$ECHO "$complete" | $GREP " "`
18944      if test "x$has_space" != x; then
18945        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18946$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18947      fi
18948      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18949    fi
18950  fi
18951
18952  # Now new_path has a complete unix path to the binary
18953  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18954    # Keep paths in /bin as-is, but remove trailing .exe if any
18955    new_path="${new_path/%.exe/}"
18956    # Do not save /bin paths to all_fixpath_prefixes!
18957  else
18958    # Not in mixed or Windows style, start by that.
18959    new_path=`cmd //c echo $new_path`
18960
18961  input_path="$new_path"
18962  # Check if we need to convert this using DOS-style short mode. If the path
18963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18964  # take no chances and rewrite it.
18965  # Note: m4 eats our [], so we need to use [ and ] instead.
18966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18967  if test "x$has_forbidden_chars" != x; then
18968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18970  fi
18971
18972    # Output is in $new_path
18973
18974  windows_path="$new_path"
18975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18976    unix_path=`$CYGPATH -u "$windows_path"`
18977    new_path="$unix_path"
18978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18980    new_path="$unix_path"
18981  fi
18982
18983    # remove trailing .exe if any
18984    new_path="${new_path/%.exe/}"
18985
18986    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18987    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18988  fi
18989
18990    else
18991      # We're on a unix platform. Hooray! :)
18992      # First separate the path from the arguments. This will split at the first
18993      # space.
18994      complete="$FOUND_MAKE"
18995      path="${complete%% *}"
18996      tmp="$complete EOL"
18997      arguments="${tmp#* }"
18998
18999      # Cannot rely on the command "which" here since it doesn't always work.
19000      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19001      if test -z "$is_absolute_path"; then
19002        # Path to executable is not absolute. Find it.
19003        IFS_save="$IFS"
19004        IFS=:
19005        for p in $PATH; do
19006          if test -f "$p/$path" && test -x "$p/$path"; then
19007            new_path="$p/$path"
19008            break
19009          fi
19010        done
19011        IFS="$IFS_save"
19012      else
19013        # This is an absolute path, we can use it without further modifications.
19014        new_path="$path"
19015      fi
19016
19017      if test "x$new_path" = x; then
19018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19019$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19020        has_space=`$ECHO "$complete" | $GREP " "`
19021        if test "x$has_space" != x; then
19022          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19023$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19024        fi
19025        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19026      fi
19027    fi
19028
19029    # Now join together the path and the arguments once again
19030    if test "x$arguments" != xEOL; then
19031      new_complete="$new_path ${arguments% *}"
19032    else
19033      new_complete="$new_path"
19034    fi
19035
19036    if test "x$complete" != "x$new_complete"; then
19037      FOUND_MAKE="$new_complete"
19038      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19039$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19040    fi
19041  fi
19042
19043        fi
19044      fi
19045    fi
19046  fi
19047
19048        if test "x$FOUND_MAKE" = x; then
19049          for ac_prog in make
19050do
19051  # Extract the first word of "$ac_prog", so it can be a program name with args.
19052set dummy $ac_prog; ac_word=$2
19053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19054$as_echo_n "checking for $ac_word... " >&6; }
19055if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19056  $as_echo_n "(cached) " >&6
19057else
19058  case $CHECK_TOOLSDIR_MAKE in
19059  [\\/]* | ?:[\\/]*)
19060  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19061  ;;
19062  *)
19063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19064for as_dir in $PATH
19065do
19066  IFS=$as_save_IFS
19067  test -z "$as_dir" && as_dir=.
19068    for ac_exec_ext in '' $ac_executable_extensions; do
19069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19070    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19072    break 2
19073  fi
19074done
19075  done
19076IFS=$as_save_IFS
19077
19078  ;;
19079esac
19080fi
19081CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19082if test -n "$CHECK_TOOLSDIR_MAKE"; then
19083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19084$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19085else
19086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19087$as_echo "no" >&6; }
19088fi
19089
19090
19091  test -n "$CHECK_TOOLSDIR_MAKE" && break
19092done
19093
19094
19095  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19096  DESCRIPTION="make in tools-dir"
19097
19098  # On Cygwin, we require a newer version of make than on other platforms
19099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19100    MAKE_VERSION_EXPR="-e 4\."
19101    MAKE_REQUIRED_VERSION="4.0"
19102   else
19103    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19104    MAKE_REQUIRED_VERSION="3.81"
19105  fi
19106
19107  if test "x$MAKE_CANDIDATE" != x; then
19108    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19109$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19110    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19111    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19112    if test "x$IS_GNU_MAKE" = x; then
19113      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19114$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19115    else
19116      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19117      if test "x$IS_MODERN_MAKE" = x; then
19118        { $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
19119$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;}
19120      else
19121        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19122          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19123            MAKE_EXPECTED_ENV='cygwin'
19124          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19125            MAKE_EXPECTED_ENV='msys'
19126          else
19127            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19128          fi
19129          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19130          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19131        else
19132          # Not relevant for non-Windows
19133          IS_MAKE_CORRECT_ENV=true
19134        fi
19135        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19136          { $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
19137$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;}
19138        else
19139          FOUND_MAKE=$MAKE_CANDIDATE
19140
19141  # Only process if variable expands to non-empty
19142
19143  if test "x$FOUND_MAKE" != x; then
19144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19145
19146  # First separate the path from the arguments. This will split at the first
19147  # space.
19148  complete="$FOUND_MAKE"
19149  path="${complete%% *}"
19150  tmp="$complete EOL"
19151  arguments="${tmp#* }"
19152
19153  # Input might be given as Windows format, start by converting to
19154  # unix format.
19155  new_path=`$CYGPATH -u "$path"`
19156
19157  # Now try to locate executable using which
19158  new_path=`$WHICH "$new_path" 2> /dev/null`
19159  # bat and cmd files are not always considered executable in cygwin causing which
19160  # to not find them
19161  if test "x$new_path" = x \
19162      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19163      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19164    new_path=`$CYGPATH -u "$path"`
19165  fi
19166  if test "x$new_path" = x; then
19167    # Oops. Which didn't find the executable.
19168    # The splitting of arguments from the executable at a space might have been incorrect,
19169    # since paths with space are more likely in Windows. Give it another try with the whole
19170    # argument.
19171    path="$complete"
19172    arguments="EOL"
19173    new_path=`$CYGPATH -u "$path"`
19174    new_path=`$WHICH "$new_path" 2> /dev/null`
19175    # bat and cmd files are not always considered executable in cygwin causing which
19176    # to not find them
19177    if test "x$new_path" = x \
19178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19180      new_path=`$CYGPATH -u "$path"`
19181    fi
19182    if test "x$new_path" = x; then
19183      # It's still not found. Now this is an unrecoverable error.
19184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19185$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19186      has_space=`$ECHO "$complete" | $GREP " "`
19187      if test "x$has_space" != x; then
19188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19190      fi
19191      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19192    fi
19193  fi
19194
19195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19198  # "foo.exe" is OK but "foo" is an error.
19199  #
19200  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19201  # It is also a way to make sure we got the proper file name for the real test later on.
19202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19203  if test "x$test_shortpath" = x; then
19204    # Short path failed, file does not exist as specified.
19205    # Try adding .exe or .cmd
19206    if test -f "${new_path}.exe"; then
19207      input_to_shortpath="${new_path}.exe"
19208    elif test -f "${new_path}.cmd"; then
19209      input_to_shortpath="${new_path}.cmd"
19210    else
19211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19213      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19214$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19215      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19216    fi
19217  else
19218    input_to_shortpath="$new_path"
19219  fi
19220
19221  # Call helper function which possibly converts this using DOS-style short mode.
19222  # If so, the updated path is stored in $new_path.
19223  new_path="$input_to_shortpath"
19224
19225  input_path="$input_to_shortpath"
19226  # Check if we need to convert this using DOS-style short mode. If the path
19227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19228  # take no chances and rewrite it.
19229  # Note: m4 eats our [], so we need to use [ and ] instead.
19230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19231  if test "x$has_forbidden_chars" != x; then
19232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19236      # Going to short mode and back again did indeed matter. Since short mode is
19237      # case insensitive, let's make it lowercase to improve readability.
19238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19239      # Now convert it back to Unix-style (cygpath)
19240      input_path=`$CYGPATH -u "$shortmode_path"`
19241      new_path="$input_path"
19242    fi
19243  fi
19244
19245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19246  if test "x$test_cygdrive_prefix" = x; then
19247    # As a simple fix, exclude /usr/bin since it's not a real path.
19248    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19250      # a path prefixed by /cygdrive for fixpath to work.
19251      new_path="$CYGWIN_ROOT_PATH$input_path"
19252    fi
19253  fi
19254
19255  # remove trailing .exe if any
19256  new_path="${new_path/%.exe/}"
19257
19258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19259
19260  # First separate the path from the arguments. This will split at the first
19261  # space.
19262  complete="$FOUND_MAKE"
19263  path="${complete%% *}"
19264  tmp="$complete EOL"
19265  arguments="${tmp#* }"
19266
19267  # Input might be given as Windows format, start by converting to
19268  # unix format.
19269  new_path="$path"
19270
19271  windows_path="$new_path"
19272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19273    unix_path=`$CYGPATH -u "$windows_path"`
19274    new_path="$unix_path"
19275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19277    new_path="$unix_path"
19278  fi
19279
19280
19281  # Now try to locate executable using which
19282  new_path=`$WHICH "$new_path" 2> /dev/null`
19283
19284  if test "x$new_path" = x; then
19285    # Oops. Which didn't find the executable.
19286    # The splitting of arguments from the executable at a space might have been incorrect,
19287    # since paths with space are more likely in Windows. Give it another try with the whole
19288    # argument.
19289    path="$complete"
19290    arguments="EOL"
19291    new_path="$path"
19292
19293  windows_path="$new_path"
19294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19295    unix_path=`$CYGPATH -u "$windows_path"`
19296    new_path="$unix_path"
19297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19299    new_path="$unix_path"
19300  fi
19301
19302
19303    new_path=`$WHICH "$new_path" 2> /dev/null`
19304    # bat and cmd files are not always considered executable in MSYS causing which
19305    # to not find them
19306    if test "x$new_path" = x \
19307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19309      new_path="$path"
19310
19311  windows_path="$new_path"
19312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19313    unix_path=`$CYGPATH -u "$windows_path"`
19314    new_path="$unix_path"
19315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19317    new_path="$unix_path"
19318  fi
19319
19320    fi
19321
19322    if test "x$new_path" = x; then
19323      # It's still not found. Now this is an unrecoverable error.
19324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19325$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19326      has_space=`$ECHO "$complete" | $GREP " "`
19327      if test "x$has_space" != x; then
19328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19330      fi
19331      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19332    fi
19333  fi
19334
19335  # Now new_path has a complete unix path to the binary
19336  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19337    # Keep paths in /bin as-is, but remove trailing .exe if any
19338    new_path="${new_path/%.exe/}"
19339    # Do not save /bin paths to all_fixpath_prefixes!
19340  else
19341    # Not in mixed or Windows style, start by that.
19342    new_path=`cmd //c echo $new_path`
19343
19344  input_path="$new_path"
19345  # Check if we need to convert this using DOS-style short mode. If the path
19346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19347  # take no chances and rewrite it.
19348  # Note: m4 eats our [], so we need to use [ and ] instead.
19349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19350  if test "x$has_forbidden_chars" != x; then
19351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19353  fi
19354
19355    # Output is in $new_path
19356
19357  windows_path="$new_path"
19358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19359    unix_path=`$CYGPATH -u "$windows_path"`
19360    new_path="$unix_path"
19361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19363    new_path="$unix_path"
19364  fi
19365
19366    # remove trailing .exe if any
19367    new_path="${new_path/%.exe/}"
19368
19369    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19370    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19371  fi
19372
19373    else
19374      # We're on a unix platform. Hooray! :)
19375      # First separate the path from the arguments. This will split at the first
19376      # space.
19377      complete="$FOUND_MAKE"
19378      path="${complete%% *}"
19379      tmp="$complete EOL"
19380      arguments="${tmp#* }"
19381
19382      # Cannot rely on the command "which" here since it doesn't always work.
19383      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19384      if test -z "$is_absolute_path"; then
19385        # Path to executable is not absolute. Find it.
19386        IFS_save="$IFS"
19387        IFS=:
19388        for p in $PATH; do
19389          if test -f "$p/$path" && test -x "$p/$path"; then
19390            new_path="$p/$path"
19391            break
19392          fi
19393        done
19394        IFS="$IFS_save"
19395      else
19396        # This is an absolute path, we can use it without further modifications.
19397        new_path="$path"
19398      fi
19399
19400      if test "x$new_path" = x; then
19401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19402$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19403        has_space=`$ECHO "$complete" | $GREP " "`
19404        if test "x$has_space" != x; then
19405          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19406$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19407        fi
19408        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19409      fi
19410    fi
19411
19412    # Now join together the path and the arguments once again
19413    if test "x$arguments" != xEOL; then
19414      new_complete="$new_path ${arguments% *}"
19415    else
19416      new_complete="$new_path"
19417    fi
19418
19419    if test "x$complete" != "x$new_complete"; then
19420      FOUND_MAKE="$new_complete"
19421      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19422$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19423    fi
19424  fi
19425
19426        fi
19427      fi
19428    fi
19429  fi
19430
19431        fi
19432        PATH=$OLD_PATH
19433      fi
19434    fi
19435
19436    if test "x$FOUND_MAKE" = x; then
19437      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
19438    fi
19439
19440  else
19441    # The variable is set, but is it from the command line or the environment?
19442
19443    # Try to remove the string !MAKE! from our list.
19444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19446      # If it failed, the variable was not from the command line. Ignore it,
19447      # but warn the user (except for BASH, which is always set by the calling BASH).
19448      if test "xMAKE" != xBASH; then
19449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19450$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19451      fi
19452      # Try to locate tool using the code snippet
19453
19454    # Try our hardest to locate a correct version of GNU make
19455    for ac_prog in gmake
19456do
19457  # Extract the first word of "$ac_prog", so it can be a program name with args.
19458set dummy $ac_prog; ac_word=$2
19459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19460$as_echo_n "checking for $ac_word... " >&6; }
19461if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19462  $as_echo_n "(cached) " >&6
19463else
19464  case $CHECK_GMAKE in
19465  [\\/]* | ?:[\\/]*)
19466  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19467  ;;
19468  *)
19469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19470for as_dir in $PATH
19471do
19472  IFS=$as_save_IFS
19473  test -z "$as_dir" && as_dir=.
19474    for ac_exec_ext in '' $ac_executable_extensions; do
19475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19476    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19478    break 2
19479  fi
19480done
19481  done
19482IFS=$as_save_IFS
19483
19484  ;;
19485esac
19486fi
19487CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19488if test -n "$CHECK_GMAKE"; then
19489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19490$as_echo "$CHECK_GMAKE" >&6; }
19491else
19492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19493$as_echo "no" >&6; }
19494fi
19495
19496
19497  test -n "$CHECK_GMAKE" && break
19498done
19499
19500
19501  MAKE_CANDIDATE=""$CHECK_GMAKE""
19502  DESCRIPTION="gmake in PATH"
19503
19504  # On Cygwin, we require a newer version of make than on other platforms
19505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19506    MAKE_VERSION_EXPR="-e 4\."
19507    MAKE_REQUIRED_VERSION="4.0"
19508   else
19509    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19510    MAKE_REQUIRED_VERSION="3.81"
19511  fi
19512
19513  if test "x$MAKE_CANDIDATE" != x; then
19514    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19515$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19516    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19517    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19518    if test "x$IS_GNU_MAKE" = x; then
19519      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19520$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19521    else
19522      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19523      if test "x$IS_MODERN_MAKE" = x; then
19524        { $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
19525$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;}
19526      else
19527        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19528          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19529            MAKE_EXPECTED_ENV='cygwin'
19530          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19531            MAKE_EXPECTED_ENV='msys'
19532          else
19533            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19534          fi
19535          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19536          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19537        else
19538          # Not relevant for non-Windows
19539          IS_MAKE_CORRECT_ENV=true
19540        fi
19541        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19542          { $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
19543$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;}
19544        else
19545          FOUND_MAKE=$MAKE_CANDIDATE
19546
19547  # Only process if variable expands to non-empty
19548
19549  if test "x$FOUND_MAKE" != x; then
19550    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19551
19552  # First separate the path from the arguments. This will split at the first
19553  # space.
19554  complete="$FOUND_MAKE"
19555  path="${complete%% *}"
19556  tmp="$complete EOL"
19557  arguments="${tmp#* }"
19558
19559  # Input might be given as Windows format, start by converting to
19560  # unix format.
19561  new_path=`$CYGPATH -u "$path"`
19562
19563  # Now try to locate executable using which
19564  new_path=`$WHICH "$new_path" 2> /dev/null`
19565  # bat and cmd files are not always considered executable in cygwin causing which
19566  # to not find them
19567  if test "x$new_path" = x \
19568      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19569      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19570    new_path=`$CYGPATH -u "$path"`
19571  fi
19572  if test "x$new_path" = x; then
19573    # Oops. Which didn't find the executable.
19574    # The splitting of arguments from the executable at a space might have been incorrect,
19575    # since paths with space are more likely in Windows. Give it another try with the whole
19576    # argument.
19577    path="$complete"
19578    arguments="EOL"
19579    new_path=`$CYGPATH -u "$path"`
19580    new_path=`$WHICH "$new_path" 2> /dev/null`
19581    # bat and cmd files are not always considered executable in cygwin causing which
19582    # to not find them
19583    if test "x$new_path" = x \
19584        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19585        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19586      new_path=`$CYGPATH -u "$path"`
19587    fi
19588    if test "x$new_path" = x; then
19589      # It's still not found. Now this is an unrecoverable error.
19590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19591$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19592      has_space=`$ECHO "$complete" | $GREP " "`
19593      if test "x$has_space" != x; then
19594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19596      fi
19597      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19598    fi
19599  fi
19600
19601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19604  # "foo.exe" is OK but "foo" is an error.
19605  #
19606  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19607  # It is also a way to make sure we got the proper file name for the real test later on.
19608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19609  if test "x$test_shortpath" = x; then
19610    # Short path failed, file does not exist as specified.
19611    # Try adding .exe or .cmd
19612    if test -f "${new_path}.exe"; then
19613      input_to_shortpath="${new_path}.exe"
19614    elif test -f "${new_path}.cmd"; then
19615      input_to_shortpath="${new_path}.cmd"
19616    else
19617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19618$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19619      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19620$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19621      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19622    fi
19623  else
19624    input_to_shortpath="$new_path"
19625  fi
19626
19627  # Call helper function which possibly converts this using DOS-style short mode.
19628  # If so, the updated path is stored in $new_path.
19629  new_path="$input_to_shortpath"
19630
19631  input_path="$input_to_shortpath"
19632  # Check if we need to convert this using DOS-style short mode. If the path
19633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19634  # take no chances and rewrite it.
19635  # Note: m4 eats our [], so we need to use [ and ] instead.
19636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19637  if test "x$has_forbidden_chars" != x; then
19638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19642      # Going to short mode and back again did indeed matter. Since short mode is
19643      # case insensitive, let's make it lowercase to improve readability.
19644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19645      # Now convert it back to Unix-style (cygpath)
19646      input_path=`$CYGPATH -u "$shortmode_path"`
19647      new_path="$input_path"
19648    fi
19649  fi
19650
19651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19652  if test "x$test_cygdrive_prefix" = x; then
19653    # As a simple fix, exclude /usr/bin since it's not a real path.
19654    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19656      # a path prefixed by /cygdrive for fixpath to work.
19657      new_path="$CYGWIN_ROOT_PATH$input_path"
19658    fi
19659  fi
19660
19661  # remove trailing .exe if any
19662  new_path="${new_path/%.exe/}"
19663
19664    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19665
19666  # First separate the path from the arguments. This will split at the first
19667  # space.
19668  complete="$FOUND_MAKE"
19669  path="${complete%% *}"
19670  tmp="$complete EOL"
19671  arguments="${tmp#* }"
19672
19673  # Input might be given as Windows format, start by converting to
19674  # unix format.
19675  new_path="$path"
19676
19677  windows_path="$new_path"
19678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19679    unix_path=`$CYGPATH -u "$windows_path"`
19680    new_path="$unix_path"
19681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19683    new_path="$unix_path"
19684  fi
19685
19686
19687  # Now try to locate executable using which
19688  new_path=`$WHICH "$new_path" 2> /dev/null`
19689
19690  if test "x$new_path" = x; then
19691    # Oops. Which didn't find the executable.
19692    # The splitting of arguments from the executable at a space might have been incorrect,
19693    # since paths with space are more likely in Windows. Give it another try with the whole
19694    # argument.
19695    path="$complete"
19696    arguments="EOL"
19697    new_path="$path"
19698
19699  windows_path="$new_path"
19700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19701    unix_path=`$CYGPATH -u "$windows_path"`
19702    new_path="$unix_path"
19703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19705    new_path="$unix_path"
19706  fi
19707
19708
19709    new_path=`$WHICH "$new_path" 2> /dev/null`
19710    # bat and cmd files are not always considered executable in MSYS causing which
19711    # to not find them
19712    if test "x$new_path" = x \
19713        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19714        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19715      new_path="$path"
19716
19717  windows_path="$new_path"
19718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19719    unix_path=`$CYGPATH -u "$windows_path"`
19720    new_path="$unix_path"
19721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19723    new_path="$unix_path"
19724  fi
19725
19726    fi
19727
19728    if test "x$new_path" = x; then
19729      # It's still not found. Now this is an unrecoverable error.
19730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19731$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19732      has_space=`$ECHO "$complete" | $GREP " "`
19733      if test "x$has_space" != x; then
19734        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19735$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19736      fi
19737      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19738    fi
19739  fi
19740
19741  # Now new_path has a complete unix path to the binary
19742  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19743    # Keep paths in /bin as-is, but remove trailing .exe if any
19744    new_path="${new_path/%.exe/}"
19745    # Do not save /bin paths to all_fixpath_prefixes!
19746  else
19747    # Not in mixed or Windows style, start by that.
19748    new_path=`cmd //c echo $new_path`
19749
19750  input_path="$new_path"
19751  # Check if we need to convert this using DOS-style short mode. If the path
19752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19753  # take no chances and rewrite it.
19754  # Note: m4 eats our [], so we need to use [ and ] instead.
19755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19756  if test "x$has_forbidden_chars" != x; then
19757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19759  fi
19760
19761    # Output is in $new_path
19762
19763  windows_path="$new_path"
19764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19765    unix_path=`$CYGPATH -u "$windows_path"`
19766    new_path="$unix_path"
19767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19769    new_path="$unix_path"
19770  fi
19771
19772    # remove trailing .exe if any
19773    new_path="${new_path/%.exe/}"
19774
19775    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19776    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19777  fi
19778
19779    else
19780      # We're on a unix platform. Hooray! :)
19781      # First separate the path from the arguments. This will split at the first
19782      # space.
19783      complete="$FOUND_MAKE"
19784      path="${complete%% *}"
19785      tmp="$complete EOL"
19786      arguments="${tmp#* }"
19787
19788      # Cannot rely on the command "which" here since it doesn't always work.
19789      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19790      if test -z "$is_absolute_path"; then
19791        # Path to executable is not absolute. Find it.
19792        IFS_save="$IFS"
19793        IFS=:
19794        for p in $PATH; do
19795          if test -f "$p/$path" && test -x "$p/$path"; then
19796            new_path="$p/$path"
19797            break
19798          fi
19799        done
19800        IFS="$IFS_save"
19801      else
19802        # This is an absolute path, we can use it without further modifications.
19803        new_path="$path"
19804      fi
19805
19806      if test "x$new_path" = x; then
19807        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19808$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19809        has_space=`$ECHO "$complete" | $GREP " "`
19810        if test "x$has_space" != x; then
19811          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19812$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19813        fi
19814        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19815      fi
19816    fi
19817
19818    # Now join together the path and the arguments once again
19819    if test "x$arguments" != xEOL; then
19820      new_complete="$new_path ${arguments% *}"
19821    else
19822      new_complete="$new_path"
19823    fi
19824
19825    if test "x$complete" != "x$new_complete"; then
19826      FOUND_MAKE="$new_complete"
19827      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19828$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19829    fi
19830  fi
19831
19832        fi
19833      fi
19834    fi
19835  fi
19836
19837
19838    if test "x$FOUND_MAKE" = x; then
19839      for ac_prog in make
19840do
19841  # Extract the first word of "$ac_prog", so it can be a program name with args.
19842set dummy $ac_prog; ac_word=$2
19843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19844$as_echo_n "checking for $ac_word... " >&6; }
19845if ${ac_cv_path_CHECK_MAKE+:} false; then :
19846  $as_echo_n "(cached) " >&6
19847else
19848  case $CHECK_MAKE in
19849  [\\/]* | ?:[\\/]*)
19850  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19851  ;;
19852  *)
19853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19854for as_dir in $PATH
19855do
19856  IFS=$as_save_IFS
19857  test -z "$as_dir" && as_dir=.
19858    for ac_exec_ext in '' $ac_executable_extensions; do
19859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19860    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19862    break 2
19863  fi
19864done
19865  done
19866IFS=$as_save_IFS
19867
19868  ;;
19869esac
19870fi
19871CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19872if test -n "$CHECK_MAKE"; then
19873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19874$as_echo "$CHECK_MAKE" >&6; }
19875else
19876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19877$as_echo "no" >&6; }
19878fi
19879
19880
19881  test -n "$CHECK_MAKE" && break
19882done
19883
19884
19885  MAKE_CANDIDATE=""$CHECK_MAKE""
19886  DESCRIPTION="make in PATH"
19887
19888  # On Cygwin, we require a newer version of make than on other platforms
19889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19890    MAKE_VERSION_EXPR="-e 4\."
19891    MAKE_REQUIRED_VERSION="4.0"
19892   else
19893    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19894    MAKE_REQUIRED_VERSION="3.81"
19895  fi
19896
19897  if test "x$MAKE_CANDIDATE" != x; then
19898    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19899$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19900    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19901    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19902    if test "x$IS_GNU_MAKE" = x; then
19903      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19904$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19905    else
19906      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19907      if test "x$IS_MODERN_MAKE" = x; then
19908        { $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
19909$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;}
19910      else
19911        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19912          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19913            MAKE_EXPECTED_ENV='cygwin'
19914          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19915            MAKE_EXPECTED_ENV='msys'
19916          else
19917            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19918          fi
19919          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19920          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19921        else
19922          # Not relevant for non-Windows
19923          IS_MAKE_CORRECT_ENV=true
19924        fi
19925        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19926          { $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
19927$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;}
19928        else
19929          FOUND_MAKE=$MAKE_CANDIDATE
19930
19931  # Only process if variable expands to non-empty
19932
19933  if test "x$FOUND_MAKE" != x; then
19934    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19935
19936  # First separate the path from the arguments. This will split at the first
19937  # space.
19938  complete="$FOUND_MAKE"
19939  path="${complete%% *}"
19940  tmp="$complete EOL"
19941  arguments="${tmp#* }"
19942
19943  # Input might be given as Windows format, start by converting to
19944  # unix format.
19945  new_path=`$CYGPATH -u "$path"`
19946
19947  # Now try to locate executable using which
19948  new_path=`$WHICH "$new_path" 2> /dev/null`
19949  # bat and cmd files are not always considered executable in cygwin causing which
19950  # to not find them
19951  if test "x$new_path" = x \
19952      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19953      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19954    new_path=`$CYGPATH -u "$path"`
19955  fi
19956  if test "x$new_path" = x; then
19957    # Oops. Which didn't find the executable.
19958    # The splitting of arguments from the executable at a space might have been incorrect,
19959    # since paths with space are more likely in Windows. Give it another try with the whole
19960    # argument.
19961    path="$complete"
19962    arguments="EOL"
19963    new_path=`$CYGPATH -u "$path"`
19964    new_path=`$WHICH "$new_path" 2> /dev/null`
19965    # bat and cmd files are not always considered executable in cygwin causing which
19966    # to not find them
19967    if test "x$new_path" = x \
19968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19970      new_path=`$CYGPATH -u "$path"`
19971    fi
19972    if test "x$new_path" = x; then
19973      # It's still not found. Now this is an unrecoverable error.
19974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19975$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19976      has_space=`$ECHO "$complete" | $GREP " "`
19977      if test "x$has_space" != x; then
19978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19980      fi
19981      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19982    fi
19983  fi
19984
19985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19988  # "foo.exe" is OK but "foo" is an error.
19989  #
19990  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19991  # It is also a way to make sure we got the proper file name for the real test later on.
19992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19993  if test "x$test_shortpath" = x; then
19994    # Short path failed, file does not exist as specified.
19995    # Try adding .exe or .cmd
19996    if test -f "${new_path}.exe"; then
19997      input_to_shortpath="${new_path}.exe"
19998    elif test -f "${new_path}.cmd"; then
19999      input_to_shortpath="${new_path}.cmd"
20000    else
20001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20002$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20003      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20004$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20005      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20006    fi
20007  else
20008    input_to_shortpath="$new_path"
20009  fi
20010
20011  # Call helper function which possibly converts this using DOS-style short mode.
20012  # If so, the updated path is stored in $new_path.
20013  new_path="$input_to_shortpath"
20014
20015  input_path="$input_to_shortpath"
20016  # Check if we need to convert this using DOS-style short mode. If the path
20017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20018  # take no chances and rewrite it.
20019  # Note: m4 eats our [], so we need to use [ and ] instead.
20020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20021  if test "x$has_forbidden_chars" != x; then
20022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20026      # Going to short mode and back again did indeed matter. Since short mode is
20027      # case insensitive, let's make it lowercase to improve readability.
20028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20029      # Now convert it back to Unix-style (cygpath)
20030      input_path=`$CYGPATH -u "$shortmode_path"`
20031      new_path="$input_path"
20032    fi
20033  fi
20034
20035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20036  if test "x$test_cygdrive_prefix" = x; then
20037    # As a simple fix, exclude /usr/bin since it's not a real path.
20038    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20040      # a path prefixed by /cygdrive for fixpath to work.
20041      new_path="$CYGWIN_ROOT_PATH$input_path"
20042    fi
20043  fi
20044
20045  # remove trailing .exe if any
20046  new_path="${new_path/%.exe/}"
20047
20048    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20049
20050  # First separate the path from the arguments. This will split at the first
20051  # space.
20052  complete="$FOUND_MAKE"
20053  path="${complete%% *}"
20054  tmp="$complete EOL"
20055  arguments="${tmp#* }"
20056
20057  # Input might be given as Windows format, start by converting to
20058  # unix format.
20059  new_path="$path"
20060
20061  windows_path="$new_path"
20062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20063    unix_path=`$CYGPATH -u "$windows_path"`
20064    new_path="$unix_path"
20065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20067    new_path="$unix_path"
20068  fi
20069
20070
20071  # Now try to locate executable using which
20072  new_path=`$WHICH "$new_path" 2> /dev/null`
20073
20074  if test "x$new_path" = x; then
20075    # Oops. Which didn't find the executable.
20076    # The splitting of arguments from the executable at a space might have been incorrect,
20077    # since paths with space are more likely in Windows. Give it another try with the whole
20078    # argument.
20079    path="$complete"
20080    arguments="EOL"
20081    new_path="$path"
20082
20083  windows_path="$new_path"
20084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20085    unix_path=`$CYGPATH -u "$windows_path"`
20086    new_path="$unix_path"
20087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20089    new_path="$unix_path"
20090  fi
20091
20092
20093    new_path=`$WHICH "$new_path" 2> /dev/null`
20094    # bat and cmd files are not always considered executable in MSYS causing which
20095    # to not find them
20096    if test "x$new_path" = x \
20097        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20098        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20099      new_path="$path"
20100
20101  windows_path="$new_path"
20102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20103    unix_path=`$CYGPATH -u "$windows_path"`
20104    new_path="$unix_path"
20105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20107    new_path="$unix_path"
20108  fi
20109
20110    fi
20111
20112    if test "x$new_path" = x; then
20113      # It's still not found. Now this is an unrecoverable error.
20114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20115$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20116      has_space=`$ECHO "$complete" | $GREP " "`
20117      if test "x$has_space" != x; then
20118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20120      fi
20121      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20122    fi
20123  fi
20124
20125  # Now new_path has a complete unix path to the binary
20126  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20127    # Keep paths in /bin as-is, but remove trailing .exe if any
20128    new_path="${new_path/%.exe/}"
20129    # Do not save /bin paths to all_fixpath_prefixes!
20130  else
20131    # Not in mixed or Windows style, start by that.
20132    new_path=`cmd //c echo $new_path`
20133
20134  input_path="$new_path"
20135  # Check if we need to convert this using DOS-style short mode. If the path
20136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20137  # take no chances and rewrite it.
20138  # Note: m4 eats our [], so we need to use [ and ] instead.
20139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20140  if test "x$has_forbidden_chars" != x; then
20141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20143  fi
20144
20145    # Output is in $new_path
20146
20147  windows_path="$new_path"
20148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20149    unix_path=`$CYGPATH -u "$windows_path"`
20150    new_path="$unix_path"
20151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20153    new_path="$unix_path"
20154  fi
20155
20156    # remove trailing .exe if any
20157    new_path="${new_path/%.exe/}"
20158
20159    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20160    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20161  fi
20162
20163    else
20164      # We're on a unix platform. Hooray! :)
20165      # First separate the path from the arguments. This will split at the first
20166      # space.
20167      complete="$FOUND_MAKE"
20168      path="${complete%% *}"
20169      tmp="$complete EOL"
20170      arguments="${tmp#* }"
20171
20172      # Cannot rely on the command "which" here since it doesn't always work.
20173      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20174      if test -z "$is_absolute_path"; then
20175        # Path to executable is not absolute. Find it.
20176        IFS_save="$IFS"
20177        IFS=:
20178        for p in $PATH; do
20179          if test -f "$p/$path" && test -x "$p/$path"; then
20180            new_path="$p/$path"
20181            break
20182          fi
20183        done
20184        IFS="$IFS_save"
20185      else
20186        # This is an absolute path, we can use it without further modifications.
20187        new_path="$path"
20188      fi
20189
20190      if test "x$new_path" = x; then
20191        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20192$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20193        has_space=`$ECHO "$complete" | $GREP " "`
20194        if test "x$has_space" != x; then
20195          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20196$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20197        fi
20198        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20199      fi
20200    fi
20201
20202    # Now join together the path and the arguments once again
20203    if test "x$arguments" != xEOL; then
20204      new_complete="$new_path ${arguments% *}"
20205    else
20206      new_complete="$new_path"
20207    fi
20208
20209    if test "x$complete" != "x$new_complete"; then
20210      FOUND_MAKE="$new_complete"
20211      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20212$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20213    fi
20214  fi
20215
20216        fi
20217      fi
20218    fi
20219  fi
20220
20221    fi
20222
20223    if test "x$FOUND_MAKE" = x; then
20224      if test "x$TOOLCHAIN_PATH" != x; then
20225        # We have a toolchain path, check that as well before giving up.
20226        OLD_PATH=$PATH
20227        PATH=$TOOLCHAIN_PATH:$PATH
20228        for ac_prog in gmake
20229do
20230  # Extract the first word of "$ac_prog", so it can be a program name with args.
20231set dummy $ac_prog; ac_word=$2
20232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20233$as_echo_n "checking for $ac_word... " >&6; }
20234if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20235  $as_echo_n "(cached) " >&6
20236else
20237  case $CHECK_TOOLSDIR_GMAKE in
20238  [\\/]* | ?:[\\/]*)
20239  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20240  ;;
20241  *)
20242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20243for as_dir in $PATH
20244do
20245  IFS=$as_save_IFS
20246  test -z "$as_dir" && as_dir=.
20247    for ac_exec_ext in '' $ac_executable_extensions; do
20248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20249    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20251    break 2
20252  fi
20253done
20254  done
20255IFS=$as_save_IFS
20256
20257  ;;
20258esac
20259fi
20260CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20261if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20263$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20264else
20265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20266$as_echo "no" >&6; }
20267fi
20268
20269
20270  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20271done
20272
20273
20274  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20275  DESCRIPTION="gmake in tools-dir"
20276
20277  # On Cygwin, we require a newer version of make than on other platforms
20278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20279    MAKE_VERSION_EXPR="-e 4\."
20280    MAKE_REQUIRED_VERSION="4.0"
20281   else
20282    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20283    MAKE_REQUIRED_VERSION="3.81"
20284  fi
20285
20286  if test "x$MAKE_CANDIDATE" != x; then
20287    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20288$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20289    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20290    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20291    if test "x$IS_GNU_MAKE" = x; then
20292      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20293$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20294    else
20295      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20296      if test "x$IS_MODERN_MAKE" = x; then
20297        { $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
20298$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;}
20299      else
20300        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20301          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20302            MAKE_EXPECTED_ENV='cygwin'
20303          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20304            MAKE_EXPECTED_ENV='msys'
20305          else
20306            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20307          fi
20308          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20309          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20310        else
20311          # Not relevant for non-Windows
20312          IS_MAKE_CORRECT_ENV=true
20313        fi
20314        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20315          { $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
20316$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;}
20317        else
20318          FOUND_MAKE=$MAKE_CANDIDATE
20319
20320  # Only process if variable expands to non-empty
20321
20322  if test "x$FOUND_MAKE" != x; then
20323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20324
20325  # First separate the path from the arguments. This will split at the first
20326  # space.
20327  complete="$FOUND_MAKE"
20328  path="${complete%% *}"
20329  tmp="$complete EOL"
20330  arguments="${tmp#* }"
20331
20332  # Input might be given as Windows format, start by converting to
20333  # unix format.
20334  new_path=`$CYGPATH -u "$path"`
20335
20336  # Now try to locate executable using which
20337  new_path=`$WHICH "$new_path" 2> /dev/null`
20338  # bat and cmd files are not always considered executable in cygwin causing which
20339  # to not find them
20340  if test "x$new_path" = x \
20341      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20342      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20343    new_path=`$CYGPATH -u "$path"`
20344  fi
20345  if test "x$new_path" = x; then
20346    # Oops. Which didn't find the executable.
20347    # The splitting of arguments from the executable at a space might have been incorrect,
20348    # since paths with space are more likely in Windows. Give it another try with the whole
20349    # argument.
20350    path="$complete"
20351    arguments="EOL"
20352    new_path=`$CYGPATH -u "$path"`
20353    new_path=`$WHICH "$new_path" 2> /dev/null`
20354    # bat and cmd files are not always considered executable in cygwin causing which
20355    # to not find them
20356    if test "x$new_path" = x \
20357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20359      new_path=`$CYGPATH -u "$path"`
20360    fi
20361    if test "x$new_path" = x; then
20362      # It's still not found. Now this is an unrecoverable error.
20363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20364$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20365      has_space=`$ECHO "$complete" | $GREP " "`
20366      if test "x$has_space" != x; then
20367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20369      fi
20370      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20371    fi
20372  fi
20373
20374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20377  # "foo.exe" is OK but "foo" is an error.
20378  #
20379  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20380  # It is also a way to make sure we got the proper file name for the real test later on.
20381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20382  if test "x$test_shortpath" = x; then
20383    # Short path failed, file does not exist as specified.
20384    # Try adding .exe or .cmd
20385    if test -f "${new_path}.exe"; then
20386      input_to_shortpath="${new_path}.exe"
20387    elif test -f "${new_path}.cmd"; then
20388      input_to_shortpath="${new_path}.cmd"
20389    else
20390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20391$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20392      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20393$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20394      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20395    fi
20396  else
20397    input_to_shortpath="$new_path"
20398  fi
20399
20400  # Call helper function which possibly converts this using DOS-style short mode.
20401  # If so, the updated path is stored in $new_path.
20402  new_path="$input_to_shortpath"
20403
20404  input_path="$input_to_shortpath"
20405  # Check if we need to convert this using DOS-style short mode. If the path
20406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20407  # take no chances and rewrite it.
20408  # Note: m4 eats our [], so we need to use [ and ] instead.
20409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20410  if test "x$has_forbidden_chars" != x; then
20411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20415      # Going to short mode and back again did indeed matter. Since short mode is
20416      # case insensitive, let's make it lowercase to improve readability.
20417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20418      # Now convert it back to Unix-style (cygpath)
20419      input_path=`$CYGPATH -u "$shortmode_path"`
20420      new_path="$input_path"
20421    fi
20422  fi
20423
20424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20425  if test "x$test_cygdrive_prefix" = x; then
20426    # As a simple fix, exclude /usr/bin since it's not a real path.
20427    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20429      # a path prefixed by /cygdrive for fixpath to work.
20430      new_path="$CYGWIN_ROOT_PATH$input_path"
20431    fi
20432  fi
20433
20434  # remove trailing .exe if any
20435  new_path="${new_path/%.exe/}"
20436
20437    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20438
20439  # First separate the path from the arguments. This will split at the first
20440  # space.
20441  complete="$FOUND_MAKE"
20442  path="${complete%% *}"
20443  tmp="$complete EOL"
20444  arguments="${tmp#* }"
20445
20446  # Input might be given as Windows format, start by converting to
20447  # unix format.
20448  new_path="$path"
20449
20450  windows_path="$new_path"
20451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20452    unix_path=`$CYGPATH -u "$windows_path"`
20453    new_path="$unix_path"
20454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20456    new_path="$unix_path"
20457  fi
20458
20459
20460  # Now try to locate executable using which
20461  new_path=`$WHICH "$new_path" 2> /dev/null`
20462
20463  if test "x$new_path" = x; then
20464    # Oops. Which didn't find the executable.
20465    # The splitting of arguments from the executable at a space might have been incorrect,
20466    # since paths with space are more likely in Windows. Give it another try with the whole
20467    # argument.
20468    path="$complete"
20469    arguments="EOL"
20470    new_path="$path"
20471
20472  windows_path="$new_path"
20473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20474    unix_path=`$CYGPATH -u "$windows_path"`
20475    new_path="$unix_path"
20476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20478    new_path="$unix_path"
20479  fi
20480
20481
20482    new_path=`$WHICH "$new_path" 2> /dev/null`
20483    # bat and cmd files are not always considered executable in MSYS causing which
20484    # to not find them
20485    if test "x$new_path" = x \
20486        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20487        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20488      new_path="$path"
20489
20490  windows_path="$new_path"
20491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20492    unix_path=`$CYGPATH -u "$windows_path"`
20493    new_path="$unix_path"
20494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20496    new_path="$unix_path"
20497  fi
20498
20499    fi
20500
20501    if test "x$new_path" = x; then
20502      # It's still not found. Now this is an unrecoverable error.
20503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20504$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20505      has_space=`$ECHO "$complete" | $GREP " "`
20506      if test "x$has_space" != x; then
20507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20509      fi
20510      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20511    fi
20512  fi
20513
20514  # Now new_path has a complete unix path to the binary
20515  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20516    # Keep paths in /bin as-is, but remove trailing .exe if any
20517    new_path="${new_path/%.exe/}"
20518    # Do not save /bin paths to all_fixpath_prefixes!
20519  else
20520    # Not in mixed or Windows style, start by that.
20521    new_path=`cmd //c echo $new_path`
20522
20523  input_path="$new_path"
20524  # Check if we need to convert this using DOS-style short mode. If the path
20525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20526  # take no chances and rewrite it.
20527  # Note: m4 eats our [], so we need to use [ and ] instead.
20528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20529  if test "x$has_forbidden_chars" != x; then
20530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20532  fi
20533
20534    # Output is in $new_path
20535
20536  windows_path="$new_path"
20537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20538    unix_path=`$CYGPATH -u "$windows_path"`
20539    new_path="$unix_path"
20540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20542    new_path="$unix_path"
20543  fi
20544
20545    # remove trailing .exe if any
20546    new_path="${new_path/%.exe/}"
20547
20548    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20549    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20550  fi
20551
20552    else
20553      # We're on a unix platform. Hooray! :)
20554      # First separate the path from the arguments. This will split at the first
20555      # space.
20556      complete="$FOUND_MAKE"
20557      path="${complete%% *}"
20558      tmp="$complete EOL"
20559      arguments="${tmp#* }"
20560
20561      # Cannot rely on the command "which" here since it doesn't always work.
20562      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20563      if test -z "$is_absolute_path"; then
20564        # Path to executable is not absolute. Find it.
20565        IFS_save="$IFS"
20566        IFS=:
20567        for p in $PATH; do
20568          if test -f "$p/$path" && test -x "$p/$path"; then
20569            new_path="$p/$path"
20570            break
20571          fi
20572        done
20573        IFS="$IFS_save"
20574      else
20575        # This is an absolute path, we can use it without further modifications.
20576        new_path="$path"
20577      fi
20578
20579      if test "x$new_path" = x; then
20580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20581$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20582        has_space=`$ECHO "$complete" | $GREP " "`
20583        if test "x$has_space" != x; then
20584          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20585$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20586        fi
20587        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20588      fi
20589    fi
20590
20591    # Now join together the path and the arguments once again
20592    if test "x$arguments" != xEOL; then
20593      new_complete="$new_path ${arguments% *}"
20594    else
20595      new_complete="$new_path"
20596    fi
20597
20598    if test "x$complete" != "x$new_complete"; then
20599      FOUND_MAKE="$new_complete"
20600      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20601$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20602    fi
20603  fi
20604
20605        fi
20606      fi
20607    fi
20608  fi
20609
20610        if test "x$FOUND_MAKE" = x; then
20611          for ac_prog in make
20612do
20613  # Extract the first word of "$ac_prog", so it can be a program name with args.
20614set dummy $ac_prog; ac_word=$2
20615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20616$as_echo_n "checking for $ac_word... " >&6; }
20617if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20618  $as_echo_n "(cached) " >&6
20619else
20620  case $CHECK_TOOLSDIR_MAKE in
20621  [\\/]* | ?:[\\/]*)
20622  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20623  ;;
20624  *)
20625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20626for as_dir in $PATH
20627do
20628  IFS=$as_save_IFS
20629  test -z "$as_dir" && as_dir=.
20630    for ac_exec_ext in '' $ac_executable_extensions; do
20631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20632    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20634    break 2
20635  fi
20636done
20637  done
20638IFS=$as_save_IFS
20639
20640  ;;
20641esac
20642fi
20643CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20644if test -n "$CHECK_TOOLSDIR_MAKE"; then
20645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20646$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20647else
20648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20649$as_echo "no" >&6; }
20650fi
20651
20652
20653  test -n "$CHECK_TOOLSDIR_MAKE" && break
20654done
20655
20656
20657  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20658  DESCRIPTION="make in tools-dir"
20659
20660  # On Cygwin, we require a newer version of make than on other platforms
20661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20662    MAKE_VERSION_EXPR="-e 4\."
20663    MAKE_REQUIRED_VERSION="4.0"
20664   else
20665    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20666    MAKE_REQUIRED_VERSION="3.81"
20667  fi
20668
20669  if test "x$MAKE_CANDIDATE" != x; then
20670    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20671$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20672    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20673    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20674    if test "x$IS_GNU_MAKE" = x; then
20675      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20676$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20677    else
20678      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20679      if test "x$IS_MODERN_MAKE" = x; then
20680        { $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
20681$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;}
20682      else
20683        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20684          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20685            MAKE_EXPECTED_ENV='cygwin'
20686          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20687            MAKE_EXPECTED_ENV='msys'
20688          else
20689            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20690          fi
20691          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20692          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20693        else
20694          # Not relevant for non-Windows
20695          IS_MAKE_CORRECT_ENV=true
20696        fi
20697        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20698          { $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
20699$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;}
20700        else
20701          FOUND_MAKE=$MAKE_CANDIDATE
20702
20703  # Only process if variable expands to non-empty
20704
20705  if test "x$FOUND_MAKE" != x; then
20706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20707
20708  # First separate the path from the arguments. This will split at the first
20709  # space.
20710  complete="$FOUND_MAKE"
20711  path="${complete%% *}"
20712  tmp="$complete EOL"
20713  arguments="${tmp#* }"
20714
20715  # Input might be given as Windows format, start by converting to
20716  # unix format.
20717  new_path=`$CYGPATH -u "$path"`
20718
20719  # Now try to locate executable using which
20720  new_path=`$WHICH "$new_path" 2> /dev/null`
20721  # bat and cmd files are not always considered executable in cygwin causing which
20722  # to not find them
20723  if test "x$new_path" = x \
20724      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20725      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20726    new_path=`$CYGPATH -u "$path"`
20727  fi
20728  if test "x$new_path" = x; then
20729    # Oops. Which didn't find the executable.
20730    # The splitting of arguments from the executable at a space might have been incorrect,
20731    # since paths with space are more likely in Windows. Give it another try with the whole
20732    # argument.
20733    path="$complete"
20734    arguments="EOL"
20735    new_path=`$CYGPATH -u "$path"`
20736    new_path=`$WHICH "$new_path" 2> /dev/null`
20737    # bat and cmd files are not always considered executable in cygwin causing which
20738    # to not find them
20739    if test "x$new_path" = x \
20740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20742      new_path=`$CYGPATH -u "$path"`
20743    fi
20744    if test "x$new_path" = x; then
20745      # It's still not found. Now this is an unrecoverable error.
20746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20747$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20748      has_space=`$ECHO "$complete" | $GREP " "`
20749      if test "x$has_space" != x; then
20750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20752      fi
20753      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20754    fi
20755  fi
20756
20757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20760  # "foo.exe" is OK but "foo" is an error.
20761  #
20762  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20763  # It is also a way to make sure we got the proper file name for the real test later on.
20764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20765  if test "x$test_shortpath" = x; then
20766    # Short path failed, file does not exist as specified.
20767    # Try adding .exe or .cmd
20768    if test -f "${new_path}.exe"; then
20769      input_to_shortpath="${new_path}.exe"
20770    elif test -f "${new_path}.cmd"; then
20771      input_to_shortpath="${new_path}.cmd"
20772    else
20773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20774$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20775      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20776$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20777      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20778    fi
20779  else
20780    input_to_shortpath="$new_path"
20781  fi
20782
20783  # Call helper function which possibly converts this using DOS-style short mode.
20784  # If so, the updated path is stored in $new_path.
20785  new_path="$input_to_shortpath"
20786
20787  input_path="$input_to_shortpath"
20788  # Check if we need to convert this using DOS-style short mode. If the path
20789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20790  # take no chances and rewrite it.
20791  # Note: m4 eats our [], so we need to use [ and ] instead.
20792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20793  if test "x$has_forbidden_chars" != x; then
20794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20798      # Going to short mode and back again did indeed matter. Since short mode is
20799      # case insensitive, let's make it lowercase to improve readability.
20800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20801      # Now convert it back to Unix-style (cygpath)
20802      input_path=`$CYGPATH -u "$shortmode_path"`
20803      new_path="$input_path"
20804    fi
20805  fi
20806
20807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20808  if test "x$test_cygdrive_prefix" = x; then
20809    # As a simple fix, exclude /usr/bin since it's not a real path.
20810    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20812      # a path prefixed by /cygdrive for fixpath to work.
20813      new_path="$CYGWIN_ROOT_PATH$input_path"
20814    fi
20815  fi
20816
20817  # remove trailing .exe if any
20818  new_path="${new_path/%.exe/}"
20819
20820    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20821
20822  # First separate the path from the arguments. This will split at the first
20823  # space.
20824  complete="$FOUND_MAKE"
20825  path="${complete%% *}"
20826  tmp="$complete EOL"
20827  arguments="${tmp#* }"
20828
20829  # Input might be given as Windows format, start by converting to
20830  # unix format.
20831  new_path="$path"
20832
20833  windows_path="$new_path"
20834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20835    unix_path=`$CYGPATH -u "$windows_path"`
20836    new_path="$unix_path"
20837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20839    new_path="$unix_path"
20840  fi
20841
20842
20843  # Now try to locate executable using which
20844  new_path=`$WHICH "$new_path" 2> /dev/null`
20845
20846  if test "x$new_path" = x; then
20847    # Oops. Which didn't find the executable.
20848    # The splitting of arguments from the executable at a space might have been incorrect,
20849    # since paths with space are more likely in Windows. Give it another try with the whole
20850    # argument.
20851    path="$complete"
20852    arguments="EOL"
20853    new_path="$path"
20854
20855  windows_path="$new_path"
20856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20857    unix_path=`$CYGPATH -u "$windows_path"`
20858    new_path="$unix_path"
20859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20861    new_path="$unix_path"
20862  fi
20863
20864
20865    new_path=`$WHICH "$new_path" 2> /dev/null`
20866    # bat and cmd files are not always considered executable in MSYS causing which
20867    # to not find them
20868    if test "x$new_path" = x \
20869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20871      new_path="$path"
20872
20873  windows_path="$new_path"
20874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20875    unix_path=`$CYGPATH -u "$windows_path"`
20876    new_path="$unix_path"
20877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20879    new_path="$unix_path"
20880  fi
20881
20882    fi
20883
20884    if test "x$new_path" = x; then
20885      # It's still not found. Now this is an unrecoverable error.
20886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20887$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20888      has_space=`$ECHO "$complete" | $GREP " "`
20889      if test "x$has_space" != x; then
20890        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20891$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20892      fi
20893      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20894    fi
20895  fi
20896
20897  # Now new_path has a complete unix path to the binary
20898  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20899    # Keep paths in /bin as-is, but remove trailing .exe if any
20900    new_path="${new_path/%.exe/}"
20901    # Do not save /bin paths to all_fixpath_prefixes!
20902  else
20903    # Not in mixed or Windows style, start by that.
20904    new_path=`cmd //c echo $new_path`
20905
20906  input_path="$new_path"
20907  # Check if we need to convert this using DOS-style short mode. If the path
20908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20909  # take no chances and rewrite it.
20910  # Note: m4 eats our [], so we need to use [ and ] instead.
20911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20912  if test "x$has_forbidden_chars" != x; then
20913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20915  fi
20916
20917    # Output is in $new_path
20918
20919  windows_path="$new_path"
20920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20921    unix_path=`$CYGPATH -u "$windows_path"`
20922    new_path="$unix_path"
20923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20925    new_path="$unix_path"
20926  fi
20927
20928    # remove trailing .exe if any
20929    new_path="${new_path/%.exe/}"
20930
20931    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20932    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20933  fi
20934
20935    else
20936      # We're on a unix platform. Hooray! :)
20937      # First separate the path from the arguments. This will split at the first
20938      # space.
20939      complete="$FOUND_MAKE"
20940      path="${complete%% *}"
20941      tmp="$complete EOL"
20942      arguments="${tmp#* }"
20943
20944      # Cannot rely on the command "which" here since it doesn't always work.
20945      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20946      if test -z "$is_absolute_path"; then
20947        # Path to executable is not absolute. Find it.
20948        IFS_save="$IFS"
20949        IFS=:
20950        for p in $PATH; do
20951          if test -f "$p/$path" && test -x "$p/$path"; then
20952            new_path="$p/$path"
20953            break
20954          fi
20955        done
20956        IFS="$IFS_save"
20957      else
20958        # This is an absolute path, we can use it without further modifications.
20959        new_path="$path"
20960      fi
20961
20962      if test "x$new_path" = x; then
20963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20964$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20965        has_space=`$ECHO "$complete" | $GREP " "`
20966        if test "x$has_space" != x; then
20967          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20968$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20969        fi
20970        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20971      fi
20972    fi
20973
20974    # Now join together the path and the arguments once again
20975    if test "x$arguments" != xEOL; then
20976      new_complete="$new_path ${arguments% *}"
20977    else
20978      new_complete="$new_path"
20979    fi
20980
20981    if test "x$complete" != "x$new_complete"; then
20982      FOUND_MAKE="$new_complete"
20983      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20984$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20985    fi
20986  fi
20987
20988        fi
20989      fi
20990    fi
20991  fi
20992
20993        fi
20994        PATH=$OLD_PATH
20995      fi
20996    fi
20997
20998    if test "x$FOUND_MAKE" = x; then
20999      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
21000    fi
21001
21002    else
21003      # If it succeeded, then it was overridden by the user. We will use it
21004      # for the tool.
21005
21006      # First remove it from the list of overridden variables, so we can test
21007      # for unknown variables in the end.
21008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21009
21010      # Check if we try to supply an empty value
21011      if test "x$MAKE" = x; then
21012        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
21013$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
21014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21015$as_echo_n "checking for MAKE... " >&6; }
21016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21017$as_echo "disabled" >&6; }
21018      else
21019        # Check if the provided tool contains a complete path.
21020        tool_specified="$MAKE"
21021        tool_basename="${tool_specified##*/}"
21022        if test "x$tool_basename" = "x$tool_specified"; then
21023          # A command without a complete path is provided, search $PATH.
21024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
21025$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
21026          # Extract the first word of "$tool_basename", so it can be a program name with args.
21027set dummy $tool_basename; ac_word=$2
21028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21029$as_echo_n "checking for $ac_word... " >&6; }
21030if ${ac_cv_path_MAKE+:} false; then :
21031  $as_echo_n "(cached) " >&6
21032else
21033  case $MAKE in
21034  [\\/]* | ?:[\\/]*)
21035  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
21036  ;;
21037  *)
21038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21039for as_dir in $PATH
21040do
21041  IFS=$as_save_IFS
21042  test -z "$as_dir" && as_dir=.
21043    for ac_exec_ext in '' $ac_executable_extensions; do
21044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21045    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
21046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21047    break 2
21048  fi
21049done
21050  done
21051IFS=$as_save_IFS
21052
21053  ;;
21054esac
21055fi
21056MAKE=$ac_cv_path_MAKE
21057if test -n "$MAKE"; then
21058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
21059$as_echo "$MAKE" >&6; }
21060else
21061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21062$as_echo "no" >&6; }
21063fi
21064
21065
21066          if test "x$MAKE" = x; then
21067            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21068          fi
21069        else
21070          # Otherwise we believe it is a complete path. Use it as it is.
21071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
21072$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
21073          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21074$as_echo_n "checking for MAKE... " >&6; }
21075          if test ! -x "$tool_specified"; then
21076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21077$as_echo "not found" >&6; }
21078            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
21079          fi
21080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21081$as_echo "$tool_specified" >&6; }
21082        fi
21083      fi
21084    fi
21085
21086    # If MAKE was set by user, verify the version
21087
21088  MAKE_CANDIDATE=""$MAKE""
21089  DESCRIPTION="user supplied MAKE=$MAKE"
21090
21091  # On Cygwin, we require a newer version of make than on other platforms
21092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21093    MAKE_VERSION_EXPR="-e 4\."
21094    MAKE_REQUIRED_VERSION="4.0"
21095   else
21096    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21097    MAKE_REQUIRED_VERSION="3.81"
21098  fi
21099
21100  if test "x$MAKE_CANDIDATE" != x; then
21101    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21102$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21103    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21104    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21105    if test "x$IS_GNU_MAKE" = x; then
21106      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21107$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21108    else
21109      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21110      if test "x$IS_MODERN_MAKE" = x; then
21111        { $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
21112$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;}
21113      else
21114        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21115          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21116            MAKE_EXPECTED_ENV='cygwin'
21117          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21118            MAKE_EXPECTED_ENV='msys'
21119          else
21120            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21121          fi
21122          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21123          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21124        else
21125          # Not relevant for non-Windows
21126          IS_MAKE_CORRECT_ENV=true
21127        fi
21128        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21129          { $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
21130$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;}
21131        else
21132          FOUND_MAKE=$MAKE_CANDIDATE
21133
21134  # Only process if variable expands to non-empty
21135
21136  if test "x$FOUND_MAKE" != x; then
21137    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21138
21139  # First separate the path from the arguments. This will split at the first
21140  # space.
21141  complete="$FOUND_MAKE"
21142  path="${complete%% *}"
21143  tmp="$complete EOL"
21144  arguments="${tmp#* }"
21145
21146  # Input might be given as Windows format, start by converting to
21147  # unix format.
21148  new_path=`$CYGPATH -u "$path"`
21149
21150  # Now try to locate executable using which
21151  new_path=`$WHICH "$new_path" 2> /dev/null`
21152  # bat and cmd files are not always considered executable in cygwin causing which
21153  # to not find them
21154  if test "x$new_path" = x \
21155      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21156      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21157    new_path=`$CYGPATH -u "$path"`
21158  fi
21159  if test "x$new_path" = x; then
21160    # Oops. Which didn't find the executable.
21161    # The splitting of arguments from the executable at a space might have been incorrect,
21162    # since paths with space are more likely in Windows. Give it another try with the whole
21163    # argument.
21164    path="$complete"
21165    arguments="EOL"
21166    new_path=`$CYGPATH -u "$path"`
21167    new_path=`$WHICH "$new_path" 2> /dev/null`
21168    # bat and cmd files are not always considered executable in cygwin causing which
21169    # to not find them
21170    if test "x$new_path" = x \
21171        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21172        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21173      new_path=`$CYGPATH -u "$path"`
21174    fi
21175    if test "x$new_path" = x; then
21176      # It's still not found. Now this is an unrecoverable error.
21177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21178$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21179      has_space=`$ECHO "$complete" | $GREP " "`
21180      if test "x$has_space" != x; then
21181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21183      fi
21184      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21185    fi
21186  fi
21187
21188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21191  # "foo.exe" is OK but "foo" is an error.
21192  #
21193  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21194  # It is also a way to make sure we got the proper file name for the real test later on.
21195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21196  if test "x$test_shortpath" = x; then
21197    # Short path failed, file does not exist as specified.
21198    # Try adding .exe or .cmd
21199    if test -f "${new_path}.exe"; then
21200      input_to_shortpath="${new_path}.exe"
21201    elif test -f "${new_path}.cmd"; then
21202      input_to_shortpath="${new_path}.cmd"
21203    else
21204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21205$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21206      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21207$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21208      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21209    fi
21210  else
21211    input_to_shortpath="$new_path"
21212  fi
21213
21214  # Call helper function which possibly converts this using DOS-style short mode.
21215  # If so, the updated path is stored in $new_path.
21216  new_path="$input_to_shortpath"
21217
21218  input_path="$input_to_shortpath"
21219  # Check if we need to convert this using DOS-style short mode. If the path
21220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21221  # take no chances and rewrite it.
21222  # Note: m4 eats our [], so we need to use [ and ] instead.
21223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21224  if test "x$has_forbidden_chars" != x; then
21225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21229      # Going to short mode and back again did indeed matter. Since short mode is
21230      # case insensitive, let's make it lowercase to improve readability.
21231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21232      # Now convert it back to Unix-style (cygpath)
21233      input_path=`$CYGPATH -u "$shortmode_path"`
21234      new_path="$input_path"
21235    fi
21236  fi
21237
21238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21239  if test "x$test_cygdrive_prefix" = x; then
21240    # As a simple fix, exclude /usr/bin since it's not a real path.
21241    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21243      # a path prefixed by /cygdrive for fixpath to work.
21244      new_path="$CYGWIN_ROOT_PATH$input_path"
21245    fi
21246  fi
21247
21248  # remove trailing .exe if any
21249  new_path="${new_path/%.exe/}"
21250
21251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21252
21253  # First separate the path from the arguments. This will split at the first
21254  # space.
21255  complete="$FOUND_MAKE"
21256  path="${complete%% *}"
21257  tmp="$complete EOL"
21258  arguments="${tmp#* }"
21259
21260  # Input might be given as Windows format, start by converting to
21261  # unix format.
21262  new_path="$path"
21263
21264  windows_path="$new_path"
21265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21266    unix_path=`$CYGPATH -u "$windows_path"`
21267    new_path="$unix_path"
21268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21270    new_path="$unix_path"
21271  fi
21272
21273
21274  # Now try to locate executable using which
21275  new_path=`$WHICH "$new_path" 2> /dev/null`
21276
21277  if test "x$new_path" = x; then
21278    # Oops. Which didn't find the executable.
21279    # The splitting of arguments from the executable at a space might have been incorrect,
21280    # since paths with space are more likely in Windows. Give it another try with the whole
21281    # argument.
21282    path="$complete"
21283    arguments="EOL"
21284    new_path="$path"
21285
21286  windows_path="$new_path"
21287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21288    unix_path=`$CYGPATH -u "$windows_path"`
21289    new_path="$unix_path"
21290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21292    new_path="$unix_path"
21293  fi
21294
21295
21296    new_path=`$WHICH "$new_path" 2> /dev/null`
21297    # bat and cmd files are not always considered executable in MSYS causing which
21298    # to not find them
21299    if test "x$new_path" = x \
21300        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21301        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21302      new_path="$path"
21303
21304  windows_path="$new_path"
21305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21306    unix_path=`$CYGPATH -u "$windows_path"`
21307    new_path="$unix_path"
21308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21310    new_path="$unix_path"
21311  fi
21312
21313    fi
21314
21315    if test "x$new_path" = x; then
21316      # It's still not found. Now this is an unrecoverable error.
21317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21318$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21319      has_space=`$ECHO "$complete" | $GREP " "`
21320      if test "x$has_space" != x; then
21321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21323      fi
21324      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21325    fi
21326  fi
21327
21328  # Now new_path has a complete unix path to the binary
21329  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21330    # Keep paths in /bin as-is, but remove trailing .exe if any
21331    new_path="${new_path/%.exe/}"
21332    # Do not save /bin paths to all_fixpath_prefixes!
21333  else
21334    # Not in mixed or Windows style, start by that.
21335    new_path=`cmd //c echo $new_path`
21336
21337  input_path="$new_path"
21338  # Check if we need to convert this using DOS-style short mode. If the path
21339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21340  # take no chances and rewrite it.
21341  # Note: m4 eats our [], so we need to use [ and ] instead.
21342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21343  if test "x$has_forbidden_chars" != x; then
21344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21346  fi
21347
21348    # Output is in $new_path
21349
21350  windows_path="$new_path"
21351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21352    unix_path=`$CYGPATH -u "$windows_path"`
21353    new_path="$unix_path"
21354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21356    new_path="$unix_path"
21357  fi
21358
21359    # remove trailing .exe if any
21360    new_path="${new_path/%.exe/}"
21361
21362    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21363    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21364  fi
21365
21366    else
21367      # We're on a unix platform. Hooray! :)
21368      # First separate the path from the arguments. This will split at the first
21369      # space.
21370      complete="$FOUND_MAKE"
21371      path="${complete%% *}"
21372      tmp="$complete EOL"
21373      arguments="${tmp#* }"
21374
21375      # Cannot rely on the command "which" here since it doesn't always work.
21376      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21377      if test -z "$is_absolute_path"; then
21378        # Path to executable is not absolute. Find it.
21379        IFS_save="$IFS"
21380        IFS=:
21381        for p in $PATH; do
21382          if test -f "$p/$path" && test -x "$p/$path"; then
21383            new_path="$p/$path"
21384            break
21385          fi
21386        done
21387        IFS="$IFS_save"
21388      else
21389        # This is an absolute path, we can use it without further modifications.
21390        new_path="$path"
21391      fi
21392
21393      if test "x$new_path" = x; then
21394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21395$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21396        has_space=`$ECHO "$complete" | $GREP " "`
21397        if test "x$has_space" != x; then
21398          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21399$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21400        fi
21401        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21402      fi
21403    fi
21404
21405    # Now join together the path and the arguments once again
21406    if test "x$arguments" != xEOL; then
21407      new_complete="$new_path ${arguments% *}"
21408    else
21409      new_complete="$new_path"
21410    fi
21411
21412    if test "x$complete" != "x$new_complete"; then
21413      FOUND_MAKE="$new_complete"
21414      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21415$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21416    fi
21417  fi
21418
21419        fi
21420      fi
21421    fi
21422  fi
21423
21424    if test "x$FOUND_MAKE" = x; then
21425      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21426    fi
21427
21428  fi
21429
21430
21431  MAKE=$FOUND_MAKE
21432
21433  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21434$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21435
21436
21437  # Check if make supports the output sync option and if so, setup using it.
21438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21439$as_echo_n "checking if make --output-sync is supported... " >&6; }
21440  if $MAKE --version -O > /dev/null 2>&1; then
21441    OUTPUT_SYNC_SUPPORTED=true
21442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21443$as_echo "yes" >&6; }
21444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21445$as_echo_n "checking for output-sync value... " >&6; }
21446
21447# Check whether --with-output-sync was given.
21448if test "${with_output_sync+set}" = set; then :
21449  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21450fi
21451
21452    if test "x$OUTPUT_SYNC" = "x"; then
21453      OUTPUT_SYNC=none
21454    fi
21455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21456$as_echo "$OUTPUT_SYNC" >&6; }
21457    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21458      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21459    fi
21460  else
21461    OUTPUT_SYNC_SUPPORTED=false
21462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21463$as_echo "no" >&6; }
21464  fi
21465
21466
21467
21468
21469
21470
21471  # Test if find supports -delete
21472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21473$as_echo_n "checking if find supports -delete... " >&6; }
21474  FIND_DELETE="-delete"
21475
21476  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21477
21478  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21479
21480  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21481  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21482    # No, it does not.
21483    $RM $DELETEDIR/TestIfFindSupportsDelete
21484    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21485      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21486      FIND_DELETE="-print | $XARGS $RM"
21487    else
21488      FIND_DELETE="-exec $RM \{\} \+"
21489    fi
21490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21491$as_echo "no" >&6; }
21492  else
21493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21494$as_echo "yes" >&6; }
21495  fi
21496  $RMDIR $DELETEDIR
21497
21498
21499
21500  # Test which kind of tar was found
21501  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21502    TAR_TYPE="gnu"
21503  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21504    TAR_TYPE="bsd"
21505  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21506    TAR_TYPE="bsd"
21507  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21508    TAR_TYPE="solaris"
21509  fi
21510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21511$as_echo_n "checking what type of tar was found... " >&6; }
21512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21513$as_echo "$TAR_TYPE" >&6; }
21514
21515  TAR_CREATE_FILE_PARAM=""
21516
21517  if test "x$TAR_TYPE" = "xgnu"; then
21518    TAR_INCLUDE_PARAM="T"
21519    TAR_SUPPORTS_TRANSFORM="true"
21520    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21521      # When using gnu tar for Solaris targets, need to use compatibility mode
21522      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21523    fi
21524  else
21525    TAR_INCLUDE_PARAM="I"
21526    TAR_SUPPORTS_TRANSFORM="false"
21527  fi
21528
21529
21530
21531
21532
21533
21534  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21535  # This is a problem for the grep resident on AIX.
21536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21537$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21538  # Multiple subsequent spaces..
21539  STACK_SPACES='aaa   bbb   ccc'
21540  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21541  # patterns in it.
21542  STACK_LIST=${STACK_SPACES// /$'\n'}
21543  NEEDLE_SPACES='ccc bbb aaa'
21544  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21545  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21546  if test "x$RESULT" == "x"; then
21547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21548$as_echo "yes" >&6; }
21549  else
21550    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21551      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21552    fi
21553    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21554  fi
21555
21556
21557  # These tools might not be installed by default,
21558  # need hint on how to install them.
21559
21560
21561
21562  # Publish this variable in the help.
21563
21564
21565  if [ -z "${UNZIP+x}" ]; then
21566    # The variable is not set by user, try to locate tool using the code snippet
21567    for ac_prog in unzip
21568do
21569  # Extract the first word of "$ac_prog", so it can be a program name with args.
21570set dummy $ac_prog; ac_word=$2
21571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21572$as_echo_n "checking for $ac_word... " >&6; }
21573if ${ac_cv_path_UNZIP+:} false; then :
21574  $as_echo_n "(cached) " >&6
21575else
21576  case $UNZIP in
21577  [\\/]* | ?:[\\/]*)
21578  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21579  ;;
21580  *)
21581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21582for as_dir in $PATH
21583do
21584  IFS=$as_save_IFS
21585  test -z "$as_dir" && as_dir=.
21586    for ac_exec_ext in '' $ac_executable_extensions; do
21587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21588    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21590    break 2
21591  fi
21592done
21593  done
21594IFS=$as_save_IFS
21595
21596  ;;
21597esac
21598fi
21599UNZIP=$ac_cv_path_UNZIP
21600if test -n "$UNZIP"; then
21601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21602$as_echo "$UNZIP" >&6; }
21603else
21604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21605$as_echo "no" >&6; }
21606fi
21607
21608
21609  test -n "$UNZIP" && break
21610done
21611
21612  else
21613    # The variable is set, but is it from the command line or the environment?
21614
21615    # Try to remove the string !UNZIP! from our list.
21616    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21617    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21618      # If it failed, the variable was not from the command line. Ignore it,
21619      # but warn the user (except for BASH, which is always set by the calling BASH).
21620      if test "xUNZIP" != xBASH; then
21621        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21622$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21623      fi
21624      # Try to locate tool using the code snippet
21625      for ac_prog in unzip
21626do
21627  # Extract the first word of "$ac_prog", so it can be a program name with args.
21628set dummy $ac_prog; ac_word=$2
21629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21630$as_echo_n "checking for $ac_word... " >&6; }
21631if ${ac_cv_path_UNZIP+:} false; then :
21632  $as_echo_n "(cached) " >&6
21633else
21634  case $UNZIP in
21635  [\\/]* | ?:[\\/]*)
21636  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21637  ;;
21638  *)
21639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21640for as_dir in $PATH
21641do
21642  IFS=$as_save_IFS
21643  test -z "$as_dir" && as_dir=.
21644    for ac_exec_ext in '' $ac_executable_extensions; do
21645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21646    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21648    break 2
21649  fi
21650done
21651  done
21652IFS=$as_save_IFS
21653
21654  ;;
21655esac
21656fi
21657UNZIP=$ac_cv_path_UNZIP
21658if test -n "$UNZIP"; then
21659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21660$as_echo "$UNZIP" >&6; }
21661else
21662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21663$as_echo "no" >&6; }
21664fi
21665
21666
21667  test -n "$UNZIP" && break
21668done
21669
21670    else
21671      # If it succeeded, then it was overridden by the user. We will use it
21672      # for the tool.
21673
21674      # First remove it from the list of overridden variables, so we can test
21675      # for unknown variables in the end.
21676      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21677
21678      # Check if we try to supply an empty value
21679      if test "x$UNZIP" = x; then
21680        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21681$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21683$as_echo_n "checking for UNZIP... " >&6; }
21684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21685$as_echo "disabled" >&6; }
21686      else
21687        # Check if the provided tool contains a complete path.
21688        tool_specified="$UNZIP"
21689        tool_basename="${tool_specified##*/}"
21690        if test "x$tool_basename" = "x$tool_specified"; then
21691          # A command without a complete path is provided, search $PATH.
21692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21693$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21694          # Extract the first word of "$tool_basename", so it can be a program name with args.
21695set dummy $tool_basename; ac_word=$2
21696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21697$as_echo_n "checking for $ac_word... " >&6; }
21698if ${ac_cv_path_UNZIP+:} false; then :
21699  $as_echo_n "(cached) " >&6
21700else
21701  case $UNZIP in
21702  [\\/]* | ?:[\\/]*)
21703  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21704  ;;
21705  *)
21706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21707for as_dir in $PATH
21708do
21709  IFS=$as_save_IFS
21710  test -z "$as_dir" && as_dir=.
21711    for ac_exec_ext in '' $ac_executable_extensions; do
21712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21713    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21715    break 2
21716  fi
21717done
21718  done
21719IFS=$as_save_IFS
21720
21721  ;;
21722esac
21723fi
21724UNZIP=$ac_cv_path_UNZIP
21725if test -n "$UNZIP"; then
21726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21727$as_echo "$UNZIP" >&6; }
21728else
21729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21730$as_echo "no" >&6; }
21731fi
21732
21733
21734          if test "x$UNZIP" = x; then
21735            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21736          fi
21737        else
21738          # Otherwise we believe it is a complete path. Use it as it is.
21739          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21740$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21741          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21742$as_echo_n "checking for UNZIP... " >&6; }
21743          if test ! -x "$tool_specified"; then
21744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21745$as_echo "not found" >&6; }
21746            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21747          fi
21748          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21749$as_echo "$tool_specified" >&6; }
21750        fi
21751      fi
21752    fi
21753
21754  fi
21755
21756
21757
21758  if test "x$UNZIP" = x; then
21759    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21760  fi
21761
21762
21763  # Since zip uses "ZIP" as a environment variable for passing options, we need
21764  # to name our variable differently, hence ZIPEXE.
21765
21766
21767
21768  # Publish this variable in the help.
21769
21770
21771  if [ -z "${ZIPEXE+x}" ]; then
21772    # The variable is not set by user, try to locate tool using the code snippet
21773    for ac_prog in zip
21774do
21775  # Extract the first word of "$ac_prog", so it can be a program name with args.
21776set dummy $ac_prog; ac_word=$2
21777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21778$as_echo_n "checking for $ac_word... " >&6; }
21779if ${ac_cv_path_ZIPEXE+:} false; then :
21780  $as_echo_n "(cached) " >&6
21781else
21782  case $ZIPEXE in
21783  [\\/]* | ?:[\\/]*)
21784  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21785  ;;
21786  *)
21787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21788for as_dir in $PATH
21789do
21790  IFS=$as_save_IFS
21791  test -z "$as_dir" && as_dir=.
21792    for ac_exec_ext in '' $ac_executable_extensions; do
21793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21794    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21796    break 2
21797  fi
21798done
21799  done
21800IFS=$as_save_IFS
21801
21802  ;;
21803esac
21804fi
21805ZIPEXE=$ac_cv_path_ZIPEXE
21806if test -n "$ZIPEXE"; then
21807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21808$as_echo "$ZIPEXE" >&6; }
21809else
21810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21811$as_echo "no" >&6; }
21812fi
21813
21814
21815  test -n "$ZIPEXE" && break
21816done
21817
21818  else
21819    # The variable is set, but is it from the command line or the environment?
21820
21821    # Try to remove the string !ZIPEXE! from our list.
21822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21824      # If it failed, the variable was not from the command line. Ignore it,
21825      # but warn the user (except for BASH, which is always set by the calling BASH).
21826      if test "xZIPEXE" != xBASH; then
21827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21828$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21829      fi
21830      # Try to locate tool using the code snippet
21831      for ac_prog in zip
21832do
21833  # Extract the first word of "$ac_prog", so it can be a program name with args.
21834set dummy $ac_prog; ac_word=$2
21835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21836$as_echo_n "checking for $ac_word... " >&6; }
21837if ${ac_cv_path_ZIPEXE+:} false; then :
21838  $as_echo_n "(cached) " >&6
21839else
21840  case $ZIPEXE in
21841  [\\/]* | ?:[\\/]*)
21842  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21843  ;;
21844  *)
21845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21846for as_dir in $PATH
21847do
21848  IFS=$as_save_IFS
21849  test -z "$as_dir" && as_dir=.
21850    for ac_exec_ext in '' $ac_executable_extensions; do
21851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21852    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21854    break 2
21855  fi
21856done
21857  done
21858IFS=$as_save_IFS
21859
21860  ;;
21861esac
21862fi
21863ZIPEXE=$ac_cv_path_ZIPEXE
21864if test -n "$ZIPEXE"; then
21865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21866$as_echo "$ZIPEXE" >&6; }
21867else
21868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21869$as_echo "no" >&6; }
21870fi
21871
21872
21873  test -n "$ZIPEXE" && break
21874done
21875
21876    else
21877      # If it succeeded, then it was overridden by the user. We will use it
21878      # for the tool.
21879
21880      # First remove it from the list of overridden variables, so we can test
21881      # for unknown variables in the end.
21882      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21883
21884      # Check if we try to supply an empty value
21885      if test "x$ZIPEXE" = x; then
21886        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21887$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21888        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21889$as_echo_n "checking for ZIPEXE... " >&6; }
21890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21891$as_echo "disabled" >&6; }
21892      else
21893        # Check if the provided tool contains a complete path.
21894        tool_specified="$ZIPEXE"
21895        tool_basename="${tool_specified##*/}"
21896        if test "x$tool_basename" = "x$tool_specified"; then
21897          # A command without a complete path is provided, search $PATH.
21898          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21899$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21900          # Extract the first word of "$tool_basename", so it can be a program name with args.
21901set dummy $tool_basename; ac_word=$2
21902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21903$as_echo_n "checking for $ac_word... " >&6; }
21904if ${ac_cv_path_ZIPEXE+:} false; then :
21905  $as_echo_n "(cached) " >&6
21906else
21907  case $ZIPEXE in
21908  [\\/]* | ?:[\\/]*)
21909  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21910  ;;
21911  *)
21912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21913for as_dir in $PATH
21914do
21915  IFS=$as_save_IFS
21916  test -z "$as_dir" && as_dir=.
21917    for ac_exec_ext in '' $ac_executable_extensions; do
21918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21919    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21921    break 2
21922  fi
21923done
21924  done
21925IFS=$as_save_IFS
21926
21927  ;;
21928esac
21929fi
21930ZIPEXE=$ac_cv_path_ZIPEXE
21931if test -n "$ZIPEXE"; then
21932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21933$as_echo "$ZIPEXE" >&6; }
21934else
21935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21936$as_echo "no" >&6; }
21937fi
21938
21939
21940          if test "x$ZIPEXE" = x; then
21941            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21942          fi
21943        else
21944          # Otherwise we believe it is a complete path. Use it as it is.
21945          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21946$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21947          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21948$as_echo_n "checking for ZIPEXE... " >&6; }
21949          if test ! -x "$tool_specified"; then
21950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21951$as_echo "not found" >&6; }
21952            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21953          fi
21954          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21955$as_echo "$tool_specified" >&6; }
21956        fi
21957      fi
21958    fi
21959
21960  fi
21961
21962
21963
21964  if test "x$ZIPEXE" = x; then
21965    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21966  fi
21967
21968
21969
21970  # Non-required basic tools
21971
21972
21973
21974  # Publish this variable in the help.
21975
21976
21977  if [ -z "${LDD+x}" ]; then
21978    # The variable is not set by user, try to locate tool using the code snippet
21979    for ac_prog in ldd
21980do
21981  # Extract the first word of "$ac_prog", so it can be a program name with args.
21982set dummy $ac_prog; ac_word=$2
21983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21984$as_echo_n "checking for $ac_word... " >&6; }
21985if ${ac_cv_path_LDD+:} false; then :
21986  $as_echo_n "(cached) " >&6
21987else
21988  case $LDD in
21989  [\\/]* | ?:[\\/]*)
21990  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21991  ;;
21992  *)
21993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21994for as_dir in $PATH
21995do
21996  IFS=$as_save_IFS
21997  test -z "$as_dir" && as_dir=.
21998    for ac_exec_ext in '' $ac_executable_extensions; do
21999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22000    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22002    break 2
22003  fi
22004done
22005  done
22006IFS=$as_save_IFS
22007
22008  ;;
22009esac
22010fi
22011LDD=$ac_cv_path_LDD
22012if test -n "$LDD"; then
22013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22014$as_echo "$LDD" >&6; }
22015else
22016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22017$as_echo "no" >&6; }
22018fi
22019
22020
22021  test -n "$LDD" && break
22022done
22023
22024  else
22025    # The variable is set, but is it from the command line or the environment?
22026
22027    # Try to remove the string !LDD! from our list.
22028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
22029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22030      # If it failed, the variable was not from the command line. Ignore it,
22031      # but warn the user (except for BASH, which is always set by the calling BASH).
22032      if test "xLDD" != xBASH; then
22033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
22034$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
22035      fi
22036      # Try to locate tool using the code snippet
22037      for ac_prog in ldd
22038do
22039  # Extract the first word of "$ac_prog", so it can be a program name with args.
22040set dummy $ac_prog; ac_word=$2
22041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22042$as_echo_n "checking for $ac_word... " >&6; }
22043if ${ac_cv_path_LDD+:} false; then :
22044  $as_echo_n "(cached) " >&6
22045else
22046  case $LDD in
22047  [\\/]* | ?:[\\/]*)
22048  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22049  ;;
22050  *)
22051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22052for as_dir in $PATH
22053do
22054  IFS=$as_save_IFS
22055  test -z "$as_dir" && as_dir=.
22056    for ac_exec_ext in '' $ac_executable_extensions; do
22057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22058    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22060    break 2
22061  fi
22062done
22063  done
22064IFS=$as_save_IFS
22065
22066  ;;
22067esac
22068fi
22069LDD=$ac_cv_path_LDD
22070if test -n "$LDD"; then
22071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22072$as_echo "$LDD" >&6; }
22073else
22074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22075$as_echo "no" >&6; }
22076fi
22077
22078
22079  test -n "$LDD" && break
22080done
22081
22082    else
22083      # If it succeeded, then it was overridden by the user. We will use it
22084      # for the tool.
22085
22086      # First remove it from the list of overridden variables, so we can test
22087      # for unknown variables in the end.
22088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22089
22090      # Check if we try to supply an empty value
22091      if test "x$LDD" = x; then
22092        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22093$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22095$as_echo_n "checking for LDD... " >&6; }
22096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22097$as_echo "disabled" >&6; }
22098      else
22099        # Check if the provided tool contains a complete path.
22100        tool_specified="$LDD"
22101        tool_basename="${tool_specified##*/}"
22102        if test "x$tool_basename" = "x$tool_specified"; then
22103          # A command without a complete path is provided, search $PATH.
22104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22105$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22106          # Extract the first word of "$tool_basename", so it can be a program name with args.
22107set dummy $tool_basename; ac_word=$2
22108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22109$as_echo_n "checking for $ac_word... " >&6; }
22110if ${ac_cv_path_LDD+:} false; then :
22111  $as_echo_n "(cached) " >&6
22112else
22113  case $LDD in
22114  [\\/]* | ?:[\\/]*)
22115  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22116  ;;
22117  *)
22118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22119for as_dir in $PATH
22120do
22121  IFS=$as_save_IFS
22122  test -z "$as_dir" && as_dir=.
22123    for ac_exec_ext in '' $ac_executable_extensions; do
22124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22125    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22127    break 2
22128  fi
22129done
22130  done
22131IFS=$as_save_IFS
22132
22133  ;;
22134esac
22135fi
22136LDD=$ac_cv_path_LDD
22137if test -n "$LDD"; then
22138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22139$as_echo "$LDD" >&6; }
22140else
22141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22142$as_echo "no" >&6; }
22143fi
22144
22145
22146          if test "x$LDD" = x; then
22147            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22148          fi
22149        else
22150          # Otherwise we believe it is a complete path. Use it as it is.
22151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22152$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22153          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22154$as_echo_n "checking for LDD... " >&6; }
22155          if test ! -x "$tool_specified"; then
22156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22157$as_echo "not found" >&6; }
22158            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22159          fi
22160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22161$as_echo "$tool_specified" >&6; }
22162        fi
22163      fi
22164    fi
22165
22166  fi
22167
22168
22169  if test "x$LDD" = "x"; then
22170    # List shared lib dependencies is used for
22171    # debug output and checking for forbidden dependencies.
22172    # We can build without it.
22173    LDD="true"
22174  fi
22175
22176
22177  # Publish this variable in the help.
22178
22179
22180  if [ -z "${OTOOL+x}" ]; then
22181    # The variable is not set by user, try to locate tool using the code snippet
22182    for ac_prog in otool
22183do
22184  # Extract the first word of "$ac_prog", so it can be a program name with args.
22185set dummy $ac_prog; ac_word=$2
22186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22187$as_echo_n "checking for $ac_word... " >&6; }
22188if ${ac_cv_path_OTOOL+:} false; then :
22189  $as_echo_n "(cached) " >&6
22190else
22191  case $OTOOL in
22192  [\\/]* | ?:[\\/]*)
22193  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22194  ;;
22195  *)
22196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22197for as_dir in $PATH
22198do
22199  IFS=$as_save_IFS
22200  test -z "$as_dir" && as_dir=.
22201    for ac_exec_ext in '' $ac_executable_extensions; do
22202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22203    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22205    break 2
22206  fi
22207done
22208  done
22209IFS=$as_save_IFS
22210
22211  ;;
22212esac
22213fi
22214OTOOL=$ac_cv_path_OTOOL
22215if test -n "$OTOOL"; then
22216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22217$as_echo "$OTOOL" >&6; }
22218else
22219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22220$as_echo "no" >&6; }
22221fi
22222
22223
22224  test -n "$OTOOL" && break
22225done
22226
22227  else
22228    # The variable is set, but is it from the command line or the environment?
22229
22230    # Try to remove the string !OTOOL! from our list.
22231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22233      # If it failed, the variable was not from the command line. Ignore it,
22234      # but warn the user (except for BASH, which is always set by the calling BASH).
22235      if test "xOTOOL" != xBASH; then
22236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22237$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22238      fi
22239      # Try to locate tool using the code snippet
22240      for ac_prog in otool
22241do
22242  # Extract the first word of "$ac_prog", so it can be a program name with args.
22243set dummy $ac_prog; ac_word=$2
22244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22245$as_echo_n "checking for $ac_word... " >&6; }
22246if ${ac_cv_path_OTOOL+:} false; then :
22247  $as_echo_n "(cached) " >&6
22248else
22249  case $OTOOL in
22250  [\\/]* | ?:[\\/]*)
22251  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22252  ;;
22253  *)
22254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22255for as_dir in $PATH
22256do
22257  IFS=$as_save_IFS
22258  test -z "$as_dir" && as_dir=.
22259    for ac_exec_ext in '' $ac_executable_extensions; do
22260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22261    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22263    break 2
22264  fi
22265done
22266  done
22267IFS=$as_save_IFS
22268
22269  ;;
22270esac
22271fi
22272OTOOL=$ac_cv_path_OTOOL
22273if test -n "$OTOOL"; then
22274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22275$as_echo "$OTOOL" >&6; }
22276else
22277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22278$as_echo "no" >&6; }
22279fi
22280
22281
22282  test -n "$OTOOL" && break
22283done
22284
22285    else
22286      # If it succeeded, then it was overridden by the user. We will use it
22287      # for the tool.
22288
22289      # First remove it from the list of overridden variables, so we can test
22290      # for unknown variables in the end.
22291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22292
22293      # Check if we try to supply an empty value
22294      if test "x$OTOOL" = x; then
22295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22296$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22298$as_echo_n "checking for OTOOL... " >&6; }
22299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22300$as_echo "disabled" >&6; }
22301      else
22302        # Check if the provided tool contains a complete path.
22303        tool_specified="$OTOOL"
22304        tool_basename="${tool_specified##*/}"
22305        if test "x$tool_basename" = "x$tool_specified"; then
22306          # A command without a complete path is provided, search $PATH.
22307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22308$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22309          # Extract the first word of "$tool_basename", so it can be a program name with args.
22310set dummy $tool_basename; ac_word=$2
22311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22312$as_echo_n "checking for $ac_word... " >&6; }
22313if ${ac_cv_path_OTOOL+:} false; then :
22314  $as_echo_n "(cached) " >&6
22315else
22316  case $OTOOL in
22317  [\\/]* | ?:[\\/]*)
22318  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22319  ;;
22320  *)
22321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22322for as_dir in $PATH
22323do
22324  IFS=$as_save_IFS
22325  test -z "$as_dir" && as_dir=.
22326    for ac_exec_ext in '' $ac_executable_extensions; do
22327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22328    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22330    break 2
22331  fi
22332done
22333  done
22334IFS=$as_save_IFS
22335
22336  ;;
22337esac
22338fi
22339OTOOL=$ac_cv_path_OTOOL
22340if test -n "$OTOOL"; then
22341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22342$as_echo "$OTOOL" >&6; }
22343else
22344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22345$as_echo "no" >&6; }
22346fi
22347
22348
22349          if test "x$OTOOL" = x; then
22350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22351          fi
22352        else
22353          # Otherwise we believe it is a complete path. Use it as it is.
22354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22355$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22357$as_echo_n "checking for OTOOL... " >&6; }
22358          if test ! -x "$tool_specified"; then
22359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22360$as_echo "not found" >&6; }
22361            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22362          fi
22363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22364$as_echo "$tool_specified" >&6; }
22365        fi
22366      fi
22367    fi
22368
22369  fi
22370
22371
22372  if test "x$OTOOL" = "x"; then
22373    OTOOL="true"
22374  fi
22375
22376
22377  # Publish this variable in the help.
22378
22379
22380  if [ -z "${READELF+x}" ]; then
22381    # The variable is not set by user, try to locate tool using the code snippet
22382    for ac_prog in greadelf readelf
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_READELF+:} false; then :
22389  $as_echo_n "(cached) " >&6
22390else
22391  case $READELF in
22392  [\\/]* | ?:[\\/]*)
22393  ac_cv_path_READELF="$READELF" # 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_READELF="$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
22414READELF=$ac_cv_path_READELF
22415if test -n "$READELF"; then
22416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22417$as_echo "$READELF" >&6; }
22418else
22419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22420$as_echo "no" >&6; }
22421fi
22422
22423
22424  test -n "$READELF" && 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 !READELF! from our list.
22431    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
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 "xREADELF" != xBASH; then
22436        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22437$as_echo "$as_me: WARNING: Ignoring value of READELF 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 greadelf readelf
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_READELF+:} false; then :
22447  $as_echo_n "(cached) " >&6
22448else
22449  case $READELF in
22450  [\\/]* | ?:[\\/]*)
22451  ac_cv_path_READELF="$READELF" # 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_READELF="$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
22472READELF=$ac_cv_path_READELF
22473if test -n "$READELF"; then
22474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22475$as_echo "$READELF" >&6; }
22476else
22477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22478$as_echo "no" >&6; }
22479fi
22480
22481
22482  test -n "$READELF" && 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$READELF" = x; then
22495        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22496$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22498$as_echo_n "checking for READELF... " >&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="$READELF"
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 READELF=$tool_basename" >&5
22508$as_echo "$as_me: Will search for user supplied tool READELF=$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_READELF+:} false; then :
22514  $as_echo_n "(cached) " >&6
22515else
22516  case $READELF in
22517  [\\/]* | ?:[\\/]*)
22518  ac_cv_path_READELF="$READELF" # 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_READELF="$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
22539READELF=$ac_cv_path_READELF
22540if test -n "$READELF"; then
22541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22542$as_echo "$READELF" >&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$READELF" = 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 READELF=$tool_specified" >&5
22555$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22556          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22557$as_echo_n "checking for READELF... " >&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 READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22562          fi
22563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22564$as_echo "$tool_specified" >&6; }
22565        fi
22566      fi
22567    fi
22568
22569  fi
22570
22571
22572
22573
22574  # Publish this variable in the help.
22575
22576
22577  if [ -z "${DOT+x}" ]; then
22578    # The variable is not set by user, try to locate tool using the code snippet
22579    for ac_prog in dot
22580do
22581  # Extract the first word of "$ac_prog", so it can be a program name with args.
22582set dummy $ac_prog; ac_word=$2
22583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22584$as_echo_n "checking for $ac_word... " >&6; }
22585if ${ac_cv_path_DOT+:} false; then :
22586  $as_echo_n "(cached) " >&6
22587else
22588  case $DOT in
22589  [\\/]* | ?:[\\/]*)
22590  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22591  ;;
22592  *)
22593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22594for as_dir in $PATH
22595do
22596  IFS=$as_save_IFS
22597  test -z "$as_dir" && as_dir=.
22598    for ac_exec_ext in '' $ac_executable_extensions; do
22599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22600    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22602    break 2
22603  fi
22604done
22605  done
22606IFS=$as_save_IFS
22607
22608  ;;
22609esac
22610fi
22611DOT=$ac_cv_path_DOT
22612if test -n "$DOT"; then
22613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22614$as_echo "$DOT" >&6; }
22615else
22616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22617$as_echo "no" >&6; }
22618fi
22619
22620
22621  test -n "$DOT" && break
22622done
22623
22624  else
22625    # The variable is set, but is it from the command line or the environment?
22626
22627    # Try to remove the string !DOT! from our list.
22628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22630      # If it failed, the variable was not from the command line. Ignore it,
22631      # but warn the user (except for BASH, which is always set by the calling BASH).
22632      if test "xDOT" != xBASH; then
22633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22634$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22635      fi
22636      # Try to locate tool using the code snippet
22637      for ac_prog in dot
22638do
22639  # Extract the first word of "$ac_prog", so it can be a program name with args.
22640set dummy $ac_prog; ac_word=$2
22641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22642$as_echo_n "checking for $ac_word... " >&6; }
22643if ${ac_cv_path_DOT+:} false; then :
22644  $as_echo_n "(cached) " >&6
22645else
22646  case $DOT in
22647  [\\/]* | ?:[\\/]*)
22648  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22649  ;;
22650  *)
22651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22652for as_dir in $PATH
22653do
22654  IFS=$as_save_IFS
22655  test -z "$as_dir" && as_dir=.
22656    for ac_exec_ext in '' $ac_executable_extensions; do
22657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22658    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22660    break 2
22661  fi
22662done
22663  done
22664IFS=$as_save_IFS
22665
22666  ;;
22667esac
22668fi
22669DOT=$ac_cv_path_DOT
22670if test -n "$DOT"; then
22671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22672$as_echo "$DOT" >&6; }
22673else
22674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22675$as_echo "no" >&6; }
22676fi
22677
22678
22679  test -n "$DOT" && break
22680done
22681
22682    else
22683      # If it succeeded, then it was overridden by the user. We will use it
22684      # for the tool.
22685
22686      # First remove it from the list of overridden variables, so we can test
22687      # for unknown variables in the end.
22688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22689
22690      # Check if we try to supply an empty value
22691      if test "x$DOT" = x; then
22692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22693$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22695$as_echo_n "checking for DOT... " >&6; }
22696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22697$as_echo "disabled" >&6; }
22698      else
22699        # Check if the provided tool contains a complete path.
22700        tool_specified="$DOT"
22701        tool_basename="${tool_specified##*/}"
22702        if test "x$tool_basename" = "x$tool_specified"; then
22703          # A command without a complete path is provided, search $PATH.
22704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22705$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22706          # Extract the first word of "$tool_basename", so it can be a program name with args.
22707set dummy $tool_basename; ac_word=$2
22708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22709$as_echo_n "checking for $ac_word... " >&6; }
22710if ${ac_cv_path_DOT+:} false; then :
22711  $as_echo_n "(cached) " >&6
22712else
22713  case $DOT in
22714  [\\/]* | ?:[\\/]*)
22715  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22716  ;;
22717  *)
22718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22719for as_dir in $PATH
22720do
22721  IFS=$as_save_IFS
22722  test -z "$as_dir" && as_dir=.
22723    for ac_exec_ext in '' $ac_executable_extensions; do
22724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22725    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22727    break 2
22728  fi
22729done
22730  done
22731IFS=$as_save_IFS
22732
22733  ;;
22734esac
22735fi
22736DOT=$ac_cv_path_DOT
22737if test -n "$DOT"; then
22738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22739$as_echo "$DOT" >&6; }
22740else
22741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22742$as_echo "no" >&6; }
22743fi
22744
22745
22746          if test "x$DOT" = x; then
22747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22748          fi
22749        else
22750          # Otherwise we believe it is a complete path. Use it as it is.
22751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22752$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22754$as_echo_n "checking for DOT... " >&6; }
22755          if test ! -x "$tool_specified"; then
22756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22757$as_echo "not found" >&6; }
22758            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22759          fi
22760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22761$as_echo "$tool_specified" >&6; }
22762        fi
22763      fi
22764    fi
22765
22766  fi
22767
22768
22769
22770
22771  # Publish this variable in the help.
22772
22773
22774  if [ -z "${HG+x}" ]; then
22775    # The variable is not set by user, try to locate tool using the code snippet
22776    for ac_prog in hg
22777do
22778  # Extract the first word of "$ac_prog", so it can be a program name with args.
22779set dummy $ac_prog; ac_word=$2
22780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22781$as_echo_n "checking for $ac_word... " >&6; }
22782if ${ac_cv_path_HG+:} false; then :
22783  $as_echo_n "(cached) " >&6
22784else
22785  case $HG in
22786  [\\/]* | ?:[\\/]*)
22787  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22788  ;;
22789  *)
22790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22791for as_dir in $PATH
22792do
22793  IFS=$as_save_IFS
22794  test -z "$as_dir" && as_dir=.
22795    for ac_exec_ext in '' $ac_executable_extensions; do
22796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22797    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22799    break 2
22800  fi
22801done
22802  done
22803IFS=$as_save_IFS
22804
22805  ;;
22806esac
22807fi
22808HG=$ac_cv_path_HG
22809if test -n "$HG"; then
22810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22811$as_echo "$HG" >&6; }
22812else
22813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22814$as_echo "no" >&6; }
22815fi
22816
22817
22818  test -n "$HG" && break
22819done
22820
22821  else
22822    # The variable is set, but is it from the command line or the environment?
22823
22824    # Try to remove the string !HG! from our list.
22825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22827      # If it failed, the variable was not from the command line. Ignore it,
22828      # but warn the user (except for BASH, which is always set by the calling BASH).
22829      if test "xHG" != xBASH; then
22830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22831$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22832      fi
22833      # Try to locate tool using the code snippet
22834      for ac_prog in hg
22835do
22836  # Extract the first word of "$ac_prog", so it can be a program name with args.
22837set dummy $ac_prog; ac_word=$2
22838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22839$as_echo_n "checking for $ac_word... " >&6; }
22840if ${ac_cv_path_HG+:} false; then :
22841  $as_echo_n "(cached) " >&6
22842else
22843  case $HG in
22844  [\\/]* | ?:[\\/]*)
22845  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22846  ;;
22847  *)
22848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22849for as_dir in $PATH
22850do
22851  IFS=$as_save_IFS
22852  test -z "$as_dir" && as_dir=.
22853    for ac_exec_ext in '' $ac_executable_extensions; do
22854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22855    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22857    break 2
22858  fi
22859done
22860  done
22861IFS=$as_save_IFS
22862
22863  ;;
22864esac
22865fi
22866HG=$ac_cv_path_HG
22867if test -n "$HG"; then
22868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22869$as_echo "$HG" >&6; }
22870else
22871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22872$as_echo "no" >&6; }
22873fi
22874
22875
22876  test -n "$HG" && break
22877done
22878
22879    else
22880      # If it succeeded, then it was overridden by the user. We will use it
22881      # for the tool.
22882
22883      # First remove it from the list of overridden variables, so we can test
22884      # for unknown variables in the end.
22885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22886
22887      # Check if we try to supply an empty value
22888      if test "x$HG" = x; then
22889        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22890$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22891        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22892$as_echo_n "checking for HG... " >&6; }
22893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22894$as_echo "disabled" >&6; }
22895      else
22896        # Check if the provided tool contains a complete path.
22897        tool_specified="$HG"
22898        tool_basename="${tool_specified##*/}"
22899        if test "x$tool_basename" = "x$tool_specified"; then
22900          # A command without a complete path is provided, search $PATH.
22901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22902$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22903          # Extract the first word of "$tool_basename", so it can be a program name with args.
22904set dummy $tool_basename; ac_word=$2
22905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22906$as_echo_n "checking for $ac_word... " >&6; }
22907if ${ac_cv_path_HG+:} false; then :
22908  $as_echo_n "(cached) " >&6
22909else
22910  case $HG in
22911  [\\/]* | ?:[\\/]*)
22912  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22913  ;;
22914  *)
22915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22916for as_dir in $PATH
22917do
22918  IFS=$as_save_IFS
22919  test -z "$as_dir" && as_dir=.
22920    for ac_exec_ext in '' $ac_executable_extensions; do
22921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22922    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22924    break 2
22925  fi
22926done
22927  done
22928IFS=$as_save_IFS
22929
22930  ;;
22931esac
22932fi
22933HG=$ac_cv_path_HG
22934if test -n "$HG"; then
22935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22936$as_echo "$HG" >&6; }
22937else
22938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22939$as_echo "no" >&6; }
22940fi
22941
22942
22943          if test "x$HG" = x; then
22944            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22945          fi
22946        else
22947          # Otherwise we believe it is a complete path. Use it as it is.
22948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22949$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22950          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22951$as_echo_n "checking for HG... " >&6; }
22952          if test ! -x "$tool_specified"; then
22953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22954$as_echo "not found" >&6; }
22955            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22956          fi
22957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22958$as_echo "$tool_specified" >&6; }
22959        fi
22960      fi
22961    fi
22962
22963  fi
22964
22965
22966
22967
22968  # Publish this variable in the help.
22969
22970
22971  if [ -z "${STAT+x}" ]; then
22972    # The variable is not set by user, try to locate tool using the code snippet
22973    for ac_prog in stat
22974do
22975  # Extract the first word of "$ac_prog", so it can be a program name with args.
22976set dummy $ac_prog; ac_word=$2
22977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22978$as_echo_n "checking for $ac_word... " >&6; }
22979if ${ac_cv_path_STAT+:} false; then :
22980  $as_echo_n "(cached) " >&6
22981else
22982  case $STAT in
22983  [\\/]* | ?:[\\/]*)
22984  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22985  ;;
22986  *)
22987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22988for as_dir in $PATH
22989do
22990  IFS=$as_save_IFS
22991  test -z "$as_dir" && as_dir=.
22992    for ac_exec_ext in '' $ac_executable_extensions; do
22993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22994    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22996    break 2
22997  fi
22998done
22999  done
23000IFS=$as_save_IFS
23001
23002  ;;
23003esac
23004fi
23005STAT=$ac_cv_path_STAT
23006if test -n "$STAT"; then
23007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23008$as_echo "$STAT" >&6; }
23009else
23010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23011$as_echo "no" >&6; }
23012fi
23013
23014
23015  test -n "$STAT" && break
23016done
23017
23018  else
23019    # The variable is set, but is it from the command line or the environment?
23020
23021    # Try to remove the string !STAT! from our list.
23022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
23023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23024      # If it failed, the variable was not from the command line. Ignore it,
23025      # but warn the user (except for BASH, which is always set by the calling BASH).
23026      if test "xSTAT" != xBASH; then
23027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
23028$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
23029      fi
23030      # Try to locate tool using the code snippet
23031      for ac_prog in stat
23032do
23033  # Extract the first word of "$ac_prog", so it can be a program name with args.
23034set dummy $ac_prog; ac_word=$2
23035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23036$as_echo_n "checking for $ac_word... " >&6; }
23037if ${ac_cv_path_STAT+:} false; then :
23038  $as_echo_n "(cached) " >&6
23039else
23040  case $STAT in
23041  [\\/]* | ?:[\\/]*)
23042  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23043  ;;
23044  *)
23045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23046for as_dir in $PATH
23047do
23048  IFS=$as_save_IFS
23049  test -z "$as_dir" && as_dir=.
23050    for ac_exec_ext in '' $ac_executable_extensions; do
23051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23052    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23054    break 2
23055  fi
23056done
23057  done
23058IFS=$as_save_IFS
23059
23060  ;;
23061esac
23062fi
23063STAT=$ac_cv_path_STAT
23064if test -n "$STAT"; then
23065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23066$as_echo "$STAT" >&6; }
23067else
23068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23069$as_echo "no" >&6; }
23070fi
23071
23072
23073  test -n "$STAT" && break
23074done
23075
23076    else
23077      # If it succeeded, then it was overridden by the user. We will use it
23078      # for the tool.
23079
23080      # First remove it from the list of overridden variables, so we can test
23081      # for unknown variables in the end.
23082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23083
23084      # Check if we try to supply an empty value
23085      if test "x$STAT" = x; then
23086        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
23087$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
23088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23089$as_echo_n "checking for STAT... " >&6; }
23090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23091$as_echo "disabled" >&6; }
23092      else
23093        # Check if the provided tool contains a complete path.
23094        tool_specified="$STAT"
23095        tool_basename="${tool_specified##*/}"
23096        if test "x$tool_basename" = "x$tool_specified"; then
23097          # A command without a complete path is provided, search $PATH.
23098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23099$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23100          # Extract the first word of "$tool_basename", so it can be a program name with args.
23101set dummy $tool_basename; ac_word=$2
23102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23103$as_echo_n "checking for $ac_word... " >&6; }
23104if ${ac_cv_path_STAT+:} false; then :
23105  $as_echo_n "(cached) " >&6
23106else
23107  case $STAT in
23108  [\\/]* | ?:[\\/]*)
23109  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23110  ;;
23111  *)
23112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23113for as_dir in $PATH
23114do
23115  IFS=$as_save_IFS
23116  test -z "$as_dir" && as_dir=.
23117    for ac_exec_ext in '' $ac_executable_extensions; do
23118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23119    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23121    break 2
23122  fi
23123done
23124  done
23125IFS=$as_save_IFS
23126
23127  ;;
23128esac
23129fi
23130STAT=$ac_cv_path_STAT
23131if test -n "$STAT"; then
23132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23133$as_echo "$STAT" >&6; }
23134else
23135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23136$as_echo "no" >&6; }
23137fi
23138
23139
23140          if test "x$STAT" = x; then
23141            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23142          fi
23143        else
23144          # Otherwise we believe it is a complete path. Use it as it is.
23145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23146$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23147          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23148$as_echo_n "checking for STAT... " >&6; }
23149          if test ! -x "$tool_specified"; then
23150            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23151$as_echo "not found" >&6; }
23152            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23153          fi
23154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23155$as_echo "$tool_specified" >&6; }
23156        fi
23157      fi
23158    fi
23159
23160  fi
23161
23162
23163
23164
23165  # Publish this variable in the help.
23166
23167
23168  if [ -z "${TIME+x}" ]; then
23169    # The variable is not set by user, try to locate tool using the code snippet
23170    for ac_prog in time
23171do
23172  # Extract the first word of "$ac_prog", so it can be a program name with args.
23173set dummy $ac_prog; ac_word=$2
23174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23175$as_echo_n "checking for $ac_word... " >&6; }
23176if ${ac_cv_path_TIME+:} false; then :
23177  $as_echo_n "(cached) " >&6
23178else
23179  case $TIME in
23180  [\\/]* | ?:[\\/]*)
23181  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23182  ;;
23183  *)
23184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23185for as_dir in $PATH
23186do
23187  IFS=$as_save_IFS
23188  test -z "$as_dir" && as_dir=.
23189    for ac_exec_ext in '' $ac_executable_extensions; do
23190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23191    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23193    break 2
23194  fi
23195done
23196  done
23197IFS=$as_save_IFS
23198
23199  ;;
23200esac
23201fi
23202TIME=$ac_cv_path_TIME
23203if test -n "$TIME"; then
23204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23205$as_echo "$TIME" >&6; }
23206else
23207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23208$as_echo "no" >&6; }
23209fi
23210
23211
23212  test -n "$TIME" && break
23213done
23214
23215  else
23216    # The variable is set, but is it from the command line or the environment?
23217
23218    # Try to remove the string !TIME! from our list.
23219    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23220    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23221      # If it failed, the variable was not from the command line. Ignore it,
23222      # but warn the user (except for BASH, which is always set by the calling BASH).
23223      if test "xTIME" != xBASH; then
23224        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23225$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23226      fi
23227      # Try to locate tool using the code snippet
23228      for ac_prog in time
23229do
23230  # Extract the first word of "$ac_prog", so it can be a program name with args.
23231set dummy $ac_prog; ac_word=$2
23232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23233$as_echo_n "checking for $ac_word... " >&6; }
23234if ${ac_cv_path_TIME+:} false; then :
23235  $as_echo_n "(cached) " >&6
23236else
23237  case $TIME in
23238  [\\/]* | ?:[\\/]*)
23239  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23240  ;;
23241  *)
23242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23243for as_dir in $PATH
23244do
23245  IFS=$as_save_IFS
23246  test -z "$as_dir" && as_dir=.
23247    for ac_exec_ext in '' $ac_executable_extensions; do
23248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23249    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23251    break 2
23252  fi
23253done
23254  done
23255IFS=$as_save_IFS
23256
23257  ;;
23258esac
23259fi
23260TIME=$ac_cv_path_TIME
23261if test -n "$TIME"; then
23262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23263$as_echo "$TIME" >&6; }
23264else
23265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23266$as_echo "no" >&6; }
23267fi
23268
23269
23270  test -n "$TIME" && break
23271done
23272
23273    else
23274      # If it succeeded, then it was overridden by the user. We will use it
23275      # for the tool.
23276
23277      # First remove it from the list of overridden variables, so we can test
23278      # for unknown variables in the end.
23279      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23280
23281      # Check if we try to supply an empty value
23282      if test "x$TIME" = x; then
23283        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23284$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23285        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23286$as_echo_n "checking for TIME... " >&6; }
23287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23288$as_echo "disabled" >&6; }
23289      else
23290        # Check if the provided tool contains a complete path.
23291        tool_specified="$TIME"
23292        tool_basename="${tool_specified##*/}"
23293        if test "x$tool_basename" = "x$tool_specified"; then
23294          # A command without a complete path is provided, search $PATH.
23295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23296$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23297          # Extract the first word of "$tool_basename", so it can be a program name with args.
23298set dummy $tool_basename; ac_word=$2
23299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23300$as_echo_n "checking for $ac_word... " >&6; }
23301if ${ac_cv_path_TIME+:} false; then :
23302  $as_echo_n "(cached) " >&6
23303else
23304  case $TIME in
23305  [\\/]* | ?:[\\/]*)
23306  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23307  ;;
23308  *)
23309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23310for as_dir in $PATH
23311do
23312  IFS=$as_save_IFS
23313  test -z "$as_dir" && as_dir=.
23314    for ac_exec_ext in '' $ac_executable_extensions; do
23315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23316    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23318    break 2
23319  fi
23320done
23321  done
23322IFS=$as_save_IFS
23323
23324  ;;
23325esac
23326fi
23327TIME=$ac_cv_path_TIME
23328if test -n "$TIME"; then
23329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23330$as_echo "$TIME" >&6; }
23331else
23332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23333$as_echo "no" >&6; }
23334fi
23335
23336
23337          if test "x$TIME" = x; then
23338            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23339          fi
23340        else
23341          # Otherwise we believe it is a complete path. Use it as it is.
23342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23343$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23344          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23345$as_echo_n "checking for TIME... " >&6; }
23346          if test ! -x "$tool_specified"; then
23347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23348$as_echo "not found" >&6; }
23349            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23350          fi
23351          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23352$as_echo "$tool_specified" >&6; }
23353        fi
23354      fi
23355    fi
23356
23357  fi
23358
23359
23360
23361
23362  # Publish this variable in the help.
23363
23364
23365  if [ -z "${FLOCK+x}" ]; then
23366    # The variable is not set by user, try to locate tool using the code snippet
23367    for ac_prog in flock
23368do
23369  # Extract the first word of "$ac_prog", so it can be a program name with args.
23370set dummy $ac_prog; ac_word=$2
23371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23372$as_echo_n "checking for $ac_word... " >&6; }
23373if ${ac_cv_path_FLOCK+:} false; then :
23374  $as_echo_n "(cached) " >&6
23375else
23376  case $FLOCK in
23377  [\\/]* | ?:[\\/]*)
23378  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23379  ;;
23380  *)
23381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23382for as_dir in $PATH
23383do
23384  IFS=$as_save_IFS
23385  test -z "$as_dir" && as_dir=.
23386    for ac_exec_ext in '' $ac_executable_extensions; do
23387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23388    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23390    break 2
23391  fi
23392done
23393  done
23394IFS=$as_save_IFS
23395
23396  ;;
23397esac
23398fi
23399FLOCK=$ac_cv_path_FLOCK
23400if test -n "$FLOCK"; then
23401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23402$as_echo "$FLOCK" >&6; }
23403else
23404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23405$as_echo "no" >&6; }
23406fi
23407
23408
23409  test -n "$FLOCK" && break
23410done
23411
23412  else
23413    # The variable is set, but is it from the command line or the environment?
23414
23415    # Try to remove the string !FLOCK! from our list.
23416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23418      # If it failed, the variable was not from the command line. Ignore it,
23419      # but warn the user (except for BASH, which is always set by the calling BASH).
23420      if test "xFLOCK" != xBASH; then
23421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23422$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23423      fi
23424      # Try to locate tool using the code snippet
23425      for ac_prog in flock
23426do
23427  # Extract the first word of "$ac_prog", so it can be a program name with args.
23428set dummy $ac_prog; ac_word=$2
23429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23430$as_echo_n "checking for $ac_word... " >&6; }
23431if ${ac_cv_path_FLOCK+:} false; then :
23432  $as_echo_n "(cached) " >&6
23433else
23434  case $FLOCK in
23435  [\\/]* | ?:[\\/]*)
23436  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23437  ;;
23438  *)
23439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23440for as_dir in $PATH
23441do
23442  IFS=$as_save_IFS
23443  test -z "$as_dir" && as_dir=.
23444    for ac_exec_ext in '' $ac_executable_extensions; do
23445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23446    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23448    break 2
23449  fi
23450done
23451  done
23452IFS=$as_save_IFS
23453
23454  ;;
23455esac
23456fi
23457FLOCK=$ac_cv_path_FLOCK
23458if test -n "$FLOCK"; then
23459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23460$as_echo "$FLOCK" >&6; }
23461else
23462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23463$as_echo "no" >&6; }
23464fi
23465
23466
23467  test -n "$FLOCK" && break
23468done
23469
23470    else
23471      # If it succeeded, then it was overridden by the user. We will use it
23472      # for the tool.
23473
23474      # First remove it from the list of overridden variables, so we can test
23475      # for unknown variables in the end.
23476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23477
23478      # Check if we try to supply an empty value
23479      if test "x$FLOCK" = x; then
23480        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23481$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23483$as_echo_n "checking for FLOCK... " >&6; }
23484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23485$as_echo "disabled" >&6; }
23486      else
23487        # Check if the provided tool contains a complete path.
23488        tool_specified="$FLOCK"
23489        tool_basename="${tool_specified##*/}"
23490        if test "x$tool_basename" = "x$tool_specified"; then
23491          # A command without a complete path is provided, search $PATH.
23492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23493$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23494          # Extract the first word of "$tool_basename", so it can be a program name with args.
23495set dummy $tool_basename; ac_word=$2
23496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23497$as_echo_n "checking for $ac_word... " >&6; }
23498if ${ac_cv_path_FLOCK+:} false; then :
23499  $as_echo_n "(cached) " >&6
23500else
23501  case $FLOCK in
23502  [\\/]* | ?:[\\/]*)
23503  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23504  ;;
23505  *)
23506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23507for as_dir in $PATH
23508do
23509  IFS=$as_save_IFS
23510  test -z "$as_dir" && as_dir=.
23511    for ac_exec_ext in '' $ac_executable_extensions; do
23512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23513    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23515    break 2
23516  fi
23517done
23518  done
23519IFS=$as_save_IFS
23520
23521  ;;
23522esac
23523fi
23524FLOCK=$ac_cv_path_FLOCK
23525if test -n "$FLOCK"; then
23526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23527$as_echo "$FLOCK" >&6; }
23528else
23529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23530$as_echo "no" >&6; }
23531fi
23532
23533
23534          if test "x$FLOCK" = x; then
23535            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23536          fi
23537        else
23538          # Otherwise we believe it is a complete path. Use it as it is.
23539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23540$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23541          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23542$as_echo_n "checking for FLOCK... " >&6; }
23543          if test ! -x "$tool_specified"; then
23544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23545$as_echo "not found" >&6; }
23546            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23547          fi
23548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23549$as_echo "$tool_specified" >&6; }
23550        fi
23551      fi
23552    fi
23553
23554  fi
23555
23556
23557  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23558  # be in the user path.
23559
23560
23561  # Publish this variable in the help.
23562
23563
23564  if [ -z "${DTRACE+x}" ]; then
23565    # The variable is not set by user, try to locate tool using the code snippet
23566    for ac_prog in dtrace
23567do
23568  # Extract the first word of "$ac_prog", so it can be a program name with args.
23569set dummy $ac_prog; ac_word=$2
23570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23571$as_echo_n "checking for $ac_word... " >&6; }
23572if ${ac_cv_path_DTRACE+:} false; then :
23573  $as_echo_n "(cached) " >&6
23574else
23575  case $DTRACE in
23576  [\\/]* | ?:[\\/]*)
23577  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23578  ;;
23579  *)
23580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23581as_dummy="$PATH:/usr/sbin"
23582for as_dir in $as_dummy
23583do
23584  IFS=$as_save_IFS
23585  test -z "$as_dir" && as_dir=.
23586    for ac_exec_ext in '' $ac_executable_extensions; do
23587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23588    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23590    break 2
23591  fi
23592done
23593  done
23594IFS=$as_save_IFS
23595
23596  ;;
23597esac
23598fi
23599DTRACE=$ac_cv_path_DTRACE
23600if test -n "$DTRACE"; then
23601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23602$as_echo "$DTRACE" >&6; }
23603else
23604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23605$as_echo "no" >&6; }
23606fi
23607
23608
23609  test -n "$DTRACE" && break
23610done
23611
23612  else
23613    # The variable is set, but is it from the command line or the environment?
23614
23615    # Try to remove the string !DTRACE! from our list.
23616    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23617    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23618      # If it failed, the variable was not from the command line. Ignore it,
23619      # but warn the user (except for BASH, which is always set by the calling BASH).
23620      if test "xDTRACE" != xBASH; then
23621        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23622$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23623      fi
23624      # Try to locate tool using the code snippet
23625      for ac_prog in dtrace
23626do
23627  # Extract the first word of "$ac_prog", so it can be a program name with args.
23628set dummy $ac_prog; ac_word=$2
23629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23630$as_echo_n "checking for $ac_word... " >&6; }
23631if ${ac_cv_path_DTRACE+:} false; then :
23632  $as_echo_n "(cached) " >&6
23633else
23634  case $DTRACE in
23635  [\\/]* | ?:[\\/]*)
23636  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23637  ;;
23638  *)
23639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23640as_dummy="$PATH:/usr/sbin"
23641for as_dir in $as_dummy
23642do
23643  IFS=$as_save_IFS
23644  test -z "$as_dir" && as_dir=.
23645    for ac_exec_ext in '' $ac_executable_extensions; do
23646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23647    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23649    break 2
23650  fi
23651done
23652  done
23653IFS=$as_save_IFS
23654
23655  ;;
23656esac
23657fi
23658DTRACE=$ac_cv_path_DTRACE
23659if test -n "$DTRACE"; then
23660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23661$as_echo "$DTRACE" >&6; }
23662else
23663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23664$as_echo "no" >&6; }
23665fi
23666
23667
23668  test -n "$DTRACE" && break
23669done
23670
23671    else
23672      # If it succeeded, then it was overridden by the user. We will use it
23673      # for the tool.
23674
23675      # First remove it from the list of overridden variables, so we can test
23676      # for unknown variables in the end.
23677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23678
23679      # Check if we try to supply an empty value
23680      if test "x$DTRACE" = x; then
23681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23682$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23684$as_echo_n "checking for DTRACE... " >&6; }
23685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23686$as_echo "disabled" >&6; }
23687      else
23688        # Check if the provided tool contains a complete path.
23689        tool_specified="$DTRACE"
23690        tool_basename="${tool_specified##*/}"
23691        if test "x$tool_basename" = "x$tool_specified"; then
23692          # A command without a complete path is provided, search $PATH.
23693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23694$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23695          # Extract the first word of "$tool_basename", so it can be a program name with args.
23696set dummy $tool_basename; ac_word=$2
23697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23698$as_echo_n "checking for $ac_word... " >&6; }
23699if ${ac_cv_path_DTRACE+:} false; then :
23700  $as_echo_n "(cached) " >&6
23701else
23702  case $DTRACE in
23703  [\\/]* | ?:[\\/]*)
23704  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23705  ;;
23706  *)
23707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23708for as_dir in $PATH
23709do
23710  IFS=$as_save_IFS
23711  test -z "$as_dir" && as_dir=.
23712    for ac_exec_ext in '' $ac_executable_extensions; do
23713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23714    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23716    break 2
23717  fi
23718done
23719  done
23720IFS=$as_save_IFS
23721
23722  ;;
23723esac
23724fi
23725DTRACE=$ac_cv_path_DTRACE
23726if test -n "$DTRACE"; then
23727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23728$as_echo "$DTRACE" >&6; }
23729else
23730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23731$as_echo "no" >&6; }
23732fi
23733
23734
23735          if test "x$DTRACE" = x; then
23736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23737          fi
23738        else
23739          # Otherwise we believe it is a complete path. Use it as it is.
23740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23741$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23743$as_echo_n "checking for DTRACE... " >&6; }
23744          if test ! -x "$tool_specified"; then
23745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23746$as_echo "not found" >&6; }
23747            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23748          fi
23749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23750$as_echo "$tool_specified" >&6; }
23751        fi
23752      fi
23753    fi
23754
23755  fi
23756
23757
23758
23759
23760  # Publish this variable in the help.
23761
23762
23763  if [ -z "${PATCH+x}" ]; then
23764    # The variable is not set by user, try to locate tool using the code snippet
23765    for ac_prog in gpatch patch
23766do
23767  # Extract the first word of "$ac_prog", so it can be a program name with args.
23768set dummy $ac_prog; ac_word=$2
23769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23770$as_echo_n "checking for $ac_word... " >&6; }
23771if ${ac_cv_path_PATCH+:} false; then :
23772  $as_echo_n "(cached) " >&6
23773else
23774  case $PATCH in
23775  [\\/]* | ?:[\\/]*)
23776  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23777  ;;
23778  *)
23779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23780for as_dir in $PATH
23781do
23782  IFS=$as_save_IFS
23783  test -z "$as_dir" && as_dir=.
23784    for ac_exec_ext in '' $ac_executable_extensions; do
23785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23786    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23788    break 2
23789  fi
23790done
23791  done
23792IFS=$as_save_IFS
23793
23794  ;;
23795esac
23796fi
23797PATCH=$ac_cv_path_PATCH
23798if test -n "$PATCH"; then
23799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23800$as_echo "$PATCH" >&6; }
23801else
23802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23803$as_echo "no" >&6; }
23804fi
23805
23806
23807  test -n "$PATCH" && break
23808done
23809
23810  else
23811    # The variable is set, but is it from the command line or the environment?
23812
23813    # Try to remove the string !PATCH! from our list.
23814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23816      # If it failed, the variable was not from the command line. Ignore it,
23817      # but warn the user (except for BASH, which is always set by the calling BASH).
23818      if test "xPATCH" != xBASH; then
23819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23820$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23821      fi
23822      # Try to locate tool using the code snippet
23823      for ac_prog in gpatch patch
23824do
23825  # Extract the first word of "$ac_prog", so it can be a program name with args.
23826set dummy $ac_prog; ac_word=$2
23827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23828$as_echo_n "checking for $ac_word... " >&6; }
23829if ${ac_cv_path_PATCH+:} false; then :
23830  $as_echo_n "(cached) " >&6
23831else
23832  case $PATCH in
23833  [\\/]* | ?:[\\/]*)
23834  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23835  ;;
23836  *)
23837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23838for as_dir in $PATH
23839do
23840  IFS=$as_save_IFS
23841  test -z "$as_dir" && as_dir=.
23842    for ac_exec_ext in '' $ac_executable_extensions; do
23843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23844    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23846    break 2
23847  fi
23848done
23849  done
23850IFS=$as_save_IFS
23851
23852  ;;
23853esac
23854fi
23855PATCH=$ac_cv_path_PATCH
23856if test -n "$PATCH"; then
23857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23858$as_echo "$PATCH" >&6; }
23859else
23860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23861$as_echo "no" >&6; }
23862fi
23863
23864
23865  test -n "$PATCH" && break
23866done
23867
23868    else
23869      # If it succeeded, then it was overridden by the user. We will use it
23870      # for the tool.
23871
23872      # First remove it from the list of overridden variables, so we can test
23873      # for unknown variables in the end.
23874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23875
23876      # Check if we try to supply an empty value
23877      if test "x$PATCH" = x; then
23878        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23879$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23881$as_echo_n "checking for PATCH... " >&6; }
23882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23883$as_echo "disabled" >&6; }
23884      else
23885        # Check if the provided tool contains a complete path.
23886        tool_specified="$PATCH"
23887        tool_basename="${tool_specified##*/}"
23888        if test "x$tool_basename" = "x$tool_specified"; then
23889          # A command without a complete path is provided, search $PATH.
23890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23891$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23892          # Extract the first word of "$tool_basename", so it can be a program name with args.
23893set dummy $tool_basename; ac_word=$2
23894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23895$as_echo_n "checking for $ac_word... " >&6; }
23896if ${ac_cv_path_PATCH+:} false; then :
23897  $as_echo_n "(cached) " >&6
23898else
23899  case $PATCH in
23900  [\\/]* | ?:[\\/]*)
23901  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23902  ;;
23903  *)
23904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23905for as_dir in $PATH
23906do
23907  IFS=$as_save_IFS
23908  test -z "$as_dir" && as_dir=.
23909    for ac_exec_ext in '' $ac_executable_extensions; do
23910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23911    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23913    break 2
23914  fi
23915done
23916  done
23917IFS=$as_save_IFS
23918
23919  ;;
23920esac
23921fi
23922PATCH=$ac_cv_path_PATCH
23923if test -n "$PATCH"; then
23924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23925$as_echo "$PATCH" >&6; }
23926else
23927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23928$as_echo "no" >&6; }
23929fi
23930
23931
23932          if test "x$PATCH" = x; then
23933            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23934          fi
23935        else
23936          # Otherwise we believe it is a complete path. Use it as it is.
23937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23938$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23939          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23940$as_echo_n "checking for PATCH... " >&6; }
23941          if test ! -x "$tool_specified"; then
23942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23943$as_echo "not found" >&6; }
23944            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23945          fi
23946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23947$as_echo "$tool_specified" >&6; }
23948        fi
23949      fi
23950    fi
23951
23952  fi
23953
23954
23955  # Check if it's GNU time
23956  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23957  if test "x$IS_GNU_TIME" != x; then
23958    IS_GNU_TIME=yes
23959  else
23960    IS_GNU_TIME=no
23961  fi
23962
23963
23964  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23965
23966
23967
23968  # Publish this variable in the help.
23969
23970
23971  if [ -z "${DSYMUTIL+x}" ]; then
23972    # The variable is not set by user, try to locate tool using the code snippet
23973    for ac_prog in dsymutil
23974do
23975  # Extract the first word of "$ac_prog", so it can be a program name with args.
23976set dummy $ac_prog; ac_word=$2
23977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23978$as_echo_n "checking for $ac_word... " >&6; }
23979if ${ac_cv_path_DSYMUTIL+:} false; then :
23980  $as_echo_n "(cached) " >&6
23981else
23982  case $DSYMUTIL in
23983  [\\/]* | ?:[\\/]*)
23984  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23985  ;;
23986  *)
23987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23988for as_dir in $PATH
23989do
23990  IFS=$as_save_IFS
23991  test -z "$as_dir" && as_dir=.
23992    for ac_exec_ext in '' $ac_executable_extensions; do
23993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23994    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23996    break 2
23997  fi
23998done
23999  done
24000IFS=$as_save_IFS
24001
24002  ;;
24003esac
24004fi
24005DSYMUTIL=$ac_cv_path_DSYMUTIL
24006if test -n "$DSYMUTIL"; then
24007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24008$as_echo "$DSYMUTIL" >&6; }
24009else
24010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24011$as_echo "no" >&6; }
24012fi
24013
24014
24015  test -n "$DSYMUTIL" && break
24016done
24017
24018  else
24019    # The variable is set, but is it from the command line or the environment?
24020
24021    # Try to remove the string !DSYMUTIL! from our list.
24022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
24023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24024      # If it failed, the variable was not from the command line. Ignore it,
24025      # but warn the user (except for BASH, which is always set by the calling BASH).
24026      if test "xDSYMUTIL" != xBASH; then
24027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
24028$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
24029      fi
24030      # Try to locate tool using the code snippet
24031      for ac_prog in dsymutil
24032do
24033  # Extract the first word of "$ac_prog", so it can be a program name with args.
24034set dummy $ac_prog; ac_word=$2
24035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24036$as_echo_n "checking for $ac_word... " >&6; }
24037if ${ac_cv_path_DSYMUTIL+:} false; then :
24038  $as_echo_n "(cached) " >&6
24039else
24040  case $DSYMUTIL in
24041  [\\/]* | ?:[\\/]*)
24042  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24043  ;;
24044  *)
24045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24046for as_dir in $PATH
24047do
24048  IFS=$as_save_IFS
24049  test -z "$as_dir" && as_dir=.
24050    for ac_exec_ext in '' $ac_executable_extensions; do
24051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24052    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24054    break 2
24055  fi
24056done
24057  done
24058IFS=$as_save_IFS
24059
24060  ;;
24061esac
24062fi
24063DSYMUTIL=$ac_cv_path_DSYMUTIL
24064if test -n "$DSYMUTIL"; then
24065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24066$as_echo "$DSYMUTIL" >&6; }
24067else
24068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24069$as_echo "no" >&6; }
24070fi
24071
24072
24073  test -n "$DSYMUTIL" && break
24074done
24075
24076    else
24077      # If it succeeded, then it was overridden by the user. We will use it
24078      # for the tool.
24079
24080      # First remove it from the list of overridden variables, so we can test
24081      # for unknown variables in the end.
24082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24083
24084      # Check if we try to supply an empty value
24085      if test "x$DSYMUTIL" = x; then
24086        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
24087$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
24088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24089$as_echo_n "checking for DSYMUTIL... " >&6; }
24090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24091$as_echo "disabled" >&6; }
24092      else
24093        # Check if the provided tool contains a complete path.
24094        tool_specified="$DSYMUTIL"
24095        tool_basename="${tool_specified##*/}"
24096        if test "x$tool_basename" = "x$tool_specified"; then
24097          # A command without a complete path is provided, search $PATH.
24098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
24099$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
24100          # Extract the first word of "$tool_basename", so it can be a program name with args.
24101set dummy $tool_basename; ac_word=$2
24102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24103$as_echo_n "checking for $ac_word... " >&6; }
24104if ${ac_cv_path_DSYMUTIL+:} false; then :
24105  $as_echo_n "(cached) " >&6
24106else
24107  case $DSYMUTIL in
24108  [\\/]* | ?:[\\/]*)
24109  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24110  ;;
24111  *)
24112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24113for as_dir in $PATH
24114do
24115  IFS=$as_save_IFS
24116  test -z "$as_dir" && as_dir=.
24117    for ac_exec_ext in '' $ac_executable_extensions; do
24118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24119    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24121    break 2
24122  fi
24123done
24124  done
24125IFS=$as_save_IFS
24126
24127  ;;
24128esac
24129fi
24130DSYMUTIL=$ac_cv_path_DSYMUTIL
24131if test -n "$DSYMUTIL"; then
24132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24133$as_echo "$DSYMUTIL" >&6; }
24134else
24135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24136$as_echo "no" >&6; }
24137fi
24138
24139
24140          if test "x$DSYMUTIL" = x; then
24141            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24142          fi
24143        else
24144          # Otherwise we believe it is a complete path. Use it as it is.
24145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24146$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24147          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24148$as_echo_n "checking for DSYMUTIL... " >&6; }
24149          if test ! -x "$tool_specified"; then
24150            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24151$as_echo "not found" >&6; }
24152            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24153          fi
24154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24155$as_echo "$tool_specified" >&6; }
24156        fi
24157      fi
24158    fi
24159
24160  fi
24161
24162
24163
24164  if test "x$DSYMUTIL" = x; then
24165    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24166  fi
24167
24168
24169
24170
24171
24172  # Publish this variable in the help.
24173
24174
24175  if [ -z "${XATTR+x}" ]; then
24176    # The variable is not set by user, try to locate tool using the code snippet
24177    for ac_prog in xattr
24178do
24179  # Extract the first word of "$ac_prog", so it can be a program name with args.
24180set dummy $ac_prog; ac_word=$2
24181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24182$as_echo_n "checking for $ac_word... " >&6; }
24183if ${ac_cv_path_XATTR+:} false; then :
24184  $as_echo_n "(cached) " >&6
24185else
24186  case $XATTR in
24187  [\\/]* | ?:[\\/]*)
24188  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24189  ;;
24190  *)
24191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24192for as_dir in $PATH
24193do
24194  IFS=$as_save_IFS
24195  test -z "$as_dir" && as_dir=.
24196    for ac_exec_ext in '' $ac_executable_extensions; do
24197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24198    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24200    break 2
24201  fi
24202done
24203  done
24204IFS=$as_save_IFS
24205
24206  ;;
24207esac
24208fi
24209XATTR=$ac_cv_path_XATTR
24210if test -n "$XATTR"; then
24211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24212$as_echo "$XATTR" >&6; }
24213else
24214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24215$as_echo "no" >&6; }
24216fi
24217
24218
24219  test -n "$XATTR" && break
24220done
24221
24222  else
24223    # The variable is set, but is it from the command line or the environment?
24224
24225    # Try to remove the string !XATTR! from our list.
24226    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24227    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24228      # If it failed, the variable was not from the command line. Ignore it,
24229      # but warn the user (except for BASH, which is always set by the calling BASH).
24230      if test "xXATTR" != xBASH; then
24231        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24232$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24233      fi
24234      # Try to locate tool using the code snippet
24235      for ac_prog in xattr
24236do
24237  # Extract the first word of "$ac_prog", so it can be a program name with args.
24238set dummy $ac_prog; ac_word=$2
24239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24240$as_echo_n "checking for $ac_word... " >&6; }
24241if ${ac_cv_path_XATTR+:} false; then :
24242  $as_echo_n "(cached) " >&6
24243else
24244  case $XATTR in
24245  [\\/]* | ?:[\\/]*)
24246  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24247  ;;
24248  *)
24249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24250for as_dir in $PATH
24251do
24252  IFS=$as_save_IFS
24253  test -z "$as_dir" && as_dir=.
24254    for ac_exec_ext in '' $ac_executable_extensions; do
24255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24256    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24258    break 2
24259  fi
24260done
24261  done
24262IFS=$as_save_IFS
24263
24264  ;;
24265esac
24266fi
24267XATTR=$ac_cv_path_XATTR
24268if test -n "$XATTR"; then
24269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24270$as_echo "$XATTR" >&6; }
24271else
24272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24273$as_echo "no" >&6; }
24274fi
24275
24276
24277  test -n "$XATTR" && break
24278done
24279
24280    else
24281      # If it succeeded, then it was overridden by the user. We will use it
24282      # for the tool.
24283
24284      # First remove it from the list of overridden variables, so we can test
24285      # for unknown variables in the end.
24286      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24287
24288      # Check if we try to supply an empty value
24289      if test "x$XATTR" = x; then
24290        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24291$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24293$as_echo_n "checking for XATTR... " >&6; }
24294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24295$as_echo "disabled" >&6; }
24296      else
24297        # Check if the provided tool contains a complete path.
24298        tool_specified="$XATTR"
24299        tool_basename="${tool_specified##*/}"
24300        if test "x$tool_basename" = "x$tool_specified"; then
24301          # A command without a complete path is provided, search $PATH.
24302          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24303$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24304          # Extract the first word of "$tool_basename", so it can be a program name with args.
24305set dummy $tool_basename; ac_word=$2
24306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24307$as_echo_n "checking for $ac_word... " >&6; }
24308if ${ac_cv_path_XATTR+:} false; then :
24309  $as_echo_n "(cached) " >&6
24310else
24311  case $XATTR in
24312  [\\/]* | ?:[\\/]*)
24313  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24314  ;;
24315  *)
24316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24317for as_dir in $PATH
24318do
24319  IFS=$as_save_IFS
24320  test -z "$as_dir" && as_dir=.
24321    for ac_exec_ext in '' $ac_executable_extensions; do
24322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24323    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24325    break 2
24326  fi
24327done
24328  done
24329IFS=$as_save_IFS
24330
24331  ;;
24332esac
24333fi
24334XATTR=$ac_cv_path_XATTR
24335if test -n "$XATTR"; then
24336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24337$as_echo "$XATTR" >&6; }
24338else
24339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24340$as_echo "no" >&6; }
24341fi
24342
24343
24344          if test "x$XATTR" = x; then
24345            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24346          fi
24347        else
24348          # Otherwise we believe it is a complete path. Use it as it is.
24349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24350$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24351          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24352$as_echo_n "checking for XATTR... " >&6; }
24353          if test ! -x "$tool_specified"; then
24354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24355$as_echo "not found" >&6; }
24356            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24357          fi
24358          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24359$as_echo "$tool_specified" >&6; }
24360        fi
24361      fi
24362    fi
24363
24364  fi
24365
24366
24367
24368  if test "x$XATTR" = x; then
24369    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24370  fi
24371
24372
24373
24374
24375  # Publish this variable in the help.
24376
24377
24378  if [ -z "${CODESIGN+x}" ]; then
24379    # The variable is not set by user, try to locate tool using the code snippet
24380    for ac_prog in codesign
24381do
24382  # Extract the first word of "$ac_prog", so it can be a program name with args.
24383set dummy $ac_prog; ac_word=$2
24384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24385$as_echo_n "checking for $ac_word... " >&6; }
24386if ${ac_cv_path_CODESIGN+:} false; then :
24387  $as_echo_n "(cached) " >&6
24388else
24389  case $CODESIGN in
24390  [\\/]* | ?:[\\/]*)
24391  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24392  ;;
24393  *)
24394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24395for as_dir in $PATH
24396do
24397  IFS=$as_save_IFS
24398  test -z "$as_dir" && as_dir=.
24399    for ac_exec_ext in '' $ac_executable_extensions; do
24400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24401    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24403    break 2
24404  fi
24405done
24406  done
24407IFS=$as_save_IFS
24408
24409  ;;
24410esac
24411fi
24412CODESIGN=$ac_cv_path_CODESIGN
24413if test -n "$CODESIGN"; then
24414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24415$as_echo "$CODESIGN" >&6; }
24416else
24417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24418$as_echo "no" >&6; }
24419fi
24420
24421
24422  test -n "$CODESIGN" && break
24423done
24424
24425  else
24426    # The variable is set, but is it from the command line or the environment?
24427
24428    # Try to remove the string !CODESIGN! from our list.
24429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24431      # If it failed, the variable was not from the command line. Ignore it,
24432      # but warn the user (except for BASH, which is always set by the calling BASH).
24433      if test "xCODESIGN" != xBASH; then
24434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24435$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24436      fi
24437      # Try to locate tool using the code snippet
24438      for ac_prog in codesign
24439do
24440  # Extract the first word of "$ac_prog", so it can be a program name with args.
24441set dummy $ac_prog; ac_word=$2
24442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24443$as_echo_n "checking for $ac_word... " >&6; }
24444if ${ac_cv_path_CODESIGN+:} false; then :
24445  $as_echo_n "(cached) " >&6
24446else
24447  case $CODESIGN in
24448  [\\/]* | ?:[\\/]*)
24449  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24450  ;;
24451  *)
24452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24453for as_dir in $PATH
24454do
24455  IFS=$as_save_IFS
24456  test -z "$as_dir" && as_dir=.
24457    for ac_exec_ext in '' $ac_executable_extensions; do
24458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24459    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24461    break 2
24462  fi
24463done
24464  done
24465IFS=$as_save_IFS
24466
24467  ;;
24468esac
24469fi
24470CODESIGN=$ac_cv_path_CODESIGN
24471if test -n "$CODESIGN"; then
24472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24473$as_echo "$CODESIGN" >&6; }
24474else
24475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24476$as_echo "no" >&6; }
24477fi
24478
24479
24480  test -n "$CODESIGN" && break
24481done
24482
24483    else
24484      # If it succeeded, then it was overridden by the user. We will use it
24485      # for the tool.
24486
24487      # First remove it from the list of overridden variables, so we can test
24488      # for unknown variables in the end.
24489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24490
24491      # Check if we try to supply an empty value
24492      if test "x$CODESIGN" = x; then
24493        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24494$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24496$as_echo_n "checking for CODESIGN... " >&6; }
24497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24498$as_echo "disabled" >&6; }
24499      else
24500        # Check if the provided tool contains a complete path.
24501        tool_specified="$CODESIGN"
24502        tool_basename="${tool_specified##*/}"
24503        if test "x$tool_basename" = "x$tool_specified"; then
24504          # A command without a complete path is provided, search $PATH.
24505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24506$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24507          # Extract the first word of "$tool_basename", so it can be a program name with args.
24508set dummy $tool_basename; ac_word=$2
24509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24510$as_echo_n "checking for $ac_word... " >&6; }
24511if ${ac_cv_path_CODESIGN+:} false; then :
24512  $as_echo_n "(cached) " >&6
24513else
24514  case $CODESIGN in
24515  [\\/]* | ?:[\\/]*)
24516  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24517  ;;
24518  *)
24519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24520for as_dir in $PATH
24521do
24522  IFS=$as_save_IFS
24523  test -z "$as_dir" && as_dir=.
24524    for ac_exec_ext in '' $ac_executable_extensions; do
24525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24526    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24528    break 2
24529  fi
24530done
24531  done
24532IFS=$as_save_IFS
24533
24534  ;;
24535esac
24536fi
24537CODESIGN=$ac_cv_path_CODESIGN
24538if test -n "$CODESIGN"; then
24539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24540$as_echo "$CODESIGN" >&6; }
24541else
24542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24543$as_echo "no" >&6; }
24544fi
24545
24546
24547          if test "x$CODESIGN" = x; then
24548            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24549          fi
24550        else
24551          # Otherwise we believe it is a complete path. Use it as it is.
24552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24553$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24554          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24555$as_echo_n "checking for CODESIGN... " >&6; }
24556          if test ! -x "$tool_specified"; then
24557            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24558$as_echo "not found" >&6; }
24559            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24560          fi
24561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24562$as_echo "$tool_specified" >&6; }
24563        fi
24564      fi
24565    fi
24566
24567  fi
24568
24569
24570    if test "x$CODESIGN" != "x"; then
24571      # Verify that the openjdk_codesign certificate is present
24572      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24573$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24574      $RM codesign-testfile
24575      $TOUCH codesign-testfile
24576      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24577      $RM codesign-testfile
24578      if test "x$CODESIGN" = x; then
24579        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24580$as_echo "no" >&6; }
24581      else
24582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24583$as_echo "yes" >&6; }
24584      fi
24585    fi
24586
24587
24588
24589  # Publish this variable in the help.
24590
24591
24592  if [ -z "${SETFILE+x}" ]; then
24593    # The variable is not set by user, try to locate tool using the code snippet
24594    for ac_prog in SetFile
24595do
24596  # Extract the first word of "$ac_prog", so it can be a program name with args.
24597set dummy $ac_prog; ac_word=$2
24598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24599$as_echo_n "checking for $ac_word... " >&6; }
24600if ${ac_cv_path_SETFILE+:} false; then :
24601  $as_echo_n "(cached) " >&6
24602else
24603  case $SETFILE in
24604  [\\/]* | ?:[\\/]*)
24605  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24606  ;;
24607  *)
24608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24609for as_dir in $PATH
24610do
24611  IFS=$as_save_IFS
24612  test -z "$as_dir" && as_dir=.
24613    for ac_exec_ext in '' $ac_executable_extensions; do
24614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24615    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24617    break 2
24618  fi
24619done
24620  done
24621IFS=$as_save_IFS
24622
24623  ;;
24624esac
24625fi
24626SETFILE=$ac_cv_path_SETFILE
24627if test -n "$SETFILE"; then
24628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24629$as_echo "$SETFILE" >&6; }
24630else
24631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24632$as_echo "no" >&6; }
24633fi
24634
24635
24636  test -n "$SETFILE" && break
24637done
24638
24639  else
24640    # The variable is set, but is it from the command line or the environment?
24641
24642    # Try to remove the string !SETFILE! from our list.
24643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24645      # If it failed, the variable was not from the command line. Ignore it,
24646      # but warn the user (except for BASH, which is always set by the calling BASH).
24647      if test "xSETFILE" != xBASH; then
24648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24649$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24650      fi
24651      # Try to locate tool using the code snippet
24652      for ac_prog in SetFile
24653do
24654  # Extract the first word of "$ac_prog", so it can be a program name with args.
24655set dummy $ac_prog; ac_word=$2
24656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24657$as_echo_n "checking for $ac_word... " >&6; }
24658if ${ac_cv_path_SETFILE+:} false; then :
24659  $as_echo_n "(cached) " >&6
24660else
24661  case $SETFILE in
24662  [\\/]* | ?:[\\/]*)
24663  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24664  ;;
24665  *)
24666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24667for as_dir in $PATH
24668do
24669  IFS=$as_save_IFS
24670  test -z "$as_dir" && as_dir=.
24671    for ac_exec_ext in '' $ac_executable_extensions; do
24672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24673    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24675    break 2
24676  fi
24677done
24678  done
24679IFS=$as_save_IFS
24680
24681  ;;
24682esac
24683fi
24684SETFILE=$ac_cv_path_SETFILE
24685if test -n "$SETFILE"; then
24686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24687$as_echo "$SETFILE" >&6; }
24688else
24689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24690$as_echo "no" >&6; }
24691fi
24692
24693
24694  test -n "$SETFILE" && break
24695done
24696
24697    else
24698      # If it succeeded, then it was overridden by the user. We will use it
24699      # for the tool.
24700
24701      # First remove it from the list of overridden variables, so we can test
24702      # for unknown variables in the end.
24703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24704
24705      # Check if we try to supply an empty value
24706      if test "x$SETFILE" = x; then
24707        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24708$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24710$as_echo_n "checking for SETFILE... " >&6; }
24711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24712$as_echo "disabled" >&6; }
24713      else
24714        # Check if the provided tool contains a complete path.
24715        tool_specified="$SETFILE"
24716        tool_basename="${tool_specified##*/}"
24717        if test "x$tool_basename" = "x$tool_specified"; then
24718          # A command without a complete path is provided, search $PATH.
24719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24720$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24721          # Extract the first word of "$tool_basename", so it can be a program name with args.
24722set dummy $tool_basename; ac_word=$2
24723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24724$as_echo_n "checking for $ac_word... " >&6; }
24725if ${ac_cv_path_SETFILE+:} false; then :
24726  $as_echo_n "(cached) " >&6
24727else
24728  case $SETFILE in
24729  [\\/]* | ?:[\\/]*)
24730  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24731  ;;
24732  *)
24733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24734for as_dir in $PATH
24735do
24736  IFS=$as_save_IFS
24737  test -z "$as_dir" && as_dir=.
24738    for ac_exec_ext in '' $ac_executable_extensions; do
24739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24740    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24742    break 2
24743  fi
24744done
24745  done
24746IFS=$as_save_IFS
24747
24748  ;;
24749esac
24750fi
24751SETFILE=$ac_cv_path_SETFILE
24752if test -n "$SETFILE"; then
24753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24754$as_echo "$SETFILE" >&6; }
24755else
24756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24757$as_echo "no" >&6; }
24758fi
24759
24760
24761          if test "x$SETFILE" = x; then
24762            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24763          fi
24764        else
24765          # Otherwise we believe it is a complete path. Use it as it is.
24766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24767$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24768          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24769$as_echo_n "checking for SETFILE... " >&6; }
24770          if test ! -x "$tool_specified"; then
24771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24772$as_echo "not found" >&6; }
24773            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24774          fi
24775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24776$as_echo "$tool_specified" >&6; }
24777        fi
24778      fi
24779    fi
24780
24781  fi
24782
24783
24784
24785  if test "x$SETFILE" = x; then
24786    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24787  fi
24788
24789
24790  fi
24791
24792
24793  # Check bash version
24794  # Extra [ ] to stop m4 mangling
24795   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24797$as_echo_n "checking bash version... " >&6; }
24798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24799$as_echo "$BASH_VER" >&6; }
24800
24801  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24802  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24803  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24804    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24805  fi
24806
24807  # Test if bash supports pipefail.
24808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24809$as_echo_n "checking if bash supports pipefail... " >&6; }
24810  if ${BASH} -c 'set -o pipefail'; then
24811    BASH_ARGS="$BASH_ARGS -o pipefail"
24812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24813$as_echo "yes" >&6; }
24814  else
24815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24816$as_echo "no" >&6; }
24817  fi
24818
24819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24820$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24821  if ${BASH} -e -c 'true'; then
24822    BASH_ARGS="$BASH_ARGS -e"
24823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24824$as_echo "yes" >&6; }
24825  else
24826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24827$as_echo "no" >&6; }
24828  fi
24829
24830
24831
24832
24833# Check if pkg-config is available.
24834
24835
24836if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24837	if test -n "$ac_tool_prefix"; then
24838  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24839set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24841$as_echo_n "checking for $ac_word... " >&6; }
24842if ${ac_cv_path_PKG_CONFIG+:} false; then :
24843  $as_echo_n "(cached) " >&6
24844else
24845  case $PKG_CONFIG in
24846  [\\/]* | ?:[\\/]*)
24847  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24848  ;;
24849  *)
24850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24851for as_dir in $PATH
24852do
24853  IFS=$as_save_IFS
24854  test -z "$as_dir" && as_dir=.
24855    for ac_exec_ext in '' $ac_executable_extensions; do
24856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24857    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24859    break 2
24860  fi
24861done
24862  done
24863IFS=$as_save_IFS
24864
24865  ;;
24866esac
24867fi
24868PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24869if test -n "$PKG_CONFIG"; then
24870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24871$as_echo "$PKG_CONFIG" >&6; }
24872else
24873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24874$as_echo "no" >&6; }
24875fi
24876
24877
24878fi
24879if test -z "$ac_cv_path_PKG_CONFIG"; then
24880  ac_pt_PKG_CONFIG=$PKG_CONFIG
24881  # Extract the first word of "pkg-config", so it can be a program name with args.
24882set dummy pkg-config; ac_word=$2
24883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24884$as_echo_n "checking for $ac_word... " >&6; }
24885if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24886  $as_echo_n "(cached) " >&6
24887else
24888  case $ac_pt_PKG_CONFIG in
24889  [\\/]* | ?:[\\/]*)
24890  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24891  ;;
24892  *)
24893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24894for as_dir in $PATH
24895do
24896  IFS=$as_save_IFS
24897  test -z "$as_dir" && as_dir=.
24898    for ac_exec_ext in '' $ac_executable_extensions; do
24899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24900    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24902    break 2
24903  fi
24904done
24905  done
24906IFS=$as_save_IFS
24907
24908  ;;
24909esac
24910fi
24911ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24912if test -n "$ac_pt_PKG_CONFIG"; then
24913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24914$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24915else
24916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24917$as_echo "no" >&6; }
24918fi
24919
24920  if test "x$ac_pt_PKG_CONFIG" = x; then
24921    PKG_CONFIG=""
24922  else
24923    case $cross_compiling:$ac_tool_warned in
24924yes:)
24925{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24926$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24927ac_tool_warned=yes ;;
24928esac
24929    PKG_CONFIG=$ac_pt_PKG_CONFIG
24930  fi
24931else
24932  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24933fi
24934
24935fi
24936if test -n "$PKG_CONFIG"; then
24937	_pkg_min_version=0.9.0
24938	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24939$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24940	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24941		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24942$as_echo "yes" >&6; }
24943	else
24944		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24945$as_echo "no" >&6; }
24946		PKG_CONFIG=""
24947	fi
24948
24949fi
24950
24951# After basic tools have been setup, we can check build os specific details.
24952
24953  ###############################################################################
24954
24955  # Note that this is the build platform OS version!
24956
24957  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24958  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24959  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24960  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24961
24962
24963
24964
24965
24966# Misc basic settings
24967
24968
24969# Check whether --with-default-make-target was given.
24970if test "${with_default_make_target+set}" = set; then :
24971  withval=$with_default_make_target;
24972fi
24973
24974  if test "x$with_default_make_target" = "x" \
24975      || test "x$with_default_make_target" = "xyes"; then
24976    DEFAULT_MAKE_TARGET="exploded-image"
24977  elif test "x$with_default_make_target" = "xno"; then
24978    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24979  else
24980    DEFAULT_MAKE_TARGET="$with_default_make_target"
24981  fi
24982
24983
24984
24985
24986###############################################################################
24987#
24988# Determine OpenJDK variants, options and version numbers.
24989#
24990###############################################################################
24991
24992# We need build & target for this.
24993
24994  # Should we build a JDK without a graphical UI?
24995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24996$as_echo_n "checking headless only... " >&6; }
24997  # Check whether --enable-headless-only was given.
24998if test "${enable_headless_only+set}" = set; then :
24999  enableval=$enable_headless_only;
25000fi
25001
25002
25003  if test "x$enable_headless_only" = "xyes"; then
25004    ENABLE_HEADLESS_ONLY="true"
25005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25006$as_echo "yes" >&6; }
25007  elif test "x$enable_headless_only" = "xno"; then
25008    ENABLE_HEADLESS_ONLY="false"
25009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25010$as_echo "no" >&6; }
25011  elif test "x$enable_headless_only" = "x"; then
25012    ENABLE_HEADLESS_ONLY="false"
25013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25014$as_echo "no" >&6; }
25015  else
25016    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
25017  fi
25018
25019
25020
25021  # Should we build the complete docs, or just a lightweight version?
25022  # Check whether --enable-full-docs was given.
25023if test "${enable_full_docs+set}" = set; then :
25024  enableval=$enable_full_docs;
25025fi
25026
25027
25028  # Verify dependencies
25029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
25030$as_echo_n "checking for graphviz dot... " >&6; }
25031  if test "x$DOT" != "x"; then
25032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25033$as_echo "yes" >&6; }
25034  else
25035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
25036$as_echo "no, cannot generate full docs" >&6; }
25037    FULL_DOCS_DEP_MISSING=true
25038  fi
25039
25040  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
25041$as_echo_n "checking for pandoc... " >&6; }
25042  if test "x$PANDOC" != "x"; then
25043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25044$as_echo "yes" >&6; }
25045  else
25046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
25047$as_echo "no, cannot generate full docs" >&6; }
25048    FULL_DOCS_DEP_MISSING=true
25049  fi
25050
25051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
25052$as_echo_n "checking full docs... " >&6; }
25053  if test "x$enable_full_docs" = xyes; then
25054    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
25055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25056$as_echo "no, missing dependencies" >&6; }
25057
25058  # Print a helpful message on how to acquire the necessary build dependency.
25059  # dot is the help tag: freetype, cups, alsa etc
25060  MISSING_DEPENDENCY=dot
25061
25062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25063    cygwin_help $MISSING_DEPENDENCY
25064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25065    msys_help $MISSING_DEPENDENCY
25066  else
25067    PKGHANDLER_COMMAND=
25068
25069    case $PKGHANDLER in
25070      apt-get)
25071        apt_help     $MISSING_DEPENDENCY ;;
25072      yum)
25073        yum_help     $MISSING_DEPENDENCY ;;
25074      brew)
25075        brew_help    $MISSING_DEPENDENCY ;;
25076      port)
25077        port_help    $MISSING_DEPENDENCY ;;
25078      pkgutil)
25079        pkgutil_help $MISSING_DEPENDENCY ;;
25080      pkgadd)
25081        pkgadd_help  $MISSING_DEPENDENCY ;;
25082    esac
25083
25084    if test "x$PKGHANDLER_COMMAND" != x; then
25085      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25086    fi
25087  fi
25088
25089      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
25090    else
25091      ENABLE_FULL_DOCS=true
25092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
25093$as_echo "yes, forced" >&6; }
25094    fi
25095  elif test "x$enable_full_docs" = xno; then
25096    ENABLE_FULL_DOCS=false
25097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
25098$as_echo "no, forced" >&6; }
25099  elif test "x$enable_full_docs" = x; then
25100    # Check for prerequisites
25101    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
25102      ENABLE_FULL_DOCS=false
25103      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25104$as_echo "no, missing dependencies" >&6; }
25105    else
25106      ENABLE_FULL_DOCS=true
25107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
25108$as_echo "yes, dependencies present" >&6; }
25109    fi
25110  else
25111    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
25112  fi
25113
25114
25115
25116  # Choose cacerts source file
25117
25118# Check whether --with-cacerts-file was given.
25119if test "${with_cacerts_file+set}" = set; then :
25120  withval=$with_cacerts_file;
25121fi
25122
25123  if test "x$with_cacerts_file" != x; then
25124    CACERTS_FILE=$with_cacerts_file
25125  fi
25126
25127
25128  # Enable or disable unlimited crypto
25129  # Check whether --enable-unlimited-crypto was given.
25130if test "${enable_unlimited_crypto+set}" = set; then :
25131  enableval=$enable_unlimited_crypto;
25132else
25133  enable_unlimited_crypto=yes
25134fi
25135
25136  if test "x$enable_unlimited_crypto" = "xyes"; then
25137    UNLIMITED_CRYPTO=true
25138  else
25139    UNLIMITED_CRYPTO=false
25140  fi
25141
25142
25143  # Should we build the serviceability agent (SA)?
25144  INCLUDE_SA=true
25145  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25146    INCLUDE_SA=false
25147  fi
25148  if test "x$OPENJDK_TARGET_OS" = xaix ; then
25149    INCLUDE_SA=false
25150  fi
25151
25152
25153  # Compress jars
25154  COMPRESS_JARS=false
25155
25156
25157
25158  # Setup default copyright year. Mostly overridden when building close to a new year.
25159
25160# Check whether --with-copyright-year was given.
25161if test "${with_copyright_year+set}" = set; then :
25162  withval=$with_copyright_year;
25163fi
25164
25165  if test "x$with_copyright_year" = xyes; then
25166    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25167  elif test "x$with_copyright_year" != x; then
25168    COPYRIGHT_YEAR="$with_copyright_year"
25169  else
25170    COPYRIGHT_YEAR=`$DATE +'%Y'`
25171  fi
25172
25173
25174
25175  # Check whether --enable-keep-packaged-modules was given.
25176if test "${enable_keep_packaged_modules+set}" = set; then :
25177  enableval=$enable_keep_packaged_modules;
25178fi
25179
25180
25181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25182$as_echo_n "checking if packaged modules are kept... " >&6; }
25183  if test "x$enable_keep_packaged_modules" = "xyes"; then
25184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25185$as_echo "yes" >&6; }
25186    JLINK_KEEP_PACKAGED_MODULES=true
25187  elif test "x$enable_keep_packaged_modules" = "xno"; then
25188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25189$as_echo "no" >&6; }
25190    JLINK_KEEP_PACKAGED_MODULES=false
25191  elif test "x$enable_keep_packaged_modules" = "x"; then
25192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25193$as_echo "yes (default)" >&6; }
25194    JLINK_KEEP_PACKAGED_MODULES=true
25195  else
25196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25197$as_echo "error" >&6; }
25198    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25199  fi
25200
25201
25202
25203
25204  # Warn user that old version arguments are deprecated.
25205
25206
25207# Check whether --with-milestone was given.
25208if test "${with_milestone+set}" = set; then :
25209  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25210$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25211fi
25212
25213
25214
25215
25216# Check whether --with-update-version was given.
25217if test "${with_update_version+set}" = set; then :
25218  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25219$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25220fi
25221
25222
25223
25224
25225# Check whether --with-user-release-suffix was given.
25226if test "${with_user_release_suffix+set}" = set; then :
25227  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
25228$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25229fi
25230
25231
25232
25233
25234# Check whether --with-build-number was given.
25235if test "${with_build_number+set}" = set; then :
25236  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25237$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25238fi
25239
25240
25241
25242  # Source the version numbers file
25243  . $AUTOCONF_DIR/version-numbers
25244
25245  # Some non-version number information is set in that file
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255  # Override version from arguments
25256
25257  # If --with-version-string is set, process it first. It is possible to
25258  # override parts with more specific flags, since these are processed later.
25259
25260# Check whether --with-version-string was given.
25261if test "${with_version_string+set}" = set; then :
25262  withval=$with_version_string;
25263fi
25264
25265  if test "x$with_version_string" = xyes; then
25266    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25267  elif test "x$with_version_string" != x; then
25268    # Additional [] needed to keep m4 from mangling shell constructs.
25269    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25270      VERSION_MAJOR=${BASH_REMATCH[1]}
25271      VERSION_MINOR=${BASH_REMATCH[3]}
25272      VERSION_SECURITY=${BASH_REMATCH[5]}
25273      VERSION_PATCH=${BASH_REMATCH[7]}
25274      VERSION_PRE=${BASH_REMATCH[9]}
25275      version_plus_separator=${BASH_REMATCH[11]}
25276      VERSION_BUILD=${BASH_REMATCH[12]}
25277      VERSION_OPT=${BASH_REMATCH[14]}
25278      # Unspecified numerical fields are interpreted as 0.
25279      if test "x$VERSION_MINOR" = x; then
25280        VERSION_MINOR=0
25281      fi
25282      if test "x$VERSION_SECURITY" = x; then
25283        VERSION_SECURITY=0
25284      fi
25285      if test "x$VERSION_PATCH" = x; then
25286        VERSION_PATCH=0
25287      fi
25288      if test "x$version_plus_separator" != x \
25289          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25290        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25291      fi
25292      # Stop the version part process from setting default values.
25293      # We still allow them to explicitly override though.
25294      NO_DEFAULT_VERSION_PARTS=true
25295    else
25296      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25297    fi
25298  fi
25299
25300
25301# Check whether --with-version-pre was given.
25302if test "${with_version_pre+set}" = set; then :
25303  withval=$with_version_pre; with_version_pre_present=true
25304else
25305  with_version_pre_present=false
25306fi
25307
25308
25309  if test "x$with_version_pre_present" = xtrue; then
25310    if test "x$with_version_pre" = xyes; then
25311      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25312    elif test "x$with_version_pre" = xno; then
25313      # Interpret --without-* as empty string instead of the literal "no"
25314      VERSION_PRE=
25315    else
25316      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25317       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25318      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25320$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25321      fi
25322    fi
25323  else
25324    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25325      # Default is to use "internal" as pre
25326      VERSION_PRE="internal"
25327    fi
25328  fi
25329
25330
25331# Check whether --with-version-opt was given.
25332if test "${with_version_opt+set}" = set; then :
25333  withval=$with_version_opt; with_version_opt_present=true
25334else
25335  with_version_opt_present=false
25336fi
25337
25338
25339  if test "x$with_version_opt_present" = xtrue; then
25340    if test "x$with_version_opt" = xyes; then
25341      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25342    elif test "x$with_version_opt" = xno; then
25343      # Interpret --without-* as empty string instead of the literal "no"
25344      VERSION_OPT=
25345    else
25346      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25347       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25348      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25350$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25351      fi
25352    fi
25353  else
25354    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25355      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25356      # Outer [ ] to quote m4.
25357       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25358      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25359    fi
25360  fi
25361
25362
25363# Check whether --with-version-build was given.
25364if test "${with_version_build+set}" = set; then :
25365  withval=$with_version_build; with_version_build_present=true
25366else
25367  with_version_build_present=false
25368fi
25369
25370
25371  if test "x$with_version_build_present" = xtrue; then
25372    if test "x$with_version_build" = xyes; then
25373      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25374    elif test "x$with_version_build" = xno; then
25375      # Interpret --without-* as empty string instead of the literal "no"
25376      VERSION_BUILD=
25377    elif test "x$with_version_build" = x; then
25378      VERSION_BUILD=
25379    else
25380
25381  # Additional [] needed to keep m4 from mangling shell constructs.
25382  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25383    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25384  fi
25385  # Extract the version number without leading zeros.
25386  cleaned_value=${BASH_REMATCH[1]}
25387  if test "x$cleaned_value" = x; then
25388    # Special case for zero
25389    cleaned_value=${BASH_REMATCH[2]}
25390  fi
25391
25392  if test $cleaned_value -gt 255; then
25393    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25394  fi
25395  if test "x$cleaned_value" != "x$with_version_build"; then
25396    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25397$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25398  fi
25399  VERSION_BUILD=$cleaned_value
25400
25401    fi
25402  else
25403    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25404      # Default is to not have a build number.
25405      VERSION_BUILD=""
25406      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25407      VERSION_BUILD=0
25408    fi
25409  fi
25410
25411
25412# Check whether --with-version-major was given.
25413if test "${with_version_major+set}" = set; then :
25414  withval=$with_version_major; with_version_major_present=true
25415else
25416  with_version_major_present=false
25417fi
25418
25419
25420  if test "x$with_version_major_present" = xtrue; then
25421    if test "x$with_version_major" = xyes; then
25422      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25423    else
25424
25425  # Additional [] needed to keep m4 from mangling shell constructs.
25426  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25427    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25428  fi
25429  # Extract the version number without leading zeros.
25430  cleaned_value=${BASH_REMATCH[1]}
25431  if test "x$cleaned_value" = x; then
25432    # Special case for zero
25433    cleaned_value=${BASH_REMATCH[2]}
25434  fi
25435
25436  if test $cleaned_value -gt 255; then
25437    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25438  fi
25439  if test "x$cleaned_value" != "x$with_version_major"; then
25440    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25441$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25442  fi
25443  VERSION_MAJOR=$cleaned_value
25444
25445    fi
25446  else
25447    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25448      # Default is to get value from version-numbers
25449      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25450    fi
25451  fi
25452
25453
25454# Check whether --with-version-minor was given.
25455if test "${with_version_minor+set}" = set; then :
25456  withval=$with_version_minor; with_version_minor_present=true
25457else
25458  with_version_minor_present=false
25459fi
25460
25461
25462  if test "x$with_version_minor_present" = xtrue; then
25463    if test "x$with_version_minor" = xyes; then
25464      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25465    elif test "x$with_version_minor" = xno; then
25466      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25467      VERSION_MINOR=0
25468    elif test "x$with_version_minor" = x; then
25469      VERSION_MINOR=0
25470    else
25471
25472  # Additional [] needed to keep m4 from mangling shell constructs.
25473  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25474    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25475  fi
25476  # Extract the version number without leading zeros.
25477  cleaned_value=${BASH_REMATCH[1]}
25478  if test "x$cleaned_value" = x; then
25479    # Special case for zero
25480    cleaned_value=${BASH_REMATCH[2]}
25481  fi
25482
25483  if test $cleaned_value -gt 255; then
25484    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25485  fi
25486  if test "x$cleaned_value" != "x$with_version_minor"; then
25487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25488$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25489  fi
25490  VERSION_MINOR=$cleaned_value
25491
25492    fi
25493  else
25494    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25495      # Default is 0, if unspecified
25496      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25497    fi
25498  fi
25499
25500
25501# Check whether --with-version-security was given.
25502if test "${with_version_security+set}" = set; then :
25503  withval=$with_version_security; with_version_security_present=true
25504else
25505  with_version_security_present=false
25506fi
25507
25508
25509  if test "x$with_version_security_present" = xtrue; then
25510    if test "x$with_version_security" = xyes; then
25511      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25512    elif test "x$with_version_security" = xno; then
25513      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25514      VERSION_SECURITY=0
25515    elif test "x$with_version_security" = x; then
25516      VERSION_SECURITY=0
25517    else
25518
25519  # Additional [] needed to keep m4 from mangling shell constructs.
25520  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25521    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25522  fi
25523  # Extract the version number without leading zeros.
25524  cleaned_value=${BASH_REMATCH[1]}
25525  if test "x$cleaned_value" = x; then
25526    # Special case for zero
25527    cleaned_value=${BASH_REMATCH[2]}
25528  fi
25529
25530  if test $cleaned_value -gt 255; then
25531    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25532  fi
25533  if test "x$cleaned_value" != "x$with_version_security"; then
25534    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25535$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25536  fi
25537  VERSION_SECURITY=$cleaned_value
25538
25539    fi
25540  else
25541    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25542      # Default is 0, if unspecified
25543      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25544    fi
25545  fi
25546
25547
25548# Check whether --with-version-patch was given.
25549if test "${with_version_patch+set}" = set; then :
25550  withval=$with_version_patch; with_version_patch_present=true
25551else
25552  with_version_patch_present=false
25553fi
25554
25555
25556  if test "x$with_version_patch_present" = xtrue; then
25557    if test "x$with_version_patch" = xyes; then
25558      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25559    elif test "x$with_version_patch" = xno; then
25560      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25561      VERSION_PATCH=0
25562    elif test "x$with_version_patch" = x; then
25563      VERSION_PATCH=0
25564    else
25565
25566  # Additional [] needed to keep m4 from mangling shell constructs.
25567  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25568    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25569  fi
25570  # Extract the version number without leading zeros.
25571  cleaned_value=${BASH_REMATCH[1]}
25572  if test "x$cleaned_value" = x; then
25573    # Special case for zero
25574    cleaned_value=${BASH_REMATCH[2]}
25575  fi
25576
25577  if test $cleaned_value -gt 255; then
25578    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25579  fi
25580  if test "x$cleaned_value" != "x$with_version_patch"; then
25581    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25582$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25583  fi
25584  VERSION_PATCH=$cleaned_value
25585
25586    fi
25587  else
25588    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25589      # Default is 0, if unspecified
25590      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25591    fi
25592  fi
25593
25594  # Calculate derived version properties
25595
25596  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25597  if test "x$VERSION_PRE" = x; then
25598    VERSION_IS_GA=true
25599  else
25600    VERSION_IS_GA=false
25601  fi
25602
25603  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25604  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25605
25606  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25607  # Strip trailing zeroes from stripped_version_number
25608  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25609  VERSION_NUMBER=$stripped_version_number
25610
25611  # The complete version string, with additional build information
25612  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25613    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25614  else
25615    # If either build or opt is set, we need a + separator
25616    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25617  fi
25618
25619  # The short version string, just VERSION_NUMBER and PRE, if present.
25620  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25621
25622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25623$as_echo_n "checking for version string... " >&6; }
25624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25625$as_echo "$VERSION_STRING" >&6; }
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641###############################################################################
25642#
25643# Setup BootJDK, used to bootstrap the build.
25644#
25645###############################################################################
25646
25647
25648  BOOT_JDK_FOUND=no
25649
25650# Check whether --with-boot-jdk was given.
25651if test "${with_boot_jdk+set}" = set; then :
25652  withval=$with_boot_jdk;
25653fi
25654
25655
25656  # We look for the Boot JDK through various means, going from more certain to
25657  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25658  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25659  # must check if this is indeed valid; otherwise we'll continue looking.
25660
25661  # Test: Is bootjdk explicitly set by command line arguments?
25662
25663  if test "x$BOOT_JDK_FOUND" = xno; then
25664    # Now execute the test
25665
25666  if test "x$with_boot_jdk" != x; then
25667    BOOT_JDK=$with_boot_jdk
25668    BOOT_JDK_FOUND=maybe
25669    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25670$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25671  fi
25672
25673
25674    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25675    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25676      # Do we have a bin/java?
25677      if test ! -x "$BOOT_JDK/bin/java"; then
25678        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25680        BOOT_JDK_FOUND=no
25681      else
25682        # Do we have a bin/javac?
25683        if test ! -x "$BOOT_JDK/bin/javac"; then
25684          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25686          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25687$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25688          BOOT_JDK_FOUND=no
25689        else
25690          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25691          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25692
25693          # Extra M4 quote needed to protect [] in grep expression.
25694          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25695          if test "x$FOUND_CORRECT_VERSION" = x; then
25696            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25698            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25699$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25700            BOOT_JDK_FOUND=no
25701          else
25702            # We're done! :-)
25703            BOOT_JDK_FOUND=yes
25704
25705  # Only process if variable expands to non-empty
25706
25707  if test "x$BOOT_JDK" != x; then
25708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25709
25710  # Input might be given as Windows format, start by converting to
25711  # unix format.
25712  path="$BOOT_JDK"
25713  new_path=`$CYGPATH -u "$path"`
25714
25715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25718  # "foo.exe" is OK but "foo" is an error.
25719  #
25720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25721  # It is also a way to make sure we got the proper file name for the real test later on.
25722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25723  if test "x$test_shortpath" = x; then
25724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25726    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25727  fi
25728
25729  # Call helper function which possibly converts this using DOS-style short mode.
25730  # If so, the updated path is stored in $new_path.
25731
25732  input_path="$new_path"
25733  # Check if we need to convert this using DOS-style short mode. If the path
25734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25735  # take no chances and rewrite it.
25736  # Note: m4 eats our [], so we need to use [ and ] instead.
25737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25738  if test "x$has_forbidden_chars" != x; then
25739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25743      # Going to short mode and back again did indeed matter. Since short mode is
25744      # case insensitive, let's make it lowercase to improve readability.
25745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25746      # Now convert it back to Unix-style (cygpath)
25747      input_path=`$CYGPATH -u "$shortmode_path"`
25748      new_path="$input_path"
25749    fi
25750  fi
25751
25752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25753  if test "x$test_cygdrive_prefix" = x; then
25754    # As a simple fix, exclude /usr/bin since it's not a real path.
25755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25757      # a path prefixed by /cygdrive for fixpath to work.
25758      new_path="$CYGWIN_ROOT_PATH$input_path"
25759    fi
25760  fi
25761
25762
25763  if test "x$path" != "x$new_path"; then
25764    BOOT_JDK="$new_path"
25765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25767  fi
25768
25769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25770
25771  path="$BOOT_JDK"
25772  has_colon=`$ECHO $path | $GREP ^.:`
25773  new_path="$path"
25774  if test "x$has_colon" = x; then
25775    # Not in mixed or Windows style, start by that.
25776    new_path=`cmd //c echo $path`
25777  fi
25778
25779
25780  input_path="$new_path"
25781  # Check if we need to convert this using DOS-style short mode. If the path
25782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25783  # take no chances and rewrite it.
25784  # Note: m4 eats our [], so we need to use [ and ] instead.
25785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25786  if test "x$has_forbidden_chars" != x; then
25787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25789  fi
25790
25791
25792  windows_path="$new_path"
25793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25794    unix_path=`$CYGPATH -u "$windows_path"`
25795    new_path="$unix_path"
25796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25798    new_path="$unix_path"
25799  fi
25800
25801  if test "x$path" != "x$new_path"; then
25802    BOOT_JDK="$new_path"
25803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25805  fi
25806
25807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25809
25810    else
25811      # We're on a unix platform. Hooray! :)
25812      path="$BOOT_JDK"
25813      has_space=`$ECHO "$path" | $GREP " "`
25814      if test "x$has_space" != x; then
25815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25818      fi
25819
25820      # Use eval to expand a potential ~
25821      eval path="$path"
25822      if test ! -f "$path" && test ! -d "$path"; then
25823        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25824      fi
25825
25826      if test -d "$path"; then
25827        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25828      else
25829        dir="`$DIRNAME "$path"`"
25830        base="`$BASENAME "$path"`"
25831        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25832      fi
25833    fi
25834  fi
25835
25836            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25837$as_echo_n "checking for Boot JDK... " >&6; }
25838            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25839$as_echo "$BOOT_JDK" >&6; }
25840            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25841$as_echo_n "checking Boot JDK version... " >&6; }
25842            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25843            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25844$as_echo "$BOOT_JDK_VERSION" >&6; }
25845          fi # end check jdk version
25846        fi # end check javac
25847      fi # end check java
25848    fi # end check boot jdk found
25849  fi
25850
25851  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25852    # Having specified an argument which is incorrect will produce an instant failure;
25853    # we should not go on looking
25854    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25855  fi
25856
25857  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25858
25859  if test "x$BOOT_JDK_FOUND" = xno; then
25860    # Now execute the test
25861
25862  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25863    # First check at user selected default
25864
25865  if test "x$BOOT_JDK_FOUND" = xno; then
25866    # Now execute the test
25867
25868  if test -x /usr/libexec/java_home; then
25869    BOOT_JDK=`/usr/libexec/java_home `
25870    BOOT_JDK_FOUND=maybe
25871    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25872$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25873  fi
25874
25875
25876    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25877    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25878      # Do we have a bin/java?
25879      if test ! -x "$BOOT_JDK/bin/java"; then
25880        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25882        BOOT_JDK_FOUND=no
25883      else
25884        # Do we have a bin/javac?
25885        if test ! -x "$BOOT_JDK/bin/javac"; then
25886          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25888          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25889$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25890          BOOT_JDK_FOUND=no
25891        else
25892          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25893          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25894
25895          # Extra M4 quote needed to protect [] in grep expression.
25896          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25897          if test "x$FOUND_CORRECT_VERSION" = x; then
25898            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25900            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25901$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25902            BOOT_JDK_FOUND=no
25903          else
25904            # We're done! :-)
25905            BOOT_JDK_FOUND=yes
25906
25907  # Only process if variable expands to non-empty
25908
25909  if test "x$BOOT_JDK" != x; then
25910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25911
25912  # Input might be given as Windows format, start by converting to
25913  # unix format.
25914  path="$BOOT_JDK"
25915  new_path=`$CYGPATH -u "$path"`
25916
25917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25920  # "foo.exe" is OK but "foo" is an error.
25921  #
25922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25923  # It is also a way to make sure we got the proper file name for the real test later on.
25924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25925  if test "x$test_shortpath" = x; then
25926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25928    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25929  fi
25930
25931  # Call helper function which possibly converts this using DOS-style short mode.
25932  # If so, the updated path is stored in $new_path.
25933
25934  input_path="$new_path"
25935  # Check if we need to convert this using DOS-style short mode. If the path
25936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25937  # take no chances and rewrite it.
25938  # Note: m4 eats our [], so we need to use [ and ] instead.
25939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25940  if test "x$has_forbidden_chars" != x; then
25941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25945      # Going to short mode and back again did indeed matter. Since short mode is
25946      # case insensitive, let's make it lowercase to improve readability.
25947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25948      # Now convert it back to Unix-style (cygpath)
25949      input_path=`$CYGPATH -u "$shortmode_path"`
25950      new_path="$input_path"
25951    fi
25952  fi
25953
25954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25955  if test "x$test_cygdrive_prefix" = x; then
25956    # As a simple fix, exclude /usr/bin since it's not a real path.
25957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25959      # a path prefixed by /cygdrive for fixpath to work.
25960      new_path="$CYGWIN_ROOT_PATH$input_path"
25961    fi
25962  fi
25963
25964
25965  if test "x$path" != "x$new_path"; then
25966    BOOT_JDK="$new_path"
25967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25968$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25969  fi
25970
25971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25972
25973  path="$BOOT_JDK"
25974  has_colon=`$ECHO $path | $GREP ^.:`
25975  new_path="$path"
25976  if test "x$has_colon" = x; then
25977    # Not in mixed or Windows style, start by that.
25978    new_path=`cmd //c echo $path`
25979  fi
25980
25981
25982  input_path="$new_path"
25983  # Check if we need to convert this using DOS-style short mode. If the path
25984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25985  # take no chances and rewrite it.
25986  # Note: m4 eats our [], so we need to use [ and ] instead.
25987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25988  if test "x$has_forbidden_chars" != x; then
25989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25991  fi
25992
25993
25994  windows_path="$new_path"
25995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25996    unix_path=`$CYGPATH -u "$windows_path"`
25997    new_path="$unix_path"
25998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26000    new_path="$unix_path"
26001  fi
26002
26003  if test "x$path" != "x$new_path"; then
26004    BOOT_JDK="$new_path"
26005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26006$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26007  fi
26008
26009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26011
26012    else
26013      # We're on a unix platform. Hooray! :)
26014      path="$BOOT_JDK"
26015      has_space=`$ECHO "$path" | $GREP " "`
26016      if test "x$has_space" != x; then
26017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26019        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26020      fi
26021
26022      # Use eval to expand a potential ~
26023      eval path="$path"
26024      if test ! -f "$path" && test ! -d "$path"; then
26025        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26026      fi
26027
26028      if test -d "$path"; then
26029        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26030      else
26031        dir="`$DIRNAME "$path"`"
26032        base="`$BASENAME "$path"`"
26033        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26034      fi
26035    fi
26036  fi
26037
26038            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26039$as_echo_n "checking for Boot JDK... " >&6; }
26040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26041$as_echo "$BOOT_JDK" >&6; }
26042            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26043$as_echo_n "checking Boot JDK version... " >&6; }
26044            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26046$as_echo "$BOOT_JDK_VERSION" >&6; }
26047          fi # end check jdk version
26048        fi # end check javac
26049      fi # end check java
26050    fi # end check boot jdk found
26051  fi
26052
26053    # If that did not work out (e.g. too old), try explicit versions instead
26054
26055  if test "x$BOOT_JDK_FOUND" = xno; then
26056    # Now execute the test
26057
26058  if test -x /usr/libexec/java_home; then
26059    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
26060    BOOT_JDK_FOUND=maybe
26061    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
26062$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
26063  fi
26064
26065
26066    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26067    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26068      # Do we have a bin/java?
26069      if test ! -x "$BOOT_JDK/bin/java"; then
26070        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26072        BOOT_JDK_FOUND=no
26073      else
26074        # Do we have a bin/javac?
26075        if test ! -x "$BOOT_JDK/bin/javac"; then
26076          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26078          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26079$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26080          BOOT_JDK_FOUND=no
26081        else
26082          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26083          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26084
26085          # Extra M4 quote needed to protect [] in grep expression.
26086          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26087          if test "x$FOUND_CORRECT_VERSION" = x; then
26088            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26090            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26091$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26092            BOOT_JDK_FOUND=no
26093          else
26094            # We're done! :-)
26095            BOOT_JDK_FOUND=yes
26096
26097  # Only process if variable expands to non-empty
26098
26099  if test "x$BOOT_JDK" != x; then
26100    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26101
26102  # Input might be given as Windows format, start by converting to
26103  # unix format.
26104  path="$BOOT_JDK"
26105  new_path=`$CYGPATH -u "$path"`
26106
26107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26110  # "foo.exe" is OK but "foo" is an error.
26111  #
26112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26113  # It is also a way to make sure we got the proper file name for the real test later on.
26114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26115  if test "x$test_shortpath" = x; then
26116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26118    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26119  fi
26120
26121  # Call helper function which possibly converts this using DOS-style short mode.
26122  # If so, the updated path is stored in $new_path.
26123
26124  input_path="$new_path"
26125  # Check if we need to convert this using DOS-style short mode. If the path
26126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26127  # take no chances and rewrite it.
26128  # Note: m4 eats our [], so we need to use [ and ] instead.
26129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26130  if test "x$has_forbidden_chars" != x; then
26131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26135      # Going to short mode and back again did indeed matter. Since short mode is
26136      # case insensitive, let's make it lowercase to improve readability.
26137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26138      # Now convert it back to Unix-style (cygpath)
26139      input_path=`$CYGPATH -u "$shortmode_path"`
26140      new_path="$input_path"
26141    fi
26142  fi
26143
26144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26145  if test "x$test_cygdrive_prefix" = x; then
26146    # As a simple fix, exclude /usr/bin since it's not a real path.
26147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26149      # a path prefixed by /cygdrive for fixpath to work.
26150      new_path="$CYGWIN_ROOT_PATH$input_path"
26151    fi
26152  fi
26153
26154
26155  if test "x$path" != "x$new_path"; then
26156    BOOT_JDK="$new_path"
26157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26158$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26159  fi
26160
26161    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26162
26163  path="$BOOT_JDK"
26164  has_colon=`$ECHO $path | $GREP ^.:`
26165  new_path="$path"
26166  if test "x$has_colon" = x; then
26167    # Not in mixed or Windows style, start by that.
26168    new_path=`cmd //c echo $path`
26169  fi
26170
26171
26172  input_path="$new_path"
26173  # Check if we need to convert this using DOS-style short mode. If the path
26174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26175  # take no chances and rewrite it.
26176  # Note: m4 eats our [], so we need to use [ and ] instead.
26177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26178  if test "x$has_forbidden_chars" != x; then
26179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26181  fi
26182
26183
26184  windows_path="$new_path"
26185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26186    unix_path=`$CYGPATH -u "$windows_path"`
26187    new_path="$unix_path"
26188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26190    new_path="$unix_path"
26191  fi
26192
26193  if test "x$path" != "x$new_path"; then
26194    BOOT_JDK="$new_path"
26195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26196$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26197  fi
26198
26199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26201
26202    else
26203      # We're on a unix platform. Hooray! :)
26204      path="$BOOT_JDK"
26205      has_space=`$ECHO "$path" | $GREP " "`
26206      if test "x$has_space" != x; then
26207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26208$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26209        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26210      fi
26211
26212      # Use eval to expand a potential ~
26213      eval path="$path"
26214      if test ! -f "$path" && test ! -d "$path"; then
26215        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26216      fi
26217
26218      if test -d "$path"; then
26219        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26220      else
26221        dir="`$DIRNAME "$path"`"
26222        base="`$BASENAME "$path"`"
26223        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26224      fi
26225    fi
26226  fi
26227
26228            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26229$as_echo_n "checking for Boot JDK... " >&6; }
26230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26231$as_echo "$BOOT_JDK" >&6; }
26232            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26233$as_echo_n "checking Boot JDK version... " >&6; }
26234            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26236$as_echo "$BOOT_JDK_VERSION" >&6; }
26237          fi # end check jdk version
26238        fi # end check javac
26239      fi # end check java
26240    fi # end check boot jdk found
26241  fi
26242
26243
26244  if test "x$BOOT_JDK_FOUND" = xno; then
26245    # Now execute the test
26246
26247  if test -x /usr/libexec/java_home; then
26248    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26249    BOOT_JDK_FOUND=maybe
26250    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26251$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26252  fi
26253
26254
26255    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26256    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26257      # Do we have a bin/java?
26258      if test ! -x "$BOOT_JDK/bin/java"; then
26259        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26261        BOOT_JDK_FOUND=no
26262      else
26263        # Do we have a bin/javac?
26264        if test ! -x "$BOOT_JDK/bin/javac"; then
26265          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26267          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26268$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26269          BOOT_JDK_FOUND=no
26270        else
26271          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26272          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26273
26274          # Extra M4 quote needed to protect [] in grep expression.
26275          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26276          if test "x$FOUND_CORRECT_VERSION" = x; then
26277            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26279            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26280$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26281            BOOT_JDK_FOUND=no
26282          else
26283            # We're done! :-)
26284            BOOT_JDK_FOUND=yes
26285
26286  # Only process if variable expands to non-empty
26287
26288  if test "x$BOOT_JDK" != x; then
26289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26290
26291  # Input might be given as Windows format, start by converting to
26292  # unix format.
26293  path="$BOOT_JDK"
26294  new_path=`$CYGPATH -u "$path"`
26295
26296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26299  # "foo.exe" is OK but "foo" is an error.
26300  #
26301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26302  # It is also a way to make sure we got the proper file name for the real test later on.
26303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26304  if test "x$test_shortpath" = x; then
26305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26307    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26308  fi
26309
26310  # Call helper function which possibly converts this using DOS-style short mode.
26311  # If so, the updated path is stored in $new_path.
26312
26313  input_path="$new_path"
26314  # Check if we need to convert this using DOS-style short mode. If the path
26315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26316  # take no chances and rewrite it.
26317  # Note: m4 eats our [], so we need to use [ and ] instead.
26318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26319  if test "x$has_forbidden_chars" != x; then
26320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26324      # Going to short mode and back again did indeed matter. Since short mode is
26325      # case insensitive, let's make it lowercase to improve readability.
26326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26327      # Now convert it back to Unix-style (cygpath)
26328      input_path=`$CYGPATH -u "$shortmode_path"`
26329      new_path="$input_path"
26330    fi
26331  fi
26332
26333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26334  if test "x$test_cygdrive_prefix" = x; then
26335    # As a simple fix, exclude /usr/bin since it's not a real path.
26336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26338      # a path prefixed by /cygdrive for fixpath to work.
26339      new_path="$CYGWIN_ROOT_PATH$input_path"
26340    fi
26341  fi
26342
26343
26344  if test "x$path" != "x$new_path"; then
26345    BOOT_JDK="$new_path"
26346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26347$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26348  fi
26349
26350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26351
26352  path="$BOOT_JDK"
26353  has_colon=`$ECHO $path | $GREP ^.:`
26354  new_path="$path"
26355  if test "x$has_colon" = x; then
26356    # Not in mixed or Windows style, start by that.
26357    new_path=`cmd //c echo $path`
26358  fi
26359
26360
26361  input_path="$new_path"
26362  # Check if we need to convert this using DOS-style short mode. If the path
26363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26364  # take no chances and rewrite it.
26365  # Note: m4 eats our [], so we need to use [ and ] instead.
26366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26367  if test "x$has_forbidden_chars" != x; then
26368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26370  fi
26371
26372
26373  windows_path="$new_path"
26374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26375    unix_path=`$CYGPATH -u "$windows_path"`
26376    new_path="$unix_path"
26377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26379    new_path="$unix_path"
26380  fi
26381
26382  if test "x$path" != "x$new_path"; then
26383    BOOT_JDK="$new_path"
26384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26385$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26386  fi
26387
26388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26390
26391    else
26392      # We're on a unix platform. Hooray! :)
26393      path="$BOOT_JDK"
26394      has_space=`$ECHO "$path" | $GREP " "`
26395      if test "x$has_space" != x; then
26396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26397$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26398        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26399      fi
26400
26401      # Use eval to expand a potential ~
26402      eval path="$path"
26403      if test ! -f "$path" && test ! -d "$path"; then
26404        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26405      fi
26406
26407      if test -d "$path"; then
26408        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26409      else
26410        dir="`$DIRNAME "$path"`"
26411        base="`$BASENAME "$path"`"
26412        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26413      fi
26414    fi
26415  fi
26416
26417            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26418$as_echo_n "checking for Boot JDK... " >&6; }
26419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26420$as_echo "$BOOT_JDK" >&6; }
26421            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26422$as_echo_n "checking Boot JDK version... " >&6; }
26423            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26425$as_echo "$BOOT_JDK_VERSION" >&6; }
26426          fi # end check jdk version
26427        fi # end check javac
26428      fi # end check java
26429    fi # end check boot jdk found
26430  fi
26431
26432
26433  if test "x$BOOT_JDK_FOUND" = xno; then
26434    # Now execute the test
26435
26436  if test -x /usr/libexec/java_home; then
26437    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26438    BOOT_JDK_FOUND=maybe
26439    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26440$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26441  fi
26442
26443
26444    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26445    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26446      # Do we have a bin/java?
26447      if test ! -x "$BOOT_JDK/bin/java"; then
26448        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26450        BOOT_JDK_FOUND=no
26451      else
26452        # Do we have a bin/javac?
26453        if test ! -x "$BOOT_JDK/bin/javac"; then
26454          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26456          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26457$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26458          BOOT_JDK_FOUND=no
26459        else
26460          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26461          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26462
26463          # Extra M4 quote needed to protect [] in grep expression.
26464          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26465          if test "x$FOUND_CORRECT_VERSION" = x; then
26466            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26467$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26468            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26469$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26470            BOOT_JDK_FOUND=no
26471          else
26472            # We're done! :-)
26473            BOOT_JDK_FOUND=yes
26474
26475  # Only process if variable expands to non-empty
26476
26477  if test "x$BOOT_JDK" != x; then
26478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26479
26480  # Input might be given as Windows format, start by converting to
26481  # unix format.
26482  path="$BOOT_JDK"
26483  new_path=`$CYGPATH -u "$path"`
26484
26485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26488  # "foo.exe" is OK but "foo" is an error.
26489  #
26490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26491  # It is also a way to make sure we got the proper file name for the real test later on.
26492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26493  if test "x$test_shortpath" = x; then
26494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26495$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26496    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26497  fi
26498
26499  # Call helper function which possibly converts this using DOS-style short mode.
26500  # If so, the updated path is stored in $new_path.
26501
26502  input_path="$new_path"
26503  # Check if we need to convert this using DOS-style short mode. If the path
26504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26505  # take no chances and rewrite it.
26506  # Note: m4 eats our [], so we need to use [ and ] instead.
26507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26508  if test "x$has_forbidden_chars" != x; then
26509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26513      # Going to short mode and back again did indeed matter. Since short mode is
26514      # case insensitive, let's make it lowercase to improve readability.
26515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26516      # Now convert it back to Unix-style (cygpath)
26517      input_path=`$CYGPATH -u "$shortmode_path"`
26518      new_path="$input_path"
26519    fi
26520  fi
26521
26522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26523  if test "x$test_cygdrive_prefix" = x; then
26524    # As a simple fix, exclude /usr/bin since it's not a real path.
26525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26527      # a path prefixed by /cygdrive for fixpath to work.
26528      new_path="$CYGWIN_ROOT_PATH$input_path"
26529    fi
26530  fi
26531
26532
26533  if test "x$path" != "x$new_path"; then
26534    BOOT_JDK="$new_path"
26535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26537  fi
26538
26539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26540
26541  path="$BOOT_JDK"
26542  has_colon=`$ECHO $path | $GREP ^.:`
26543  new_path="$path"
26544  if test "x$has_colon" = x; then
26545    # Not in mixed or Windows style, start by that.
26546    new_path=`cmd //c echo $path`
26547  fi
26548
26549
26550  input_path="$new_path"
26551  # Check if we need to convert this using DOS-style short mode. If the path
26552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26553  # take no chances and rewrite it.
26554  # Note: m4 eats our [], so we need to use [ and ] instead.
26555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26556  if test "x$has_forbidden_chars" != x; then
26557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26559  fi
26560
26561
26562  windows_path="$new_path"
26563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26564    unix_path=`$CYGPATH -u "$windows_path"`
26565    new_path="$unix_path"
26566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26568    new_path="$unix_path"
26569  fi
26570
26571  if test "x$path" != "x$new_path"; then
26572    BOOT_JDK="$new_path"
26573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26575  fi
26576
26577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26579
26580    else
26581      # We're on a unix platform. Hooray! :)
26582      path="$BOOT_JDK"
26583      has_space=`$ECHO "$path" | $GREP " "`
26584      if test "x$has_space" != x; then
26585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26586$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26587        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26588      fi
26589
26590      # Use eval to expand a potential ~
26591      eval path="$path"
26592      if test ! -f "$path" && test ! -d "$path"; then
26593        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26594      fi
26595
26596      if test -d "$path"; then
26597        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26598      else
26599        dir="`$DIRNAME "$path"`"
26600        base="`$BASENAME "$path"`"
26601        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26602      fi
26603    fi
26604  fi
26605
26606            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26607$as_echo_n "checking for Boot JDK... " >&6; }
26608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26609$as_echo "$BOOT_JDK" >&6; }
26610            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26611$as_echo_n "checking Boot JDK version... " >&6; }
26612            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26614$as_echo "$BOOT_JDK_VERSION" >&6; }
26615          fi # end check jdk version
26616        fi # end check javac
26617      fi # end check java
26618    fi # end check boot jdk found
26619  fi
26620
26621  fi
26622
26623
26624    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26625    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26626      # Do we have a bin/java?
26627      if test ! -x "$BOOT_JDK/bin/java"; then
26628        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26630        BOOT_JDK_FOUND=no
26631      else
26632        # Do we have a bin/javac?
26633        if test ! -x "$BOOT_JDK/bin/javac"; then
26634          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26636          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26637$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26638          BOOT_JDK_FOUND=no
26639        else
26640          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26641          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26642
26643          # Extra M4 quote needed to protect [] in grep expression.
26644          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26645          if test "x$FOUND_CORRECT_VERSION" = x; then
26646            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26647$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26648            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26649$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26650            BOOT_JDK_FOUND=no
26651          else
26652            # We're done! :-)
26653            BOOT_JDK_FOUND=yes
26654
26655  # Only process if variable expands to non-empty
26656
26657  if test "x$BOOT_JDK" != x; then
26658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26659
26660  # Input might be given as Windows format, start by converting to
26661  # unix format.
26662  path="$BOOT_JDK"
26663  new_path=`$CYGPATH -u "$path"`
26664
26665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26668  # "foo.exe" is OK but "foo" is an error.
26669  #
26670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26671  # It is also a way to make sure we got the proper file name for the real test later on.
26672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26673  if test "x$test_shortpath" = x; then
26674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26675$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26676    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26677  fi
26678
26679  # Call helper function which possibly converts this using DOS-style short mode.
26680  # If so, the updated path is stored in $new_path.
26681
26682  input_path="$new_path"
26683  # Check if we need to convert this using DOS-style short mode. If the path
26684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26685  # take no chances and rewrite it.
26686  # Note: m4 eats our [], so we need to use [ and ] instead.
26687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26688  if test "x$has_forbidden_chars" != x; then
26689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26693      # Going to short mode and back again did indeed matter. Since short mode is
26694      # case insensitive, let's make it lowercase to improve readability.
26695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26696      # Now convert it back to Unix-style (cygpath)
26697      input_path=`$CYGPATH -u "$shortmode_path"`
26698      new_path="$input_path"
26699    fi
26700  fi
26701
26702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26703  if test "x$test_cygdrive_prefix" = x; then
26704    # As a simple fix, exclude /usr/bin since it's not a real path.
26705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26707      # a path prefixed by /cygdrive for fixpath to work.
26708      new_path="$CYGWIN_ROOT_PATH$input_path"
26709    fi
26710  fi
26711
26712
26713  if test "x$path" != "x$new_path"; then
26714    BOOT_JDK="$new_path"
26715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26717  fi
26718
26719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26720
26721  path="$BOOT_JDK"
26722  has_colon=`$ECHO $path | $GREP ^.:`
26723  new_path="$path"
26724  if test "x$has_colon" = x; then
26725    # Not in mixed or Windows style, start by that.
26726    new_path=`cmd //c echo $path`
26727  fi
26728
26729
26730  input_path="$new_path"
26731  # Check if we need to convert this using DOS-style short mode. If the path
26732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26733  # take no chances and rewrite it.
26734  # Note: m4 eats our [], so we need to use [ and ] instead.
26735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26736  if test "x$has_forbidden_chars" != x; then
26737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26739  fi
26740
26741
26742  windows_path="$new_path"
26743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26744    unix_path=`$CYGPATH -u "$windows_path"`
26745    new_path="$unix_path"
26746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26748    new_path="$unix_path"
26749  fi
26750
26751  if test "x$path" != "x$new_path"; then
26752    BOOT_JDK="$new_path"
26753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26754$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26755  fi
26756
26757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26759
26760    else
26761      # We're on a unix platform. Hooray! :)
26762      path="$BOOT_JDK"
26763      has_space=`$ECHO "$path" | $GREP " "`
26764      if test "x$has_space" != x; then
26765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26766$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26768      fi
26769
26770      # Use eval to expand a potential ~
26771      eval path="$path"
26772      if test ! -f "$path" && test ! -d "$path"; then
26773        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26774      fi
26775
26776      if test -d "$path"; then
26777        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26778      else
26779        dir="`$DIRNAME "$path"`"
26780        base="`$BASENAME "$path"`"
26781        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26782      fi
26783    fi
26784  fi
26785
26786            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26787$as_echo_n "checking for Boot JDK... " >&6; }
26788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26789$as_echo "$BOOT_JDK" >&6; }
26790            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26791$as_echo_n "checking Boot JDK version... " >&6; }
26792            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26794$as_echo "$BOOT_JDK_VERSION" >&6; }
26795          fi # end check jdk version
26796        fi # end check javac
26797      fi # end check java
26798    fi # end check boot jdk found
26799  fi
26800
26801
26802  # Test: Is $JAVA_HOME set?
26803
26804  if test "x$BOOT_JDK_FOUND" = xno; then
26805    # Now execute the test
26806
26807  if test "x$JAVA_HOME" != x; then
26808    JAVA_HOME_PROCESSED="$JAVA_HOME"
26809
26810  # Only process if variable expands to non-empty
26811
26812  if test "x$JAVA_HOME_PROCESSED" != x; then
26813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26814
26815  # Input might be given as Windows format, start by converting to
26816  # unix format.
26817  path="$JAVA_HOME_PROCESSED"
26818  new_path=`$CYGPATH -u "$path"`
26819
26820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26823  # "foo.exe" is OK but "foo" is an error.
26824  #
26825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26826  # It is also a way to make sure we got the proper file name for the real test later on.
26827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26828  if test "x$test_shortpath" = x; then
26829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26830$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26831    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26832  fi
26833
26834  # Call helper function which possibly converts this using DOS-style short mode.
26835  # If so, the updated path is stored in $new_path.
26836
26837  input_path="$new_path"
26838  # Check if we need to convert this using DOS-style short mode. If the path
26839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26840  # take no chances and rewrite it.
26841  # Note: m4 eats our [], so we need to use [ and ] instead.
26842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26843  if test "x$has_forbidden_chars" != x; then
26844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26848      # Going to short mode and back again did indeed matter. Since short mode is
26849      # case insensitive, let's make it lowercase to improve readability.
26850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26851      # Now convert it back to Unix-style (cygpath)
26852      input_path=`$CYGPATH -u "$shortmode_path"`
26853      new_path="$input_path"
26854    fi
26855  fi
26856
26857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26858  if test "x$test_cygdrive_prefix" = x; then
26859    # As a simple fix, exclude /usr/bin since it's not a real path.
26860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26862      # a path prefixed by /cygdrive for fixpath to work.
26863      new_path="$CYGWIN_ROOT_PATH$input_path"
26864    fi
26865  fi
26866
26867
26868  if test "x$path" != "x$new_path"; then
26869    JAVA_HOME_PROCESSED="$new_path"
26870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26871$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26872  fi
26873
26874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26875
26876  path="$JAVA_HOME_PROCESSED"
26877  has_colon=`$ECHO $path | $GREP ^.:`
26878  new_path="$path"
26879  if test "x$has_colon" = x; then
26880    # Not in mixed or Windows style, start by that.
26881    new_path=`cmd //c echo $path`
26882  fi
26883
26884
26885  input_path="$new_path"
26886  # Check if we need to convert this using DOS-style short mode. If the path
26887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26888  # take no chances and rewrite it.
26889  # Note: m4 eats our [], so we need to use [ and ] instead.
26890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26891  if test "x$has_forbidden_chars" != x; then
26892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26894  fi
26895
26896
26897  windows_path="$new_path"
26898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26899    unix_path=`$CYGPATH -u "$windows_path"`
26900    new_path="$unix_path"
26901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26903    new_path="$unix_path"
26904  fi
26905
26906  if test "x$path" != "x$new_path"; then
26907    JAVA_HOME_PROCESSED="$new_path"
26908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26909$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26910  fi
26911
26912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26914
26915    else
26916      # We're on a unix platform. Hooray! :)
26917      path="$JAVA_HOME_PROCESSED"
26918      has_space=`$ECHO "$path" | $GREP " "`
26919      if test "x$has_space" != x; then
26920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26921$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26923      fi
26924
26925      # Use eval to expand a potential ~
26926      eval path="$path"
26927      if test ! -f "$path" && test ! -d "$path"; then
26928        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26929      fi
26930
26931      if test -d "$path"; then
26932        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26933      else
26934        dir="`$DIRNAME "$path"`"
26935        base="`$BASENAME "$path"`"
26936        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26937      fi
26938    fi
26939  fi
26940
26941    if test ! -d "$JAVA_HOME_PROCESSED"; then
26942      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26943$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26944    else
26945      # Aha, the user has set a JAVA_HOME
26946      # let us use that as the Boot JDK.
26947      BOOT_JDK="$JAVA_HOME_PROCESSED"
26948      BOOT_JDK_FOUND=maybe
26949      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26950$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26951    fi
26952  fi
26953
26954
26955    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26956    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26957      # Do we have a bin/java?
26958      if test ! -x "$BOOT_JDK/bin/java"; then
26959        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26961        BOOT_JDK_FOUND=no
26962      else
26963        # Do we have a bin/javac?
26964        if test ! -x "$BOOT_JDK/bin/javac"; then
26965          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26966$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26967          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26968$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26969          BOOT_JDK_FOUND=no
26970        else
26971          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26972          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26973
26974          # Extra M4 quote needed to protect [] in grep expression.
26975          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26976          if test "x$FOUND_CORRECT_VERSION" = x; then
26977            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26979            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26980$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26981            BOOT_JDK_FOUND=no
26982          else
26983            # We're done! :-)
26984            BOOT_JDK_FOUND=yes
26985
26986  # Only process if variable expands to non-empty
26987
26988  if test "x$BOOT_JDK" != x; then
26989    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26990
26991  # Input might be given as Windows format, start by converting to
26992  # unix format.
26993  path="$BOOT_JDK"
26994  new_path=`$CYGPATH -u "$path"`
26995
26996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26999  # "foo.exe" is OK but "foo" is an error.
27000  #
27001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27002  # It is also a way to make sure we got the proper file name for the real test later on.
27003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27004  if test "x$test_shortpath" = x; then
27005    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27007    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27008  fi
27009
27010  # Call helper function which possibly converts this using DOS-style short mode.
27011  # If so, the updated path is stored in $new_path.
27012
27013  input_path="$new_path"
27014  # Check if we need to convert this using DOS-style short mode. If the path
27015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27016  # take no chances and rewrite it.
27017  # Note: m4 eats our [], so we need to use [ and ] instead.
27018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27019  if test "x$has_forbidden_chars" != x; then
27020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27024      # Going to short mode and back again did indeed matter. Since short mode is
27025      # case insensitive, let's make it lowercase to improve readability.
27026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27027      # Now convert it back to Unix-style (cygpath)
27028      input_path=`$CYGPATH -u "$shortmode_path"`
27029      new_path="$input_path"
27030    fi
27031  fi
27032
27033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27034  if test "x$test_cygdrive_prefix" = x; then
27035    # As a simple fix, exclude /usr/bin since it's not a real path.
27036    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27038      # a path prefixed by /cygdrive for fixpath to work.
27039      new_path="$CYGWIN_ROOT_PATH$input_path"
27040    fi
27041  fi
27042
27043
27044  if test "x$path" != "x$new_path"; then
27045    BOOT_JDK="$new_path"
27046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27048  fi
27049
27050    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27051
27052  path="$BOOT_JDK"
27053  has_colon=`$ECHO $path | $GREP ^.:`
27054  new_path="$path"
27055  if test "x$has_colon" = x; then
27056    # Not in mixed or Windows style, start by that.
27057    new_path=`cmd //c echo $path`
27058  fi
27059
27060
27061  input_path="$new_path"
27062  # Check if we need to convert this using DOS-style short mode. If the path
27063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27064  # take no chances and rewrite it.
27065  # Note: m4 eats our [], so we need to use [ and ] instead.
27066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27067  if test "x$has_forbidden_chars" != x; then
27068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27070  fi
27071
27072
27073  windows_path="$new_path"
27074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27075    unix_path=`$CYGPATH -u "$windows_path"`
27076    new_path="$unix_path"
27077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27079    new_path="$unix_path"
27080  fi
27081
27082  if test "x$path" != "x$new_path"; then
27083    BOOT_JDK="$new_path"
27084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27086  fi
27087
27088  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27089  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27090
27091    else
27092      # We're on a unix platform. Hooray! :)
27093      path="$BOOT_JDK"
27094      has_space=`$ECHO "$path" | $GREP " "`
27095      if test "x$has_space" != x; then
27096        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27098        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27099      fi
27100
27101      # Use eval to expand a potential ~
27102      eval path="$path"
27103      if test ! -f "$path" && test ! -d "$path"; then
27104        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27105      fi
27106
27107      if test -d "$path"; then
27108        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27109      else
27110        dir="`$DIRNAME "$path"`"
27111        base="`$BASENAME "$path"`"
27112        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27113      fi
27114    fi
27115  fi
27116
27117            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27118$as_echo_n "checking for Boot JDK... " >&6; }
27119            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27120$as_echo "$BOOT_JDK" >&6; }
27121            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27122$as_echo_n "checking Boot JDK version... " >&6; }
27123            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27124            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27125$as_echo "$BOOT_JDK_VERSION" >&6; }
27126          fi # end check jdk version
27127        fi # end check javac
27128      fi # end check java
27129    fi # end check boot jdk found
27130  fi
27131
27132
27133  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27134
27135  if test "x$BOOT_JDK_FOUND" = xno; then
27136    # Now execute the test
27137
27138  # Extract the first word of "javac", so it can be a program name with args.
27139set dummy javac; ac_word=$2
27140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27141$as_echo_n "checking for $ac_word... " >&6; }
27142if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27143  $as_echo_n "(cached) " >&6
27144else
27145  case $JAVAC_CHECK in
27146  [\\/]* | ?:[\\/]*)
27147  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27148  ;;
27149  *)
27150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27151for as_dir in $PATH
27152do
27153  IFS=$as_save_IFS
27154  test -z "$as_dir" && as_dir=.
27155    for ac_exec_ext in '' $ac_executable_extensions; do
27156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27157    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27159    break 2
27160  fi
27161done
27162  done
27163IFS=$as_save_IFS
27164
27165  ;;
27166esac
27167fi
27168JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27169if test -n "$JAVAC_CHECK"; then
27170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27171$as_echo "$JAVAC_CHECK" >&6; }
27172else
27173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27174$as_echo "no" >&6; }
27175fi
27176
27177
27178  # Extract the first word of "java", so it can be a program name with args.
27179set dummy java; ac_word=$2
27180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27181$as_echo_n "checking for $ac_word... " >&6; }
27182if ${ac_cv_path_JAVA_CHECK+:} false; then :
27183  $as_echo_n "(cached) " >&6
27184else
27185  case $JAVA_CHECK in
27186  [\\/]* | ?:[\\/]*)
27187  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27188  ;;
27189  *)
27190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27191for as_dir in $PATH
27192do
27193  IFS=$as_save_IFS
27194  test -z "$as_dir" && as_dir=.
27195    for ac_exec_ext in '' $ac_executable_extensions; do
27196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27197    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27199    break 2
27200  fi
27201done
27202  done
27203IFS=$as_save_IFS
27204
27205  ;;
27206esac
27207fi
27208JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27209if test -n "$JAVA_CHECK"; then
27210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27211$as_echo "$JAVA_CHECK" >&6; }
27212else
27213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27214$as_echo "no" >&6; }
27215fi
27216
27217
27218  BINARY="$JAVAC_CHECK"
27219  if test "x$JAVAC_CHECK" = x; then
27220    BINARY="$JAVA_CHECK"
27221  fi
27222  if test "x$BINARY" != x; then
27223    # So there is a java(c) binary, it might be part of a JDK.
27224    # Lets find the JDK/JRE directory by following symbolic links.
27225    # Linux/GNU systems often have links from /usr/bin/java to
27226    # /etc/alternatives/java to the real JDK binary.
27227
27228  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27229    # Follow a chain of symbolic links. Use readlink
27230    # where it exists, else fall back to horribly
27231    # complicated shell code.
27232    if test "x$READLINK_TESTED" != yes; then
27233      # On MacOSX there is a readlink tool with a different
27234      # purpose than the GNU readlink tool. Check the found readlink.
27235      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27236      if test "x$ISGNU" = x; then
27237        # A readlink that we do not know how to use.
27238        # Are there other non-GNU readlinks out there?
27239        READLINK_TESTED=yes
27240        READLINK=
27241      fi
27242    fi
27243
27244    if test "x$READLINK" != x; then
27245      BINARY=`$READLINK -f $BINARY`
27246    else
27247      # Save the current directory for restoring afterwards
27248      STARTDIR=$PWD
27249      COUNTER=0
27250      sym_link_dir=`$DIRNAME $BINARY`
27251      sym_link_file=`$BASENAME $BINARY`
27252      cd $sym_link_dir
27253      # Use -P flag to resolve symlinks in directories.
27254      cd `$THEPWDCMD -P`
27255      sym_link_dir=`$THEPWDCMD -P`
27256      # Resolve file symlinks
27257      while test $COUNTER -lt 20; do
27258        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27259        if test "x$ISLINK" == x; then
27260          # This is not a symbolic link! We are done!
27261          break
27262        fi
27263        # Again resolve directory symlinks since the target of the just found
27264        # link could be in a different directory
27265        cd `$DIRNAME $ISLINK`
27266        sym_link_dir=`$THEPWDCMD -P`
27267        sym_link_file=`$BASENAME $ISLINK`
27268        let COUNTER=COUNTER+1
27269      done
27270      cd $STARTDIR
27271      BINARY=$sym_link_dir/$sym_link_file
27272    fi
27273  fi
27274
27275    BOOT_JDK=`dirname "$BINARY"`
27276    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27277    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27278      # Looks like we found ourselves an JDK
27279      BOOT_JDK_FOUND=maybe
27280      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27281$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27282    fi
27283  fi
27284
27285
27286    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27287    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27288      # Do we have a bin/java?
27289      if test ! -x "$BOOT_JDK/bin/java"; then
27290        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27292        BOOT_JDK_FOUND=no
27293      else
27294        # Do we have a bin/javac?
27295        if test ! -x "$BOOT_JDK/bin/javac"; then
27296          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27298          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27299$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27300          BOOT_JDK_FOUND=no
27301        else
27302          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27303          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27304
27305          # Extra M4 quote needed to protect [] in grep expression.
27306          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27307          if test "x$FOUND_CORRECT_VERSION" = x; then
27308            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27310            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27311$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27312            BOOT_JDK_FOUND=no
27313          else
27314            # We're done! :-)
27315            BOOT_JDK_FOUND=yes
27316
27317  # Only process if variable expands to non-empty
27318
27319  if test "x$BOOT_JDK" != x; then
27320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27321
27322  # Input might be given as Windows format, start by converting to
27323  # unix format.
27324  path="$BOOT_JDK"
27325  new_path=`$CYGPATH -u "$path"`
27326
27327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27330  # "foo.exe" is OK but "foo" is an error.
27331  #
27332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27333  # It is also a way to make sure we got the proper file name for the real test later on.
27334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27335  if test "x$test_shortpath" = x; then
27336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27338    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27339  fi
27340
27341  # Call helper function which possibly converts this using DOS-style short mode.
27342  # If so, the updated path is stored in $new_path.
27343
27344  input_path="$new_path"
27345  # Check if we need to convert this using DOS-style short mode. If the path
27346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27347  # take no chances and rewrite it.
27348  # Note: m4 eats our [], so we need to use [ and ] instead.
27349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27350  if test "x$has_forbidden_chars" != x; then
27351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27355      # Going to short mode and back again did indeed matter. Since short mode is
27356      # case insensitive, let's make it lowercase to improve readability.
27357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27358      # Now convert it back to Unix-style (cygpath)
27359      input_path=`$CYGPATH -u "$shortmode_path"`
27360      new_path="$input_path"
27361    fi
27362  fi
27363
27364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27365  if test "x$test_cygdrive_prefix" = x; then
27366    # As a simple fix, exclude /usr/bin since it's not a real path.
27367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27369      # a path prefixed by /cygdrive for fixpath to work.
27370      new_path="$CYGWIN_ROOT_PATH$input_path"
27371    fi
27372  fi
27373
27374
27375  if test "x$path" != "x$new_path"; then
27376    BOOT_JDK="$new_path"
27377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27379  fi
27380
27381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27382
27383  path="$BOOT_JDK"
27384  has_colon=`$ECHO $path | $GREP ^.:`
27385  new_path="$path"
27386  if test "x$has_colon" = x; then
27387    # Not in mixed or Windows style, start by that.
27388    new_path=`cmd //c echo $path`
27389  fi
27390
27391
27392  input_path="$new_path"
27393  # Check if we need to convert this using DOS-style short mode. If the path
27394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27395  # take no chances and rewrite it.
27396  # Note: m4 eats our [], so we need to use [ and ] instead.
27397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27398  if test "x$has_forbidden_chars" != x; then
27399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27401  fi
27402
27403
27404  windows_path="$new_path"
27405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27406    unix_path=`$CYGPATH -u "$windows_path"`
27407    new_path="$unix_path"
27408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27410    new_path="$unix_path"
27411  fi
27412
27413  if test "x$path" != "x$new_path"; then
27414    BOOT_JDK="$new_path"
27415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27417  fi
27418
27419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27421
27422    else
27423      # We're on a unix platform. Hooray! :)
27424      path="$BOOT_JDK"
27425      has_space=`$ECHO "$path" | $GREP " "`
27426      if test "x$has_space" != x; then
27427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27428$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27429        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27430      fi
27431
27432      # Use eval to expand a potential ~
27433      eval path="$path"
27434      if test ! -f "$path" && test ! -d "$path"; then
27435        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27436      fi
27437
27438      if test -d "$path"; then
27439        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27440      else
27441        dir="`$DIRNAME "$path"`"
27442        base="`$BASENAME "$path"`"
27443        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27444      fi
27445    fi
27446  fi
27447
27448            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27449$as_echo_n "checking for Boot JDK... " >&6; }
27450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27451$as_echo "$BOOT_JDK" >&6; }
27452            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27453$as_echo_n "checking Boot JDK version... " >&6; }
27454            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27456$as_echo "$BOOT_JDK_VERSION" >&6; }
27457          fi # end check jdk version
27458        fi # end check javac
27459      fi # end check java
27460    fi # end check boot jdk found
27461  fi
27462
27463
27464  # Test: Is there a JDK installed in default, well-known locations?
27465
27466  if test "x$BOOT_JDK_FOUND" = xno; then
27467    # Now execute the test
27468
27469  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27470
27471  if test "x$BOOT_JDK_FOUND" = xno; then
27472    # Now execute the test
27473
27474  if test "x$ProgramW6432" != x; then
27475    VIRTUAL_DIR="$ProgramW6432/Java"
27476
27477  windows_path="$VIRTUAL_DIR"
27478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27479    unix_path=`$CYGPATH -u "$windows_path"`
27480    VIRTUAL_DIR="$unix_path"
27481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27483    VIRTUAL_DIR="$unix_path"
27484  fi
27485
27486
27487  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27488  BOOT_JDK_SUFFIX=""
27489  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27490  if test "x$ALL_JDKS_FOUND" != x; then
27491    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27492
27493  if test "x$BOOT_JDK_FOUND" = xno; then
27494    # Now execute the test
27495
27496        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27497        if test -d "$BOOT_JDK"; then
27498          BOOT_JDK_FOUND=maybe
27499          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27500$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27501        fi
27502
27503
27504    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27505    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27506      # Do we have a bin/java?
27507      if test ! -x "$BOOT_JDK/bin/java"; then
27508        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27510        BOOT_JDK_FOUND=no
27511      else
27512        # Do we have a bin/javac?
27513        if test ! -x "$BOOT_JDK/bin/javac"; then
27514          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27516          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27517$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27518          BOOT_JDK_FOUND=no
27519        else
27520          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27521          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27522
27523          # Extra M4 quote needed to protect [] in grep expression.
27524          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27525          if test "x$FOUND_CORRECT_VERSION" = x; then
27526            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27528            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27529$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27530            BOOT_JDK_FOUND=no
27531          else
27532            # We're done! :-)
27533            BOOT_JDK_FOUND=yes
27534
27535  # Only process if variable expands to non-empty
27536
27537  if test "x$BOOT_JDK" != x; then
27538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27539
27540  # Input might be given as Windows format, start by converting to
27541  # unix format.
27542  path="$BOOT_JDK"
27543  new_path=`$CYGPATH -u "$path"`
27544
27545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27548  # "foo.exe" is OK but "foo" is an error.
27549  #
27550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27551  # It is also a way to make sure we got the proper file name for the real test later on.
27552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27553  if test "x$test_shortpath" = x; then
27554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27556    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27557  fi
27558
27559  # Call helper function which possibly converts this using DOS-style short mode.
27560  # If so, the updated path is stored in $new_path.
27561
27562  input_path="$new_path"
27563  # Check if we need to convert this using DOS-style short mode. If the path
27564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27565  # take no chances and rewrite it.
27566  # Note: m4 eats our [], so we need to use [ and ] instead.
27567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27568  if test "x$has_forbidden_chars" != x; then
27569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27573      # Going to short mode and back again did indeed matter. Since short mode is
27574      # case insensitive, let's make it lowercase to improve readability.
27575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27576      # Now convert it back to Unix-style (cygpath)
27577      input_path=`$CYGPATH -u "$shortmode_path"`
27578      new_path="$input_path"
27579    fi
27580  fi
27581
27582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27583  if test "x$test_cygdrive_prefix" = x; then
27584    # As a simple fix, exclude /usr/bin since it's not a real path.
27585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27587      # a path prefixed by /cygdrive for fixpath to work.
27588      new_path="$CYGWIN_ROOT_PATH$input_path"
27589    fi
27590  fi
27591
27592
27593  if test "x$path" != "x$new_path"; then
27594    BOOT_JDK="$new_path"
27595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27596$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27597  fi
27598
27599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27600
27601  path="$BOOT_JDK"
27602  has_colon=`$ECHO $path | $GREP ^.:`
27603  new_path="$path"
27604  if test "x$has_colon" = x; then
27605    # Not in mixed or Windows style, start by that.
27606    new_path=`cmd //c echo $path`
27607  fi
27608
27609
27610  input_path="$new_path"
27611  # Check if we need to convert this using DOS-style short mode. If the path
27612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27613  # take no chances and rewrite it.
27614  # Note: m4 eats our [], so we need to use [ and ] instead.
27615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27616  if test "x$has_forbidden_chars" != x; then
27617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27619  fi
27620
27621
27622  windows_path="$new_path"
27623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27624    unix_path=`$CYGPATH -u "$windows_path"`
27625    new_path="$unix_path"
27626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27628    new_path="$unix_path"
27629  fi
27630
27631  if test "x$path" != "x$new_path"; then
27632    BOOT_JDK="$new_path"
27633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27634$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27635  fi
27636
27637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27639
27640    else
27641      # We're on a unix platform. Hooray! :)
27642      path="$BOOT_JDK"
27643      has_space=`$ECHO "$path" | $GREP " "`
27644      if test "x$has_space" != x; then
27645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27647        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27648      fi
27649
27650      # Use eval to expand a potential ~
27651      eval path="$path"
27652      if test ! -f "$path" && test ! -d "$path"; then
27653        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27654      fi
27655
27656      if test -d "$path"; then
27657        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27658      else
27659        dir="`$DIRNAME "$path"`"
27660        base="`$BASENAME "$path"`"
27661        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27662      fi
27663    fi
27664  fi
27665
27666            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27667$as_echo_n "checking for Boot JDK... " >&6; }
27668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27669$as_echo "$BOOT_JDK" >&6; }
27670            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27671$as_echo_n "checking Boot JDK version... " >&6; }
27672            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27674$as_echo "$BOOT_JDK_VERSION" >&6; }
27675          fi # end check jdk version
27676        fi # end check javac
27677      fi # end check java
27678    fi # end check boot jdk found
27679  fi
27680
27681    done
27682  fi
27683
27684  fi
27685
27686
27687    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27688    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27689      # Do we have a bin/java?
27690      if test ! -x "$BOOT_JDK/bin/java"; then
27691        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27693        BOOT_JDK_FOUND=no
27694      else
27695        # Do we have a bin/javac?
27696        if test ! -x "$BOOT_JDK/bin/javac"; then
27697          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27699          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27700$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27701          BOOT_JDK_FOUND=no
27702        else
27703          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27704          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27705
27706          # Extra M4 quote needed to protect [] in grep expression.
27707          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27708          if test "x$FOUND_CORRECT_VERSION" = x; then
27709            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27711            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27712$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27713            BOOT_JDK_FOUND=no
27714          else
27715            # We're done! :-)
27716            BOOT_JDK_FOUND=yes
27717
27718  # Only process if variable expands to non-empty
27719
27720  if test "x$BOOT_JDK" != x; then
27721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27722
27723  # Input might be given as Windows format, start by converting to
27724  # unix format.
27725  path="$BOOT_JDK"
27726  new_path=`$CYGPATH -u "$path"`
27727
27728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27731  # "foo.exe" is OK but "foo" is an error.
27732  #
27733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27734  # It is also a way to make sure we got the proper file name for the real test later on.
27735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27736  if test "x$test_shortpath" = x; then
27737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27739    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27740  fi
27741
27742  # Call helper function which possibly converts this using DOS-style short mode.
27743  # If so, the updated path is stored in $new_path.
27744
27745  input_path="$new_path"
27746  # Check if we need to convert this using DOS-style short mode. If the path
27747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27748  # take no chances and rewrite it.
27749  # Note: m4 eats our [], so we need to use [ and ] instead.
27750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27751  if test "x$has_forbidden_chars" != x; then
27752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27756      # Going to short mode and back again did indeed matter. Since short mode is
27757      # case insensitive, let's make it lowercase to improve readability.
27758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27759      # Now convert it back to Unix-style (cygpath)
27760      input_path=`$CYGPATH -u "$shortmode_path"`
27761      new_path="$input_path"
27762    fi
27763  fi
27764
27765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27766  if test "x$test_cygdrive_prefix" = x; then
27767    # As a simple fix, exclude /usr/bin since it's not a real path.
27768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27770      # a path prefixed by /cygdrive for fixpath to work.
27771      new_path="$CYGWIN_ROOT_PATH$input_path"
27772    fi
27773  fi
27774
27775
27776  if test "x$path" != "x$new_path"; then
27777    BOOT_JDK="$new_path"
27778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27780  fi
27781
27782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27783
27784  path="$BOOT_JDK"
27785  has_colon=`$ECHO $path | $GREP ^.:`
27786  new_path="$path"
27787  if test "x$has_colon" = x; then
27788    # Not in mixed or Windows style, start by that.
27789    new_path=`cmd //c echo $path`
27790  fi
27791
27792
27793  input_path="$new_path"
27794  # Check if we need to convert this using DOS-style short mode. If the path
27795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27796  # take no chances and rewrite it.
27797  # Note: m4 eats our [], so we need to use [ and ] instead.
27798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27799  if test "x$has_forbidden_chars" != x; then
27800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27802  fi
27803
27804
27805  windows_path="$new_path"
27806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27807    unix_path=`$CYGPATH -u "$windows_path"`
27808    new_path="$unix_path"
27809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27811    new_path="$unix_path"
27812  fi
27813
27814  if test "x$path" != "x$new_path"; then
27815    BOOT_JDK="$new_path"
27816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27817$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27818  fi
27819
27820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27822
27823    else
27824      # We're on a unix platform. Hooray! :)
27825      path="$BOOT_JDK"
27826      has_space=`$ECHO "$path" | $GREP " "`
27827      if test "x$has_space" != x; then
27828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27831      fi
27832
27833      # Use eval to expand a potential ~
27834      eval path="$path"
27835      if test ! -f "$path" && test ! -d "$path"; then
27836        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27837      fi
27838
27839      if test -d "$path"; then
27840        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27841      else
27842        dir="`$DIRNAME "$path"`"
27843        base="`$BASENAME "$path"`"
27844        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27845      fi
27846    fi
27847  fi
27848
27849            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27850$as_echo_n "checking for Boot JDK... " >&6; }
27851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27852$as_echo "$BOOT_JDK" >&6; }
27853            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27854$as_echo_n "checking Boot JDK version... " >&6; }
27855            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27857$as_echo "$BOOT_JDK_VERSION" >&6; }
27858          fi # end check jdk version
27859        fi # end check javac
27860      fi # end check java
27861    fi # end check boot jdk found
27862  fi
27863
27864
27865  if test "x$BOOT_JDK_FOUND" = xno; then
27866    # Now execute the test
27867
27868  if test "x$PROGRAMW6432" != x; then
27869    VIRTUAL_DIR="$PROGRAMW6432/Java"
27870
27871  windows_path="$VIRTUAL_DIR"
27872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27873    unix_path=`$CYGPATH -u "$windows_path"`
27874    VIRTUAL_DIR="$unix_path"
27875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27877    VIRTUAL_DIR="$unix_path"
27878  fi
27879
27880
27881  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27882  BOOT_JDK_SUFFIX=""
27883  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27884  if test "x$ALL_JDKS_FOUND" != x; then
27885    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27886
27887  if test "x$BOOT_JDK_FOUND" = xno; then
27888    # Now execute the test
27889
27890        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27891        if test -d "$BOOT_JDK"; then
27892          BOOT_JDK_FOUND=maybe
27893          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27894$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27895        fi
27896
27897
27898    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27899    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27900      # Do we have a bin/java?
27901      if test ! -x "$BOOT_JDK/bin/java"; then
27902        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27904        BOOT_JDK_FOUND=no
27905      else
27906        # Do we have a bin/javac?
27907        if test ! -x "$BOOT_JDK/bin/javac"; then
27908          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27910          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27911$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27912          BOOT_JDK_FOUND=no
27913        else
27914          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27915          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27916
27917          # Extra M4 quote needed to protect [] in grep expression.
27918          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27919          if test "x$FOUND_CORRECT_VERSION" = x; then
27920            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27922            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27923$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27924            BOOT_JDK_FOUND=no
27925          else
27926            # We're done! :-)
27927            BOOT_JDK_FOUND=yes
27928
27929  # Only process if variable expands to non-empty
27930
27931  if test "x$BOOT_JDK" != x; then
27932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27933
27934  # Input might be given as Windows format, start by converting to
27935  # unix format.
27936  path="$BOOT_JDK"
27937  new_path=`$CYGPATH -u "$path"`
27938
27939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27942  # "foo.exe" is OK but "foo" is an error.
27943  #
27944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27945  # It is also a way to make sure we got the proper file name for the real test later on.
27946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27947  if test "x$test_shortpath" = x; then
27948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27949$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27950    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27951  fi
27952
27953  # Call helper function which possibly converts this using DOS-style short mode.
27954  # If so, the updated path is stored in $new_path.
27955
27956  input_path="$new_path"
27957  # Check if we need to convert this using DOS-style short mode. If the path
27958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27959  # take no chances and rewrite it.
27960  # Note: m4 eats our [], so we need to use [ and ] instead.
27961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27962  if test "x$has_forbidden_chars" != x; then
27963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27967      # Going to short mode and back again did indeed matter. Since short mode is
27968      # case insensitive, let's make it lowercase to improve readability.
27969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27970      # Now convert it back to Unix-style (cygpath)
27971      input_path=`$CYGPATH -u "$shortmode_path"`
27972      new_path="$input_path"
27973    fi
27974  fi
27975
27976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27977  if test "x$test_cygdrive_prefix" = x; then
27978    # As a simple fix, exclude /usr/bin since it's not a real path.
27979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27981      # a path prefixed by /cygdrive for fixpath to work.
27982      new_path="$CYGWIN_ROOT_PATH$input_path"
27983    fi
27984  fi
27985
27986
27987  if test "x$path" != "x$new_path"; then
27988    BOOT_JDK="$new_path"
27989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27990$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27991  fi
27992
27993    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27994
27995  path="$BOOT_JDK"
27996  has_colon=`$ECHO $path | $GREP ^.:`
27997  new_path="$path"
27998  if test "x$has_colon" = x; then
27999    # Not in mixed or Windows style, start by that.
28000    new_path=`cmd //c echo $path`
28001  fi
28002
28003
28004  input_path="$new_path"
28005  # Check if we need to convert this using DOS-style short mode. If the path
28006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28007  # take no chances and rewrite it.
28008  # Note: m4 eats our [], so we need to use [ and ] instead.
28009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28010  if test "x$has_forbidden_chars" != x; then
28011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28013  fi
28014
28015
28016  windows_path="$new_path"
28017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28018    unix_path=`$CYGPATH -u "$windows_path"`
28019    new_path="$unix_path"
28020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28022    new_path="$unix_path"
28023  fi
28024
28025  if test "x$path" != "x$new_path"; then
28026    BOOT_JDK="$new_path"
28027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28028$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28029  fi
28030
28031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28033
28034    else
28035      # We're on a unix platform. Hooray! :)
28036      path="$BOOT_JDK"
28037      has_space=`$ECHO "$path" | $GREP " "`
28038      if test "x$has_space" != x; then
28039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28040$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28041        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28042      fi
28043
28044      # Use eval to expand a potential ~
28045      eval path="$path"
28046      if test ! -f "$path" && test ! -d "$path"; then
28047        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28048      fi
28049
28050      if test -d "$path"; then
28051        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28052      else
28053        dir="`$DIRNAME "$path"`"
28054        base="`$BASENAME "$path"`"
28055        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28056      fi
28057    fi
28058  fi
28059
28060            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28061$as_echo_n "checking for Boot JDK... " >&6; }
28062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28063$as_echo "$BOOT_JDK" >&6; }
28064            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28065$as_echo_n "checking Boot JDK version... " >&6; }
28066            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28068$as_echo "$BOOT_JDK_VERSION" >&6; }
28069          fi # end check jdk version
28070        fi # end check javac
28071      fi # end check java
28072    fi # end check boot jdk found
28073  fi
28074
28075    done
28076  fi
28077
28078  fi
28079
28080
28081    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28082    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28083      # Do we have a bin/java?
28084      if test ! -x "$BOOT_JDK/bin/java"; then
28085        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28087        BOOT_JDK_FOUND=no
28088      else
28089        # Do we have a bin/javac?
28090        if test ! -x "$BOOT_JDK/bin/javac"; then
28091          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28093          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28094$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28095          BOOT_JDK_FOUND=no
28096        else
28097          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28098          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28099
28100          # Extra M4 quote needed to protect [] in grep expression.
28101          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28102          if test "x$FOUND_CORRECT_VERSION" = x; then
28103            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28105            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28106$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28107            BOOT_JDK_FOUND=no
28108          else
28109            # We're done! :-)
28110            BOOT_JDK_FOUND=yes
28111
28112  # Only process if variable expands to non-empty
28113
28114  if test "x$BOOT_JDK" != x; then
28115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28116
28117  # Input might be given as Windows format, start by converting to
28118  # unix format.
28119  path="$BOOT_JDK"
28120  new_path=`$CYGPATH -u "$path"`
28121
28122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28125  # "foo.exe" is OK but "foo" is an error.
28126  #
28127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28128  # It is also a way to make sure we got the proper file name for the real test later on.
28129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28130  if test "x$test_shortpath" = x; then
28131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28132$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28133    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28134  fi
28135
28136  # Call helper function which possibly converts this using DOS-style short mode.
28137  # If so, the updated path is stored in $new_path.
28138
28139  input_path="$new_path"
28140  # Check if we need to convert this using DOS-style short mode. If the path
28141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28142  # take no chances and rewrite it.
28143  # Note: m4 eats our [], so we need to use [ and ] instead.
28144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28145  if test "x$has_forbidden_chars" != x; then
28146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28150      # Going to short mode and back again did indeed matter. Since short mode is
28151      # case insensitive, let's make it lowercase to improve readability.
28152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28153      # Now convert it back to Unix-style (cygpath)
28154      input_path=`$CYGPATH -u "$shortmode_path"`
28155      new_path="$input_path"
28156    fi
28157  fi
28158
28159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28160  if test "x$test_cygdrive_prefix" = x; then
28161    # As a simple fix, exclude /usr/bin since it's not a real path.
28162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28164      # a path prefixed by /cygdrive for fixpath to work.
28165      new_path="$CYGWIN_ROOT_PATH$input_path"
28166    fi
28167  fi
28168
28169
28170  if test "x$path" != "x$new_path"; then
28171    BOOT_JDK="$new_path"
28172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28173$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28174  fi
28175
28176    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28177
28178  path="$BOOT_JDK"
28179  has_colon=`$ECHO $path | $GREP ^.:`
28180  new_path="$path"
28181  if test "x$has_colon" = x; then
28182    # Not in mixed or Windows style, start by that.
28183    new_path=`cmd //c echo $path`
28184  fi
28185
28186
28187  input_path="$new_path"
28188  # Check if we need to convert this using DOS-style short mode. If the path
28189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28190  # take no chances and rewrite it.
28191  # Note: m4 eats our [], so we need to use [ and ] instead.
28192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28193  if test "x$has_forbidden_chars" != x; then
28194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28196  fi
28197
28198
28199  windows_path="$new_path"
28200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28201    unix_path=`$CYGPATH -u "$windows_path"`
28202    new_path="$unix_path"
28203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28205    new_path="$unix_path"
28206  fi
28207
28208  if test "x$path" != "x$new_path"; then
28209    BOOT_JDK="$new_path"
28210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28211$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28212  fi
28213
28214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28216
28217    else
28218      # We're on a unix platform. Hooray! :)
28219      path="$BOOT_JDK"
28220      has_space=`$ECHO "$path" | $GREP " "`
28221      if test "x$has_space" != x; then
28222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28223$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28224        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28225      fi
28226
28227      # Use eval to expand a potential ~
28228      eval path="$path"
28229      if test ! -f "$path" && test ! -d "$path"; then
28230        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28231      fi
28232
28233      if test -d "$path"; then
28234        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28235      else
28236        dir="`$DIRNAME "$path"`"
28237        base="`$BASENAME "$path"`"
28238        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28239      fi
28240    fi
28241  fi
28242
28243            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28244$as_echo_n "checking for Boot JDK... " >&6; }
28245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28246$as_echo "$BOOT_JDK" >&6; }
28247            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28248$as_echo_n "checking Boot JDK version... " >&6; }
28249            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28250            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28251$as_echo "$BOOT_JDK_VERSION" >&6; }
28252          fi # end check jdk version
28253        fi # end check javac
28254      fi # end check java
28255    fi # end check boot jdk found
28256  fi
28257
28258
28259  if test "x$BOOT_JDK_FOUND" = xno; then
28260    # Now execute the test
28261
28262  if test "x$PROGRAMFILES" != x; then
28263    VIRTUAL_DIR="$PROGRAMFILES/Java"
28264
28265  windows_path="$VIRTUAL_DIR"
28266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28267    unix_path=`$CYGPATH -u "$windows_path"`
28268    VIRTUAL_DIR="$unix_path"
28269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28271    VIRTUAL_DIR="$unix_path"
28272  fi
28273
28274
28275  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28276  BOOT_JDK_SUFFIX=""
28277  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28278  if test "x$ALL_JDKS_FOUND" != x; then
28279    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28280
28281  if test "x$BOOT_JDK_FOUND" = xno; then
28282    # Now execute the test
28283
28284        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28285        if test -d "$BOOT_JDK"; then
28286          BOOT_JDK_FOUND=maybe
28287          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28288$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28289        fi
28290
28291
28292    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28293    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28294      # Do we have a bin/java?
28295      if test ! -x "$BOOT_JDK/bin/java"; then
28296        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28298        BOOT_JDK_FOUND=no
28299      else
28300        # Do we have a bin/javac?
28301        if test ! -x "$BOOT_JDK/bin/javac"; then
28302          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28304          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28305$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28306          BOOT_JDK_FOUND=no
28307        else
28308          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28309          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28310
28311          # Extra M4 quote needed to protect [] in grep expression.
28312          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28313          if test "x$FOUND_CORRECT_VERSION" = x; then
28314            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28316            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28317$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28318            BOOT_JDK_FOUND=no
28319          else
28320            # We're done! :-)
28321            BOOT_JDK_FOUND=yes
28322
28323  # Only process if variable expands to non-empty
28324
28325  if test "x$BOOT_JDK" != x; then
28326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28327
28328  # Input might be given as Windows format, start by converting to
28329  # unix format.
28330  path="$BOOT_JDK"
28331  new_path=`$CYGPATH -u "$path"`
28332
28333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28336  # "foo.exe" is OK but "foo" is an error.
28337  #
28338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28339  # It is also a way to make sure we got the proper file name for the real test later on.
28340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28341  if test "x$test_shortpath" = x; then
28342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28344    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28345  fi
28346
28347  # Call helper function which possibly converts this using DOS-style short mode.
28348  # If so, the updated path is stored in $new_path.
28349
28350  input_path="$new_path"
28351  # Check if we need to convert this using DOS-style short mode. If the path
28352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28353  # take no chances and rewrite it.
28354  # Note: m4 eats our [], so we need to use [ and ] instead.
28355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28356  if test "x$has_forbidden_chars" != x; then
28357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28361      # Going to short mode and back again did indeed matter. Since short mode is
28362      # case insensitive, let's make it lowercase to improve readability.
28363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28364      # Now convert it back to Unix-style (cygpath)
28365      input_path=`$CYGPATH -u "$shortmode_path"`
28366      new_path="$input_path"
28367    fi
28368  fi
28369
28370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28371  if test "x$test_cygdrive_prefix" = x; then
28372    # As a simple fix, exclude /usr/bin since it's not a real path.
28373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28375      # a path prefixed by /cygdrive for fixpath to work.
28376      new_path="$CYGWIN_ROOT_PATH$input_path"
28377    fi
28378  fi
28379
28380
28381  if test "x$path" != "x$new_path"; then
28382    BOOT_JDK="$new_path"
28383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28385  fi
28386
28387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28388
28389  path="$BOOT_JDK"
28390  has_colon=`$ECHO $path | $GREP ^.:`
28391  new_path="$path"
28392  if test "x$has_colon" = x; then
28393    # Not in mixed or Windows style, start by that.
28394    new_path=`cmd //c echo $path`
28395  fi
28396
28397
28398  input_path="$new_path"
28399  # Check if we need to convert this using DOS-style short mode. If the path
28400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28401  # take no chances and rewrite it.
28402  # Note: m4 eats our [], so we need to use [ and ] instead.
28403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28404  if test "x$has_forbidden_chars" != x; then
28405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28407  fi
28408
28409
28410  windows_path="$new_path"
28411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28412    unix_path=`$CYGPATH -u "$windows_path"`
28413    new_path="$unix_path"
28414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28416    new_path="$unix_path"
28417  fi
28418
28419  if test "x$path" != "x$new_path"; then
28420    BOOT_JDK="$new_path"
28421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28423  fi
28424
28425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28427
28428    else
28429      # We're on a unix platform. Hooray! :)
28430      path="$BOOT_JDK"
28431      has_space=`$ECHO "$path" | $GREP " "`
28432      if test "x$has_space" != x; then
28433        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28435        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28436      fi
28437
28438      # Use eval to expand a potential ~
28439      eval path="$path"
28440      if test ! -f "$path" && test ! -d "$path"; then
28441        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28442      fi
28443
28444      if test -d "$path"; then
28445        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28446      else
28447        dir="`$DIRNAME "$path"`"
28448        base="`$BASENAME "$path"`"
28449        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28450      fi
28451    fi
28452  fi
28453
28454            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28455$as_echo_n "checking for Boot JDK... " >&6; }
28456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28457$as_echo "$BOOT_JDK" >&6; }
28458            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28459$as_echo_n "checking Boot JDK version... " >&6; }
28460            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28462$as_echo "$BOOT_JDK_VERSION" >&6; }
28463          fi # end check jdk version
28464        fi # end check javac
28465      fi # end check java
28466    fi # end check boot jdk found
28467  fi
28468
28469    done
28470  fi
28471
28472  fi
28473
28474
28475    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28476    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28477      # Do we have a bin/java?
28478      if test ! -x "$BOOT_JDK/bin/java"; then
28479        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28481        BOOT_JDK_FOUND=no
28482      else
28483        # Do we have a bin/javac?
28484        if test ! -x "$BOOT_JDK/bin/javac"; then
28485          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28487          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28488$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28489          BOOT_JDK_FOUND=no
28490        else
28491          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28492          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28493
28494          # Extra M4 quote needed to protect [] in grep expression.
28495          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28496          if test "x$FOUND_CORRECT_VERSION" = x; then
28497            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28499            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28500$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28501            BOOT_JDK_FOUND=no
28502          else
28503            # We're done! :-)
28504            BOOT_JDK_FOUND=yes
28505
28506  # Only process if variable expands to non-empty
28507
28508  if test "x$BOOT_JDK" != x; then
28509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28510
28511  # Input might be given as Windows format, start by converting to
28512  # unix format.
28513  path="$BOOT_JDK"
28514  new_path=`$CYGPATH -u "$path"`
28515
28516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28519  # "foo.exe" is OK but "foo" is an error.
28520  #
28521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28522  # It is also a way to make sure we got the proper file name for the real test later on.
28523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28524  if test "x$test_shortpath" = x; then
28525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28526$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28527    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28528  fi
28529
28530  # Call helper function which possibly converts this using DOS-style short mode.
28531  # If so, the updated path is stored in $new_path.
28532
28533  input_path="$new_path"
28534  # Check if we need to convert this using DOS-style short mode. If the path
28535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28536  # take no chances and rewrite it.
28537  # Note: m4 eats our [], so we need to use [ and ] instead.
28538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28539  if test "x$has_forbidden_chars" != x; then
28540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28544      # Going to short mode and back again did indeed matter. Since short mode is
28545      # case insensitive, let's make it lowercase to improve readability.
28546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28547      # Now convert it back to Unix-style (cygpath)
28548      input_path=`$CYGPATH -u "$shortmode_path"`
28549      new_path="$input_path"
28550    fi
28551  fi
28552
28553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28554  if test "x$test_cygdrive_prefix" = x; then
28555    # As a simple fix, exclude /usr/bin since it's not a real path.
28556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28558      # a path prefixed by /cygdrive for fixpath to work.
28559      new_path="$CYGWIN_ROOT_PATH$input_path"
28560    fi
28561  fi
28562
28563
28564  if test "x$path" != "x$new_path"; then
28565    BOOT_JDK="$new_path"
28566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28567$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28568  fi
28569
28570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28571
28572  path="$BOOT_JDK"
28573  has_colon=`$ECHO $path | $GREP ^.:`
28574  new_path="$path"
28575  if test "x$has_colon" = x; then
28576    # Not in mixed or Windows style, start by that.
28577    new_path=`cmd //c echo $path`
28578  fi
28579
28580
28581  input_path="$new_path"
28582  # Check if we need to convert this using DOS-style short mode. If the path
28583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28584  # take no chances and rewrite it.
28585  # Note: m4 eats our [], so we need to use [ and ] instead.
28586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28587  if test "x$has_forbidden_chars" != x; then
28588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28590  fi
28591
28592
28593  windows_path="$new_path"
28594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28595    unix_path=`$CYGPATH -u "$windows_path"`
28596    new_path="$unix_path"
28597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28599    new_path="$unix_path"
28600  fi
28601
28602  if test "x$path" != "x$new_path"; then
28603    BOOT_JDK="$new_path"
28604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28605$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28606  fi
28607
28608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28610
28611    else
28612      # We're on a unix platform. Hooray! :)
28613      path="$BOOT_JDK"
28614      has_space=`$ECHO "$path" | $GREP " "`
28615      if test "x$has_space" != x; then
28616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28617$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28618        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28619      fi
28620
28621      # Use eval to expand a potential ~
28622      eval path="$path"
28623      if test ! -f "$path" && test ! -d "$path"; then
28624        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28625      fi
28626
28627      if test -d "$path"; then
28628        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28629      else
28630        dir="`$DIRNAME "$path"`"
28631        base="`$BASENAME "$path"`"
28632        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28633      fi
28634    fi
28635  fi
28636
28637            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28638$as_echo_n "checking for Boot JDK... " >&6; }
28639            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28640$as_echo "$BOOT_JDK" >&6; }
28641            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28642$as_echo_n "checking Boot JDK version... " >&6; }
28643            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28645$as_echo "$BOOT_JDK_VERSION" >&6; }
28646          fi # end check jdk version
28647        fi # end check javac
28648      fi # end check java
28649    fi # end check boot jdk found
28650  fi
28651
28652
28653  if test "x$BOOT_JDK_FOUND" = xno; then
28654    # Now execute the test
28655
28656  if test "x$ProgramFiles" != x; then
28657    VIRTUAL_DIR="$ProgramFiles/Java"
28658
28659  windows_path="$VIRTUAL_DIR"
28660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28661    unix_path=`$CYGPATH -u "$windows_path"`
28662    VIRTUAL_DIR="$unix_path"
28663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28665    VIRTUAL_DIR="$unix_path"
28666  fi
28667
28668
28669  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28670  BOOT_JDK_SUFFIX=""
28671  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28672  if test "x$ALL_JDKS_FOUND" != x; then
28673    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28674
28675  if test "x$BOOT_JDK_FOUND" = xno; then
28676    # Now execute the test
28677
28678        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28679        if test -d "$BOOT_JDK"; then
28680          BOOT_JDK_FOUND=maybe
28681          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28682$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28683        fi
28684
28685
28686    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28687    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28688      # Do we have a bin/java?
28689      if test ! -x "$BOOT_JDK/bin/java"; then
28690        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28692        BOOT_JDK_FOUND=no
28693      else
28694        # Do we have a bin/javac?
28695        if test ! -x "$BOOT_JDK/bin/javac"; then
28696          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28698          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28699$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28700          BOOT_JDK_FOUND=no
28701        else
28702          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28703          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28704
28705          # Extra M4 quote needed to protect [] in grep expression.
28706          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28707          if test "x$FOUND_CORRECT_VERSION" = x; then
28708            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28710            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28711$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28712            BOOT_JDK_FOUND=no
28713          else
28714            # We're done! :-)
28715            BOOT_JDK_FOUND=yes
28716
28717  # Only process if variable expands to non-empty
28718
28719  if test "x$BOOT_JDK" != x; then
28720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28721
28722  # Input might be given as Windows format, start by converting to
28723  # unix format.
28724  path="$BOOT_JDK"
28725  new_path=`$CYGPATH -u "$path"`
28726
28727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28730  # "foo.exe" is OK but "foo" is an error.
28731  #
28732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28733  # It is also a way to make sure we got the proper file name for the real test later on.
28734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28735  if test "x$test_shortpath" = x; then
28736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28738    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28739  fi
28740
28741  # Call helper function which possibly converts this using DOS-style short mode.
28742  # If so, the updated path is stored in $new_path.
28743
28744  input_path="$new_path"
28745  # Check if we need to convert this using DOS-style short mode. If the path
28746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28747  # take no chances and rewrite it.
28748  # Note: m4 eats our [], so we need to use [ and ] instead.
28749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28750  if test "x$has_forbidden_chars" != x; then
28751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28755      # Going to short mode and back again did indeed matter. Since short mode is
28756      # case insensitive, let's make it lowercase to improve readability.
28757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28758      # Now convert it back to Unix-style (cygpath)
28759      input_path=`$CYGPATH -u "$shortmode_path"`
28760      new_path="$input_path"
28761    fi
28762  fi
28763
28764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28765  if test "x$test_cygdrive_prefix" = x; then
28766    # As a simple fix, exclude /usr/bin since it's not a real path.
28767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28769      # a path prefixed by /cygdrive for fixpath to work.
28770      new_path="$CYGWIN_ROOT_PATH$input_path"
28771    fi
28772  fi
28773
28774
28775  if test "x$path" != "x$new_path"; then
28776    BOOT_JDK="$new_path"
28777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28779  fi
28780
28781    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28782
28783  path="$BOOT_JDK"
28784  has_colon=`$ECHO $path | $GREP ^.:`
28785  new_path="$path"
28786  if test "x$has_colon" = x; then
28787    # Not in mixed or Windows style, start by that.
28788    new_path=`cmd //c echo $path`
28789  fi
28790
28791
28792  input_path="$new_path"
28793  # Check if we need to convert this using DOS-style short mode. If the path
28794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28795  # take no chances and rewrite it.
28796  # Note: m4 eats our [], so we need to use [ and ] instead.
28797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28798  if test "x$has_forbidden_chars" != x; then
28799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28801  fi
28802
28803
28804  windows_path="$new_path"
28805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28806    unix_path=`$CYGPATH -u "$windows_path"`
28807    new_path="$unix_path"
28808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28810    new_path="$unix_path"
28811  fi
28812
28813  if test "x$path" != "x$new_path"; then
28814    BOOT_JDK="$new_path"
28815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28817  fi
28818
28819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28821
28822    else
28823      # We're on a unix platform. Hooray! :)
28824      path="$BOOT_JDK"
28825      has_space=`$ECHO "$path" | $GREP " "`
28826      if test "x$has_space" != x; then
28827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28829        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28830      fi
28831
28832      # Use eval to expand a potential ~
28833      eval path="$path"
28834      if test ! -f "$path" && test ! -d "$path"; then
28835        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28836      fi
28837
28838      if test -d "$path"; then
28839        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28840      else
28841        dir="`$DIRNAME "$path"`"
28842        base="`$BASENAME "$path"`"
28843        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28844      fi
28845    fi
28846  fi
28847
28848            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28849$as_echo_n "checking for Boot JDK... " >&6; }
28850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28851$as_echo "$BOOT_JDK" >&6; }
28852            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28853$as_echo_n "checking Boot JDK version... " >&6; }
28854            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28856$as_echo "$BOOT_JDK_VERSION" >&6; }
28857          fi # end check jdk version
28858        fi # end check javac
28859      fi # end check java
28860    fi # end check boot jdk found
28861  fi
28862
28863    done
28864  fi
28865
28866  fi
28867
28868
28869    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28870    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28871      # Do we have a bin/java?
28872      if test ! -x "$BOOT_JDK/bin/java"; then
28873        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28875        BOOT_JDK_FOUND=no
28876      else
28877        # Do we have a bin/javac?
28878        if test ! -x "$BOOT_JDK/bin/javac"; then
28879          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28881          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28882$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28883          BOOT_JDK_FOUND=no
28884        else
28885          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28886          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28887
28888          # Extra M4 quote needed to protect [] in grep expression.
28889          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28890          if test "x$FOUND_CORRECT_VERSION" = x; then
28891            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28893            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28894$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28895            BOOT_JDK_FOUND=no
28896          else
28897            # We're done! :-)
28898            BOOT_JDK_FOUND=yes
28899
28900  # Only process if variable expands to non-empty
28901
28902  if test "x$BOOT_JDK" != x; then
28903    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28904
28905  # Input might be given as Windows format, start by converting to
28906  # unix format.
28907  path="$BOOT_JDK"
28908  new_path=`$CYGPATH -u "$path"`
28909
28910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28913  # "foo.exe" is OK but "foo" is an error.
28914  #
28915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28916  # It is also a way to make sure we got the proper file name for the real test later on.
28917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28918  if test "x$test_shortpath" = x; then
28919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28920$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28921    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28922  fi
28923
28924  # Call helper function which possibly converts this using DOS-style short mode.
28925  # If so, the updated path is stored in $new_path.
28926
28927  input_path="$new_path"
28928  # Check if we need to convert this using DOS-style short mode. If the path
28929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28930  # take no chances and rewrite it.
28931  # Note: m4 eats our [], so we need to use [ and ] instead.
28932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28933  if test "x$has_forbidden_chars" != x; then
28934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28938      # Going to short mode and back again did indeed matter. Since short mode is
28939      # case insensitive, let's make it lowercase to improve readability.
28940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28941      # Now convert it back to Unix-style (cygpath)
28942      input_path=`$CYGPATH -u "$shortmode_path"`
28943      new_path="$input_path"
28944    fi
28945  fi
28946
28947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28948  if test "x$test_cygdrive_prefix" = x; then
28949    # As a simple fix, exclude /usr/bin since it's not a real path.
28950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28952      # a path prefixed by /cygdrive for fixpath to work.
28953      new_path="$CYGWIN_ROOT_PATH$input_path"
28954    fi
28955  fi
28956
28957
28958  if test "x$path" != "x$new_path"; then
28959    BOOT_JDK="$new_path"
28960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28961$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28962  fi
28963
28964    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28965
28966  path="$BOOT_JDK"
28967  has_colon=`$ECHO $path | $GREP ^.:`
28968  new_path="$path"
28969  if test "x$has_colon" = x; then
28970    # Not in mixed or Windows style, start by that.
28971    new_path=`cmd //c echo $path`
28972  fi
28973
28974
28975  input_path="$new_path"
28976  # Check if we need to convert this using DOS-style short mode. If the path
28977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28978  # take no chances and rewrite it.
28979  # Note: m4 eats our [], so we need to use [ and ] instead.
28980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28981  if test "x$has_forbidden_chars" != x; then
28982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28984  fi
28985
28986
28987  windows_path="$new_path"
28988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28989    unix_path=`$CYGPATH -u "$windows_path"`
28990    new_path="$unix_path"
28991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28993    new_path="$unix_path"
28994  fi
28995
28996  if test "x$path" != "x$new_path"; then
28997    BOOT_JDK="$new_path"
28998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28999$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29000  fi
29001
29002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29004
29005    else
29006      # We're on a unix platform. Hooray! :)
29007      path="$BOOT_JDK"
29008      has_space=`$ECHO "$path" | $GREP " "`
29009      if test "x$has_space" != x; then
29010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29011$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29012        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29013      fi
29014
29015      # Use eval to expand a potential ~
29016      eval path="$path"
29017      if test ! -f "$path" && test ! -d "$path"; then
29018        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29019      fi
29020
29021      if test -d "$path"; then
29022        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29023      else
29024        dir="`$DIRNAME "$path"`"
29025        base="`$BASENAME "$path"`"
29026        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29027      fi
29028    fi
29029  fi
29030
29031            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29032$as_echo_n "checking for Boot JDK... " >&6; }
29033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29034$as_echo "$BOOT_JDK" >&6; }
29035            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29036$as_echo_n "checking Boot JDK version... " >&6; }
29037            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29039$as_echo "$BOOT_JDK_VERSION" >&6; }
29040          fi # end check jdk version
29041        fi # end check javac
29042      fi # end check java
29043    fi # end check boot jdk found
29044  fi
29045
29046
29047  if test "x$BOOT_JDK_FOUND" = xno; then
29048    # Now execute the test
29049
29050  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
29051  BOOT_JDK_SUFFIX=""
29052  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29053  if test "x$ALL_JDKS_FOUND" != x; then
29054    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29055
29056  if test "x$BOOT_JDK_FOUND" = xno; then
29057    # Now execute the test
29058
29059        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29060        if test -d "$BOOT_JDK"; then
29061          BOOT_JDK_FOUND=maybe
29062          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29063$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29064        fi
29065
29066
29067    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29068    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29069      # Do we have a bin/java?
29070      if test ! -x "$BOOT_JDK/bin/java"; then
29071        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29073        BOOT_JDK_FOUND=no
29074      else
29075        # Do we have a bin/javac?
29076        if test ! -x "$BOOT_JDK/bin/javac"; then
29077          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29079          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29080$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29081          BOOT_JDK_FOUND=no
29082        else
29083          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29084          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29085
29086          # Extra M4 quote needed to protect [] in grep expression.
29087          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29088          if test "x$FOUND_CORRECT_VERSION" = x; then
29089            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29091            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29092$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29093            BOOT_JDK_FOUND=no
29094          else
29095            # We're done! :-)
29096            BOOT_JDK_FOUND=yes
29097
29098  # Only process if variable expands to non-empty
29099
29100  if test "x$BOOT_JDK" != x; then
29101    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29102
29103  # Input might be given as Windows format, start by converting to
29104  # unix format.
29105  path="$BOOT_JDK"
29106  new_path=`$CYGPATH -u "$path"`
29107
29108  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29109  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29110  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29111  # "foo.exe" is OK but "foo" is an error.
29112  #
29113  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29114  # It is also a way to make sure we got the proper file name for the real test later on.
29115  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29116  if test "x$test_shortpath" = x; then
29117    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29119    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29120  fi
29121
29122  # Call helper function which possibly converts this using DOS-style short mode.
29123  # If so, the updated path is stored in $new_path.
29124
29125  input_path="$new_path"
29126  # Check if we need to convert this using DOS-style short mode. If the path
29127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29128  # take no chances and rewrite it.
29129  # Note: m4 eats our [], so we need to use [ and ] instead.
29130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29131  if test "x$has_forbidden_chars" != x; then
29132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29136      # Going to short mode and back again did indeed matter. Since short mode is
29137      # case insensitive, let's make it lowercase to improve readability.
29138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29139      # Now convert it back to Unix-style (cygpath)
29140      input_path=`$CYGPATH -u "$shortmode_path"`
29141      new_path="$input_path"
29142    fi
29143  fi
29144
29145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29146  if test "x$test_cygdrive_prefix" = x; then
29147    # As a simple fix, exclude /usr/bin since it's not a real path.
29148    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29150      # a path prefixed by /cygdrive for fixpath to work.
29151      new_path="$CYGWIN_ROOT_PATH$input_path"
29152    fi
29153  fi
29154
29155
29156  if test "x$path" != "x$new_path"; then
29157    BOOT_JDK="$new_path"
29158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29159$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29160  fi
29161
29162    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29163
29164  path="$BOOT_JDK"
29165  has_colon=`$ECHO $path | $GREP ^.:`
29166  new_path="$path"
29167  if test "x$has_colon" = x; then
29168    # Not in mixed or Windows style, start by that.
29169    new_path=`cmd //c echo $path`
29170  fi
29171
29172
29173  input_path="$new_path"
29174  # Check if we need to convert this using DOS-style short mode. If the path
29175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29176  # take no chances and rewrite it.
29177  # Note: m4 eats our [], so we need to use [ and ] instead.
29178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29179  if test "x$has_forbidden_chars" != x; then
29180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29181    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29182  fi
29183
29184
29185  windows_path="$new_path"
29186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29187    unix_path=`$CYGPATH -u "$windows_path"`
29188    new_path="$unix_path"
29189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29191    new_path="$unix_path"
29192  fi
29193
29194  if test "x$path" != "x$new_path"; then
29195    BOOT_JDK="$new_path"
29196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29197$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29198  fi
29199
29200  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29201  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29202
29203    else
29204      # We're on a unix platform. Hooray! :)
29205      path="$BOOT_JDK"
29206      has_space=`$ECHO "$path" | $GREP " "`
29207      if test "x$has_space" != x; then
29208        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29209$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29210        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29211      fi
29212
29213      # Use eval to expand a potential ~
29214      eval path="$path"
29215      if test ! -f "$path" && test ! -d "$path"; then
29216        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29217      fi
29218
29219      if test -d "$path"; then
29220        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29221      else
29222        dir="`$DIRNAME "$path"`"
29223        base="`$BASENAME "$path"`"
29224        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29225      fi
29226    fi
29227  fi
29228
29229            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29230$as_echo_n "checking for Boot JDK... " >&6; }
29231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29232$as_echo "$BOOT_JDK" >&6; }
29233            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29234$as_echo_n "checking Boot JDK version... " >&6; }
29235            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29237$as_echo "$BOOT_JDK_VERSION" >&6; }
29238          fi # end check jdk version
29239        fi # end check javac
29240      fi # end check java
29241    fi # end check boot jdk found
29242  fi
29243
29244    done
29245  fi
29246
29247
29248    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29249    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29250      # Do we have a bin/java?
29251      if test ! -x "$BOOT_JDK/bin/java"; then
29252        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29254        BOOT_JDK_FOUND=no
29255      else
29256        # Do we have a bin/javac?
29257        if test ! -x "$BOOT_JDK/bin/javac"; then
29258          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29260          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29261$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29262          BOOT_JDK_FOUND=no
29263        else
29264          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29265          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29266
29267          # Extra M4 quote needed to protect [] in grep expression.
29268          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29269          if test "x$FOUND_CORRECT_VERSION" = x; then
29270            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29272            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29273$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29274            BOOT_JDK_FOUND=no
29275          else
29276            # We're done! :-)
29277            BOOT_JDK_FOUND=yes
29278
29279  # Only process if variable expands to non-empty
29280
29281  if test "x$BOOT_JDK" != x; then
29282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29283
29284  # Input might be given as Windows format, start by converting to
29285  # unix format.
29286  path="$BOOT_JDK"
29287  new_path=`$CYGPATH -u "$path"`
29288
29289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29292  # "foo.exe" is OK but "foo" is an error.
29293  #
29294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29295  # It is also a way to make sure we got the proper file name for the real test later on.
29296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29297  if test "x$test_shortpath" = x; then
29298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29299$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29300    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29301  fi
29302
29303  # Call helper function which possibly converts this using DOS-style short mode.
29304  # If so, the updated path is stored in $new_path.
29305
29306  input_path="$new_path"
29307  # Check if we need to convert this using DOS-style short mode. If the path
29308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29309  # take no chances and rewrite it.
29310  # Note: m4 eats our [], so we need to use [ and ] instead.
29311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29312  if test "x$has_forbidden_chars" != x; then
29313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29317      # Going to short mode and back again did indeed matter. Since short mode is
29318      # case insensitive, let's make it lowercase to improve readability.
29319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29320      # Now convert it back to Unix-style (cygpath)
29321      input_path=`$CYGPATH -u "$shortmode_path"`
29322      new_path="$input_path"
29323    fi
29324  fi
29325
29326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29327  if test "x$test_cygdrive_prefix" = x; then
29328    # As a simple fix, exclude /usr/bin since it's not a real path.
29329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29331      # a path prefixed by /cygdrive for fixpath to work.
29332      new_path="$CYGWIN_ROOT_PATH$input_path"
29333    fi
29334  fi
29335
29336
29337  if test "x$path" != "x$new_path"; then
29338    BOOT_JDK="$new_path"
29339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29341  fi
29342
29343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29344
29345  path="$BOOT_JDK"
29346  has_colon=`$ECHO $path | $GREP ^.:`
29347  new_path="$path"
29348  if test "x$has_colon" = x; then
29349    # Not in mixed or Windows style, start by that.
29350    new_path=`cmd //c echo $path`
29351  fi
29352
29353
29354  input_path="$new_path"
29355  # Check if we need to convert this using DOS-style short mode. If the path
29356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29357  # take no chances and rewrite it.
29358  # Note: m4 eats our [], so we need to use [ and ] instead.
29359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29360  if test "x$has_forbidden_chars" != x; then
29361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29363  fi
29364
29365
29366  windows_path="$new_path"
29367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29368    unix_path=`$CYGPATH -u "$windows_path"`
29369    new_path="$unix_path"
29370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29372    new_path="$unix_path"
29373  fi
29374
29375  if test "x$path" != "x$new_path"; then
29376    BOOT_JDK="$new_path"
29377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29379  fi
29380
29381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29383
29384    else
29385      # We're on a unix platform. Hooray! :)
29386      path="$BOOT_JDK"
29387      has_space=`$ECHO "$path" | $GREP " "`
29388      if test "x$has_space" != x; then
29389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29390$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29392      fi
29393
29394      # Use eval to expand a potential ~
29395      eval path="$path"
29396      if test ! -f "$path" && test ! -d "$path"; then
29397        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29398      fi
29399
29400      if test -d "$path"; then
29401        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29402      else
29403        dir="`$DIRNAME "$path"`"
29404        base="`$BASENAME "$path"`"
29405        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29406      fi
29407    fi
29408  fi
29409
29410            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29411$as_echo_n "checking for Boot JDK... " >&6; }
29412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29413$as_echo "$BOOT_JDK" >&6; }
29414            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29415$as_echo_n "checking Boot JDK version... " >&6; }
29416            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29418$as_echo "$BOOT_JDK_VERSION" >&6; }
29419          fi # end check jdk version
29420        fi # end check javac
29421      fi # end check java
29422    fi # end check boot jdk found
29423  fi
29424
29425  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29426
29427  if test "x$BOOT_JDK_FOUND" = xno; then
29428    # Now execute the test
29429
29430  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29431  BOOT_JDK_SUFFIX="/Contents/Home"
29432  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29433  if test "x$ALL_JDKS_FOUND" != x; then
29434    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29435
29436  if test "x$BOOT_JDK_FOUND" = xno; then
29437    # Now execute the test
29438
29439        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29440        if test -d "$BOOT_JDK"; then
29441          BOOT_JDK_FOUND=maybe
29442          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29443$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29444        fi
29445
29446
29447    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29448    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29449      # Do we have a bin/java?
29450      if test ! -x "$BOOT_JDK/bin/java"; then
29451        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29453        BOOT_JDK_FOUND=no
29454      else
29455        # Do we have a bin/javac?
29456        if test ! -x "$BOOT_JDK/bin/javac"; then
29457          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29459          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29460$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29461          BOOT_JDK_FOUND=no
29462        else
29463          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29464          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29465
29466          # Extra M4 quote needed to protect [] in grep expression.
29467          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29468          if test "x$FOUND_CORRECT_VERSION" = x; then
29469            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29471            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29472$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29473            BOOT_JDK_FOUND=no
29474          else
29475            # We're done! :-)
29476            BOOT_JDK_FOUND=yes
29477
29478  # Only process if variable expands to non-empty
29479
29480  if test "x$BOOT_JDK" != x; then
29481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29482
29483  # Input might be given as Windows format, start by converting to
29484  # unix format.
29485  path="$BOOT_JDK"
29486  new_path=`$CYGPATH -u "$path"`
29487
29488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29491  # "foo.exe" is OK but "foo" is an error.
29492  #
29493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29494  # It is also a way to make sure we got the proper file name for the real test later on.
29495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29496  if test "x$test_shortpath" = x; then
29497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29499    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29500  fi
29501
29502  # Call helper function which possibly converts this using DOS-style short mode.
29503  # If so, the updated path is stored in $new_path.
29504
29505  input_path="$new_path"
29506  # Check if we need to convert this using DOS-style short mode. If the path
29507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29508  # take no chances and rewrite it.
29509  # Note: m4 eats our [], so we need to use [ and ] instead.
29510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29511  if test "x$has_forbidden_chars" != x; then
29512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29516      # Going to short mode and back again did indeed matter. Since short mode is
29517      # case insensitive, let's make it lowercase to improve readability.
29518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29519      # Now convert it back to Unix-style (cygpath)
29520      input_path=`$CYGPATH -u "$shortmode_path"`
29521      new_path="$input_path"
29522    fi
29523  fi
29524
29525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29526  if test "x$test_cygdrive_prefix" = x; then
29527    # As a simple fix, exclude /usr/bin since it's not a real path.
29528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29530      # a path prefixed by /cygdrive for fixpath to work.
29531      new_path="$CYGWIN_ROOT_PATH$input_path"
29532    fi
29533  fi
29534
29535
29536  if test "x$path" != "x$new_path"; then
29537    BOOT_JDK="$new_path"
29538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29540  fi
29541
29542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29543
29544  path="$BOOT_JDK"
29545  has_colon=`$ECHO $path | $GREP ^.:`
29546  new_path="$path"
29547  if test "x$has_colon" = x; then
29548    # Not in mixed or Windows style, start by that.
29549    new_path=`cmd //c echo $path`
29550  fi
29551
29552
29553  input_path="$new_path"
29554  # Check if we need to convert this using DOS-style short mode. If the path
29555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29556  # take no chances and rewrite it.
29557  # Note: m4 eats our [], so we need to use [ and ] instead.
29558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29559  if test "x$has_forbidden_chars" != x; then
29560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29562  fi
29563
29564
29565  windows_path="$new_path"
29566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29567    unix_path=`$CYGPATH -u "$windows_path"`
29568    new_path="$unix_path"
29569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29571    new_path="$unix_path"
29572  fi
29573
29574  if test "x$path" != "x$new_path"; then
29575    BOOT_JDK="$new_path"
29576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29577$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29578  fi
29579
29580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29582
29583    else
29584      # We're on a unix platform. Hooray! :)
29585      path="$BOOT_JDK"
29586      has_space=`$ECHO "$path" | $GREP " "`
29587      if test "x$has_space" != x; then
29588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29589$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29590        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29591      fi
29592
29593      # Use eval to expand a potential ~
29594      eval path="$path"
29595      if test ! -f "$path" && test ! -d "$path"; then
29596        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29597      fi
29598
29599      if test -d "$path"; then
29600        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29601      else
29602        dir="`$DIRNAME "$path"`"
29603        base="`$BASENAME "$path"`"
29604        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29605      fi
29606    fi
29607  fi
29608
29609            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29610$as_echo_n "checking for Boot JDK... " >&6; }
29611            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29612$as_echo "$BOOT_JDK" >&6; }
29613            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29614$as_echo_n "checking Boot JDK version... " >&6; }
29615            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29617$as_echo "$BOOT_JDK_VERSION" >&6; }
29618          fi # end check jdk version
29619        fi # end check javac
29620      fi # end check java
29621    fi # end check boot jdk found
29622  fi
29623
29624    done
29625  fi
29626
29627
29628    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29629    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29630      # Do we have a bin/java?
29631      if test ! -x "$BOOT_JDK/bin/java"; then
29632        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29634        BOOT_JDK_FOUND=no
29635      else
29636        # Do we have a bin/javac?
29637        if test ! -x "$BOOT_JDK/bin/javac"; then
29638          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29640          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29641$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29642          BOOT_JDK_FOUND=no
29643        else
29644          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29645          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29646
29647          # Extra M4 quote needed to protect [] in grep expression.
29648          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29649          if test "x$FOUND_CORRECT_VERSION" = x; then
29650            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29652            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29653$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29654            BOOT_JDK_FOUND=no
29655          else
29656            # We're done! :-)
29657            BOOT_JDK_FOUND=yes
29658
29659  # Only process if variable expands to non-empty
29660
29661  if test "x$BOOT_JDK" != x; then
29662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29663
29664  # Input might be given as Windows format, start by converting to
29665  # unix format.
29666  path="$BOOT_JDK"
29667  new_path=`$CYGPATH -u "$path"`
29668
29669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29672  # "foo.exe" is OK but "foo" is an error.
29673  #
29674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29675  # It is also a way to make sure we got the proper file name for the real test later on.
29676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29677  if test "x$test_shortpath" = x; then
29678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29680    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29681  fi
29682
29683  # Call helper function which possibly converts this using DOS-style short mode.
29684  # If so, the updated path is stored in $new_path.
29685
29686  input_path="$new_path"
29687  # Check if we need to convert this using DOS-style short mode. If the path
29688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29689  # take no chances and rewrite it.
29690  # Note: m4 eats our [], so we need to use [ and ] instead.
29691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29692  if test "x$has_forbidden_chars" != x; then
29693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29697      # Going to short mode and back again did indeed matter. Since short mode is
29698      # case insensitive, let's make it lowercase to improve readability.
29699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29700      # Now convert it back to Unix-style (cygpath)
29701      input_path=`$CYGPATH -u "$shortmode_path"`
29702      new_path="$input_path"
29703    fi
29704  fi
29705
29706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29707  if test "x$test_cygdrive_prefix" = x; then
29708    # As a simple fix, exclude /usr/bin since it's not a real path.
29709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29711      # a path prefixed by /cygdrive for fixpath to work.
29712      new_path="$CYGWIN_ROOT_PATH$input_path"
29713    fi
29714  fi
29715
29716
29717  if test "x$path" != "x$new_path"; then
29718    BOOT_JDK="$new_path"
29719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29721  fi
29722
29723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29724
29725  path="$BOOT_JDK"
29726  has_colon=`$ECHO $path | $GREP ^.:`
29727  new_path="$path"
29728  if test "x$has_colon" = x; then
29729    # Not in mixed or Windows style, start by that.
29730    new_path=`cmd //c echo $path`
29731  fi
29732
29733
29734  input_path="$new_path"
29735  # Check if we need to convert this using DOS-style short mode. If the path
29736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29737  # take no chances and rewrite it.
29738  # Note: m4 eats our [], so we need to use [ and ] instead.
29739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29740  if test "x$has_forbidden_chars" != x; then
29741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29743  fi
29744
29745
29746  windows_path="$new_path"
29747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29748    unix_path=`$CYGPATH -u "$windows_path"`
29749    new_path="$unix_path"
29750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29752    new_path="$unix_path"
29753  fi
29754
29755  if test "x$path" != "x$new_path"; then
29756    BOOT_JDK="$new_path"
29757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29759  fi
29760
29761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29763
29764    else
29765      # We're on a unix platform. Hooray! :)
29766      path="$BOOT_JDK"
29767      has_space=`$ECHO "$path" | $GREP " "`
29768      if test "x$has_space" != x; then
29769        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29771        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29772      fi
29773
29774      # Use eval to expand a potential ~
29775      eval path="$path"
29776      if test ! -f "$path" && test ! -d "$path"; then
29777        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29778      fi
29779
29780      if test -d "$path"; then
29781        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29782      else
29783        dir="`$DIRNAME "$path"`"
29784        base="`$BASENAME "$path"`"
29785        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29786      fi
29787    fi
29788  fi
29789
29790            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29791$as_echo_n "checking for Boot JDK... " >&6; }
29792            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29793$as_echo "$BOOT_JDK" >&6; }
29794            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29795$as_echo_n "checking Boot JDK version... " >&6; }
29796            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29797            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29798$as_echo "$BOOT_JDK_VERSION" >&6; }
29799          fi # end check jdk version
29800        fi # end check javac
29801      fi # end check java
29802    fi # end check boot jdk found
29803  fi
29804
29805
29806  if test "x$BOOT_JDK_FOUND" = xno; then
29807    # Now execute the test
29808
29809  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29810  BOOT_JDK_SUFFIX="/Contents/Home"
29811  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29812  if test "x$ALL_JDKS_FOUND" != x; then
29813    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29814
29815  if test "x$BOOT_JDK_FOUND" = xno; then
29816    # Now execute the test
29817
29818        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29819        if test -d "$BOOT_JDK"; then
29820          BOOT_JDK_FOUND=maybe
29821          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29822$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29823        fi
29824
29825
29826    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29827    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29828      # Do we have a bin/java?
29829      if test ! -x "$BOOT_JDK/bin/java"; then
29830        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29832        BOOT_JDK_FOUND=no
29833      else
29834        # Do we have a bin/javac?
29835        if test ! -x "$BOOT_JDK/bin/javac"; then
29836          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29838          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29839$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29840          BOOT_JDK_FOUND=no
29841        else
29842          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29843          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29844
29845          # Extra M4 quote needed to protect [] in grep expression.
29846          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29847          if test "x$FOUND_CORRECT_VERSION" = x; then
29848            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29849$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29850            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29851$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29852            BOOT_JDK_FOUND=no
29853          else
29854            # We're done! :-)
29855            BOOT_JDK_FOUND=yes
29856
29857  # Only process if variable expands to non-empty
29858
29859  if test "x$BOOT_JDK" != x; then
29860    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29861
29862  # Input might be given as Windows format, start by converting to
29863  # unix format.
29864  path="$BOOT_JDK"
29865  new_path=`$CYGPATH -u "$path"`
29866
29867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29870  # "foo.exe" is OK but "foo" is an error.
29871  #
29872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29873  # It is also a way to make sure we got the proper file name for the real test later on.
29874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29875  if test "x$test_shortpath" = x; then
29876    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29877$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29878    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29879  fi
29880
29881  # Call helper function which possibly converts this using DOS-style short mode.
29882  # If so, the updated path is stored in $new_path.
29883
29884  input_path="$new_path"
29885  # Check if we need to convert this using DOS-style short mode. If the path
29886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29887  # take no chances and rewrite it.
29888  # Note: m4 eats our [], so we need to use [ and ] instead.
29889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29890  if test "x$has_forbidden_chars" != x; then
29891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29895      # Going to short mode and back again did indeed matter. Since short mode is
29896      # case insensitive, let's make it lowercase to improve readability.
29897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29898      # Now convert it back to Unix-style (cygpath)
29899      input_path=`$CYGPATH -u "$shortmode_path"`
29900      new_path="$input_path"
29901    fi
29902  fi
29903
29904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29905  if test "x$test_cygdrive_prefix" = x; then
29906    # As a simple fix, exclude /usr/bin since it's not a real path.
29907    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29909      # a path prefixed by /cygdrive for fixpath to work.
29910      new_path="$CYGWIN_ROOT_PATH$input_path"
29911    fi
29912  fi
29913
29914
29915  if test "x$path" != "x$new_path"; then
29916    BOOT_JDK="$new_path"
29917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29919  fi
29920
29921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29922
29923  path="$BOOT_JDK"
29924  has_colon=`$ECHO $path | $GREP ^.:`
29925  new_path="$path"
29926  if test "x$has_colon" = x; then
29927    # Not in mixed or Windows style, start by that.
29928    new_path=`cmd //c echo $path`
29929  fi
29930
29931
29932  input_path="$new_path"
29933  # Check if we need to convert this using DOS-style short mode. If the path
29934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29935  # take no chances and rewrite it.
29936  # Note: m4 eats our [], so we need to use [ and ] instead.
29937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29938  if test "x$has_forbidden_chars" != x; then
29939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29941  fi
29942
29943
29944  windows_path="$new_path"
29945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29946    unix_path=`$CYGPATH -u "$windows_path"`
29947    new_path="$unix_path"
29948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29950    new_path="$unix_path"
29951  fi
29952
29953  if test "x$path" != "x$new_path"; then
29954    BOOT_JDK="$new_path"
29955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29956$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29957  fi
29958
29959  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29960  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29961
29962    else
29963      # We're on a unix platform. Hooray! :)
29964      path="$BOOT_JDK"
29965      has_space=`$ECHO "$path" | $GREP " "`
29966      if test "x$has_space" != x; then
29967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29968$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29969        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29970      fi
29971
29972      # Use eval to expand a potential ~
29973      eval path="$path"
29974      if test ! -f "$path" && test ! -d "$path"; then
29975        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29976      fi
29977
29978      if test -d "$path"; then
29979        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29980      else
29981        dir="`$DIRNAME "$path"`"
29982        base="`$BASENAME "$path"`"
29983        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29984      fi
29985    fi
29986  fi
29987
29988            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29989$as_echo_n "checking for Boot JDK... " >&6; }
29990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29991$as_echo "$BOOT_JDK" >&6; }
29992            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29993$as_echo_n "checking Boot JDK version... " >&6; }
29994            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29995            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29996$as_echo "$BOOT_JDK_VERSION" >&6; }
29997          fi # end check jdk version
29998        fi # end check javac
29999      fi # end check java
30000    fi # end check boot jdk found
30001  fi
30002
30003    done
30004  fi
30005
30006
30007    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30008    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30009      # Do we have a bin/java?
30010      if test ! -x "$BOOT_JDK/bin/java"; then
30011        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30013        BOOT_JDK_FOUND=no
30014      else
30015        # Do we have a bin/javac?
30016        if test ! -x "$BOOT_JDK/bin/javac"; then
30017          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30019          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30020$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30021          BOOT_JDK_FOUND=no
30022        else
30023          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30024          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30025
30026          # Extra M4 quote needed to protect [] in grep expression.
30027          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30028          if test "x$FOUND_CORRECT_VERSION" = x; then
30029            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30031            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30032$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30033            BOOT_JDK_FOUND=no
30034          else
30035            # We're done! :-)
30036            BOOT_JDK_FOUND=yes
30037
30038  # Only process if variable expands to non-empty
30039
30040  if test "x$BOOT_JDK" != x; then
30041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30042
30043  # Input might be given as Windows format, start by converting to
30044  # unix format.
30045  path="$BOOT_JDK"
30046  new_path=`$CYGPATH -u "$path"`
30047
30048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30051  # "foo.exe" is OK but "foo" is an error.
30052  #
30053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30054  # It is also a way to make sure we got the proper file name for the real test later on.
30055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30056  if test "x$test_shortpath" = x; then
30057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30059    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30060  fi
30061
30062  # Call helper function which possibly converts this using DOS-style short mode.
30063  # If so, the updated path is stored in $new_path.
30064
30065  input_path="$new_path"
30066  # Check if we need to convert this using DOS-style short mode. If the path
30067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30068  # take no chances and rewrite it.
30069  # Note: m4 eats our [], so we need to use [ and ] instead.
30070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30071  if test "x$has_forbidden_chars" != x; then
30072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30076      # Going to short mode and back again did indeed matter. Since short mode is
30077      # case insensitive, let's make it lowercase to improve readability.
30078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30079      # Now convert it back to Unix-style (cygpath)
30080      input_path=`$CYGPATH -u "$shortmode_path"`
30081      new_path="$input_path"
30082    fi
30083  fi
30084
30085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30086  if test "x$test_cygdrive_prefix" = x; then
30087    # As a simple fix, exclude /usr/bin since it's not a real path.
30088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30090      # a path prefixed by /cygdrive for fixpath to work.
30091      new_path="$CYGWIN_ROOT_PATH$input_path"
30092    fi
30093  fi
30094
30095
30096  if test "x$path" != "x$new_path"; then
30097    BOOT_JDK="$new_path"
30098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30100  fi
30101
30102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30103
30104  path="$BOOT_JDK"
30105  has_colon=`$ECHO $path | $GREP ^.:`
30106  new_path="$path"
30107  if test "x$has_colon" = x; then
30108    # Not in mixed or Windows style, start by that.
30109    new_path=`cmd //c echo $path`
30110  fi
30111
30112
30113  input_path="$new_path"
30114  # Check if we need to convert this using DOS-style short mode. If the path
30115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30116  # take no chances and rewrite it.
30117  # Note: m4 eats our [], so we need to use [ and ] instead.
30118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30119  if test "x$has_forbidden_chars" != x; then
30120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30122  fi
30123
30124
30125  windows_path="$new_path"
30126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30127    unix_path=`$CYGPATH -u "$windows_path"`
30128    new_path="$unix_path"
30129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30131    new_path="$unix_path"
30132  fi
30133
30134  if test "x$path" != "x$new_path"; then
30135    BOOT_JDK="$new_path"
30136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30138  fi
30139
30140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30142
30143    else
30144      # We're on a unix platform. Hooray! :)
30145      path="$BOOT_JDK"
30146      has_space=`$ECHO "$path" | $GREP " "`
30147      if test "x$has_space" != x; then
30148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30150        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30151      fi
30152
30153      # Use eval to expand a potential ~
30154      eval path="$path"
30155      if test ! -f "$path" && test ! -d "$path"; then
30156        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30157      fi
30158
30159      if test -d "$path"; then
30160        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30161      else
30162        dir="`$DIRNAME "$path"`"
30163        base="`$BASENAME "$path"`"
30164        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30165      fi
30166    fi
30167  fi
30168
30169            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30170$as_echo_n "checking for Boot JDK... " >&6; }
30171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30172$as_echo "$BOOT_JDK" >&6; }
30173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30174$as_echo_n "checking Boot JDK version... " >&6; }
30175            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30177$as_echo "$BOOT_JDK_VERSION" >&6; }
30178          fi # end check jdk version
30179        fi # end check javac
30180      fi # end check java
30181    fi # end check boot jdk found
30182  fi
30183
30184  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30185
30186  if test "x$BOOT_JDK_FOUND" = xno; then
30187    # Now execute the test
30188
30189  BOOT_JDK_PREFIX="/usr/lib/jvm"
30190  BOOT_JDK_SUFFIX=""
30191  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30192  if test "x$ALL_JDKS_FOUND" != x; then
30193    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30194
30195  if test "x$BOOT_JDK_FOUND" = xno; then
30196    # Now execute the test
30197
30198        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30199        if test -d "$BOOT_JDK"; then
30200          BOOT_JDK_FOUND=maybe
30201          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30202$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30203        fi
30204
30205
30206    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30207    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30208      # Do we have a bin/java?
30209      if test ! -x "$BOOT_JDK/bin/java"; then
30210        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30212        BOOT_JDK_FOUND=no
30213      else
30214        # Do we have a bin/javac?
30215        if test ! -x "$BOOT_JDK/bin/javac"; then
30216          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30218          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30219$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30220          BOOT_JDK_FOUND=no
30221        else
30222          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30223          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30224
30225          # Extra M4 quote needed to protect [] in grep expression.
30226          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30227          if test "x$FOUND_CORRECT_VERSION" = x; then
30228            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30230            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30231$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30232            BOOT_JDK_FOUND=no
30233          else
30234            # We're done! :-)
30235            BOOT_JDK_FOUND=yes
30236
30237  # Only process if variable expands to non-empty
30238
30239  if test "x$BOOT_JDK" != x; then
30240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30241
30242  # Input might be given as Windows format, start by converting to
30243  # unix format.
30244  path="$BOOT_JDK"
30245  new_path=`$CYGPATH -u "$path"`
30246
30247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30250  # "foo.exe" is OK but "foo" is an error.
30251  #
30252  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30253  # It is also a way to make sure we got the proper file name for the real test later on.
30254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30255  if test "x$test_shortpath" = x; then
30256    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30257$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30258    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30259  fi
30260
30261  # Call helper function which possibly converts this using DOS-style short mode.
30262  # If so, the updated path is stored in $new_path.
30263
30264  input_path="$new_path"
30265  # Check if we need to convert this using DOS-style short mode. If the path
30266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30267  # take no chances and rewrite it.
30268  # Note: m4 eats our [], so we need to use [ and ] instead.
30269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30270  if test "x$has_forbidden_chars" != x; then
30271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30275      # Going to short mode and back again did indeed matter. Since short mode is
30276      # case insensitive, let's make it lowercase to improve readability.
30277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30278      # Now convert it back to Unix-style (cygpath)
30279      input_path=`$CYGPATH -u "$shortmode_path"`
30280      new_path="$input_path"
30281    fi
30282  fi
30283
30284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30285  if test "x$test_cygdrive_prefix" = x; then
30286    # As a simple fix, exclude /usr/bin since it's not a real path.
30287    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30289      # a path prefixed by /cygdrive for fixpath to work.
30290      new_path="$CYGWIN_ROOT_PATH$input_path"
30291    fi
30292  fi
30293
30294
30295  if test "x$path" != "x$new_path"; then
30296    BOOT_JDK="$new_path"
30297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30298$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30299  fi
30300
30301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30302
30303  path="$BOOT_JDK"
30304  has_colon=`$ECHO $path | $GREP ^.:`
30305  new_path="$path"
30306  if test "x$has_colon" = x; then
30307    # Not in mixed or Windows style, start by that.
30308    new_path=`cmd //c echo $path`
30309  fi
30310
30311
30312  input_path="$new_path"
30313  # Check if we need to convert this using DOS-style short mode. If the path
30314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30315  # take no chances and rewrite it.
30316  # Note: m4 eats our [], so we need to use [ and ] instead.
30317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30318  if test "x$has_forbidden_chars" != x; then
30319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30321  fi
30322
30323
30324  windows_path="$new_path"
30325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30326    unix_path=`$CYGPATH -u "$windows_path"`
30327    new_path="$unix_path"
30328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30330    new_path="$unix_path"
30331  fi
30332
30333  if test "x$path" != "x$new_path"; then
30334    BOOT_JDK="$new_path"
30335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30336$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30337  fi
30338
30339  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30340  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30341
30342    else
30343      # We're on a unix platform. Hooray! :)
30344      path="$BOOT_JDK"
30345      has_space=`$ECHO "$path" | $GREP " "`
30346      if test "x$has_space" != x; then
30347        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30348$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30349        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30350      fi
30351
30352      # Use eval to expand a potential ~
30353      eval path="$path"
30354      if test ! -f "$path" && test ! -d "$path"; then
30355        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30356      fi
30357
30358      if test -d "$path"; then
30359        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30360      else
30361        dir="`$DIRNAME "$path"`"
30362        base="`$BASENAME "$path"`"
30363        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30364      fi
30365    fi
30366  fi
30367
30368            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30369$as_echo_n "checking for Boot JDK... " >&6; }
30370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30371$as_echo "$BOOT_JDK" >&6; }
30372            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30373$as_echo_n "checking Boot JDK version... " >&6; }
30374            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30375            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30376$as_echo "$BOOT_JDK_VERSION" >&6; }
30377          fi # end check jdk version
30378        fi # end check javac
30379      fi # end check java
30380    fi # end check boot jdk found
30381  fi
30382
30383    done
30384  fi
30385
30386
30387    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30388    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30389      # Do we have a bin/java?
30390      if test ! -x "$BOOT_JDK/bin/java"; then
30391        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30393        BOOT_JDK_FOUND=no
30394      else
30395        # Do we have a bin/javac?
30396        if test ! -x "$BOOT_JDK/bin/javac"; then
30397          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30398$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30399          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30400$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30401          BOOT_JDK_FOUND=no
30402        else
30403          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30404          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30405
30406          # Extra M4 quote needed to protect [] in grep expression.
30407          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30408          if test "x$FOUND_CORRECT_VERSION" = x; then
30409            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30411            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30412$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30413            BOOT_JDK_FOUND=no
30414          else
30415            # We're done! :-)
30416            BOOT_JDK_FOUND=yes
30417
30418  # Only process if variable expands to non-empty
30419
30420  if test "x$BOOT_JDK" != x; then
30421    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30422
30423  # Input might be given as Windows format, start by converting to
30424  # unix format.
30425  path="$BOOT_JDK"
30426  new_path=`$CYGPATH -u "$path"`
30427
30428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30431  # "foo.exe" is OK but "foo" is an error.
30432  #
30433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30434  # It is also a way to make sure we got the proper file name for the real test later on.
30435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30436  if test "x$test_shortpath" = x; then
30437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30439    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30440  fi
30441
30442  # Call helper function which possibly converts this using DOS-style short mode.
30443  # If so, the updated path is stored in $new_path.
30444
30445  input_path="$new_path"
30446  # Check if we need to convert this using DOS-style short mode. If the path
30447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30448  # take no chances and rewrite it.
30449  # Note: m4 eats our [], so we need to use [ and ] instead.
30450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30451  if test "x$has_forbidden_chars" != x; then
30452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30456      # Going to short mode and back again did indeed matter. Since short mode is
30457      # case insensitive, let's make it lowercase to improve readability.
30458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30459      # Now convert it back to Unix-style (cygpath)
30460      input_path=`$CYGPATH -u "$shortmode_path"`
30461      new_path="$input_path"
30462    fi
30463  fi
30464
30465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30466  if test "x$test_cygdrive_prefix" = x; then
30467    # As a simple fix, exclude /usr/bin since it's not a real path.
30468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30470      # a path prefixed by /cygdrive for fixpath to work.
30471      new_path="$CYGWIN_ROOT_PATH$input_path"
30472    fi
30473  fi
30474
30475
30476  if test "x$path" != "x$new_path"; then
30477    BOOT_JDK="$new_path"
30478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30479$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30480  fi
30481
30482    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30483
30484  path="$BOOT_JDK"
30485  has_colon=`$ECHO $path | $GREP ^.:`
30486  new_path="$path"
30487  if test "x$has_colon" = x; then
30488    # Not in mixed or Windows style, start by that.
30489    new_path=`cmd //c echo $path`
30490  fi
30491
30492
30493  input_path="$new_path"
30494  # Check if we need to convert this using DOS-style short mode. If the path
30495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30496  # take no chances and rewrite it.
30497  # Note: m4 eats our [], so we need to use [ and ] instead.
30498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30499  if test "x$has_forbidden_chars" != x; then
30500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30502  fi
30503
30504
30505  windows_path="$new_path"
30506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30507    unix_path=`$CYGPATH -u "$windows_path"`
30508    new_path="$unix_path"
30509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30511    new_path="$unix_path"
30512  fi
30513
30514  if test "x$path" != "x$new_path"; then
30515    BOOT_JDK="$new_path"
30516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30518  fi
30519
30520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30522
30523    else
30524      # We're on a unix platform. Hooray! :)
30525      path="$BOOT_JDK"
30526      has_space=`$ECHO "$path" | $GREP " "`
30527      if test "x$has_space" != x; then
30528        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30529$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30530        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30531      fi
30532
30533      # Use eval to expand a potential ~
30534      eval path="$path"
30535      if test ! -f "$path" && test ! -d "$path"; then
30536        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30537      fi
30538
30539      if test -d "$path"; then
30540        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30541      else
30542        dir="`$DIRNAME "$path"`"
30543        base="`$BASENAME "$path"`"
30544        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30545      fi
30546    fi
30547  fi
30548
30549            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30550$as_echo_n "checking for Boot JDK... " >&6; }
30551            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30552$as_echo "$BOOT_JDK" >&6; }
30553            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30554$as_echo_n "checking Boot JDK version... " >&6; }
30555            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30557$as_echo "$BOOT_JDK_VERSION" >&6; }
30558          fi # end check jdk version
30559        fi # end check javac
30560      fi # end check java
30561    fi # end check boot jdk found
30562  fi
30563
30564  fi
30565
30566
30567    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30568    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30569      # Do we have a bin/java?
30570      if test ! -x "$BOOT_JDK/bin/java"; then
30571        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30573        BOOT_JDK_FOUND=no
30574      else
30575        # Do we have a bin/javac?
30576        if test ! -x "$BOOT_JDK/bin/javac"; then
30577          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30579          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30580$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30581          BOOT_JDK_FOUND=no
30582        else
30583          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30584          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30585
30586          # Extra M4 quote needed to protect [] in grep expression.
30587          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30588          if test "x$FOUND_CORRECT_VERSION" = x; then
30589            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30591            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30592$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30593            BOOT_JDK_FOUND=no
30594          else
30595            # We're done! :-)
30596            BOOT_JDK_FOUND=yes
30597
30598  # Only process if variable expands to non-empty
30599
30600  if test "x$BOOT_JDK" != x; then
30601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30602
30603  # Input might be given as Windows format, start by converting to
30604  # unix format.
30605  path="$BOOT_JDK"
30606  new_path=`$CYGPATH -u "$path"`
30607
30608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30611  # "foo.exe" is OK but "foo" is an error.
30612  #
30613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30614  # It is also a way to make sure we got the proper file name for the real test later on.
30615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30616  if test "x$test_shortpath" = x; then
30617    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30618$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30619    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30620  fi
30621
30622  # Call helper function which possibly converts this using DOS-style short mode.
30623  # If so, the updated path is stored in $new_path.
30624
30625  input_path="$new_path"
30626  # Check if we need to convert this using DOS-style short mode. If the path
30627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30628  # take no chances and rewrite it.
30629  # Note: m4 eats our [], so we need to use [ and ] instead.
30630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30631  if test "x$has_forbidden_chars" != x; then
30632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30636      # Going to short mode and back again did indeed matter. Since short mode is
30637      # case insensitive, let's make it lowercase to improve readability.
30638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30639      # Now convert it back to Unix-style (cygpath)
30640      input_path=`$CYGPATH -u "$shortmode_path"`
30641      new_path="$input_path"
30642    fi
30643  fi
30644
30645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30646  if test "x$test_cygdrive_prefix" = x; then
30647    # As a simple fix, exclude /usr/bin since it's not a real path.
30648    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30650      # a path prefixed by /cygdrive for fixpath to work.
30651      new_path="$CYGWIN_ROOT_PATH$input_path"
30652    fi
30653  fi
30654
30655
30656  if test "x$path" != "x$new_path"; then
30657    BOOT_JDK="$new_path"
30658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30659$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30660  fi
30661
30662    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30663
30664  path="$BOOT_JDK"
30665  has_colon=`$ECHO $path | $GREP ^.:`
30666  new_path="$path"
30667  if test "x$has_colon" = x; then
30668    # Not in mixed or Windows style, start by that.
30669    new_path=`cmd //c echo $path`
30670  fi
30671
30672
30673  input_path="$new_path"
30674  # Check if we need to convert this using DOS-style short mode. If the path
30675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30676  # take no chances and rewrite it.
30677  # Note: m4 eats our [], so we need to use [ and ] instead.
30678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30679  if test "x$has_forbidden_chars" != x; then
30680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30682  fi
30683
30684
30685  windows_path="$new_path"
30686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30687    unix_path=`$CYGPATH -u "$windows_path"`
30688    new_path="$unix_path"
30689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30691    new_path="$unix_path"
30692  fi
30693
30694  if test "x$path" != "x$new_path"; then
30695    BOOT_JDK="$new_path"
30696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30698  fi
30699
30700  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30701  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30702
30703    else
30704      # We're on a unix platform. Hooray! :)
30705      path="$BOOT_JDK"
30706      has_space=`$ECHO "$path" | $GREP " "`
30707      if test "x$has_space" != x; then
30708        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30709$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30710        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30711      fi
30712
30713      # Use eval to expand a potential ~
30714      eval path="$path"
30715      if test ! -f "$path" && test ! -d "$path"; then
30716        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30717      fi
30718
30719      if test -d "$path"; then
30720        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30721      else
30722        dir="`$DIRNAME "$path"`"
30723        base="`$BASENAME "$path"`"
30724        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30725      fi
30726    fi
30727  fi
30728
30729            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30730$as_echo_n "checking for Boot JDK... " >&6; }
30731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30732$as_echo "$BOOT_JDK" >&6; }
30733            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30734$as_echo_n "checking Boot JDK version... " >&6; }
30735            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30737$as_echo "$BOOT_JDK_VERSION" >&6; }
30738          fi # end check jdk version
30739        fi # end check javac
30740      fi # end check java
30741    fi # end check boot jdk found
30742  fi
30743
30744
30745  # If we haven't found anything yet, we've truly lost. Give up.
30746  if test "x$BOOT_JDK_FOUND" = xno; then
30747
30748  # Print a helpful message on how to acquire the necessary build dependency.
30749  # openjdk is the help tag: freetype, cups, alsa etc
30750  MISSING_DEPENDENCY=openjdk
30751
30752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30753    cygwin_help $MISSING_DEPENDENCY
30754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30755    msys_help $MISSING_DEPENDENCY
30756  else
30757    PKGHANDLER_COMMAND=
30758
30759    case $PKGHANDLER in
30760      apt-get)
30761        apt_help     $MISSING_DEPENDENCY ;;
30762      yum)
30763        yum_help     $MISSING_DEPENDENCY ;;
30764      brew)
30765        brew_help    $MISSING_DEPENDENCY ;;
30766      port)
30767        port_help    $MISSING_DEPENDENCY ;;
30768      pkgutil)
30769        pkgutil_help $MISSING_DEPENDENCY ;;
30770      pkgadd)
30771        pkgadd_help  $MISSING_DEPENDENCY ;;
30772    esac
30773
30774    if test "x$PKGHANDLER_COMMAND" != x; then
30775      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30776    fi
30777  fi
30778
30779    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30780$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30781    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30782$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30783    as_fn_error $? "Cannot continue" "$LINENO" 5
30784  fi
30785
30786
30787
30788  # Setup tools from the Boot JDK.
30789
30790  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30791
30792  # Publish this variable in the help.
30793
30794
30795  if [ -z "${JAVA+x}" ]; then
30796    # The variable is not set by user, try to locate tool using the code snippet
30797
30798      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30799$as_echo_n "checking for java in Boot JDK... " >&6; }
30800      JAVA=$BOOT_JDK/bin/java
30801      if test ! -x $JAVA; then
30802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30803$as_echo "not found" >&6; }
30804        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30805$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30806        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30807      fi
30808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30809$as_echo "ok" >&6; }
30810
30811
30812  else
30813    # The variable is set, but is it from the command line or the environment?
30814
30815    # Try to remove the string !JAVA! from our list.
30816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30818      # If it failed, the variable was not from the command line. Ignore it,
30819      # but warn the user (except for BASH, which is always set by the calling BASH).
30820      if test "xJAVA" != xBASH; then
30821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30822$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30823      fi
30824      # Try to locate tool using the code snippet
30825
30826      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30827$as_echo_n "checking for java in Boot JDK... " >&6; }
30828      JAVA=$BOOT_JDK/bin/java
30829      if test ! -x $JAVA; then
30830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30831$as_echo "not found" >&6; }
30832        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30833$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30834        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30835      fi
30836      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30837$as_echo "ok" >&6; }
30838
30839
30840    else
30841      # If it succeeded, then it was overridden by the user. We will use it
30842      # for the tool.
30843
30844      # First remove it from the list of overridden variables, so we can test
30845      # for unknown variables in the end.
30846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30847
30848      # Check if we try to supply an empty value
30849      if test "x$JAVA" = x; then
30850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30851$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30853$as_echo_n "checking for JAVA... " >&6; }
30854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30855$as_echo "disabled" >&6; }
30856      else
30857        # Check if the provided tool contains a complete path.
30858        tool_specified="$JAVA"
30859        tool_basename="${tool_specified##*/}"
30860        if test "x$tool_basename" = "x$tool_specified"; then
30861          # A command without a complete path is provided, search $PATH.
30862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30863$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30864          # Extract the first word of "$tool_basename", so it can be a program name with args.
30865set dummy $tool_basename; ac_word=$2
30866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30867$as_echo_n "checking for $ac_word... " >&6; }
30868if ${ac_cv_path_JAVA+:} false; then :
30869  $as_echo_n "(cached) " >&6
30870else
30871  case $JAVA in
30872  [\\/]* | ?:[\\/]*)
30873  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30874  ;;
30875  *)
30876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30877for as_dir in $PATH
30878do
30879  IFS=$as_save_IFS
30880  test -z "$as_dir" && as_dir=.
30881    for ac_exec_ext in '' $ac_executable_extensions; do
30882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30883    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30885    break 2
30886  fi
30887done
30888  done
30889IFS=$as_save_IFS
30890
30891  ;;
30892esac
30893fi
30894JAVA=$ac_cv_path_JAVA
30895if test -n "$JAVA"; then
30896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30897$as_echo "$JAVA" >&6; }
30898else
30899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30900$as_echo "no" >&6; }
30901fi
30902
30903
30904          if test "x$JAVA" = x; then
30905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30906          fi
30907        else
30908          # Otherwise we believe it is a complete path. Use it as it is.
30909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30910$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30912$as_echo_n "checking for JAVA... " >&6; }
30913          if test ! -x "$tool_specified"; then
30914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30915$as_echo "not found" >&6; }
30916            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30917          fi
30918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30919$as_echo "$tool_specified" >&6; }
30920        fi
30921      fi
30922    fi
30923
30924  fi
30925
30926
30927
30928  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30929
30930  # Publish this variable in the help.
30931
30932
30933  if [ -z "${JAVAC+x}" ]; then
30934    # The variable is not set by user, try to locate tool using the code snippet
30935
30936      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30937$as_echo_n "checking for javac in Boot JDK... " >&6; }
30938      JAVAC=$BOOT_JDK/bin/javac
30939      if test ! -x $JAVAC; then
30940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30941$as_echo "not found" >&6; }
30942        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30943$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30944        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30945      fi
30946      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30947$as_echo "ok" >&6; }
30948
30949
30950  else
30951    # The variable is set, but is it from the command line or the environment?
30952
30953    # Try to remove the string !JAVAC! from our list.
30954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30956      # If it failed, the variable was not from the command line. Ignore it,
30957      # but warn the user (except for BASH, which is always set by the calling BASH).
30958      if test "xJAVAC" != xBASH; then
30959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30960$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30961      fi
30962      # Try to locate tool using the code snippet
30963
30964      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30965$as_echo_n "checking for javac in Boot JDK... " >&6; }
30966      JAVAC=$BOOT_JDK/bin/javac
30967      if test ! -x $JAVAC; then
30968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30969$as_echo "not found" >&6; }
30970        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30971$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30972        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30973      fi
30974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30975$as_echo "ok" >&6; }
30976
30977
30978    else
30979      # If it succeeded, then it was overridden by the user. We will use it
30980      # for the tool.
30981
30982      # First remove it from the list of overridden variables, so we can test
30983      # for unknown variables in the end.
30984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30985
30986      # Check if we try to supply an empty value
30987      if test "x$JAVAC" = x; then
30988        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30989$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30991$as_echo_n "checking for JAVAC... " >&6; }
30992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30993$as_echo "disabled" >&6; }
30994      else
30995        # Check if the provided tool contains a complete path.
30996        tool_specified="$JAVAC"
30997        tool_basename="${tool_specified##*/}"
30998        if test "x$tool_basename" = "x$tool_specified"; then
30999          # A command without a complete path is provided, search $PATH.
31000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
31001$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
31002          # Extract the first word of "$tool_basename", so it can be a program name with args.
31003set dummy $tool_basename; ac_word=$2
31004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31005$as_echo_n "checking for $ac_word... " >&6; }
31006if ${ac_cv_path_JAVAC+:} false; then :
31007  $as_echo_n "(cached) " >&6
31008else
31009  case $JAVAC in
31010  [\\/]* | ?:[\\/]*)
31011  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
31012  ;;
31013  *)
31014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31015for as_dir in $PATH
31016do
31017  IFS=$as_save_IFS
31018  test -z "$as_dir" && as_dir=.
31019    for ac_exec_ext in '' $ac_executable_extensions; do
31020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31021    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
31022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31023    break 2
31024  fi
31025done
31026  done
31027IFS=$as_save_IFS
31028
31029  ;;
31030esac
31031fi
31032JAVAC=$ac_cv_path_JAVAC
31033if test -n "$JAVAC"; then
31034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
31035$as_echo "$JAVAC" >&6; }
31036else
31037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31038$as_echo "no" >&6; }
31039fi
31040
31041
31042          if test "x$JAVAC" = x; then
31043            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31044          fi
31045        else
31046          # Otherwise we believe it is a complete path. Use it as it is.
31047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
31048$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
31049          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
31050$as_echo_n "checking for JAVAC... " >&6; }
31051          if test ! -x "$tool_specified"; then
31052            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31053$as_echo "not found" >&6; }
31054            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
31055          fi
31056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31057$as_echo "$tool_specified" >&6; }
31058        fi
31059      fi
31060    fi
31061
31062  fi
31063
31064
31065
31066  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31067
31068  # Publish this variable in the help.
31069
31070
31071  if [ -z "${JAVAH+x}" ]; then
31072    # The variable is not set by user, try to locate tool using the code snippet
31073
31074      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31075$as_echo_n "checking for javah in Boot JDK... " >&6; }
31076      JAVAH=$BOOT_JDK/bin/javah
31077      if test ! -x $JAVAH; then
31078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31079$as_echo "not found" >&6; }
31080        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31081$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31082        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31083      fi
31084      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31085$as_echo "ok" >&6; }
31086
31087
31088  else
31089    # The variable is set, but is it from the command line or the environment?
31090
31091    # Try to remove the string !JAVAH! from our list.
31092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
31093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31094      # If it failed, the variable was not from the command line. Ignore it,
31095      # but warn the user (except for BASH, which is always set by the calling BASH).
31096      if test "xJAVAH" != xBASH; then
31097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
31098$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
31099      fi
31100      # Try to locate tool using the code snippet
31101
31102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31103$as_echo_n "checking for javah in Boot JDK... " >&6; }
31104      JAVAH=$BOOT_JDK/bin/javah
31105      if test ! -x $JAVAH; then
31106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31107$as_echo "not found" >&6; }
31108        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31109$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31110        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31111      fi
31112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31113$as_echo "ok" >&6; }
31114
31115
31116    else
31117      # If it succeeded, then it was overridden by the user. We will use it
31118      # for the tool.
31119
31120      # First remove it from the list of overridden variables, so we can test
31121      # for unknown variables in the end.
31122      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31123
31124      # Check if we try to supply an empty value
31125      if test "x$JAVAH" = x; then
31126        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31127$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31128        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31129$as_echo_n "checking for JAVAH... " >&6; }
31130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31131$as_echo "disabled" >&6; }
31132      else
31133        # Check if the provided tool contains a complete path.
31134        tool_specified="$JAVAH"
31135        tool_basename="${tool_specified##*/}"
31136        if test "x$tool_basename" = "x$tool_specified"; then
31137          # A command without a complete path is provided, search $PATH.
31138          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31139$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31140          # Extract the first word of "$tool_basename", so it can be a program name with args.
31141set dummy $tool_basename; ac_word=$2
31142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31143$as_echo_n "checking for $ac_word... " >&6; }
31144if ${ac_cv_path_JAVAH+:} false; then :
31145  $as_echo_n "(cached) " >&6
31146else
31147  case $JAVAH in
31148  [\\/]* | ?:[\\/]*)
31149  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31150  ;;
31151  *)
31152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31153for as_dir in $PATH
31154do
31155  IFS=$as_save_IFS
31156  test -z "$as_dir" && as_dir=.
31157    for ac_exec_ext in '' $ac_executable_extensions; do
31158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31159    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31161    break 2
31162  fi
31163done
31164  done
31165IFS=$as_save_IFS
31166
31167  ;;
31168esac
31169fi
31170JAVAH=$ac_cv_path_JAVAH
31171if test -n "$JAVAH"; then
31172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31173$as_echo "$JAVAH" >&6; }
31174else
31175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31176$as_echo "no" >&6; }
31177fi
31178
31179
31180          if test "x$JAVAH" = x; then
31181            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31182          fi
31183        else
31184          # Otherwise we believe it is a complete path. Use it as it is.
31185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31186$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31187          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31188$as_echo_n "checking for JAVAH... " >&6; }
31189          if test ! -x "$tool_specified"; then
31190            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31191$as_echo "not found" >&6; }
31192            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31193          fi
31194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31195$as_echo "$tool_specified" >&6; }
31196        fi
31197      fi
31198    fi
31199
31200  fi
31201
31202
31203
31204  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31205
31206  # Publish this variable in the help.
31207
31208
31209  if [ -z "${JAR+x}" ]; then
31210    # The variable is not set by user, try to locate tool using the code snippet
31211
31212      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31213$as_echo_n "checking for jar in Boot JDK... " >&6; }
31214      JAR=$BOOT_JDK/bin/jar
31215      if test ! -x $JAR; then
31216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31217$as_echo "not found" >&6; }
31218        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31219$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31220        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31221      fi
31222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31223$as_echo "ok" >&6; }
31224
31225
31226  else
31227    # The variable is set, but is it from the command line or the environment?
31228
31229    # Try to remove the string !JAR! from our list.
31230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31232      # If it failed, the variable was not from the command line. Ignore it,
31233      # but warn the user (except for BASH, which is always set by the calling BASH).
31234      if test "xJAR" != xBASH; then
31235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31236$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31237      fi
31238      # Try to locate tool using the code snippet
31239
31240      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31241$as_echo_n "checking for jar in Boot JDK... " >&6; }
31242      JAR=$BOOT_JDK/bin/jar
31243      if test ! -x $JAR; then
31244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31245$as_echo "not found" >&6; }
31246        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31247$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31248        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31249      fi
31250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31251$as_echo "ok" >&6; }
31252
31253
31254    else
31255      # If it succeeded, then it was overridden by the user. We will use it
31256      # for the tool.
31257
31258      # First remove it from the list of overridden variables, so we can test
31259      # for unknown variables in the end.
31260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31261
31262      # Check if we try to supply an empty value
31263      if test "x$JAR" = x; then
31264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31265$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31267$as_echo_n "checking for JAR... " >&6; }
31268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31269$as_echo "disabled" >&6; }
31270      else
31271        # Check if the provided tool contains a complete path.
31272        tool_specified="$JAR"
31273        tool_basename="${tool_specified##*/}"
31274        if test "x$tool_basename" = "x$tool_specified"; then
31275          # A command without a complete path is provided, search $PATH.
31276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31277$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31278          # Extract the first word of "$tool_basename", so it can be a program name with args.
31279set dummy $tool_basename; ac_word=$2
31280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31281$as_echo_n "checking for $ac_word... " >&6; }
31282if ${ac_cv_path_JAR+:} false; then :
31283  $as_echo_n "(cached) " >&6
31284else
31285  case $JAR in
31286  [\\/]* | ?:[\\/]*)
31287  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31288  ;;
31289  *)
31290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31291for as_dir in $PATH
31292do
31293  IFS=$as_save_IFS
31294  test -z "$as_dir" && as_dir=.
31295    for ac_exec_ext in '' $ac_executable_extensions; do
31296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31297    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31299    break 2
31300  fi
31301done
31302  done
31303IFS=$as_save_IFS
31304
31305  ;;
31306esac
31307fi
31308JAR=$ac_cv_path_JAR
31309if test -n "$JAR"; then
31310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31311$as_echo "$JAR" >&6; }
31312else
31313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31314$as_echo "no" >&6; }
31315fi
31316
31317
31318          if test "x$JAR" = x; then
31319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31320          fi
31321        else
31322          # Otherwise we believe it is a complete path. Use it as it is.
31323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31324$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31326$as_echo_n "checking for JAR... " >&6; }
31327          if test ! -x "$tool_specified"; then
31328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31329$as_echo "not found" >&6; }
31330            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31331          fi
31332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31333$as_echo "$tool_specified" >&6; }
31334        fi
31335      fi
31336    fi
31337
31338  fi
31339
31340
31341
31342  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31343
31344  # Publish this variable in the help.
31345
31346
31347  if [ -z "${JARSIGNER+x}" ]; then
31348    # The variable is not set by user, try to locate tool using the code snippet
31349
31350      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31351$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31352      JARSIGNER=$BOOT_JDK/bin/jarsigner
31353      if test ! -x $JARSIGNER; then
31354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31355$as_echo "not found" >&6; }
31356        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31357$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31358        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31359      fi
31360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31361$as_echo "ok" >&6; }
31362
31363
31364  else
31365    # The variable is set, but is it from the command line or the environment?
31366
31367    # Try to remove the string !JARSIGNER! from our list.
31368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31370      # If it failed, the variable was not from the command line. Ignore it,
31371      # but warn the user (except for BASH, which is always set by the calling BASH).
31372      if test "xJARSIGNER" != xBASH; then
31373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31374$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31375      fi
31376      # Try to locate tool using the code snippet
31377
31378      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31379$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31380      JARSIGNER=$BOOT_JDK/bin/jarsigner
31381      if test ! -x $JARSIGNER; then
31382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31383$as_echo "not found" >&6; }
31384        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31385$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31386        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31387      fi
31388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31389$as_echo "ok" >&6; }
31390
31391
31392    else
31393      # If it succeeded, then it was overridden by the user. We will use it
31394      # for the tool.
31395
31396      # First remove it from the list of overridden variables, so we can test
31397      # for unknown variables in the end.
31398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31399
31400      # Check if we try to supply an empty value
31401      if test "x$JARSIGNER" = x; then
31402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31403$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31405$as_echo_n "checking for JARSIGNER... " >&6; }
31406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31407$as_echo "disabled" >&6; }
31408      else
31409        # Check if the provided tool contains a complete path.
31410        tool_specified="$JARSIGNER"
31411        tool_basename="${tool_specified##*/}"
31412        if test "x$tool_basename" = "x$tool_specified"; then
31413          # A command without a complete path is provided, search $PATH.
31414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31415$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31416          # Extract the first word of "$tool_basename", so it can be a program name with args.
31417set dummy $tool_basename; ac_word=$2
31418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31419$as_echo_n "checking for $ac_word... " >&6; }
31420if ${ac_cv_path_JARSIGNER+:} false; then :
31421  $as_echo_n "(cached) " >&6
31422else
31423  case $JARSIGNER in
31424  [\\/]* | ?:[\\/]*)
31425  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31426  ;;
31427  *)
31428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31429for as_dir in $PATH
31430do
31431  IFS=$as_save_IFS
31432  test -z "$as_dir" && as_dir=.
31433    for ac_exec_ext in '' $ac_executable_extensions; do
31434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31435    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31437    break 2
31438  fi
31439done
31440  done
31441IFS=$as_save_IFS
31442
31443  ;;
31444esac
31445fi
31446JARSIGNER=$ac_cv_path_JARSIGNER
31447if test -n "$JARSIGNER"; then
31448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31449$as_echo "$JARSIGNER" >&6; }
31450else
31451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31452$as_echo "no" >&6; }
31453fi
31454
31455
31456          if test "x$JARSIGNER" = x; then
31457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31458          fi
31459        else
31460          # Otherwise we believe it is a complete path. Use it as it is.
31461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31462$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31464$as_echo_n "checking for JARSIGNER... " >&6; }
31465          if test ! -x "$tool_specified"; then
31466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31467$as_echo "not found" >&6; }
31468            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31469          fi
31470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31471$as_echo "$tool_specified" >&6; }
31472        fi
31473      fi
31474    fi
31475
31476  fi
31477
31478
31479
31480  # Finally, set some other options...
31481
31482  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31483  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31484
31485
31486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31487$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31488  if "$JAVA" --list-modules > /dev/null 2>&1; then
31489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31490$as_echo "yes" >&6; }
31491    BOOT_JDK_MODULAR="true"
31492  else
31493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31494$as_echo "no" >&6; }
31495    BOOT_JDK_MODULAR="false"
31496  fi
31497
31498
31499
31500
31501  # Check if the boot jdk is 32 or 64 bit
31502  if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31503    BOOT_JDK_BITS="64"
31504  else
31505    BOOT_JDK_BITS="32"
31506  fi
31507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31508$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31510$as_echo "$BOOT_JDK_BITS" >&6; }
31511
31512
31513
31514# Check whether --with-build-jdk was given.
31515if test "${with_build_jdk+set}" = set; then :
31516  withval=$with_build_jdk;
31517fi
31518
31519
31520  CREATE_BUILDJDK=false
31521  EXTERNAL_BUILDJDK=false
31522  BUILD_JDK_FOUND="no"
31523  if test "x$with_build_jdk" != "x"; then
31524
31525  if test "x$BUILD_JDK_FOUND" = xno; then
31526    # Execute the test
31527
31528       if test "x$with_build_jdk" != x; then
31529         BUILD_JDK=$with_build_jdk
31530         BUILD_JDK_FOUND=maybe
31531         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31532$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31533       fi
31534
31535    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31536    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31537      # Do we have a bin/java?
31538      if test ! -x "$BUILD_JDK/bin/java"; then
31539        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31540$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31541        BUILD_JDK_FOUND=no
31542      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31543        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31544$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31545        BUILD_JDK_FOUND=no
31546      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31548$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31549        BUILD_JDK_FOUND=no
31550      elif test ! -x "$BUILD_JDK/bin/javac"; then
31551        # Do we have a bin/javac?
31552        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31553$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31554        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31555$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31556        BUILD_JDK_FOUND=no
31557      else
31558        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31559        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31560
31561        # Extra M4 quote needed to protect [] in grep expression.
31562        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31563        if test "x$FOUND_CORRECT_VERSION" = x; then
31564          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31565$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31566          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31567$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31568          BUILD_JDK_FOUND=no
31569        else
31570          # We're done!
31571          BUILD_JDK_FOUND=yes
31572
31573  # Only process if variable expands to non-empty
31574
31575  if test "x$BUILD_JDK" != x; then
31576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31577
31578  # Input might be given as Windows format, start by converting to
31579  # unix format.
31580  path="$BUILD_JDK"
31581  new_path=`$CYGPATH -u "$path"`
31582
31583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31586  # "foo.exe" is OK but "foo" is an error.
31587  #
31588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31589  # It is also a way to make sure we got the proper file name for the real test later on.
31590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31591  if test "x$test_shortpath" = x; then
31592    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31593$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31594    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31595  fi
31596
31597  # Call helper function which possibly converts this using DOS-style short mode.
31598  # If so, the updated path is stored in $new_path.
31599
31600  input_path="$new_path"
31601  # Check if we need to convert this using DOS-style short mode. If the path
31602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31603  # take no chances and rewrite it.
31604  # Note: m4 eats our [], so we need to use [ and ] instead.
31605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31606  if test "x$has_forbidden_chars" != x; then
31607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31611      # Going to short mode and back again did indeed matter. Since short mode is
31612      # case insensitive, let's make it lowercase to improve readability.
31613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31614      # Now convert it back to Unix-style (cygpath)
31615      input_path=`$CYGPATH -u "$shortmode_path"`
31616      new_path="$input_path"
31617    fi
31618  fi
31619
31620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31621  if test "x$test_cygdrive_prefix" = x; then
31622    # As a simple fix, exclude /usr/bin since it's not a real path.
31623    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31625      # a path prefixed by /cygdrive for fixpath to work.
31626      new_path="$CYGWIN_ROOT_PATH$input_path"
31627    fi
31628  fi
31629
31630
31631  if test "x$path" != "x$new_path"; then
31632    BUILD_JDK="$new_path"
31633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31634$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31635  fi
31636
31637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31638
31639  path="$BUILD_JDK"
31640  has_colon=`$ECHO $path | $GREP ^.:`
31641  new_path="$path"
31642  if test "x$has_colon" = x; then
31643    # Not in mixed or Windows style, start by that.
31644    new_path=`cmd //c echo $path`
31645  fi
31646
31647
31648  input_path="$new_path"
31649  # Check if we need to convert this using DOS-style short mode. If the path
31650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31651  # take no chances and rewrite it.
31652  # Note: m4 eats our [], so we need to use [ and ] instead.
31653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31654  if test "x$has_forbidden_chars" != x; then
31655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31657  fi
31658
31659
31660  windows_path="$new_path"
31661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31662    unix_path=`$CYGPATH -u "$windows_path"`
31663    new_path="$unix_path"
31664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31666    new_path="$unix_path"
31667  fi
31668
31669  if test "x$path" != "x$new_path"; then
31670    BUILD_JDK="$new_path"
31671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31672$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31673  fi
31674
31675  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31676  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31677
31678    else
31679      # We're on a unix platform. Hooray! :)
31680      path="$BUILD_JDK"
31681      has_space=`$ECHO "$path" | $GREP " "`
31682      if test "x$has_space" != x; then
31683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31684$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31685        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31686      fi
31687
31688      # Use eval to expand a potential ~
31689      eval path="$path"
31690      if test ! -f "$path" && test ! -d "$path"; then
31691        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31692      fi
31693
31694      if test -d "$path"; then
31695        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31696      else
31697        dir="`$DIRNAME "$path"`"
31698        base="`$BASENAME "$path"`"
31699        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31700      fi
31701    fi
31702  fi
31703
31704          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31705$as_echo_n "checking for Build JDK... " >&6; }
31706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31707$as_echo "$BUILD_JDK" >&6; }
31708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31709$as_echo_n "checking Build JDK version... " >&6; }
31710          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31712$as_echo "$BUILD_JDK_VERSION" >&6; }
31713        fi # end check jdk version
31714      fi # end check java
31715    fi # end check build jdk found
31716  fi
31717
31718    EXTERNAL_BUILDJDK=true
31719  else
31720    if test "x$COMPILE_TYPE" = "xcross"; then
31721      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31722      BUILD_JDK_FOUND=yes
31723      CREATE_BUILDJDK=true
31724      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31725$as_echo_n "checking for Build JDK... " >&6; }
31726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31727$as_echo "yes, will build it for the host platform" >&6; }
31728    else
31729      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31730      BUILD_JDK_FOUND=yes
31731      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31732$as_echo_n "checking for Build JDK... " >&6; }
31733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31734$as_echo "yes, will use output dir" >&6; }
31735    fi
31736  fi
31737
31738  JMOD="$BUILD_JDK/bin/jmod"
31739  JLINK="$BUILD_JDK/bin/jlink"
31740
31741
31742
31743  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31745$as_echo_n "checking for Build JDK... " >&6; }
31746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31747$as_echo "no" >&6; }
31748    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31749  fi
31750
31751
31752
31753
31754
31755
31756###############################################################################
31757#
31758# Configure the sources to use. We can add or override individual directories.
31759#
31760###############################################################################
31761
31762
31763  # Where are the sources.
31764  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31765  CORBA_TOPDIR="$SRC_ROOT/corba"
31766  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31767  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31768  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31769  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31770  JDK_TOPDIR="$SRC_ROOT/jdk"
31771
31772
31773
31774
31775
31776
31777
31778
31779
31780  # This feature is no longer supported.
31781
31782
31783
31784# Check whether --with-add-source-root was given.
31785if test "${with_add_source_root+set}" = set; then :
31786  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
31787$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31788fi
31789
31790
31791
31792
31793# Check whether --with-override-source-root was given.
31794if test "${with_override_source_root+set}" = set; then :
31795  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
31796$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31797fi
31798
31799
31800
31801
31802# Check whether --with-adds-and-overrides was given.
31803if test "${with_adds_and_overrides+set}" = set; then :
31804  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
31805$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31806fi
31807
31808
31809
31810
31811# Check whether --with-override-langtools was given.
31812if test "${with_override_langtools+set}" = set; then :
31813  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31814$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31815fi
31816
31817
31818
31819
31820# Check whether --with-override-corba was given.
31821if test "${with_override_corba+set}" = set; then :
31822  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31823$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31824fi
31825
31826
31827
31828
31829# Check whether --with-override-jaxp was given.
31830if test "${with_override_jaxp+set}" = set; then :
31831  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31832$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31833fi
31834
31835
31836
31837
31838# Check whether --with-override-jaxws was given.
31839if test "${with_override_jaxws+set}" = set; then :
31840  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31841$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31842fi
31843
31844
31845
31846
31847# Check whether --with-override-hotspot was given.
31848if test "${with_override_hotspot+set}" = set; then :
31849  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31850$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31851fi
31852
31853
31854
31855
31856# Check whether --with-override-nashorn was given.
31857if test "${with_override_nashorn+set}" = set; then :
31858  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31859$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31860fi
31861
31862
31863
31864
31865# Check whether --with-override-jdk was given.
31866if test "${with_override_jdk+set}" = set; then :
31867  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31868$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31869fi
31870
31871
31872
31873
31874  BUILD_OUTPUT="$OUTPUT_ROOT"
31875
31876  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31877
31878
31879
31880# Check whether --with-import_hotspot was given.
31881if test "${with_import_hotspot+set}" = set; then :
31882  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31883$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31884fi
31885
31886
31887
31888
31889
31890
31891# Check whether --with-import-modules was given.
31892if test "${with_import_modules+set}" = set; then :
31893  withval=$with_import_modules;
31894fi
31895
31896
31897  if test "x$with_import_modules" != x \
31898      && test "x$with_import_modules" != "xno"; then
31899    if test -d "$with_import_modules"; then
31900      IMPORT_MODULES_TOPDIR="$with_import_modules"
31901
31902  # Only process if variable expands to non-empty
31903
31904  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31906
31907  # Input might be given as Windows format, start by converting to
31908  # unix format.
31909  path="$IMPORT_MODULES_TOPDIR"
31910  new_path=`$CYGPATH -u "$path"`
31911
31912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31915  # "foo.exe" is OK but "foo" is an error.
31916  #
31917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31918  # It is also a way to make sure we got the proper file name for the real test later on.
31919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31920  if test "x$test_shortpath" = x; then
31921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31922$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31923    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31924  fi
31925
31926  # Call helper function which possibly converts this using DOS-style short mode.
31927  # If so, the updated path is stored in $new_path.
31928
31929  input_path="$new_path"
31930  # Check if we need to convert this using DOS-style short mode. If the path
31931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31932  # take no chances and rewrite it.
31933  # Note: m4 eats our [], so we need to use [ and ] instead.
31934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31935  if test "x$has_forbidden_chars" != x; then
31936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31940      # Going to short mode and back again did indeed matter. Since short mode is
31941      # case insensitive, let's make it lowercase to improve readability.
31942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31943      # Now convert it back to Unix-style (cygpath)
31944      input_path=`$CYGPATH -u "$shortmode_path"`
31945      new_path="$input_path"
31946    fi
31947  fi
31948
31949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31950  if test "x$test_cygdrive_prefix" = x; then
31951    # As a simple fix, exclude /usr/bin since it's not a real path.
31952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31954      # a path prefixed by /cygdrive for fixpath to work.
31955      new_path="$CYGWIN_ROOT_PATH$input_path"
31956    fi
31957  fi
31958
31959
31960  if test "x$path" != "x$new_path"; then
31961    IMPORT_MODULES_TOPDIR="$new_path"
31962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31963$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31964  fi
31965
31966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31967
31968  path="$IMPORT_MODULES_TOPDIR"
31969  has_colon=`$ECHO $path | $GREP ^.:`
31970  new_path="$path"
31971  if test "x$has_colon" = x; then
31972    # Not in mixed or Windows style, start by that.
31973    new_path=`cmd //c echo $path`
31974  fi
31975
31976
31977  input_path="$new_path"
31978  # Check if we need to convert this using DOS-style short mode. If the path
31979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31980  # take no chances and rewrite it.
31981  # Note: m4 eats our [], so we need to use [ and ] instead.
31982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31983  if test "x$has_forbidden_chars" != x; then
31984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31986  fi
31987
31988
31989  windows_path="$new_path"
31990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31991    unix_path=`$CYGPATH -u "$windows_path"`
31992    new_path="$unix_path"
31993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31995    new_path="$unix_path"
31996  fi
31997
31998  if test "x$path" != "x$new_path"; then
31999    IMPORT_MODULES_TOPDIR="$new_path"
32000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
32001$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
32002  fi
32003
32004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32006
32007    else
32008      # We're on a unix platform. Hooray! :)
32009      path="$IMPORT_MODULES_TOPDIR"
32010      has_space=`$ECHO "$path" | $GREP " "`
32011      if test "x$has_space" != x; then
32012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
32013$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
32014        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32015      fi
32016
32017      # Use eval to expand a potential ~
32018      eval path="$path"
32019      if test ! -f "$path" && test ! -d "$path"; then
32020        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
32021      fi
32022
32023      if test -d "$path"; then
32024        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
32025      else
32026        dir="`$DIRNAME "$path"`"
32027        base="`$BASENAME "$path"`"
32028        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
32029      fi
32030    fi
32031  fi
32032
32033    elif test -e "$with_import_modules"; then
32034      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
32035      $RM -rf "$IMPORT_MODULES_TOPDIR"
32036      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
32037      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
32038        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
32039      fi
32040    else
32041      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
32042    fi
32043  fi
32044
32045  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
32046    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
32047  fi
32048  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
32049    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
32050  fi
32051  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
32052    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
32053  fi
32054  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
32055    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
32056  fi
32057  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
32058    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
32059  fi
32060  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
32061    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
32062  fi
32063  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
32064    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
32065  fi
32066  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
32067    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
32068  fi
32069
32070
32071
32072
32073
32074
32075
32076
32077
32078
32079
32080###############################################################################
32081#
32082# Setup the toolchain (compilers etc), i.e. tools used to compile and process
32083# native code.
32084#
32085###############################################################################
32086
32087# See if we are doing a complete static build or not
32088
32089  # Check whether --enable-static-build was given.
32090if test "${enable_static_build+set}" = set; then :
32091  enableval=$enable_static_build;
32092fi
32093
32094  STATIC_BUILD=false
32095  if test "x$enable_static_build" = "xyes"; then
32096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32097$as_echo_n "checking if static build is enabled... " >&6; }
32098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32099$as_echo "yes" >&6; }
32100    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
32101      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
32102    fi
32103    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
32104    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32105    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32106    STATIC_BUILD=true
32107  elif test "x$enable_static_build" = "xno"; then
32108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32109$as_echo_n "checking if static build is enabled... " >&6; }
32110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32111$as_echo "no" >&6; }
32112  elif test "x$enable_static_build" != "x"; then
32113    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
32114  fi
32115
32116
32117
32118
32119# First determine the toolchain type (compiler family)
32120
32121
32122# Check whether --with-toolchain-type was given.
32123if test "${with_toolchain_type+set}" = set; then :
32124  withval=$with_toolchain_type;
32125fi
32126
32127
32128  # Use indirect variable referencing
32129  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32130  VALID_TOOLCHAINS=${!toolchain_var_name}
32131
32132  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32133    if test -n "$XCODEBUILD"; then
32134      # On Mac OS X, default toolchain to clang after Xcode 5
32135      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32136      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32137      if test $? -ne 0; then
32138        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32139      fi
32140      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32141          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32142          $CUT -f 1 -d .`
32143      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32144$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32145      if test $XCODE_MAJOR_VERSION -ge 5; then
32146          DEFAULT_TOOLCHAIN="clang"
32147      else
32148          DEFAULT_TOOLCHAIN="gcc"
32149      fi
32150    else
32151      # If Xcode is not installed, but the command line tools are
32152      # then we can't run xcodebuild. On these systems we should
32153      # default to clang
32154      DEFAULT_TOOLCHAIN="clang"
32155    fi
32156  else
32157    # First toolchain type in the list is the default
32158    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32159  fi
32160
32161  if test "x$with_toolchain_type" = xlist; then
32162    # List all toolchains
32163    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32164$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32165    for toolchain in $VALID_TOOLCHAINS; do
32166      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32167      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32168      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32169    done
32170
32171    exit 0
32172  elif test "x$with_toolchain_type" != x; then
32173    # User override; check that it is valid
32174    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32175      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32176$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32177      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32178$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32179      as_fn_error $? "Cannot continue." "$LINENO" 5
32180    fi
32181    TOOLCHAIN_TYPE=$with_toolchain_type
32182  else
32183    # No flag given, use default
32184    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32185  fi
32186
32187
32188  TOOLCHAIN_CC_BINARY_clang="clang"
32189  TOOLCHAIN_CC_BINARY_gcc="gcc"
32190  TOOLCHAIN_CC_BINARY_microsoft="cl"
32191  TOOLCHAIN_CC_BINARY_solstudio="cc"
32192  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32193
32194  TOOLCHAIN_CXX_BINARY_clang="clang++"
32195  TOOLCHAIN_CXX_BINARY_gcc="g++"
32196  TOOLCHAIN_CXX_BINARY_microsoft="cl"
32197  TOOLCHAIN_CXX_BINARY_solstudio="CC"
32198  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32199
32200  # Use indirect variable referencing
32201  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32202  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32203  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32204  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32205  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32206  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32207  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32208  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32209
32210
32211  # Define filename patterns
32212  if test "x$OPENJDK_TARGET_OS" = xwindows; then
32213    LIBRARY_PREFIX=
32214    SHARED_LIBRARY_SUFFIX='.dll'
32215    STATIC_LIBRARY_SUFFIX='.lib'
32216    SHARED_LIBRARY='$1.dll'
32217    STATIC_LIBRARY='$1.lib'
32218    OBJ_SUFFIX='.obj'
32219    EXE_SUFFIX='.exe'
32220  else
32221    LIBRARY_PREFIX=lib
32222    SHARED_LIBRARY_SUFFIX='.so'
32223    STATIC_LIBRARY_SUFFIX='.a'
32224    SHARED_LIBRARY='lib$1.so'
32225    STATIC_LIBRARY='lib$1.a'
32226    OBJ_SUFFIX='.o'
32227    EXE_SUFFIX=''
32228    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32229      # For full static builds, we're overloading the SHARED_LIBRARY
32230      # variables in order to limit the amount of changes required.
32231      # It would be better to remove SHARED and just use LIBRARY and
32232      # LIBRARY_SUFFIX for libraries that can be built either
32233      # shared or static and use STATIC_* for libraries that are
32234      # always built statically.
32235      if test "x$STATIC_BUILD" = xtrue; then
32236        SHARED_LIBRARY='lib$1.a'
32237        SHARED_LIBRARY_SUFFIX='.a'
32238      else
32239        SHARED_LIBRARY='lib$1.dylib'
32240        SHARED_LIBRARY_SUFFIX='.dylib'
32241      fi
32242    fi
32243  fi
32244
32245
32246
32247
32248
32249
32250
32251
32252
32253
32254  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32255    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32256$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32257  else
32258    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32259$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32260  fi
32261
32262
32263# User supplied flags should be used when configure detects compilers
32264
32265  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32266    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32267$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32268  fi
32269
32270  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32271    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32272$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32273  fi
32274
32275  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32276    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32277$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32278  fi
32279
32280
32281# Check whether --with-extra-cflags was given.
32282if test "${with_extra_cflags+set}" = set; then :
32283  withval=$with_extra_cflags;
32284fi
32285
32286
32287
32288# Check whether --with-extra-cxxflags was given.
32289if test "${with_extra_cxxflags+set}" = set; then :
32290  withval=$with_extra_cxxflags;
32291fi
32292
32293
32294
32295# Check whether --with-extra-ldflags was given.
32296if test "${with_extra_ldflags+set}" = set; then :
32297  withval=$with_extra_ldflags;
32298fi
32299
32300
32301  EXTRA_CFLAGS="$with_extra_cflags"
32302  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32303  EXTRA_LDFLAGS="$with_extra_ldflags"
32304
32305
32306
32307
32308
32309  # The global CFLAGS and LDLAGS variables are used by configure tests and
32310  # should include the extra parameters
32311  CFLAGS="$EXTRA_CFLAGS"
32312  CXXFLAGS="$EXTRA_CXXFLAGS"
32313  LDFLAGS="$EXTRA_LDFLAGS"
32314  CPPFLAGS=""
32315
32316# The sysroot cflags are needed for configure to be able to run the compilers
32317
32318  if test "x$SYSROOT" != "x"; then
32319    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32320      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32321        # Solaris Studio does not have a concept of sysroot. Instead we must
32322        # make sure the default include and lib dirs are appended to each
32323        # compile and link command line. Must also add -I-xbuiltin to enable
32324        # inlining of system functions and intrinsics.
32325        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32326        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32327            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32328      fi
32329    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32330      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32331      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32332    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32333      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32334      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32335    fi
32336    # The global CFLAGS and LDFLAGS variables need these for configure to function
32337    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32338    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32339    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32340    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32341  fi
32342
32343  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32344    # We also need -iframework<path>/System/Library/Frameworks
32345    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32346    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32347    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32348    # set this here so it doesn't have to be peppered throughout the forest
32349    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32350    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32351  fi
32352
32353
32354
32355
32356
32357# Then detect the actual binaries needed
32358
32359  # FIXME: Is this needed?
32360  ac_ext=cpp
32361ac_cpp='$CXXCPP $CPPFLAGS'
32362ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32363ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32364ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32365
32366
32367  # Store the CFLAGS etc passed to the configure script.
32368  ORG_CFLAGS="$CFLAGS"
32369  ORG_CXXFLAGS="$CXXFLAGS"
32370
32371  # autoconf magic only relies on PATH, so update it if tools dir is specified
32372  OLD_PATH="$PATH"
32373
32374  # On Windows, we need to detect the visual studio installation first.
32375  # This will change the PATH, but we need to keep that new PATH even
32376  # after toolchain detection is done, since the compiler (on x86) uses
32377  # it for DLL resolution in runtime.
32378  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32379      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32380
32381  # Store path to cygwin link.exe to help excluding it when searching for
32382  # VS linker. This must be done before changing the PATH when looking for VS.
32383  # Extract the first word of "link", so it can be a program name with args.
32384set dummy link; ac_word=$2
32385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32386$as_echo_n "checking for $ac_word... " >&6; }
32387if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32388  $as_echo_n "(cached) " >&6
32389else
32390  case $CYGWIN_LINK in
32391  [\\/]* | ?:[\\/]*)
32392  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32393  ;;
32394  *)
32395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32396for as_dir in $PATH
32397do
32398  IFS=$as_save_IFS
32399  test -z "$as_dir" && as_dir=.
32400    for ac_exec_ext in '' $ac_executable_extensions; do
32401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32402    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32404    break 2
32405  fi
32406done
32407  done
32408IFS=$as_save_IFS
32409
32410  ;;
32411esac
32412fi
32413CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32414if test -n "$CYGWIN_LINK"; then
32415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32416$as_echo "$CYGWIN_LINK" >&6; }
32417else
32418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32419$as_echo "no" >&6; }
32420fi
32421
32422
32423  if test "x$CYGWIN_LINK" != x; then
32424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32425$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32426    "$CYGWIN_LINK" --version > /dev/null
32427    if test $? -eq 0 ; then
32428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32429$as_echo "yes" >&6; }
32430    else
32431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32432$as_echo "no" >&6; }
32433      # This might be the VS linker. Don't exclude it later on.
32434      CYGWIN_LINK=""
32435    fi
32436  fi
32437
32438  # First-hand choice is to locate and run the vsvars bat file.
32439
32440
32441# Check whether --with-toolchain-version was given.
32442if test "${with_toolchain_version+set}" = set; then :
32443  withval=$with_toolchain_version;
32444fi
32445
32446
32447  if test "x$with_toolchain_version" = xlist; then
32448    # List all toolchains
32449    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32450$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32451    for version in $VALID_VS_VERSIONS; do
32452      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32453      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32454    done
32455
32456    exit 0
32457  elif test "x$DEVKIT_VS_VERSION" != x; then
32458    VS_VERSION=$DEVKIT_VS_VERSION
32459    TOOLCHAIN_VERSION=$VS_VERSION
32460    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32461    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32462    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32463    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32464    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32465    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32466
32467    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32468    # can still be exported as INCLUDE for compiler invocations without
32469    # SYSROOT_CFLAGS
32470    OLDIFS="$IFS"
32471    IFS=";"
32472    for i in $DEVKIT_VS_INCLUDE; do
32473      ipath=$i
32474
32475  unix_path="$ipath"
32476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32477    windows_path=`$CYGPATH -m "$unix_path"`
32478    ipath="$windows_path"
32479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32480    windows_path=`cmd //c echo $unix_path`
32481    ipath="$windows_path"
32482  fi
32483
32484      VS_INCLUDE="$VS_INCLUDE;$ipath"
32485    done
32486    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32487    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32488    for i in $DEVKIT_VS_LIB; do
32489      libpath=$i
32490
32491  unix_path="$libpath"
32492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32493    windows_path=`$CYGPATH -m "$unix_path"`
32494    libpath="$windows_path"
32495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32496    windows_path=`cmd //c echo $unix_path`
32497    libpath="$windows_path"
32498  fi
32499
32500      VS_LIB="$VS_LIB;$libpath"
32501    done
32502    IFS="$OLDIFS"
32503
32504    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32505$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32506
32507  elif test "x$with_toolchain_version" != x; then
32508    # User override; check that it is valid
32509    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32510      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32511$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32512      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32513$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32514      as_fn_error $? "Cannot continue." "$LINENO" 5
32515    fi
32516    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32517  else
32518    # No flag given, use default
32519    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32520  fi
32521
32522  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32523
32524  VS_VERSION="$VS_VERSION"
32525  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32526  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32527  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32528  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32529
32530  # When using --with-tools-dir, assume it points to the correct and default
32531  # version of Visual Studio or that --with-toolchain-version was also set.
32532  if test "x$with_tools_dir" != x; then
32533
32534  if test "x$VS_ENV_CMD" = x; then
32535    VS_VERSION="${VS_VERSION}"
32536    VS_BASE="$with_tools_dir/../.."
32537    METHOD="--with-tools-dir"
32538
32539    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32540      VCVARSFILE="vc/bin/vcvars32.bat"
32541    else
32542      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32543    fi
32544
32545
32546  windows_path="$VS_BASE"
32547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32548    unix_path=`$CYGPATH -u "$windows_path"`
32549    VS_BASE="$unix_path"
32550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32552    VS_BASE="$unix_path"
32553  fi
32554
32555    if test -d "$VS_BASE"; then
32556      if test -f "$VS_BASE/$VCVARSFILE"; then
32557        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32558$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32559        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32560        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32561        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32562        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32563      else
32564        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32565$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32566        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32567$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32568      fi
32569    fi
32570  fi
32571
32572
32573  if test "x$VS_ENV_CMD" = x; then
32574    VS_VERSION="${VS_VERSION}"
32575    VS_BASE="$with_tools_dir/../../.."
32576    METHOD="--with-tools-dir"
32577
32578    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32579      VCVARSFILE="vc/bin/vcvars32.bat"
32580    else
32581      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32582    fi
32583
32584
32585  windows_path="$VS_BASE"
32586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32587    unix_path=`$CYGPATH -u "$windows_path"`
32588    VS_BASE="$unix_path"
32589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32591    VS_BASE="$unix_path"
32592  fi
32593
32594    if test -d "$VS_BASE"; then
32595      if test -f "$VS_BASE/$VCVARSFILE"; then
32596        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32597$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32598        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32599        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32600        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32601        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32602      else
32603        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32604$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32605        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32606$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32607      fi
32608    fi
32609  fi
32610
32611    if test "x$VS_ENV_CMD" = x; then
32612      # Having specified an argument which is incorrect will produce an instant failure;
32613      # we should not go on looking
32614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32615$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32616      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32617$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32618      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32619$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32620      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32621    fi
32622  fi
32623
32624  VS_ENV_CMD=""
32625  VS_ENV_ARGS=""
32626
32627  if test "x$VS_COMNTOOLS" != x; then
32628
32629  if test "x$VS_ENV_CMD" = x; then
32630    VS_VERSION="${VS_VERSION}"
32631    VS_BASE="$VS_COMNTOOLS/../.."
32632    METHOD="$VS_COMNTOOLS_VAR variable"
32633
32634    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32635      VCVARSFILE="vc/bin/vcvars32.bat"
32636    else
32637      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32638    fi
32639
32640
32641  windows_path="$VS_BASE"
32642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32643    unix_path=`$CYGPATH -u "$windows_path"`
32644    VS_BASE="$unix_path"
32645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32647    VS_BASE="$unix_path"
32648  fi
32649
32650    if test -d "$VS_BASE"; then
32651      if test -f "$VS_BASE/$VCVARSFILE"; then
32652        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32653$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32654        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32655        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32656        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32657        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32658      else
32659        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32660$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32661        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32662$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32663      fi
32664    fi
32665  fi
32666
32667  fi
32668  if test "x$PROGRAMFILES" != x; then
32669
32670  if test "x$VS_ENV_CMD" = x; then
32671    VS_VERSION="${VS_VERSION}"
32672    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32673    METHOD="well-known name"
32674
32675    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32676      VCVARSFILE="vc/bin/vcvars32.bat"
32677    else
32678      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32679    fi
32680
32681
32682  windows_path="$VS_BASE"
32683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32684    unix_path=`$CYGPATH -u "$windows_path"`
32685    VS_BASE="$unix_path"
32686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32688    VS_BASE="$unix_path"
32689  fi
32690
32691    if test -d "$VS_BASE"; then
32692      if test -f "$VS_BASE/$VCVARSFILE"; then
32693        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32694$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32695        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32696        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32697        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32698        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32699      else
32700        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32701$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32702        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32703$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32704      fi
32705    fi
32706  fi
32707
32708  fi
32709  # Work around the insanely named ProgramFiles(x86) env variable
32710  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32711  if test "x$PROGRAMFILES_X86" != x; then
32712
32713  if test "x$VS_ENV_CMD" = x; then
32714    VS_VERSION="${VS_VERSION}"
32715    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32716    METHOD="well-known name"
32717
32718    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32719      VCVARSFILE="vc/bin/vcvars32.bat"
32720    else
32721      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32722    fi
32723
32724
32725  windows_path="$VS_BASE"
32726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32727    unix_path=`$CYGPATH -u "$windows_path"`
32728    VS_BASE="$unix_path"
32729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32731    VS_BASE="$unix_path"
32732  fi
32733
32734    if test -d "$VS_BASE"; then
32735      if test -f "$VS_BASE/$VCVARSFILE"; then
32736        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32737$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32738        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32739        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32740        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32741        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32742      else
32743        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32744$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32745        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32746$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32747      fi
32748    fi
32749  fi
32750
32751  fi
32752
32753  if test "x$VS_ENV_CMD" = x; then
32754    VS_VERSION="${VS_VERSION}"
32755    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32756    METHOD="well-known name"
32757
32758    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32759      VCVARSFILE="vc/bin/vcvars32.bat"
32760    else
32761      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32762    fi
32763
32764
32765  windows_path="$VS_BASE"
32766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32767    unix_path=`$CYGPATH -u "$windows_path"`
32768    VS_BASE="$unix_path"
32769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32771    VS_BASE="$unix_path"
32772  fi
32773
32774    if test -d "$VS_BASE"; then
32775      if test -f "$VS_BASE/$VCVARSFILE"; then
32776        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32777$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32778        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32779        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32780        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32781        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32782      else
32783        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32784$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32785        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32786$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32787      fi
32788    fi
32789  fi
32790
32791
32792  if test "x$VS_ENV_CMD" = x; then
32793    VS_VERSION="${VS_VERSION}"
32794    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32795    METHOD="well-known name"
32796
32797    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32798      VCVARSFILE="vc/bin/vcvars32.bat"
32799    else
32800      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32801    fi
32802
32803
32804  windows_path="$VS_BASE"
32805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32806    unix_path=`$CYGPATH -u "$windows_path"`
32807    VS_BASE="$unix_path"
32808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32810    VS_BASE="$unix_path"
32811  fi
32812
32813    if test -d "$VS_BASE"; then
32814      if test -f "$VS_BASE/$VCVARSFILE"; then
32815        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32816$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32817        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32818        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32819        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32820        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32821      else
32822        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32823$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32824        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32825$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32826      fi
32827    fi
32828  fi
32829
32830
32831  if test "x$SDK_INSTALL_DIR" != x; then
32832    if test "x$ProgramW6432" != x; then
32833
32834  if test "x$VS_ENV_CMD" = x; then
32835    VS_VERSION="${VS_VERSION}"
32836    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32837    METHOD="well-known name"
32838
32839  windows_path="$WIN_SDK_BASE"
32840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32841    unix_path=`$CYGPATH -u "$windows_path"`
32842    WIN_SDK_BASE="$unix_path"
32843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32845    WIN_SDK_BASE="$unix_path"
32846  fi
32847
32848    if test -d "$WIN_SDK_BASE"; then
32849      # There have been cases of partial or broken SDK installations. A missing
32850      # lib dir is not going to work.
32851      if test ! -d "$WIN_SDK_BASE/lib"; then
32852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32853$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32854        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32855$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32856      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32857        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32858$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32859        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32860        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32861          VS_ENV_ARGS="/x86"
32862        else
32863          VS_ENV_ARGS="/x64"
32864        fi
32865        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32866        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32867        # TODO: improve detection for other versions of SDK
32868        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32869      else
32870        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32871$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32872        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32873$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32874      fi
32875    fi
32876  fi
32877
32878    fi
32879    if test "x$PROGRAMW6432" != x; then
32880
32881  if test "x$VS_ENV_CMD" = x; then
32882    VS_VERSION="${VS_VERSION}"
32883    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32884    METHOD="well-known name"
32885
32886  windows_path="$WIN_SDK_BASE"
32887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32888    unix_path=`$CYGPATH -u "$windows_path"`
32889    WIN_SDK_BASE="$unix_path"
32890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32892    WIN_SDK_BASE="$unix_path"
32893  fi
32894
32895    if test -d "$WIN_SDK_BASE"; then
32896      # There have been cases of partial or broken SDK installations. A missing
32897      # lib dir is not going to work.
32898      if test ! -d "$WIN_SDK_BASE/lib"; then
32899        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32900$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32901        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32902$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32903      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32904        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32905$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32906        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32907        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32908          VS_ENV_ARGS="/x86"
32909        else
32910          VS_ENV_ARGS="/x64"
32911        fi
32912        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32913        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32914        # TODO: improve detection for other versions of SDK
32915        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32916      else
32917        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32918$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32919        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32920$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32921      fi
32922    fi
32923  fi
32924
32925    fi
32926    if test "x$PROGRAMFILES" != x; then
32927
32928  if test "x$VS_ENV_CMD" = x; then
32929    VS_VERSION="${VS_VERSION}"
32930    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32931    METHOD="well-known name"
32932
32933  windows_path="$WIN_SDK_BASE"
32934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32935    unix_path=`$CYGPATH -u "$windows_path"`
32936    WIN_SDK_BASE="$unix_path"
32937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32939    WIN_SDK_BASE="$unix_path"
32940  fi
32941
32942    if test -d "$WIN_SDK_BASE"; then
32943      # There have been cases of partial or broken SDK installations. A missing
32944      # lib dir is not going to work.
32945      if test ! -d "$WIN_SDK_BASE/lib"; then
32946        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32947$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32948        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32949$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32950      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32951        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32952$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32953        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32954        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32955          VS_ENV_ARGS="/x86"
32956        else
32957          VS_ENV_ARGS="/x64"
32958        fi
32959        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32960        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32961        # TODO: improve detection for other versions of SDK
32962        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32963      else
32964        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32965$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32966        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32967$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32968      fi
32969    fi
32970  fi
32971
32972    fi
32973
32974  if test "x$VS_ENV_CMD" = x; then
32975    VS_VERSION="${VS_VERSION}"
32976    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32977    METHOD="well-known name"
32978
32979  windows_path="$WIN_SDK_BASE"
32980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32981    unix_path=`$CYGPATH -u "$windows_path"`
32982    WIN_SDK_BASE="$unix_path"
32983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32985    WIN_SDK_BASE="$unix_path"
32986  fi
32987
32988    if test -d "$WIN_SDK_BASE"; then
32989      # There have been cases of partial or broken SDK installations. A missing
32990      # lib dir is not going to work.
32991      if test ! -d "$WIN_SDK_BASE/lib"; then
32992        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32993$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32994        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32995$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32996      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32998$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32999        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
33000        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
33001          VS_ENV_ARGS="/x86"
33002        else
33003          VS_ENV_ARGS="/x64"
33004        fi
33005        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
33006        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
33007        # TODO: improve detection for other versions of SDK
33008        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
33009      else
33010        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33011$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33012        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
33013$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
33014      fi
33015    fi
33016  fi
33017
33018
33019  if test "x$VS_ENV_CMD" = x; then
33020    VS_VERSION="${VS_VERSION}"
33021    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
33022    METHOD="well-known name"
33023
33024  windows_path="$WIN_SDK_BASE"
33025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33026    unix_path=`$CYGPATH -u "$windows_path"`
33027    WIN_SDK_BASE="$unix_path"
33028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33030    WIN_SDK_BASE="$unix_path"
33031  fi
33032
33033    if test -d "$WIN_SDK_BASE"; then
33034      # There have been cases of partial or broken SDK installations. A missing
33035      # lib dir is not going to work.
33036      if test ! -d "$WIN_SDK_BASE/lib"; then
33037        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33038$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33039        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
33040$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
33041      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
33042        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33043$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33044        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
33045        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
33046          VS_ENV_ARGS="/x86"
33047        else
33048          VS_ENV_ARGS="/x64"
33049        fi
33050        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
33051        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
33052        # TODO: improve detection for other versions of SDK
33053        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
33054      else
33055        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33056$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33057        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
33058$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
33059      fi
33060    fi
33061  fi
33062
33063  fi
33064
33065    if test "x$VS_ENV_CMD" != x; then
33066      TOOLCHAIN_VERSION=$VS_VERSION
33067      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
33068      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
33069      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
33070      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
33071      # The rest of the variables are already evaled while probing
33072      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
33073$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
33074      break
33075    fi
33076  done
33077
33078
33079  # If we have a devkit, skip all of the below.
33080  if test "x$DEVKIT_VS_VERSION" = x; then
33081    if test "x$VS_ENV_CMD" != x; then
33082      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
33083
33084  # Only process if variable expands to non-empty
33085
33086  if test "x$VS_ENV_CMD" != x; then
33087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33088
33089  # First separate the path from the arguments. This will split at the first
33090  # space.
33091  complete="$VS_ENV_CMD"
33092  path="${complete%% *}"
33093  tmp="$complete EOL"
33094  arguments="${tmp#* }"
33095
33096  # Input might be given as Windows format, start by converting to
33097  # unix format.
33098  new_path=`$CYGPATH -u "$path"`
33099
33100  # Now try to locate executable using which
33101  new_path=`$WHICH "$new_path" 2> /dev/null`
33102  # bat and cmd files are not always considered executable in cygwin causing which
33103  # to not find them
33104  if test "x$new_path" = x \
33105      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33106      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33107    new_path=`$CYGPATH -u "$path"`
33108  fi
33109  if test "x$new_path" = x; then
33110    # Oops. Which didn't find the executable.
33111    # The splitting of arguments from the executable at a space might have been incorrect,
33112    # since paths with space are more likely in Windows. Give it another try with the whole
33113    # argument.
33114    path="$complete"
33115    arguments="EOL"
33116    new_path=`$CYGPATH -u "$path"`
33117    new_path=`$WHICH "$new_path" 2> /dev/null`
33118    # bat and cmd files are not always considered executable in cygwin causing which
33119    # to not find them
33120    if test "x$new_path" = x \
33121        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33122        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33123      new_path=`$CYGPATH -u "$path"`
33124    fi
33125    if test "x$new_path" = x; then
33126      # It's still not found. Now this is an unrecoverable error.
33127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33128$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33129      has_space=`$ECHO "$complete" | $GREP " "`
33130      if test "x$has_space" != x; then
33131        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33132$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33133      fi
33134      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33135    fi
33136  fi
33137
33138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33141  # "foo.exe" is OK but "foo" is an error.
33142  #
33143  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33144  # It is also a way to make sure we got the proper file name for the real test later on.
33145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33146  if test "x$test_shortpath" = x; then
33147    # Short path failed, file does not exist as specified.
33148    # Try adding .exe or .cmd
33149    if test -f "${new_path}.exe"; then
33150      input_to_shortpath="${new_path}.exe"
33151    elif test -f "${new_path}.cmd"; then
33152      input_to_shortpath="${new_path}.cmd"
33153    else
33154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33155$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33156      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33157$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33158      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33159    fi
33160  else
33161    input_to_shortpath="$new_path"
33162  fi
33163
33164  # Call helper function which possibly converts this using DOS-style short mode.
33165  # If so, the updated path is stored in $new_path.
33166  new_path="$input_to_shortpath"
33167
33168  input_path="$input_to_shortpath"
33169  # Check if we need to convert this using DOS-style short mode. If the path
33170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33171  # take no chances and rewrite it.
33172  # Note: m4 eats our [], so we need to use [ and ] instead.
33173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33174  if test "x$has_forbidden_chars" != x; then
33175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33179      # Going to short mode and back again did indeed matter. Since short mode is
33180      # case insensitive, let's make it lowercase to improve readability.
33181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33182      # Now convert it back to Unix-style (cygpath)
33183      input_path=`$CYGPATH -u "$shortmode_path"`
33184      new_path="$input_path"
33185    fi
33186  fi
33187
33188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33189  if test "x$test_cygdrive_prefix" = x; then
33190    # As a simple fix, exclude /usr/bin since it's not a real path.
33191    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33193      # a path prefixed by /cygdrive for fixpath to work.
33194      new_path="$CYGWIN_ROOT_PATH$input_path"
33195    fi
33196  fi
33197
33198  # remove trailing .exe if any
33199  new_path="${new_path/%.exe/}"
33200
33201    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33202
33203  # First separate the path from the arguments. This will split at the first
33204  # space.
33205  complete="$VS_ENV_CMD"
33206  path="${complete%% *}"
33207  tmp="$complete EOL"
33208  arguments="${tmp#* }"
33209
33210  # Input might be given as Windows format, start by converting to
33211  # unix format.
33212  new_path="$path"
33213
33214  windows_path="$new_path"
33215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33216    unix_path=`$CYGPATH -u "$windows_path"`
33217    new_path="$unix_path"
33218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33220    new_path="$unix_path"
33221  fi
33222
33223
33224  # Now try to locate executable using which
33225  new_path=`$WHICH "$new_path" 2> /dev/null`
33226
33227  if test "x$new_path" = x; then
33228    # Oops. Which didn't find the executable.
33229    # The splitting of arguments from the executable at a space might have been incorrect,
33230    # since paths with space are more likely in Windows. Give it another try with the whole
33231    # argument.
33232    path="$complete"
33233    arguments="EOL"
33234    new_path="$path"
33235
33236  windows_path="$new_path"
33237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33238    unix_path=`$CYGPATH -u "$windows_path"`
33239    new_path="$unix_path"
33240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33242    new_path="$unix_path"
33243  fi
33244
33245
33246    new_path=`$WHICH "$new_path" 2> /dev/null`
33247    # bat and cmd files are not always considered executable in MSYS causing which
33248    # to not find them
33249    if test "x$new_path" = x \
33250        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33251        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33252      new_path="$path"
33253
33254  windows_path="$new_path"
33255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33256    unix_path=`$CYGPATH -u "$windows_path"`
33257    new_path="$unix_path"
33258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33260    new_path="$unix_path"
33261  fi
33262
33263    fi
33264
33265    if test "x$new_path" = x; then
33266      # It's still not found. Now this is an unrecoverable error.
33267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33268$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33269      has_space=`$ECHO "$complete" | $GREP " "`
33270      if test "x$has_space" != x; then
33271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33273      fi
33274      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33275    fi
33276  fi
33277
33278  # Now new_path has a complete unix path to the binary
33279  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33280    # Keep paths in /bin as-is, but remove trailing .exe if any
33281    new_path="${new_path/%.exe/}"
33282    # Do not save /bin paths to all_fixpath_prefixes!
33283  else
33284    # Not in mixed or Windows style, start by that.
33285    new_path=`cmd //c echo $new_path`
33286
33287  input_path="$new_path"
33288  # Check if we need to convert this using DOS-style short mode. If the path
33289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33290  # take no chances and rewrite it.
33291  # Note: m4 eats our [], so we need to use [ and ] instead.
33292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33293  if test "x$has_forbidden_chars" != x; then
33294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33296  fi
33297
33298    # Output is in $new_path
33299
33300  windows_path="$new_path"
33301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33302    unix_path=`$CYGPATH -u "$windows_path"`
33303    new_path="$unix_path"
33304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33306    new_path="$unix_path"
33307  fi
33308
33309    # remove trailing .exe if any
33310    new_path="${new_path/%.exe/}"
33311
33312    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33313    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33314  fi
33315
33316    else
33317      # We're on a unix platform. Hooray! :)
33318      # First separate the path from the arguments. This will split at the first
33319      # space.
33320      complete="$VS_ENV_CMD"
33321      path="${complete%% *}"
33322      tmp="$complete EOL"
33323      arguments="${tmp#* }"
33324
33325      # Cannot rely on the command "which" here since it doesn't always work.
33326      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33327      if test -z "$is_absolute_path"; then
33328        # Path to executable is not absolute. Find it.
33329        IFS_save="$IFS"
33330        IFS=:
33331        for p in $PATH; do
33332          if test -f "$p/$path" && test -x "$p/$path"; then
33333            new_path="$p/$path"
33334            break
33335          fi
33336        done
33337        IFS="$IFS_save"
33338      else
33339        # This is an absolute path, we can use it without further modifications.
33340        new_path="$path"
33341      fi
33342
33343      if test "x$new_path" = x; then
33344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33345$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33346        has_space=`$ECHO "$complete" | $GREP " "`
33347        if test "x$has_space" != x; then
33348          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33349$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33350        fi
33351        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33352      fi
33353    fi
33354
33355    # Now join together the path and the arguments once again
33356    if test "x$arguments" != xEOL; then
33357      new_complete="$new_path ${arguments% *}"
33358    else
33359      new_complete="$new_path"
33360    fi
33361
33362    if test "x$complete" != "x$new_complete"; then
33363      VS_ENV_CMD="$new_complete"
33364      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33365$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33366    fi
33367  fi
33368
33369
33370      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33371      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33372$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33373
33374      # We need to create a couple of temporary files.
33375      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33376      $MKDIR -p $VS_ENV_TMP_DIR
33377
33378      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33379      # Instead create a shell script which will set the relevant variables when run.
33380      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33381
33382  unix_path="$WINPATH_VS_ENV_CMD"
33383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33384    windows_path=`$CYGPATH -m "$unix_path"`
33385    WINPATH_VS_ENV_CMD="$windows_path"
33386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33387    windows_path=`cmd //c echo $unix_path`
33388    WINPATH_VS_ENV_CMD="$windows_path"
33389  fi
33390
33391      WINPATH_BASH="$BASH"
33392
33393  unix_path="$WINPATH_BASH"
33394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33395    windows_path=`$CYGPATH -m "$unix_path"`
33396    WINPATH_BASH="$windows_path"
33397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33398    windows_path=`cmd //c echo $unix_path`
33399    WINPATH_BASH="$windows_path"
33400  fi
33401
33402
33403      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33404      # script (executable by bash) that will setup the important variables.
33405      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33406      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33407      # This will end up something like:
33408      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33409      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33410      # These will end up something like:
33411      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33412      # The trailing space for everyone except PATH is no typo, but is needed due
33413      # to trailing \ in the Windows paths. These will be stripped later.
33414      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33415          >> $EXTRACT_VC_ENV_BAT_FILE
33416      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33417          >> $EXTRACT_VC_ENV_BAT_FILE
33418      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33419          >> $EXTRACT_VC_ENV_BAT_FILE
33420      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33421          >> $EXTRACT_VC_ENV_BAT_FILE
33422      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33423          >> $EXTRACT_VC_ENV_BAT_FILE
33424      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33425          >> $EXTRACT_VC_ENV_BAT_FILE
33426
33427      # Now execute the newly created bat file.
33428      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33429      # Change directory so we don't need to mess with Windows paths in redirects.
33430      cd $VS_ENV_TMP_DIR
33431      cmd /c extract-vs-env.bat | $CAT
33432      cd $CURDIR
33433
33434      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33435        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33436$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33437        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33438$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33439        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33440$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33441        as_fn_error $? "Cannot continue" "$LINENO" 5
33442      fi
33443
33444      # Now set all paths and other env variables. This will allow the rest of
33445      # the configure script to find and run the compiler in the proper way.
33446      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33447$as_echo "$as_me: Setting extracted environment variables" >&6;}
33448      . $VS_ENV_TMP_DIR/set-vs-env.sh
33449      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33450      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33451    else
33452      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33453      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33454$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33455    fi
33456  fi
33457
33458  # At this point, we should have correct variables in the environment, or we can't continue.
33459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33460$as_echo_n "checking for Visual Studio variables... " >&6; }
33461
33462  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33463      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33464    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33466$as_echo "present but broken" >&6; }
33467      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33468    else
33469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33470$as_echo "ok" >&6; }
33471      # Remove any trailing "\" ";" and " " from the variables.
33472      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33473      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33474      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33475      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33476      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33477      # Remove any paths containing # (typically F#) as that messes up make. This
33478      # is needed if visual studio was installed with F# support.
33479      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33480
33481
33482
33483
33484
33485      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33486      OLDIFS="$IFS"
33487      IFS=";"
33488      for i in $VS_INCLUDE; do
33489        ipath=$i
33490        # Only process non-empty elements
33491        if test "x$ipath" != x; then
33492          IFS="$OLDIFS"
33493          # Check that directory exists before calling fixup_path
33494          testpath=$ipath
33495
33496  windows_path="$testpath"
33497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33498    unix_path=`$CYGPATH -u "$windows_path"`
33499    testpath="$unix_path"
33500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33502    testpath="$unix_path"
33503  fi
33504
33505          if test -d "$testpath"; then
33506
33507  # Only process if variable expands to non-empty
33508
33509  if test "x$ipath" != x; then
33510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33511
33512  # Input might be given as Windows format, start by converting to
33513  # unix format.
33514  path="$ipath"
33515  new_path=`$CYGPATH -u "$path"`
33516
33517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33520  # "foo.exe" is OK but "foo" is an error.
33521  #
33522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33523  # It is also a way to make sure we got the proper file name for the real test later on.
33524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33525  if test "x$test_shortpath" = x; then
33526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33527$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33528    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33529  fi
33530
33531  # Call helper function which possibly converts this using DOS-style short mode.
33532  # If so, the updated path is stored in $new_path.
33533
33534  input_path="$new_path"
33535  # Check if we need to convert this using DOS-style short mode. If the path
33536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33537  # take no chances and rewrite it.
33538  # Note: m4 eats our [], so we need to use [ and ] instead.
33539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33540  if test "x$has_forbidden_chars" != x; then
33541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33545      # Going to short mode and back again did indeed matter. Since short mode is
33546      # case insensitive, let's make it lowercase to improve readability.
33547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33548      # Now convert it back to Unix-style (cygpath)
33549      input_path=`$CYGPATH -u "$shortmode_path"`
33550      new_path="$input_path"
33551    fi
33552  fi
33553
33554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33555  if test "x$test_cygdrive_prefix" = x; then
33556    # As a simple fix, exclude /usr/bin since it's not a real path.
33557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33559      # a path prefixed by /cygdrive for fixpath to work.
33560      new_path="$CYGWIN_ROOT_PATH$input_path"
33561    fi
33562  fi
33563
33564
33565  if test "x$path" != "x$new_path"; then
33566    ipath="$new_path"
33567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33568$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33569  fi
33570
33571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33572
33573  path="$ipath"
33574  has_colon=`$ECHO $path | $GREP ^.:`
33575  new_path="$path"
33576  if test "x$has_colon" = x; then
33577    # Not in mixed or Windows style, start by that.
33578    new_path=`cmd //c echo $path`
33579  fi
33580
33581
33582  input_path="$new_path"
33583  # Check if we need to convert this using DOS-style short mode. If the path
33584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33585  # take no chances and rewrite it.
33586  # Note: m4 eats our [], so we need to use [ and ] instead.
33587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33588  if test "x$has_forbidden_chars" != x; then
33589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33591  fi
33592
33593
33594  windows_path="$new_path"
33595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33596    unix_path=`$CYGPATH -u "$windows_path"`
33597    new_path="$unix_path"
33598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33600    new_path="$unix_path"
33601  fi
33602
33603  if test "x$path" != "x$new_path"; then
33604    ipath="$new_path"
33605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33606$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33607  fi
33608
33609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33611
33612    else
33613      # We're on a unix platform. Hooray! :)
33614      path="$ipath"
33615      has_space=`$ECHO "$path" | $GREP " "`
33616      if test "x$has_space" != x; then
33617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33618$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33619        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33620      fi
33621
33622      # Use eval to expand a potential ~
33623      eval path="$path"
33624      if test ! -f "$path" && test ! -d "$path"; then
33625        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33626      fi
33627
33628      if test -d "$path"; then
33629        ipath="`cd "$path"; $THEPWDCMD -L`"
33630      else
33631        dir="`$DIRNAME "$path"`"
33632        base="`$BASENAME "$path"`"
33633        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33634      fi
33635    fi
33636  fi
33637
33638            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33639          fi
33640          IFS=";"
33641        fi
33642      done
33643      # Convert VS_LIB into SYSROOT_LDFLAGS
33644      for i in $VS_LIB; do
33645        libpath=$i
33646        # Only process non-empty elements
33647        if test "x$libpath" != x; then
33648          IFS="$OLDIFS"
33649          # Check that directory exists before calling fixup_path
33650          testpath=$libpath
33651
33652  windows_path="$testpath"
33653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33654    unix_path=`$CYGPATH -u "$windows_path"`
33655    testpath="$unix_path"
33656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33658    testpath="$unix_path"
33659  fi
33660
33661          if test -d "$testpath"; then
33662
33663  # Only process if variable expands to non-empty
33664
33665  if test "x$libpath" != x; then
33666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33667
33668  # Input might be given as Windows format, start by converting to
33669  # unix format.
33670  path="$libpath"
33671  new_path=`$CYGPATH -u "$path"`
33672
33673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33676  # "foo.exe" is OK but "foo" is an error.
33677  #
33678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33679  # It is also a way to make sure we got the proper file name for the real test later on.
33680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33681  if test "x$test_shortpath" = x; then
33682    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33683$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33684    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33685  fi
33686
33687  # Call helper function which possibly converts this using DOS-style short mode.
33688  # If so, the updated path is stored in $new_path.
33689
33690  input_path="$new_path"
33691  # Check if we need to convert this using DOS-style short mode. If the path
33692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33693  # take no chances and rewrite it.
33694  # Note: m4 eats our [], so we need to use [ and ] instead.
33695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33696  if test "x$has_forbidden_chars" != x; then
33697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33701      # Going to short mode and back again did indeed matter. Since short mode is
33702      # case insensitive, let's make it lowercase to improve readability.
33703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33704      # Now convert it back to Unix-style (cygpath)
33705      input_path=`$CYGPATH -u "$shortmode_path"`
33706      new_path="$input_path"
33707    fi
33708  fi
33709
33710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33711  if test "x$test_cygdrive_prefix" = x; then
33712    # As a simple fix, exclude /usr/bin since it's not a real path.
33713    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33715      # a path prefixed by /cygdrive for fixpath to work.
33716      new_path="$CYGWIN_ROOT_PATH$input_path"
33717    fi
33718  fi
33719
33720
33721  if test "x$path" != "x$new_path"; then
33722    libpath="$new_path"
33723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33724$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33725  fi
33726
33727    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33728
33729  path="$libpath"
33730  has_colon=`$ECHO $path | $GREP ^.:`
33731  new_path="$path"
33732  if test "x$has_colon" = x; then
33733    # Not in mixed or Windows style, start by that.
33734    new_path=`cmd //c echo $path`
33735  fi
33736
33737
33738  input_path="$new_path"
33739  # Check if we need to convert this using DOS-style short mode. If the path
33740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33741  # take no chances and rewrite it.
33742  # Note: m4 eats our [], so we need to use [ and ] instead.
33743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33744  if test "x$has_forbidden_chars" != x; then
33745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33747  fi
33748
33749
33750  windows_path="$new_path"
33751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33752    unix_path=`$CYGPATH -u "$windows_path"`
33753    new_path="$unix_path"
33754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33756    new_path="$unix_path"
33757  fi
33758
33759  if test "x$path" != "x$new_path"; then
33760    libpath="$new_path"
33761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33762$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33763  fi
33764
33765  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33766  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33767
33768    else
33769      # We're on a unix platform. Hooray! :)
33770      path="$libpath"
33771      has_space=`$ECHO "$path" | $GREP " "`
33772      if test "x$has_space" != x; then
33773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33774$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33775        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33776      fi
33777
33778      # Use eval to expand a potential ~
33779      eval path="$path"
33780      if test ! -f "$path" && test ! -d "$path"; then
33781        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33782      fi
33783
33784      if test -d "$path"; then
33785        libpath="`cd "$path"; $THEPWDCMD -L`"
33786      else
33787        dir="`$DIRNAME "$path"`"
33788        base="`$BASENAME "$path"`"
33789        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33790      fi
33791    fi
33792  fi
33793
33794            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33795          fi
33796          IFS=";"
33797        fi
33798      done
33799      IFS="$OLDIFS"
33800    fi
33801  else
33802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33803$as_echo "not found" >&6; }
33804
33805    if test "x$VS_ENV_CMD" = x; then
33806      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33807$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33808      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33809$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33810    else
33811      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33812$as_echo "$as_me: Running the extraction script failed." >&6;}
33813    fi
33814    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33815$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33816    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33817$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33818    as_fn_error $? "Cannot continue" "$LINENO" 5
33819  fi
33820
33821    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33822    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33823    PATH="$VS_PATH"
33824    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33825    export INCLUDE="$VS_INCLUDE"
33826    export LIB="$VS_LIB"
33827  else
33828    if test "x$XCODE_VERSION_OUTPUT" != x; then
33829      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33830      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33831      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33832    else
33833      # Currently we do not define this for other toolchains. This might change as the need arise.
33834      TOOLCHAIN_VERSION=
33835    fi
33836  fi
33837
33838
33839  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33840  # override all other locations.
33841  if test "x$TOOLCHAIN_PATH" != x; then
33842    PATH=$TOOLCHAIN_PATH:$PATH
33843  fi
33844
33845
33846  #
33847  # Setup the compilers (CC and CXX)
33848  #
33849
33850  COMPILER_NAME=C
33851  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33852
33853  if test "x$CC" != x; then
33854    # User has supplied compiler name already, always let that override.
33855    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33856$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33857    if test "x`basename $CC`" = "x$CC"; then
33858      # A command without a complete path is provided, search $PATH.
33859
33860      for ac_prog in $CC
33861do
33862  # Extract the first word of "$ac_prog", so it can be a program name with args.
33863set dummy $ac_prog; ac_word=$2
33864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33865$as_echo_n "checking for $ac_word... " >&6; }
33866if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33867  $as_echo_n "(cached) " >&6
33868else
33869  case $POTENTIAL_CC in
33870  [\\/]* | ?:[\\/]*)
33871  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33872  ;;
33873  *)
33874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33875for as_dir in $PATH
33876do
33877  IFS=$as_save_IFS
33878  test -z "$as_dir" && as_dir=.
33879    for ac_exec_ext in '' $ac_executable_extensions; do
33880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33881    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33883    break 2
33884  fi
33885done
33886  done
33887IFS=$as_save_IFS
33888
33889  ;;
33890esac
33891fi
33892POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33893if test -n "$POTENTIAL_CC"; then
33894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33895$as_echo "$POTENTIAL_CC" >&6; }
33896else
33897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33898$as_echo "no" >&6; }
33899fi
33900
33901
33902  test -n "$POTENTIAL_CC" && break
33903done
33904
33905      if test "x$POTENTIAL_CC" != x; then
33906        CC=$POTENTIAL_CC
33907      else
33908        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33909      fi
33910    else
33911      # Otherwise it might already be a complete path
33912      if test ! -x "$CC"; then
33913        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33914      fi
33915    fi
33916  else
33917    # No user supplied value. Locate compiler ourselves.
33918
33919    # If we are cross compiling, assume cross compilation tools follows the
33920    # cross compilation standard where they are prefixed with the autoconf
33921    # standard name for the target. For example the binary
33922    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33923    # If we are not cross compiling, then the default compiler name will be
33924    # used.
33925
33926    CC=
33927    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33928    # before checking the rest of the PATH.
33929    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33930    # step, this should not be necessary.
33931    if test -n "$TOOLCHAIN_PATH"; then
33932      PATH_save="$PATH"
33933      PATH="$TOOLCHAIN_PATH"
33934      if test -n "$ac_tool_prefix"; then
33935  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33936set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33938$as_echo_n "checking for $ac_word... " >&6; }
33939if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33940  $as_echo_n "(cached) " >&6
33941else
33942  case $TOOLCHAIN_PATH_CC in
33943  [\\/]* | ?:[\\/]*)
33944  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33945  ;;
33946  *)
33947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33948for as_dir in $PATH
33949do
33950  IFS=$as_save_IFS
33951  test -z "$as_dir" && as_dir=.
33952    for ac_exec_ext in '' $ac_executable_extensions; do
33953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33954    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33956    break 2
33957  fi
33958done
33959  done
33960IFS=$as_save_IFS
33961
33962  ;;
33963esac
33964fi
33965TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33966if test -n "$TOOLCHAIN_PATH_CC"; then
33967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33968$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33969else
33970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33971$as_echo "no" >&6; }
33972fi
33973
33974
33975fi
33976if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33977  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33978  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33979set dummy $SEARCH_LIST; ac_word=$2
33980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33981$as_echo_n "checking for $ac_word... " >&6; }
33982if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33983  $as_echo_n "(cached) " >&6
33984else
33985  case $ac_pt_TOOLCHAIN_PATH_CC in
33986  [\\/]* | ?:[\\/]*)
33987  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33988  ;;
33989  *)
33990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33991for as_dir in $PATH
33992do
33993  IFS=$as_save_IFS
33994  test -z "$as_dir" && as_dir=.
33995    for ac_exec_ext in '' $ac_executable_extensions; do
33996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33997    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33999    break 2
34000  fi
34001done
34002  done
34003IFS=$as_save_IFS
34004
34005  ;;
34006esac
34007fi
34008ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
34009if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
34010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
34011$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
34012else
34013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34014$as_echo "no" >&6; }
34015fi
34016
34017  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
34018    TOOLCHAIN_PATH_CC=""
34019  else
34020    case $cross_compiling:$ac_tool_warned in
34021yes:)
34022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34024ac_tool_warned=yes ;;
34025esac
34026    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
34027  fi
34028else
34029  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
34030fi
34031
34032      CC=$TOOLCHAIN_PATH_CC
34033      PATH="$PATH_save"
34034    fi
34035
34036    # AC_PATH_TOOL can't be run multiple times with the same variable,
34037    # so create a new name for this run.
34038    if test "x$CC" = x; then
34039      if test -n "$ac_tool_prefix"; then
34040  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34041set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34043$as_echo_n "checking for $ac_word... " >&6; }
34044if ${ac_cv_path_POTENTIAL_CC+:} false; then :
34045  $as_echo_n "(cached) " >&6
34046else
34047  case $POTENTIAL_CC in
34048  [\\/]* | ?:[\\/]*)
34049  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
34050  ;;
34051  *)
34052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34053for as_dir in $PATH
34054do
34055  IFS=$as_save_IFS
34056  test -z "$as_dir" && as_dir=.
34057    for ac_exec_ext in '' $ac_executable_extensions; do
34058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34059    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34061    break 2
34062  fi
34063done
34064  done
34065IFS=$as_save_IFS
34066
34067  ;;
34068esac
34069fi
34070POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
34071if test -n "$POTENTIAL_CC"; then
34072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
34073$as_echo "$POTENTIAL_CC" >&6; }
34074else
34075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34076$as_echo "no" >&6; }
34077fi
34078
34079
34080fi
34081if test -z "$ac_cv_path_POTENTIAL_CC"; then
34082  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
34083  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34084set dummy $SEARCH_LIST; ac_word=$2
34085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34086$as_echo_n "checking for $ac_word... " >&6; }
34087if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
34088  $as_echo_n "(cached) " >&6
34089else
34090  case $ac_pt_POTENTIAL_CC in
34091  [\\/]* | ?:[\\/]*)
34092  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
34093  ;;
34094  *)
34095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34096for as_dir in $PATH
34097do
34098  IFS=$as_save_IFS
34099  test -z "$as_dir" && as_dir=.
34100    for ac_exec_ext in '' $ac_executable_extensions; do
34101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34102    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34104    break 2
34105  fi
34106done
34107  done
34108IFS=$as_save_IFS
34109
34110  ;;
34111esac
34112fi
34113ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
34114if test -n "$ac_pt_POTENTIAL_CC"; then
34115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
34116$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
34117else
34118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34119$as_echo "no" >&6; }
34120fi
34121
34122  if test "x$ac_pt_POTENTIAL_CC" = x; then
34123    POTENTIAL_CC=""
34124  else
34125    case $cross_compiling:$ac_tool_warned in
34126yes:)
34127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34129ac_tool_warned=yes ;;
34130esac
34131    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34132  fi
34133else
34134  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34135fi
34136
34137      CC=$POTENTIAL_CC
34138    fi
34139
34140    if test "x$CC" = x; then
34141
34142  # Print a helpful message on how to acquire the necessary build dependency.
34143  # devkit is the help tag: freetype, cups, alsa etc
34144  MISSING_DEPENDENCY=devkit
34145
34146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34147    cygwin_help $MISSING_DEPENDENCY
34148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34149    msys_help $MISSING_DEPENDENCY
34150  else
34151    PKGHANDLER_COMMAND=
34152
34153    case $PKGHANDLER in
34154      apt-get)
34155        apt_help     $MISSING_DEPENDENCY ;;
34156      yum)
34157        yum_help     $MISSING_DEPENDENCY ;;
34158      brew)
34159        brew_help    $MISSING_DEPENDENCY ;;
34160      port)
34161        port_help    $MISSING_DEPENDENCY ;;
34162      pkgutil)
34163        pkgutil_help $MISSING_DEPENDENCY ;;
34164      pkgadd)
34165        pkgadd_help  $MISSING_DEPENDENCY ;;
34166    esac
34167
34168    if test "x$PKGHANDLER_COMMAND" != x; then
34169      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34170    fi
34171  fi
34172
34173      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34174    fi
34175  fi
34176
34177  # Now we have a compiler binary in CC. Make sure it's okay.
34178
34179  # Only process if variable expands to non-empty
34180
34181  if test "x$CC" != x; then
34182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34183
34184  # First separate the path from the arguments. This will split at the first
34185  # space.
34186  complete="$CC"
34187  path="${complete%% *}"
34188  tmp="$complete EOL"
34189  arguments="${tmp#* }"
34190
34191  # Input might be given as Windows format, start by converting to
34192  # unix format.
34193  new_path=`$CYGPATH -u "$path"`
34194
34195  # Now try to locate executable using which
34196  new_path=`$WHICH "$new_path" 2> /dev/null`
34197  # bat and cmd files are not always considered executable in cygwin causing which
34198  # to not find them
34199  if test "x$new_path" = x \
34200      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34201      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34202    new_path=`$CYGPATH -u "$path"`
34203  fi
34204  if test "x$new_path" = x; then
34205    # Oops. Which didn't find the executable.
34206    # The splitting of arguments from the executable at a space might have been incorrect,
34207    # since paths with space are more likely in Windows. Give it another try with the whole
34208    # argument.
34209    path="$complete"
34210    arguments="EOL"
34211    new_path=`$CYGPATH -u "$path"`
34212    new_path=`$WHICH "$new_path" 2> /dev/null`
34213    # bat and cmd files are not always considered executable in cygwin causing which
34214    # to not find them
34215    if test "x$new_path" = x \
34216        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34217        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34218      new_path=`$CYGPATH -u "$path"`
34219    fi
34220    if test "x$new_path" = x; then
34221      # It's still not found. Now this is an unrecoverable error.
34222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34223$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34224      has_space=`$ECHO "$complete" | $GREP " "`
34225      if test "x$has_space" != x; then
34226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34228      fi
34229      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34230    fi
34231  fi
34232
34233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34236  # "foo.exe" is OK but "foo" is an error.
34237  #
34238  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34239  # It is also a way to make sure we got the proper file name for the real test later on.
34240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34241  if test "x$test_shortpath" = x; then
34242    # Short path failed, file does not exist as specified.
34243    # Try adding .exe or .cmd
34244    if test -f "${new_path}.exe"; then
34245      input_to_shortpath="${new_path}.exe"
34246    elif test -f "${new_path}.cmd"; then
34247      input_to_shortpath="${new_path}.cmd"
34248    else
34249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34250$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34251      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34252$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34253      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34254    fi
34255  else
34256    input_to_shortpath="$new_path"
34257  fi
34258
34259  # Call helper function which possibly converts this using DOS-style short mode.
34260  # If so, the updated path is stored in $new_path.
34261  new_path="$input_to_shortpath"
34262
34263  input_path="$input_to_shortpath"
34264  # Check if we need to convert this using DOS-style short mode. If the path
34265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34266  # take no chances and rewrite it.
34267  # Note: m4 eats our [], so we need to use [ and ] instead.
34268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34269  if test "x$has_forbidden_chars" != x; then
34270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34274      # Going to short mode and back again did indeed matter. Since short mode is
34275      # case insensitive, let's make it lowercase to improve readability.
34276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34277      # Now convert it back to Unix-style (cygpath)
34278      input_path=`$CYGPATH -u "$shortmode_path"`
34279      new_path="$input_path"
34280    fi
34281  fi
34282
34283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34284  if test "x$test_cygdrive_prefix" = x; then
34285    # As a simple fix, exclude /usr/bin since it's not a real path.
34286    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34288      # a path prefixed by /cygdrive for fixpath to work.
34289      new_path="$CYGWIN_ROOT_PATH$input_path"
34290    fi
34291  fi
34292
34293  # remove trailing .exe if any
34294  new_path="${new_path/%.exe/}"
34295
34296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34297
34298  # First separate the path from the arguments. This will split at the first
34299  # space.
34300  complete="$CC"
34301  path="${complete%% *}"
34302  tmp="$complete EOL"
34303  arguments="${tmp#* }"
34304
34305  # Input might be given as Windows format, start by converting to
34306  # unix format.
34307  new_path="$path"
34308
34309  windows_path="$new_path"
34310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34311    unix_path=`$CYGPATH -u "$windows_path"`
34312    new_path="$unix_path"
34313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34315    new_path="$unix_path"
34316  fi
34317
34318
34319  # Now try to locate executable using which
34320  new_path=`$WHICH "$new_path" 2> /dev/null`
34321
34322  if test "x$new_path" = x; then
34323    # Oops. Which didn't find the executable.
34324    # The splitting of arguments from the executable at a space might have been incorrect,
34325    # since paths with space are more likely in Windows. Give it another try with the whole
34326    # argument.
34327    path="$complete"
34328    arguments="EOL"
34329    new_path="$path"
34330
34331  windows_path="$new_path"
34332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34333    unix_path=`$CYGPATH -u "$windows_path"`
34334    new_path="$unix_path"
34335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34337    new_path="$unix_path"
34338  fi
34339
34340
34341    new_path=`$WHICH "$new_path" 2> /dev/null`
34342    # bat and cmd files are not always considered executable in MSYS causing which
34343    # to not find them
34344    if test "x$new_path" = x \
34345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34347      new_path="$path"
34348
34349  windows_path="$new_path"
34350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34351    unix_path=`$CYGPATH -u "$windows_path"`
34352    new_path="$unix_path"
34353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34355    new_path="$unix_path"
34356  fi
34357
34358    fi
34359
34360    if test "x$new_path" = x; then
34361      # It's still not found. Now this is an unrecoverable error.
34362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34363$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34364      has_space=`$ECHO "$complete" | $GREP " "`
34365      if test "x$has_space" != x; then
34366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34368      fi
34369      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34370    fi
34371  fi
34372
34373  # Now new_path has a complete unix path to the binary
34374  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34375    # Keep paths in /bin as-is, but remove trailing .exe if any
34376    new_path="${new_path/%.exe/}"
34377    # Do not save /bin paths to all_fixpath_prefixes!
34378  else
34379    # Not in mixed or Windows style, start by that.
34380    new_path=`cmd //c echo $new_path`
34381
34382  input_path="$new_path"
34383  # Check if we need to convert this using DOS-style short mode. If the path
34384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34385  # take no chances and rewrite it.
34386  # Note: m4 eats our [], so we need to use [ and ] instead.
34387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34388  if test "x$has_forbidden_chars" != x; then
34389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34391  fi
34392
34393    # Output is in $new_path
34394
34395  windows_path="$new_path"
34396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34397    unix_path=`$CYGPATH -u "$windows_path"`
34398    new_path="$unix_path"
34399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34401    new_path="$unix_path"
34402  fi
34403
34404    # remove trailing .exe if any
34405    new_path="${new_path/%.exe/}"
34406
34407    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34408    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34409  fi
34410
34411    else
34412      # We're on a unix platform. Hooray! :)
34413      # First separate the path from the arguments. This will split at the first
34414      # space.
34415      complete="$CC"
34416      path="${complete%% *}"
34417      tmp="$complete EOL"
34418      arguments="${tmp#* }"
34419
34420      # Cannot rely on the command "which" here since it doesn't always work.
34421      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34422      if test -z "$is_absolute_path"; then
34423        # Path to executable is not absolute. Find it.
34424        IFS_save="$IFS"
34425        IFS=:
34426        for p in $PATH; do
34427          if test -f "$p/$path" && test -x "$p/$path"; then
34428            new_path="$p/$path"
34429            break
34430          fi
34431        done
34432        IFS="$IFS_save"
34433      else
34434        # This is an absolute path, we can use it without further modifications.
34435        new_path="$path"
34436      fi
34437
34438      if test "x$new_path" = x; then
34439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34440$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34441        has_space=`$ECHO "$complete" | $GREP " "`
34442        if test "x$has_space" != x; then
34443          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34444$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34445        fi
34446        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34447      fi
34448    fi
34449
34450    # Now join together the path and the arguments once again
34451    if test "x$arguments" != xEOL; then
34452      new_complete="$new_path ${arguments% *}"
34453    else
34454      new_complete="$new_path"
34455    fi
34456
34457    if test "x$complete" != "x$new_complete"; then
34458      CC="$new_complete"
34459      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34460$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34461    fi
34462  fi
34463
34464  TEST_COMPILER="$CC"
34465
34466  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34467$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34468  SYMLINK_ORIGINAL="$TEST_COMPILER"
34469
34470  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34471    # Follow a chain of symbolic links. Use readlink
34472    # where it exists, else fall back to horribly
34473    # complicated shell code.
34474    if test "x$READLINK_TESTED" != yes; then
34475      # On MacOSX there is a readlink tool with a different
34476      # purpose than the GNU readlink tool. Check the found readlink.
34477      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34478      if test "x$ISGNU" = x; then
34479        # A readlink that we do not know how to use.
34480        # Are there other non-GNU readlinks out there?
34481        READLINK_TESTED=yes
34482        READLINK=
34483      fi
34484    fi
34485
34486    if test "x$READLINK" != x; then
34487      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34488    else
34489      # Save the current directory for restoring afterwards
34490      STARTDIR=$PWD
34491      COUNTER=0
34492      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34493      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34494      cd $sym_link_dir
34495      # Use -P flag to resolve symlinks in directories.
34496      cd `$THEPWDCMD -P`
34497      sym_link_dir=`$THEPWDCMD -P`
34498      # Resolve file symlinks
34499      while test $COUNTER -lt 20; do
34500        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34501        if test "x$ISLINK" == x; then
34502          # This is not a symbolic link! We are done!
34503          break
34504        fi
34505        # Again resolve directory symlinks since the target of the just found
34506        # link could be in a different directory
34507        cd `$DIRNAME $ISLINK`
34508        sym_link_dir=`$THEPWDCMD -P`
34509        sym_link_file=`$BASENAME $ISLINK`
34510        let COUNTER=COUNTER+1
34511      done
34512      cd $STARTDIR
34513      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34514    fi
34515  fi
34516
34517  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34519$as_echo "no symlink" >&6; }
34520  else
34521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34522$as_echo "$SYMLINK_ORIGINAL" >&6; }
34523
34524    # We can't handle ccache by gcc wrappers, since we need to know if we're
34525    # using ccache. Instead ccache usage must be controlled by a configure option.
34526    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34527    if test "x$COMPILER_BASENAME" = "xccache"; then
34528      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34529$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34530      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34531    fi
34532  fi
34533
34534
34535  COMPILER=$CC
34536  COMPILER_NAME=$COMPILER_NAME
34537
34538  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34539    # cc -V output typically looks like
34540    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34541    # or
34542    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34543    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34544    # Check that this is likely to be the Solaris Studio cc.
34545    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34546    if test $? -ne 0; then
34547      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34548      { $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
34549$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34550      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34551$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34552      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34553$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34554      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34555    fi
34556    # Remove usage instructions (if present), and
34557    # collapse compiler output into a single line
34558    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34559        $SED -e 's/ *[Uu]sage:.*//'`
34560    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34561        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34562  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34563    # xlc -qversion output typically looks like
34564    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34565    #     Version: 11.01.0000.0015
34566    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34567    # Check that this is likely to be the IBM XL C compiler.
34568    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34569    if test $? -ne 0; then
34570      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34571      { $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
34572$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34573      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34574$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34575      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34576$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34577      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34578    fi
34579    # Collapse compiler output into a single line
34580    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34581    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34582        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34583  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34584    # There is no specific version flag, but all output starts with a version string.
34585    # First line typically looks something like:
34586    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34587    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34588    # Check that this is likely to be Microsoft CL.EXE.
34589    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34590    if test $? -ne 0; then
34591      { $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
34592$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34593      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34594$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34595      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34596    fi
34597    # Collapse compiler output into a single line
34598    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34599    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34600        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34601  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34602    # gcc --version output typically looks like
34603    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34604    #     Copyright (C) 2013 Free Software Foundation, Inc.
34605    #     This is free software; see the source for copying conditions.  There is NO
34606    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34607    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34608    # Check that this is likely to be GCC.
34609    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34610    if test $? -ne 0; then
34611      { $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
34612$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34613      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34614$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34615      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34616    fi
34617    # Remove Copyright and legalese from version string, and
34618    # collapse into a single line
34619    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34620        $SED -e 's/ *Copyright .*//'`
34621    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34622        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34623  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34624    # clang --version output typically looks like
34625    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34626    #    clang version 3.3 (tags/RELEASE_33/final)
34627    # or
34628    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34629    #    Target: x86_64-pc-linux-gnu
34630    #    Thread model: posix
34631    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34632    # Check that this is likely to be clang
34633    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34634    if test $? -ne 0; then
34635      { $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
34636$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34637      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34638$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34639      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34640    fi
34641    # Collapse compiler output into a single line
34642    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34643    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34644        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34645  else
34646      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34647  fi
34648  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34649  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34650  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34651  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34652
34653  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34654$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34655
34656
34657  # Now that we have resolved CC ourself, let autoconf have its go at it
34658  ac_ext=c
34659ac_cpp='$CPP $CPPFLAGS'
34660ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34661ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34662ac_compiler_gnu=$ac_cv_c_compiler_gnu
34663if test -n "$ac_tool_prefix"; then
34664  for ac_prog in $CC
34665  do
34666    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34667set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34669$as_echo_n "checking for $ac_word... " >&6; }
34670if ${ac_cv_prog_CC+:} false; then :
34671  $as_echo_n "(cached) " >&6
34672else
34673  if test -n "$CC"; then
34674  ac_cv_prog_CC="$CC" # Let the user override the test.
34675else
34676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34677for as_dir in $PATH
34678do
34679  IFS=$as_save_IFS
34680  test -z "$as_dir" && as_dir=.
34681    for ac_exec_ext in '' $ac_executable_extensions; do
34682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34683    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34685    break 2
34686  fi
34687done
34688  done
34689IFS=$as_save_IFS
34690
34691fi
34692fi
34693CC=$ac_cv_prog_CC
34694if test -n "$CC"; then
34695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34696$as_echo "$CC" >&6; }
34697else
34698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34699$as_echo "no" >&6; }
34700fi
34701
34702
34703    test -n "$CC" && break
34704  done
34705fi
34706if test -z "$CC"; then
34707  ac_ct_CC=$CC
34708  for ac_prog in $CC
34709do
34710  # Extract the first word of "$ac_prog", so it can be a program name with args.
34711set dummy $ac_prog; ac_word=$2
34712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34713$as_echo_n "checking for $ac_word... " >&6; }
34714if ${ac_cv_prog_ac_ct_CC+:} false; then :
34715  $as_echo_n "(cached) " >&6
34716else
34717  if test -n "$ac_ct_CC"; then
34718  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34719else
34720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34721for as_dir in $PATH
34722do
34723  IFS=$as_save_IFS
34724  test -z "$as_dir" && as_dir=.
34725    for ac_exec_ext in '' $ac_executable_extensions; do
34726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34727    ac_cv_prog_ac_ct_CC="$ac_prog"
34728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34729    break 2
34730  fi
34731done
34732  done
34733IFS=$as_save_IFS
34734
34735fi
34736fi
34737ac_ct_CC=$ac_cv_prog_ac_ct_CC
34738if test -n "$ac_ct_CC"; then
34739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34740$as_echo "$ac_ct_CC" >&6; }
34741else
34742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34743$as_echo "no" >&6; }
34744fi
34745
34746
34747  test -n "$ac_ct_CC" && break
34748done
34749
34750  if test "x$ac_ct_CC" = x; then
34751    CC=""
34752  else
34753    case $cross_compiling:$ac_tool_warned in
34754yes:)
34755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34757ac_tool_warned=yes ;;
34758esac
34759    CC=$ac_ct_CC
34760  fi
34761fi
34762
34763
34764test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34766as_fn_error $? "no acceptable C compiler found in \$PATH
34767See \`config.log' for more details" "$LINENO" 5; }
34768
34769# Provide some information about the compiler.
34770$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34771set X $ac_compile
34772ac_compiler=$2
34773for ac_option in --version -v -V -qversion; do
34774  { { ac_try="$ac_compiler $ac_option >&5"
34775case "(($ac_try" in
34776  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34777  *) ac_try_echo=$ac_try;;
34778esac
34779eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34780$as_echo "$ac_try_echo"; } >&5
34781  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34782  ac_status=$?
34783  if test -s conftest.err; then
34784    sed '10a\
34785... rest of stderr output deleted ...
34786         10q' conftest.err >conftest.er1
34787    cat conftest.er1 >&5
34788  fi
34789  rm -f conftest.er1 conftest.err
34790  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34791  test $ac_status = 0; }
34792done
34793
34794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34795/* end confdefs.h.  */
34796
34797int
34798main ()
34799{
34800
34801  ;
34802  return 0;
34803}
34804_ACEOF
34805ac_clean_files_save=$ac_clean_files
34806ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34807# Try to create an executable without -o first, disregard a.out.
34808# It will help us diagnose broken compilers, and finding out an intuition
34809# of exeext.
34810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34811$as_echo_n "checking whether the C compiler works... " >&6; }
34812ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34813
34814# The possible output files:
34815ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34816
34817ac_rmfiles=
34818for ac_file in $ac_files
34819do
34820  case $ac_file in
34821    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34822    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34823  esac
34824done
34825rm -f $ac_rmfiles
34826
34827if { { ac_try="$ac_link_default"
34828case "(($ac_try" in
34829  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34830  *) ac_try_echo=$ac_try;;
34831esac
34832eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34833$as_echo "$ac_try_echo"; } >&5
34834  (eval "$ac_link_default") 2>&5
34835  ac_status=$?
34836  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34837  test $ac_status = 0; }; then :
34838  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34839# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34840# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34841# so that the user can short-circuit this test for compilers unknown to
34842# Autoconf.
34843for ac_file in $ac_files ''
34844do
34845  test -f "$ac_file" || continue
34846  case $ac_file in
34847    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34848	;;
34849    [ab].out )
34850	# We found the default executable, but exeext='' is most
34851	# certainly right.
34852	break;;
34853    *.* )
34854	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34855	then :; else
34856	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34857	fi
34858	# We set ac_cv_exeext here because the later test for it is not
34859	# safe: cross compilers may not add the suffix if given an `-o'
34860	# argument, so we may need to know it at that point already.
34861	# Even if this section looks crufty: it has the advantage of
34862	# actually working.
34863	break;;
34864    * )
34865	break;;
34866  esac
34867done
34868test "$ac_cv_exeext" = no && ac_cv_exeext=
34869
34870else
34871  ac_file=''
34872fi
34873if test -z "$ac_file"; then :
34874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34875$as_echo "no" >&6; }
34876$as_echo "$as_me: failed program was:" >&5
34877sed 's/^/| /' conftest.$ac_ext >&5
34878
34879{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34881as_fn_error 77 "C compiler cannot create executables
34882See \`config.log' for more details" "$LINENO" 5; }
34883else
34884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34885$as_echo "yes" >&6; }
34886fi
34887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34888$as_echo_n "checking for C compiler default output file name... " >&6; }
34889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34890$as_echo "$ac_file" >&6; }
34891ac_exeext=$ac_cv_exeext
34892
34893rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34894ac_clean_files=$ac_clean_files_save
34895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34896$as_echo_n "checking for suffix of executables... " >&6; }
34897if { { ac_try="$ac_link"
34898case "(($ac_try" in
34899  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34900  *) ac_try_echo=$ac_try;;
34901esac
34902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34903$as_echo "$ac_try_echo"; } >&5
34904  (eval "$ac_link") 2>&5
34905  ac_status=$?
34906  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34907  test $ac_status = 0; }; then :
34908  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34909# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34910# work properly (i.e., refer to `conftest.exe'), while it won't with
34911# `rm'.
34912for ac_file in conftest.exe conftest conftest.*; do
34913  test -f "$ac_file" || continue
34914  case $ac_file in
34915    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34916    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34917	  break;;
34918    * ) break;;
34919  esac
34920done
34921else
34922  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34924as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34925See \`config.log' for more details" "$LINENO" 5; }
34926fi
34927rm -f conftest conftest$ac_cv_exeext
34928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34929$as_echo "$ac_cv_exeext" >&6; }
34930
34931rm -f conftest.$ac_ext
34932EXEEXT=$ac_cv_exeext
34933ac_exeext=$EXEEXT
34934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34935/* end confdefs.h.  */
34936#include <stdio.h>
34937int
34938main ()
34939{
34940FILE *f = fopen ("conftest.out", "w");
34941 return ferror (f) || fclose (f) != 0;
34942
34943  ;
34944  return 0;
34945}
34946_ACEOF
34947ac_clean_files="$ac_clean_files conftest.out"
34948# Check that the compiler produces executables we can run.  If not, either
34949# the compiler is broken, or we cross compile.
34950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34951$as_echo_n "checking whether we are cross compiling... " >&6; }
34952if test "$cross_compiling" != yes; then
34953  { { ac_try="$ac_link"
34954case "(($ac_try" in
34955  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34956  *) ac_try_echo=$ac_try;;
34957esac
34958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34959$as_echo "$ac_try_echo"; } >&5
34960  (eval "$ac_link") 2>&5
34961  ac_status=$?
34962  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34963  test $ac_status = 0; }
34964  if { ac_try='./conftest$ac_cv_exeext'
34965  { { case "(($ac_try" in
34966  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34967  *) ac_try_echo=$ac_try;;
34968esac
34969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34970$as_echo "$ac_try_echo"; } >&5
34971  (eval "$ac_try") 2>&5
34972  ac_status=$?
34973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34974  test $ac_status = 0; }; }; then
34975    cross_compiling=no
34976  else
34977    if test "$cross_compiling" = maybe; then
34978	cross_compiling=yes
34979    else
34980	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34982as_fn_error $? "cannot run C compiled programs.
34983If you meant to cross compile, use \`--host'.
34984See \`config.log' for more details" "$LINENO" 5; }
34985    fi
34986  fi
34987fi
34988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34989$as_echo "$cross_compiling" >&6; }
34990
34991rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34992ac_clean_files=$ac_clean_files_save
34993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34994$as_echo_n "checking for suffix of object files... " >&6; }
34995if ${ac_cv_objext+:} false; then :
34996  $as_echo_n "(cached) " >&6
34997else
34998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34999/* end confdefs.h.  */
35000
35001int
35002main ()
35003{
35004
35005  ;
35006  return 0;
35007}
35008_ACEOF
35009rm -f conftest.o conftest.obj
35010if { { ac_try="$ac_compile"
35011case "(($ac_try" in
35012  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35013  *) ac_try_echo=$ac_try;;
35014esac
35015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35016$as_echo "$ac_try_echo"; } >&5
35017  (eval "$ac_compile") 2>&5
35018  ac_status=$?
35019  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35020  test $ac_status = 0; }; then :
35021  for ac_file in conftest.o conftest.obj conftest.*; do
35022  test -f "$ac_file" || continue;
35023  case $ac_file in
35024    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
35025    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
35026       break;;
35027  esac
35028done
35029else
35030  $as_echo "$as_me: failed program was:" >&5
35031sed 's/^/| /' conftest.$ac_ext >&5
35032
35033{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35035as_fn_error $? "cannot compute suffix of object files: cannot compile
35036See \`config.log' for more details" "$LINENO" 5; }
35037fi
35038rm -f conftest.$ac_cv_objext conftest.$ac_ext
35039fi
35040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
35041$as_echo "$ac_cv_objext" >&6; }
35042OBJEXT=$ac_cv_objext
35043ac_objext=$OBJEXT
35044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
35045$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
35046if ${ac_cv_c_compiler_gnu+:} false; then :
35047  $as_echo_n "(cached) " >&6
35048else
35049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35050/* end confdefs.h.  */
35051
35052int
35053main ()
35054{
35055#ifndef __GNUC__
35056       choke me
35057#endif
35058
35059  ;
35060  return 0;
35061}
35062_ACEOF
35063if ac_fn_c_try_compile "$LINENO"; then :
35064  ac_compiler_gnu=yes
35065else
35066  ac_compiler_gnu=no
35067fi
35068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35069ac_cv_c_compiler_gnu=$ac_compiler_gnu
35070
35071fi
35072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
35073$as_echo "$ac_cv_c_compiler_gnu" >&6; }
35074if test $ac_compiler_gnu = yes; then
35075  GCC=yes
35076else
35077  GCC=
35078fi
35079ac_test_CFLAGS=${CFLAGS+set}
35080ac_save_CFLAGS=$CFLAGS
35081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
35082$as_echo_n "checking whether $CC accepts -g... " >&6; }
35083if ${ac_cv_prog_cc_g+:} false; then :
35084  $as_echo_n "(cached) " >&6
35085else
35086  ac_save_c_werror_flag=$ac_c_werror_flag
35087   ac_c_werror_flag=yes
35088   ac_cv_prog_cc_g=no
35089   CFLAGS="-g"
35090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35091/* end confdefs.h.  */
35092
35093int
35094main ()
35095{
35096
35097  ;
35098  return 0;
35099}
35100_ACEOF
35101if ac_fn_c_try_compile "$LINENO"; then :
35102  ac_cv_prog_cc_g=yes
35103else
35104  CFLAGS=""
35105      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35106/* end confdefs.h.  */
35107
35108int
35109main ()
35110{
35111
35112  ;
35113  return 0;
35114}
35115_ACEOF
35116if ac_fn_c_try_compile "$LINENO"; then :
35117
35118else
35119  ac_c_werror_flag=$ac_save_c_werror_flag
35120	 CFLAGS="-g"
35121	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35122/* end confdefs.h.  */
35123
35124int
35125main ()
35126{
35127
35128  ;
35129  return 0;
35130}
35131_ACEOF
35132if ac_fn_c_try_compile "$LINENO"; then :
35133  ac_cv_prog_cc_g=yes
35134fi
35135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35136fi
35137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35138fi
35139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35140   ac_c_werror_flag=$ac_save_c_werror_flag
35141fi
35142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35143$as_echo "$ac_cv_prog_cc_g" >&6; }
35144if test "$ac_test_CFLAGS" = set; then
35145  CFLAGS=$ac_save_CFLAGS
35146elif test $ac_cv_prog_cc_g = yes; then
35147  if test "$GCC" = yes; then
35148    CFLAGS="-g -O2"
35149  else
35150    CFLAGS="-g"
35151  fi
35152else
35153  if test "$GCC" = yes; then
35154    CFLAGS="-O2"
35155  else
35156    CFLAGS=
35157  fi
35158fi
35159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35160$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35161if ${ac_cv_prog_cc_c89+:} false; then :
35162  $as_echo_n "(cached) " >&6
35163else
35164  ac_cv_prog_cc_c89=no
35165ac_save_CC=$CC
35166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35167/* end confdefs.h.  */
35168#include <stdarg.h>
35169#include <stdio.h>
35170struct stat;
35171/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35172struct buf { int x; };
35173FILE * (*rcsopen) (struct buf *, struct stat *, int);
35174static char *e (p, i)
35175     char **p;
35176     int i;
35177{
35178  return p[i];
35179}
35180static char *f (char * (*g) (char **, int), char **p, ...)
35181{
35182  char *s;
35183  va_list v;
35184  va_start (v,p);
35185  s = g (p, va_arg (v,int));
35186  va_end (v);
35187  return s;
35188}
35189
35190/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35191   function prototypes and stuff, but not '\xHH' hex character constants.
35192   These don't provoke an error unfortunately, instead are silently treated
35193   as 'x'.  The following induces an error, until -std is added to get
35194   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35195   array size at least.  It's necessary to write '\x00'==0 to get something
35196   that's true only with -std.  */
35197int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35198
35199/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35200   inside strings and character constants.  */
35201#define FOO(x) 'x'
35202int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35203
35204int test (int i, double x);
35205struct s1 {int (*f) (int a);};
35206struct s2 {int (*f) (double a);};
35207int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35208int argc;
35209char **argv;
35210int
35211main ()
35212{
35213return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35214  ;
35215  return 0;
35216}
35217_ACEOF
35218for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35219	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35220do
35221  CC="$ac_save_CC $ac_arg"
35222  if ac_fn_c_try_compile "$LINENO"; then :
35223  ac_cv_prog_cc_c89=$ac_arg
35224fi
35225rm -f core conftest.err conftest.$ac_objext
35226  test "x$ac_cv_prog_cc_c89" != "xno" && break
35227done
35228rm -f conftest.$ac_ext
35229CC=$ac_save_CC
35230
35231fi
35232# AC_CACHE_VAL
35233case "x$ac_cv_prog_cc_c89" in
35234  x)
35235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35236$as_echo "none needed" >&6; } ;;
35237  xno)
35238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35239$as_echo "unsupported" >&6; } ;;
35240  *)
35241    CC="$CC $ac_cv_prog_cc_c89"
35242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35243$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35244esac
35245if test "x$ac_cv_prog_cc_c89" != xno; then :
35246
35247fi
35248
35249ac_ext=cpp
35250ac_cpp='$CXXCPP $CPPFLAGS'
35251ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35252ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35253ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35254
35255
35256
35257  COMPILER_NAME=C++
35258  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35259
35260  if test "x$CXX" != x; then
35261    # User has supplied compiler name already, always let that override.
35262    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35263$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35264    if test "x`basename $CXX`" = "x$CXX"; then
35265      # A command without a complete path is provided, search $PATH.
35266
35267      for ac_prog in $CXX
35268do
35269  # Extract the first word of "$ac_prog", so it can be a program name with args.
35270set dummy $ac_prog; ac_word=$2
35271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35272$as_echo_n "checking for $ac_word... " >&6; }
35273if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35274  $as_echo_n "(cached) " >&6
35275else
35276  case $POTENTIAL_CXX in
35277  [\\/]* | ?:[\\/]*)
35278  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35279  ;;
35280  *)
35281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35282for as_dir in $PATH
35283do
35284  IFS=$as_save_IFS
35285  test -z "$as_dir" && as_dir=.
35286    for ac_exec_ext in '' $ac_executable_extensions; do
35287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35288    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35290    break 2
35291  fi
35292done
35293  done
35294IFS=$as_save_IFS
35295
35296  ;;
35297esac
35298fi
35299POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35300if test -n "$POTENTIAL_CXX"; then
35301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35302$as_echo "$POTENTIAL_CXX" >&6; }
35303else
35304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35305$as_echo "no" >&6; }
35306fi
35307
35308
35309  test -n "$POTENTIAL_CXX" && break
35310done
35311
35312      if test "x$POTENTIAL_CXX" != x; then
35313        CXX=$POTENTIAL_CXX
35314      else
35315        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35316      fi
35317    else
35318      # Otherwise it might already be a complete path
35319      if test ! -x "$CXX"; then
35320        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35321      fi
35322    fi
35323  else
35324    # No user supplied value. Locate compiler ourselves.
35325
35326    # If we are cross compiling, assume cross compilation tools follows the
35327    # cross compilation standard where they are prefixed with the autoconf
35328    # standard name for the target. For example the binary
35329    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35330    # If we are not cross compiling, then the default compiler name will be
35331    # used.
35332
35333    CXX=
35334    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35335    # before checking the rest of the PATH.
35336    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35337    # step, this should not be necessary.
35338    if test -n "$TOOLCHAIN_PATH"; then
35339      PATH_save="$PATH"
35340      PATH="$TOOLCHAIN_PATH"
35341      if test -n "$ac_tool_prefix"; then
35342  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35343set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35345$as_echo_n "checking for $ac_word... " >&6; }
35346if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35347  $as_echo_n "(cached) " >&6
35348else
35349  case $TOOLCHAIN_PATH_CXX in
35350  [\\/]* | ?:[\\/]*)
35351  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35352  ;;
35353  *)
35354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35355for as_dir in $PATH
35356do
35357  IFS=$as_save_IFS
35358  test -z "$as_dir" && as_dir=.
35359    for ac_exec_ext in '' $ac_executable_extensions; do
35360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35361    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35363    break 2
35364  fi
35365done
35366  done
35367IFS=$as_save_IFS
35368
35369  ;;
35370esac
35371fi
35372TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35373if test -n "$TOOLCHAIN_PATH_CXX"; then
35374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35375$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35376else
35377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35378$as_echo "no" >&6; }
35379fi
35380
35381
35382fi
35383if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35384  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35385  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35386set dummy $SEARCH_LIST; ac_word=$2
35387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35388$as_echo_n "checking for $ac_word... " >&6; }
35389if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35390  $as_echo_n "(cached) " >&6
35391else
35392  case $ac_pt_TOOLCHAIN_PATH_CXX in
35393  [\\/]* | ?:[\\/]*)
35394  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35395  ;;
35396  *)
35397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35398for as_dir in $PATH
35399do
35400  IFS=$as_save_IFS
35401  test -z "$as_dir" && as_dir=.
35402    for ac_exec_ext in '' $ac_executable_extensions; do
35403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35404    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35406    break 2
35407  fi
35408done
35409  done
35410IFS=$as_save_IFS
35411
35412  ;;
35413esac
35414fi
35415ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35416if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35418$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35419else
35420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35421$as_echo "no" >&6; }
35422fi
35423
35424  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35425    TOOLCHAIN_PATH_CXX=""
35426  else
35427    case $cross_compiling:$ac_tool_warned in
35428yes:)
35429{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35430$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35431ac_tool_warned=yes ;;
35432esac
35433    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35434  fi
35435else
35436  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35437fi
35438
35439      CXX=$TOOLCHAIN_PATH_CXX
35440      PATH="$PATH_save"
35441    fi
35442
35443    # AC_PATH_TOOL can't be run multiple times with the same variable,
35444    # so create a new name for this run.
35445    if test "x$CXX" = x; then
35446      if test -n "$ac_tool_prefix"; then
35447  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35448set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35450$as_echo_n "checking for $ac_word... " >&6; }
35451if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35452  $as_echo_n "(cached) " >&6
35453else
35454  case $POTENTIAL_CXX in
35455  [\\/]* | ?:[\\/]*)
35456  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35457  ;;
35458  *)
35459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35460for as_dir in $PATH
35461do
35462  IFS=$as_save_IFS
35463  test -z "$as_dir" && as_dir=.
35464    for ac_exec_ext in '' $ac_executable_extensions; do
35465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35466    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35468    break 2
35469  fi
35470done
35471  done
35472IFS=$as_save_IFS
35473
35474  ;;
35475esac
35476fi
35477POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35478if test -n "$POTENTIAL_CXX"; then
35479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35480$as_echo "$POTENTIAL_CXX" >&6; }
35481else
35482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35483$as_echo "no" >&6; }
35484fi
35485
35486
35487fi
35488if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35489  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35490  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35491set dummy $SEARCH_LIST; ac_word=$2
35492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35493$as_echo_n "checking for $ac_word... " >&6; }
35494if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35495  $as_echo_n "(cached) " >&6
35496else
35497  case $ac_pt_POTENTIAL_CXX in
35498  [\\/]* | ?:[\\/]*)
35499  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35500  ;;
35501  *)
35502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35503for as_dir in $PATH
35504do
35505  IFS=$as_save_IFS
35506  test -z "$as_dir" && as_dir=.
35507    for ac_exec_ext in '' $ac_executable_extensions; do
35508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35509    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35511    break 2
35512  fi
35513done
35514  done
35515IFS=$as_save_IFS
35516
35517  ;;
35518esac
35519fi
35520ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35521if test -n "$ac_pt_POTENTIAL_CXX"; then
35522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35523$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35524else
35525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35526$as_echo "no" >&6; }
35527fi
35528
35529  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35530    POTENTIAL_CXX=""
35531  else
35532    case $cross_compiling:$ac_tool_warned in
35533yes:)
35534{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35535$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35536ac_tool_warned=yes ;;
35537esac
35538    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35539  fi
35540else
35541  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35542fi
35543
35544      CXX=$POTENTIAL_CXX
35545    fi
35546
35547    if test "x$CXX" = x; then
35548
35549  # Print a helpful message on how to acquire the necessary build dependency.
35550  # devkit is the help tag: freetype, cups, alsa etc
35551  MISSING_DEPENDENCY=devkit
35552
35553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35554    cygwin_help $MISSING_DEPENDENCY
35555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35556    msys_help $MISSING_DEPENDENCY
35557  else
35558    PKGHANDLER_COMMAND=
35559
35560    case $PKGHANDLER in
35561      apt-get)
35562        apt_help     $MISSING_DEPENDENCY ;;
35563      yum)
35564        yum_help     $MISSING_DEPENDENCY ;;
35565      brew)
35566        brew_help    $MISSING_DEPENDENCY ;;
35567      port)
35568        port_help    $MISSING_DEPENDENCY ;;
35569      pkgutil)
35570        pkgutil_help $MISSING_DEPENDENCY ;;
35571      pkgadd)
35572        pkgadd_help  $MISSING_DEPENDENCY ;;
35573    esac
35574
35575    if test "x$PKGHANDLER_COMMAND" != x; then
35576      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35577    fi
35578  fi
35579
35580      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35581    fi
35582  fi
35583
35584  # Now we have a compiler binary in CXX. Make sure it's okay.
35585
35586  # Only process if variable expands to non-empty
35587
35588  if test "x$CXX" != x; then
35589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35590
35591  # First separate the path from the arguments. This will split at the first
35592  # space.
35593  complete="$CXX"
35594  path="${complete%% *}"
35595  tmp="$complete EOL"
35596  arguments="${tmp#* }"
35597
35598  # Input might be given as Windows format, start by converting to
35599  # unix format.
35600  new_path=`$CYGPATH -u "$path"`
35601
35602  # Now try to locate executable using which
35603  new_path=`$WHICH "$new_path" 2> /dev/null`
35604  # bat and cmd files are not always considered executable in cygwin causing which
35605  # to not find them
35606  if test "x$new_path" = x \
35607      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35608      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35609    new_path=`$CYGPATH -u "$path"`
35610  fi
35611  if test "x$new_path" = x; then
35612    # Oops. Which didn't find the executable.
35613    # The splitting of arguments from the executable at a space might have been incorrect,
35614    # since paths with space are more likely in Windows. Give it another try with the whole
35615    # argument.
35616    path="$complete"
35617    arguments="EOL"
35618    new_path=`$CYGPATH -u "$path"`
35619    new_path=`$WHICH "$new_path" 2> /dev/null`
35620    # bat and cmd files are not always considered executable in cygwin causing which
35621    # to not find them
35622    if test "x$new_path" = x \
35623        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35624        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35625      new_path=`$CYGPATH -u "$path"`
35626    fi
35627    if test "x$new_path" = x; then
35628      # It's still not found. Now this is an unrecoverable error.
35629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35630$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35631      has_space=`$ECHO "$complete" | $GREP " "`
35632      if test "x$has_space" != x; then
35633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35635      fi
35636      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35637    fi
35638  fi
35639
35640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35643  # "foo.exe" is OK but "foo" is an error.
35644  #
35645  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35646  # It is also a way to make sure we got the proper file name for the real test later on.
35647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35648  if test "x$test_shortpath" = x; then
35649    # Short path failed, file does not exist as specified.
35650    # Try adding .exe or .cmd
35651    if test -f "${new_path}.exe"; then
35652      input_to_shortpath="${new_path}.exe"
35653    elif test -f "${new_path}.cmd"; then
35654      input_to_shortpath="${new_path}.cmd"
35655    else
35656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35657$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35658      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35659$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35660      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35661    fi
35662  else
35663    input_to_shortpath="$new_path"
35664  fi
35665
35666  # Call helper function which possibly converts this using DOS-style short mode.
35667  # If so, the updated path is stored in $new_path.
35668  new_path="$input_to_shortpath"
35669
35670  input_path="$input_to_shortpath"
35671  # Check if we need to convert this using DOS-style short mode. If the path
35672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35673  # take no chances and rewrite it.
35674  # Note: m4 eats our [], so we need to use [ and ] instead.
35675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35676  if test "x$has_forbidden_chars" != x; then
35677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35681      # Going to short mode and back again did indeed matter. Since short mode is
35682      # case insensitive, let's make it lowercase to improve readability.
35683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35684      # Now convert it back to Unix-style (cygpath)
35685      input_path=`$CYGPATH -u "$shortmode_path"`
35686      new_path="$input_path"
35687    fi
35688  fi
35689
35690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35691  if test "x$test_cygdrive_prefix" = x; then
35692    # As a simple fix, exclude /usr/bin since it's not a real path.
35693    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35695      # a path prefixed by /cygdrive for fixpath to work.
35696      new_path="$CYGWIN_ROOT_PATH$input_path"
35697    fi
35698  fi
35699
35700  # remove trailing .exe if any
35701  new_path="${new_path/%.exe/}"
35702
35703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35704
35705  # First separate the path from the arguments. This will split at the first
35706  # space.
35707  complete="$CXX"
35708  path="${complete%% *}"
35709  tmp="$complete EOL"
35710  arguments="${tmp#* }"
35711
35712  # Input might be given as Windows format, start by converting to
35713  # unix format.
35714  new_path="$path"
35715
35716  windows_path="$new_path"
35717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35718    unix_path=`$CYGPATH -u "$windows_path"`
35719    new_path="$unix_path"
35720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35722    new_path="$unix_path"
35723  fi
35724
35725
35726  # Now try to locate executable using which
35727  new_path=`$WHICH "$new_path" 2> /dev/null`
35728
35729  if test "x$new_path" = x; then
35730    # Oops. Which didn't find the executable.
35731    # The splitting of arguments from the executable at a space might have been incorrect,
35732    # since paths with space are more likely in Windows. Give it another try with the whole
35733    # argument.
35734    path="$complete"
35735    arguments="EOL"
35736    new_path="$path"
35737
35738  windows_path="$new_path"
35739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35740    unix_path=`$CYGPATH -u "$windows_path"`
35741    new_path="$unix_path"
35742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35744    new_path="$unix_path"
35745  fi
35746
35747
35748    new_path=`$WHICH "$new_path" 2> /dev/null`
35749    # bat and cmd files are not always considered executable in MSYS causing which
35750    # to not find them
35751    if test "x$new_path" = x \
35752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35754      new_path="$path"
35755
35756  windows_path="$new_path"
35757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35758    unix_path=`$CYGPATH -u "$windows_path"`
35759    new_path="$unix_path"
35760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35762    new_path="$unix_path"
35763  fi
35764
35765    fi
35766
35767    if test "x$new_path" = x; then
35768      # It's still not found. Now this is an unrecoverable error.
35769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35770$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35771      has_space=`$ECHO "$complete" | $GREP " "`
35772      if test "x$has_space" != x; then
35773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35775      fi
35776      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35777    fi
35778  fi
35779
35780  # Now new_path has a complete unix path to the binary
35781  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35782    # Keep paths in /bin as-is, but remove trailing .exe if any
35783    new_path="${new_path/%.exe/}"
35784    # Do not save /bin paths to all_fixpath_prefixes!
35785  else
35786    # Not in mixed or Windows style, start by that.
35787    new_path=`cmd //c echo $new_path`
35788
35789  input_path="$new_path"
35790  # Check if we need to convert this using DOS-style short mode. If the path
35791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35792  # take no chances and rewrite it.
35793  # Note: m4 eats our [], so we need to use [ and ] instead.
35794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35795  if test "x$has_forbidden_chars" != x; then
35796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35798  fi
35799
35800    # Output is in $new_path
35801
35802  windows_path="$new_path"
35803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35804    unix_path=`$CYGPATH -u "$windows_path"`
35805    new_path="$unix_path"
35806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35808    new_path="$unix_path"
35809  fi
35810
35811    # remove trailing .exe if any
35812    new_path="${new_path/%.exe/}"
35813
35814    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35815    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35816  fi
35817
35818    else
35819      # We're on a unix platform. Hooray! :)
35820      # First separate the path from the arguments. This will split at the first
35821      # space.
35822      complete="$CXX"
35823      path="${complete%% *}"
35824      tmp="$complete EOL"
35825      arguments="${tmp#* }"
35826
35827      # Cannot rely on the command "which" here since it doesn't always work.
35828      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35829      if test -z "$is_absolute_path"; then
35830        # Path to executable is not absolute. Find it.
35831        IFS_save="$IFS"
35832        IFS=:
35833        for p in $PATH; do
35834          if test -f "$p/$path" && test -x "$p/$path"; then
35835            new_path="$p/$path"
35836            break
35837          fi
35838        done
35839        IFS="$IFS_save"
35840      else
35841        # This is an absolute path, we can use it without further modifications.
35842        new_path="$path"
35843      fi
35844
35845      if test "x$new_path" = x; then
35846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35847$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35848        has_space=`$ECHO "$complete" | $GREP " "`
35849        if test "x$has_space" != x; then
35850          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35851$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35852        fi
35853        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35854      fi
35855    fi
35856
35857    # Now join together the path and the arguments once again
35858    if test "x$arguments" != xEOL; then
35859      new_complete="$new_path ${arguments% *}"
35860    else
35861      new_complete="$new_path"
35862    fi
35863
35864    if test "x$complete" != "x$new_complete"; then
35865      CXX="$new_complete"
35866      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35867$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35868    fi
35869  fi
35870
35871  TEST_COMPILER="$CXX"
35872
35873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35874$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35875  SYMLINK_ORIGINAL="$TEST_COMPILER"
35876
35877  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35878    # Follow a chain of symbolic links. Use readlink
35879    # where it exists, else fall back to horribly
35880    # complicated shell code.
35881    if test "x$READLINK_TESTED" != yes; then
35882      # On MacOSX there is a readlink tool with a different
35883      # purpose than the GNU readlink tool. Check the found readlink.
35884      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35885      if test "x$ISGNU" = x; then
35886        # A readlink that we do not know how to use.
35887        # Are there other non-GNU readlinks out there?
35888        READLINK_TESTED=yes
35889        READLINK=
35890      fi
35891    fi
35892
35893    if test "x$READLINK" != x; then
35894      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35895    else
35896      # Save the current directory for restoring afterwards
35897      STARTDIR=$PWD
35898      COUNTER=0
35899      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35900      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35901      cd $sym_link_dir
35902      # Use -P flag to resolve symlinks in directories.
35903      cd `$THEPWDCMD -P`
35904      sym_link_dir=`$THEPWDCMD -P`
35905      # Resolve file symlinks
35906      while test $COUNTER -lt 20; do
35907        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35908        if test "x$ISLINK" == x; then
35909          # This is not a symbolic link! We are done!
35910          break
35911        fi
35912        # Again resolve directory symlinks since the target of the just found
35913        # link could be in a different directory
35914        cd `$DIRNAME $ISLINK`
35915        sym_link_dir=`$THEPWDCMD -P`
35916        sym_link_file=`$BASENAME $ISLINK`
35917        let COUNTER=COUNTER+1
35918      done
35919      cd $STARTDIR
35920      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35921    fi
35922  fi
35923
35924  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35926$as_echo "no symlink" >&6; }
35927  else
35928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35929$as_echo "$SYMLINK_ORIGINAL" >&6; }
35930
35931    # We can't handle ccache by gcc wrappers, since we need to know if we're
35932    # using ccache. Instead ccache usage must be controlled by a configure option.
35933    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35934    if test "x$COMPILER_BASENAME" = "xccache"; then
35935      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35936$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35937      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35938    fi
35939  fi
35940
35941
35942  COMPILER=$CXX
35943  COMPILER_NAME=$COMPILER_NAME
35944
35945  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35946    # cc -V output typically looks like
35947    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35948    # or
35949    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35950    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35951    # Check that this is likely to be the Solaris Studio cc.
35952    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35953    if test $? -ne 0; then
35954      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35955      { $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
35956$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35957      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35958$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35959      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35960$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35961      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35962    fi
35963    # Remove usage instructions (if present), and
35964    # collapse compiler output into a single line
35965    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35966        $SED -e 's/ *[Uu]sage:.*//'`
35967    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35968        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35969  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35970    # xlc -qversion output typically looks like
35971    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35972    #     Version: 11.01.0000.0015
35973    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35974    # Check that this is likely to be the IBM XL C compiler.
35975    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35976    if test $? -ne 0; then
35977      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35978      { $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
35979$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35980      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35981$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35982      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35983$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35984      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35985    fi
35986    # Collapse compiler output into a single line
35987    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35988    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35989        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35990  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35991    # There is no specific version flag, but all output starts with a version string.
35992    # First line typically looks something like:
35993    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35994    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35995    # Check that this is likely to be Microsoft CL.EXE.
35996    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35997    if test $? -ne 0; then
35998      { $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
35999$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36000      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
36001$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
36002      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36003    fi
36004    # Collapse compiler output into a single line
36005    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
36006    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36007        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
36008  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
36009    # gcc --version output typically looks like
36010    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
36011    #     Copyright (C) 2013 Free Software Foundation, Inc.
36012    #     This is free software; see the source for copying conditions.  There is NO
36013    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36014    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
36015    # Check that this is likely to be GCC.
36016    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
36017    if test $? -ne 0; then
36018      { $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
36019$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36020      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
36021$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
36022      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36023    fi
36024    # Remove Copyright and legalese from version string, and
36025    # collapse into a single line
36026    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
36027        $SED -e 's/ *Copyright .*//'`
36028    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36029        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
36030  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
36031    # clang --version output typically looks like
36032    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
36033    #    clang version 3.3 (tags/RELEASE_33/final)
36034    # or
36035    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
36036    #    Target: x86_64-pc-linux-gnu
36037    #    Thread model: posix
36038    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
36039    # Check that this is likely to be clang
36040    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
36041    if test $? -ne 0; then
36042      { $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
36043$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36044      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
36045$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
36046      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36047    fi
36048    # Collapse compiler output into a single line
36049    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
36050    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36051        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
36052  else
36053      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
36054  fi
36055  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
36056  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
36057  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
36058  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
36059
36060  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
36061$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
36062
36063
36064  # Now that we have resolved CXX ourself, let autoconf have its go at it
36065  ac_ext=cpp
36066ac_cpp='$CXXCPP $CPPFLAGS'
36067ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36068ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36069ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36070if test -z "$CXX"; then
36071  if test -n "$CCC"; then
36072    CXX=$CCC
36073  else
36074    if test -n "$ac_tool_prefix"; then
36075  for ac_prog in $CXX
36076  do
36077    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36078set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36080$as_echo_n "checking for $ac_word... " >&6; }
36081if ${ac_cv_prog_CXX+:} false; then :
36082  $as_echo_n "(cached) " >&6
36083else
36084  if test -n "$CXX"; then
36085  ac_cv_prog_CXX="$CXX" # Let the user override the test.
36086else
36087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36088for as_dir in $PATH
36089do
36090  IFS=$as_save_IFS
36091  test -z "$as_dir" && as_dir=.
36092    for ac_exec_ext in '' $ac_executable_extensions; do
36093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36094    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
36095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36096    break 2
36097  fi
36098done
36099  done
36100IFS=$as_save_IFS
36101
36102fi
36103fi
36104CXX=$ac_cv_prog_CXX
36105if test -n "$CXX"; then
36106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
36107$as_echo "$CXX" >&6; }
36108else
36109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36110$as_echo "no" >&6; }
36111fi
36112
36113
36114    test -n "$CXX" && break
36115  done
36116fi
36117if test -z "$CXX"; then
36118  ac_ct_CXX=$CXX
36119  for ac_prog in $CXX
36120do
36121  # Extract the first word of "$ac_prog", so it can be a program name with args.
36122set dummy $ac_prog; ac_word=$2
36123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36124$as_echo_n "checking for $ac_word... " >&6; }
36125if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36126  $as_echo_n "(cached) " >&6
36127else
36128  if test -n "$ac_ct_CXX"; then
36129  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36130else
36131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36132for as_dir in $PATH
36133do
36134  IFS=$as_save_IFS
36135  test -z "$as_dir" && as_dir=.
36136    for ac_exec_ext in '' $ac_executable_extensions; do
36137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36138    ac_cv_prog_ac_ct_CXX="$ac_prog"
36139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36140    break 2
36141  fi
36142done
36143  done
36144IFS=$as_save_IFS
36145
36146fi
36147fi
36148ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36149if test -n "$ac_ct_CXX"; then
36150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36151$as_echo "$ac_ct_CXX" >&6; }
36152else
36153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36154$as_echo "no" >&6; }
36155fi
36156
36157
36158  test -n "$ac_ct_CXX" && break
36159done
36160
36161  if test "x$ac_ct_CXX" = x; then
36162    CXX="g++"
36163  else
36164    case $cross_compiling:$ac_tool_warned in
36165yes:)
36166{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36167$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36168ac_tool_warned=yes ;;
36169esac
36170    CXX=$ac_ct_CXX
36171  fi
36172fi
36173
36174  fi
36175fi
36176# Provide some information about the compiler.
36177$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36178set X $ac_compile
36179ac_compiler=$2
36180for ac_option in --version -v -V -qversion; do
36181  { { ac_try="$ac_compiler $ac_option >&5"
36182case "(($ac_try" in
36183  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36184  *) ac_try_echo=$ac_try;;
36185esac
36186eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36187$as_echo "$ac_try_echo"; } >&5
36188  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36189  ac_status=$?
36190  if test -s conftest.err; then
36191    sed '10a\
36192... rest of stderr output deleted ...
36193         10q' conftest.err >conftest.er1
36194    cat conftest.er1 >&5
36195  fi
36196  rm -f conftest.er1 conftest.err
36197  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36198  test $ac_status = 0; }
36199done
36200
36201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36202$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36203if ${ac_cv_cxx_compiler_gnu+:} false; then :
36204  $as_echo_n "(cached) " >&6
36205else
36206  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36207/* end confdefs.h.  */
36208
36209int
36210main ()
36211{
36212#ifndef __GNUC__
36213       choke me
36214#endif
36215
36216  ;
36217  return 0;
36218}
36219_ACEOF
36220if ac_fn_cxx_try_compile "$LINENO"; then :
36221  ac_compiler_gnu=yes
36222else
36223  ac_compiler_gnu=no
36224fi
36225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36226ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36227
36228fi
36229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36230$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36231if test $ac_compiler_gnu = yes; then
36232  GXX=yes
36233else
36234  GXX=
36235fi
36236ac_test_CXXFLAGS=${CXXFLAGS+set}
36237ac_save_CXXFLAGS=$CXXFLAGS
36238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36239$as_echo_n "checking whether $CXX accepts -g... " >&6; }
36240if ${ac_cv_prog_cxx_g+:} false; then :
36241  $as_echo_n "(cached) " >&6
36242else
36243  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36244   ac_cxx_werror_flag=yes
36245   ac_cv_prog_cxx_g=no
36246   CXXFLAGS="-g"
36247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36248/* end confdefs.h.  */
36249
36250int
36251main ()
36252{
36253
36254  ;
36255  return 0;
36256}
36257_ACEOF
36258if ac_fn_cxx_try_compile "$LINENO"; then :
36259  ac_cv_prog_cxx_g=yes
36260else
36261  CXXFLAGS=""
36262      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36263/* end confdefs.h.  */
36264
36265int
36266main ()
36267{
36268
36269  ;
36270  return 0;
36271}
36272_ACEOF
36273if ac_fn_cxx_try_compile "$LINENO"; then :
36274
36275else
36276  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36277	 CXXFLAGS="-g"
36278	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36279/* end confdefs.h.  */
36280
36281int
36282main ()
36283{
36284
36285  ;
36286  return 0;
36287}
36288_ACEOF
36289if ac_fn_cxx_try_compile "$LINENO"; then :
36290  ac_cv_prog_cxx_g=yes
36291fi
36292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36293fi
36294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36295fi
36296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36297   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36298fi
36299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36300$as_echo "$ac_cv_prog_cxx_g" >&6; }
36301if test "$ac_test_CXXFLAGS" = set; then
36302  CXXFLAGS=$ac_save_CXXFLAGS
36303elif test $ac_cv_prog_cxx_g = yes; then
36304  if test "$GXX" = yes; then
36305    CXXFLAGS="-g -O2"
36306  else
36307    CXXFLAGS="-g"
36308  fi
36309else
36310  if test "$GXX" = yes; then
36311    CXXFLAGS="-O2"
36312  else
36313    CXXFLAGS=
36314  fi
36315fi
36316ac_ext=cpp
36317ac_cpp='$CXXCPP $CPPFLAGS'
36318ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36319ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36320ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36321
36322
36323  # This is the compiler version number on the form X.Y[.Z]
36324
36325
36326
36327
36328  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36329    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36330$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36331    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36332$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36333  fi
36334
36335  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36336  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36337    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36338$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36339  fi
36340
36341  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36342    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36343$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36344  fi
36345
36346  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36347
36348
36349  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36350
36351
36352
36353
36354
36355
36356
36357
36358
36359
36360
36361
36362
36363
36364
36365
36366
36367
36368
36369
36370
36371
36372
36373
36374
36375
36376
36377
36378
36379
36380
36381
36382
36383
36384
36385
36386
36387
36388
36389
36390
36391
36392
36393
36394
36395
36396
36397
36398
36399    # Execute function body
36400
36401  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36402  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36403
36404  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36405    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36406  fi
36407
36408  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36409    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36410  fi
36411
36412  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36413  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36414
36415  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36416    :
36417
36418  else
36419    :
36420
36421          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
36422$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36423
36424
36425  fi
36426
36427
36428
36429
36430
36431
36432
36433
36434
36435
36436
36437
36438
36439
36440  fi
36441
36442  #
36443  # Setup the preprocessor (CPP and CXXCPP)
36444  #
36445  ac_ext=c
36446ac_cpp='$CPP $CPPFLAGS'
36447ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36448ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36449ac_compiler_gnu=$ac_cv_c_compiler_gnu
36450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36451$as_echo_n "checking how to run the C preprocessor... " >&6; }
36452# On Suns, sometimes $CPP names a directory.
36453if test -n "$CPP" && test -d "$CPP"; then
36454  CPP=
36455fi
36456if test -z "$CPP"; then
36457  if ${ac_cv_prog_CPP+:} false; then :
36458  $as_echo_n "(cached) " >&6
36459else
36460      # Double quotes because CPP needs to be expanded
36461    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36462    do
36463      ac_preproc_ok=false
36464for ac_c_preproc_warn_flag in '' yes
36465do
36466  # Use a header file that comes with gcc, so configuring glibc
36467  # with a fresh cross-compiler works.
36468  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36469  # <limits.h> exists even on freestanding compilers.
36470  # On the NeXT, cc -E runs the code through the compiler's parser,
36471  # not just through cpp. "Syntax error" is here to catch this case.
36472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36473/* end confdefs.h.  */
36474#ifdef __STDC__
36475# include <limits.h>
36476#else
36477# include <assert.h>
36478#endif
36479		     Syntax error
36480_ACEOF
36481if ac_fn_c_try_cpp "$LINENO"; then :
36482
36483else
36484  # Broken: fails on valid input.
36485continue
36486fi
36487rm -f conftest.err conftest.i conftest.$ac_ext
36488
36489  # OK, works on sane cases.  Now check whether nonexistent headers
36490  # can be detected and how.
36491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36492/* end confdefs.h.  */
36493#include <ac_nonexistent.h>
36494_ACEOF
36495if ac_fn_c_try_cpp "$LINENO"; then :
36496  # Broken: success on invalid input.
36497continue
36498else
36499  # Passes both tests.
36500ac_preproc_ok=:
36501break
36502fi
36503rm -f conftest.err conftest.i conftest.$ac_ext
36504
36505done
36506# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36507rm -f conftest.i conftest.err conftest.$ac_ext
36508if $ac_preproc_ok; then :
36509  break
36510fi
36511
36512    done
36513    ac_cv_prog_CPP=$CPP
36514
36515fi
36516  CPP=$ac_cv_prog_CPP
36517else
36518  ac_cv_prog_CPP=$CPP
36519fi
36520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36521$as_echo "$CPP" >&6; }
36522ac_preproc_ok=false
36523for ac_c_preproc_warn_flag in '' yes
36524do
36525  # Use a header file that comes with gcc, so configuring glibc
36526  # with a fresh cross-compiler works.
36527  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36528  # <limits.h> exists even on freestanding compilers.
36529  # On the NeXT, cc -E runs the code through the compiler's parser,
36530  # not just through cpp. "Syntax error" is here to catch this case.
36531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36532/* end confdefs.h.  */
36533#ifdef __STDC__
36534# include <limits.h>
36535#else
36536# include <assert.h>
36537#endif
36538		     Syntax error
36539_ACEOF
36540if ac_fn_c_try_cpp "$LINENO"; then :
36541
36542else
36543  # Broken: fails on valid input.
36544continue
36545fi
36546rm -f conftest.err conftest.i conftest.$ac_ext
36547
36548  # OK, works on sane cases.  Now check whether nonexistent headers
36549  # can be detected and how.
36550  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36551/* end confdefs.h.  */
36552#include <ac_nonexistent.h>
36553_ACEOF
36554if ac_fn_c_try_cpp "$LINENO"; then :
36555  # Broken: success on invalid input.
36556continue
36557else
36558  # Passes both tests.
36559ac_preproc_ok=:
36560break
36561fi
36562rm -f conftest.err conftest.i conftest.$ac_ext
36563
36564done
36565# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36566rm -f conftest.i conftest.err conftest.$ac_ext
36567if $ac_preproc_ok; then :
36568
36569else
36570  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36571$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36572as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36573See \`config.log' for more details" "$LINENO" 5; }
36574fi
36575
36576ac_ext=cpp
36577ac_cpp='$CXXCPP $CPPFLAGS'
36578ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36579ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36580ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36581
36582
36583  # Only process if variable expands to non-empty
36584
36585  if test "x$CPP" != x; then
36586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36587
36588  # First separate the path from the arguments. This will split at the first
36589  # space.
36590  complete="$CPP"
36591  path="${complete%% *}"
36592  tmp="$complete EOL"
36593  arguments="${tmp#* }"
36594
36595  # Input might be given as Windows format, start by converting to
36596  # unix format.
36597  new_path=`$CYGPATH -u "$path"`
36598
36599  # Now try to locate executable using which
36600  new_path=`$WHICH "$new_path" 2> /dev/null`
36601  # bat and cmd files are not always considered executable in cygwin causing which
36602  # to not find them
36603  if test "x$new_path" = x \
36604      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36605      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36606    new_path=`$CYGPATH -u "$path"`
36607  fi
36608  if test "x$new_path" = x; then
36609    # Oops. Which didn't find the executable.
36610    # The splitting of arguments from the executable at a space might have been incorrect,
36611    # since paths with space are more likely in Windows. Give it another try with the whole
36612    # argument.
36613    path="$complete"
36614    arguments="EOL"
36615    new_path=`$CYGPATH -u "$path"`
36616    new_path=`$WHICH "$new_path" 2> /dev/null`
36617    # bat and cmd files are not always considered executable in cygwin causing which
36618    # to not find them
36619    if test "x$new_path" = x \
36620        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36621        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36622      new_path=`$CYGPATH -u "$path"`
36623    fi
36624    if test "x$new_path" = x; then
36625      # It's still not found. Now this is an unrecoverable error.
36626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36627$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36628      has_space=`$ECHO "$complete" | $GREP " "`
36629      if test "x$has_space" != x; then
36630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36632      fi
36633      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36634    fi
36635  fi
36636
36637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36640  # "foo.exe" is OK but "foo" is an error.
36641  #
36642  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36643  # It is also a way to make sure we got the proper file name for the real test later on.
36644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36645  if test "x$test_shortpath" = x; then
36646    # Short path failed, file does not exist as specified.
36647    # Try adding .exe or .cmd
36648    if test -f "${new_path}.exe"; then
36649      input_to_shortpath="${new_path}.exe"
36650    elif test -f "${new_path}.cmd"; then
36651      input_to_shortpath="${new_path}.cmd"
36652    else
36653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36654$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36655      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36656$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36657      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36658    fi
36659  else
36660    input_to_shortpath="$new_path"
36661  fi
36662
36663  # Call helper function which possibly converts this using DOS-style short mode.
36664  # If so, the updated path is stored in $new_path.
36665  new_path="$input_to_shortpath"
36666
36667  input_path="$input_to_shortpath"
36668  # Check if we need to convert this using DOS-style short mode. If the path
36669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36670  # take no chances and rewrite it.
36671  # Note: m4 eats our [], so we need to use [ and ] instead.
36672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36673  if test "x$has_forbidden_chars" != x; then
36674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36678      # Going to short mode and back again did indeed matter. Since short mode is
36679      # case insensitive, let's make it lowercase to improve readability.
36680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36681      # Now convert it back to Unix-style (cygpath)
36682      input_path=`$CYGPATH -u "$shortmode_path"`
36683      new_path="$input_path"
36684    fi
36685  fi
36686
36687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36688  if test "x$test_cygdrive_prefix" = x; then
36689    # As a simple fix, exclude /usr/bin since it's not a real path.
36690    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36692      # a path prefixed by /cygdrive for fixpath to work.
36693      new_path="$CYGWIN_ROOT_PATH$input_path"
36694    fi
36695  fi
36696
36697  # remove trailing .exe if any
36698  new_path="${new_path/%.exe/}"
36699
36700    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36701
36702  # First separate the path from the arguments. This will split at the first
36703  # space.
36704  complete="$CPP"
36705  path="${complete%% *}"
36706  tmp="$complete EOL"
36707  arguments="${tmp#* }"
36708
36709  # Input might be given as Windows format, start by converting to
36710  # unix format.
36711  new_path="$path"
36712
36713  windows_path="$new_path"
36714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36715    unix_path=`$CYGPATH -u "$windows_path"`
36716    new_path="$unix_path"
36717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36719    new_path="$unix_path"
36720  fi
36721
36722
36723  # Now try to locate executable using which
36724  new_path=`$WHICH "$new_path" 2> /dev/null`
36725
36726  if test "x$new_path" = x; then
36727    # Oops. Which didn't find the executable.
36728    # The splitting of arguments from the executable at a space might have been incorrect,
36729    # since paths with space are more likely in Windows. Give it another try with the whole
36730    # argument.
36731    path="$complete"
36732    arguments="EOL"
36733    new_path="$path"
36734
36735  windows_path="$new_path"
36736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36737    unix_path=`$CYGPATH -u "$windows_path"`
36738    new_path="$unix_path"
36739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36741    new_path="$unix_path"
36742  fi
36743
36744
36745    new_path=`$WHICH "$new_path" 2> /dev/null`
36746    # bat and cmd files are not always considered executable in MSYS causing which
36747    # to not find them
36748    if test "x$new_path" = x \
36749        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36750        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36751      new_path="$path"
36752
36753  windows_path="$new_path"
36754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36755    unix_path=`$CYGPATH -u "$windows_path"`
36756    new_path="$unix_path"
36757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36759    new_path="$unix_path"
36760  fi
36761
36762    fi
36763
36764    if test "x$new_path" = x; then
36765      # It's still not found. Now this is an unrecoverable error.
36766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36767$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36768      has_space=`$ECHO "$complete" | $GREP " "`
36769      if test "x$has_space" != x; then
36770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36772      fi
36773      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36774    fi
36775  fi
36776
36777  # Now new_path has a complete unix path to the binary
36778  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36779    # Keep paths in /bin as-is, but remove trailing .exe if any
36780    new_path="${new_path/%.exe/}"
36781    # Do not save /bin paths to all_fixpath_prefixes!
36782  else
36783    # Not in mixed or Windows style, start by that.
36784    new_path=`cmd //c echo $new_path`
36785
36786  input_path="$new_path"
36787  # Check if we need to convert this using DOS-style short mode. If the path
36788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36789  # take no chances and rewrite it.
36790  # Note: m4 eats our [], so we need to use [ and ] instead.
36791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36792  if test "x$has_forbidden_chars" != x; then
36793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36795  fi
36796
36797    # Output is in $new_path
36798
36799  windows_path="$new_path"
36800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36801    unix_path=`$CYGPATH -u "$windows_path"`
36802    new_path="$unix_path"
36803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36805    new_path="$unix_path"
36806  fi
36807
36808    # remove trailing .exe if any
36809    new_path="${new_path/%.exe/}"
36810
36811    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36812    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36813  fi
36814
36815    else
36816      # We're on a unix platform. Hooray! :)
36817      # First separate the path from the arguments. This will split at the first
36818      # space.
36819      complete="$CPP"
36820      path="${complete%% *}"
36821      tmp="$complete EOL"
36822      arguments="${tmp#* }"
36823
36824      # Cannot rely on the command "which" here since it doesn't always work.
36825      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36826      if test -z "$is_absolute_path"; then
36827        # Path to executable is not absolute. Find it.
36828        IFS_save="$IFS"
36829        IFS=:
36830        for p in $PATH; do
36831          if test -f "$p/$path" && test -x "$p/$path"; then
36832            new_path="$p/$path"
36833            break
36834          fi
36835        done
36836        IFS="$IFS_save"
36837      else
36838        # This is an absolute path, we can use it without further modifications.
36839        new_path="$path"
36840      fi
36841
36842      if test "x$new_path" = x; then
36843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36844$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36845        has_space=`$ECHO "$complete" | $GREP " "`
36846        if test "x$has_space" != x; then
36847          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36848$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36849        fi
36850        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36851      fi
36852    fi
36853
36854    # Now join together the path and the arguments once again
36855    if test "x$arguments" != xEOL; then
36856      new_complete="$new_path ${arguments% *}"
36857    else
36858      new_complete="$new_path"
36859    fi
36860
36861    if test "x$complete" != "x$new_complete"; then
36862      CPP="$new_complete"
36863      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36864$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36865    fi
36866  fi
36867
36868  ac_ext=cpp
36869ac_cpp='$CXXCPP $CPPFLAGS'
36870ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36871ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36872ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36874$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36875if test -z "$CXXCPP"; then
36876  if ${ac_cv_prog_CXXCPP+:} false; then :
36877  $as_echo_n "(cached) " >&6
36878else
36879      # Double quotes because CXXCPP needs to be expanded
36880    for CXXCPP in "$CXX -E" "/lib/cpp"
36881    do
36882      ac_preproc_ok=false
36883for ac_cxx_preproc_warn_flag in '' yes
36884do
36885  # Use a header file that comes with gcc, so configuring glibc
36886  # with a fresh cross-compiler works.
36887  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36888  # <limits.h> exists even on freestanding compilers.
36889  # On the NeXT, cc -E runs the code through the compiler's parser,
36890  # not just through cpp. "Syntax error" is here to catch this case.
36891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36892/* end confdefs.h.  */
36893#ifdef __STDC__
36894# include <limits.h>
36895#else
36896# include <assert.h>
36897#endif
36898		     Syntax error
36899_ACEOF
36900if ac_fn_cxx_try_cpp "$LINENO"; then :
36901
36902else
36903  # Broken: fails on valid input.
36904continue
36905fi
36906rm -f conftest.err conftest.i conftest.$ac_ext
36907
36908  # OK, works on sane cases.  Now check whether nonexistent headers
36909  # can be detected and how.
36910  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36911/* end confdefs.h.  */
36912#include <ac_nonexistent.h>
36913_ACEOF
36914if ac_fn_cxx_try_cpp "$LINENO"; then :
36915  # Broken: success on invalid input.
36916continue
36917else
36918  # Passes both tests.
36919ac_preproc_ok=:
36920break
36921fi
36922rm -f conftest.err conftest.i conftest.$ac_ext
36923
36924done
36925# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36926rm -f conftest.i conftest.err conftest.$ac_ext
36927if $ac_preproc_ok; then :
36928  break
36929fi
36930
36931    done
36932    ac_cv_prog_CXXCPP=$CXXCPP
36933
36934fi
36935  CXXCPP=$ac_cv_prog_CXXCPP
36936else
36937  ac_cv_prog_CXXCPP=$CXXCPP
36938fi
36939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36940$as_echo "$CXXCPP" >&6; }
36941ac_preproc_ok=false
36942for ac_cxx_preproc_warn_flag in '' yes
36943do
36944  # Use a header file that comes with gcc, so configuring glibc
36945  # with a fresh cross-compiler works.
36946  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36947  # <limits.h> exists even on freestanding compilers.
36948  # On the NeXT, cc -E runs the code through the compiler's parser,
36949  # not just through cpp. "Syntax error" is here to catch this case.
36950  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36951/* end confdefs.h.  */
36952#ifdef __STDC__
36953# include <limits.h>
36954#else
36955# include <assert.h>
36956#endif
36957		     Syntax error
36958_ACEOF
36959if ac_fn_cxx_try_cpp "$LINENO"; then :
36960
36961else
36962  # Broken: fails on valid input.
36963continue
36964fi
36965rm -f conftest.err conftest.i conftest.$ac_ext
36966
36967  # OK, works on sane cases.  Now check whether nonexistent headers
36968  # can be detected and how.
36969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36970/* end confdefs.h.  */
36971#include <ac_nonexistent.h>
36972_ACEOF
36973if ac_fn_cxx_try_cpp "$LINENO"; then :
36974  # Broken: success on invalid input.
36975continue
36976else
36977  # Passes both tests.
36978ac_preproc_ok=:
36979break
36980fi
36981rm -f conftest.err conftest.i conftest.$ac_ext
36982
36983done
36984# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36985rm -f conftest.i conftest.err conftest.$ac_ext
36986if $ac_preproc_ok; then :
36987
36988else
36989  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36991as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36992See \`config.log' for more details" "$LINENO" 5; }
36993fi
36994
36995ac_ext=cpp
36996ac_cpp='$CXXCPP $CPPFLAGS'
36997ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36998ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36999ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
37000
37001
37002  # Only process if variable expands to non-empty
37003
37004  if test "x$CXXCPP" != x; then
37005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37006
37007  # First separate the path from the arguments. This will split at the first
37008  # space.
37009  complete="$CXXCPP"
37010  path="${complete%% *}"
37011  tmp="$complete EOL"
37012  arguments="${tmp#* }"
37013
37014  # Input might be given as Windows format, start by converting to
37015  # unix format.
37016  new_path=`$CYGPATH -u "$path"`
37017
37018  # Now try to locate executable using which
37019  new_path=`$WHICH "$new_path" 2> /dev/null`
37020  # bat and cmd files are not always considered executable in cygwin causing which
37021  # to not find them
37022  if test "x$new_path" = x \
37023      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37024      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37025    new_path=`$CYGPATH -u "$path"`
37026  fi
37027  if test "x$new_path" = x; then
37028    # Oops. Which didn't find the executable.
37029    # The splitting of arguments from the executable at a space might have been incorrect,
37030    # since paths with space are more likely in Windows. Give it another try with the whole
37031    # argument.
37032    path="$complete"
37033    arguments="EOL"
37034    new_path=`$CYGPATH -u "$path"`
37035    new_path=`$WHICH "$new_path" 2> /dev/null`
37036    # bat and cmd files are not always considered executable in cygwin causing which
37037    # to not find them
37038    if test "x$new_path" = x \
37039        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37040        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37041      new_path=`$CYGPATH -u "$path"`
37042    fi
37043    if test "x$new_path" = x; then
37044      # It's still not found. Now this is an unrecoverable error.
37045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37046$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37047      has_space=`$ECHO "$complete" | $GREP " "`
37048      if test "x$has_space" != x; then
37049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37051      fi
37052      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37053    fi
37054  fi
37055
37056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37059  # "foo.exe" is OK but "foo" is an error.
37060  #
37061  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37062  # It is also a way to make sure we got the proper file name for the real test later on.
37063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37064  if test "x$test_shortpath" = x; then
37065    # Short path failed, file does not exist as specified.
37066    # Try adding .exe or .cmd
37067    if test -f "${new_path}.exe"; then
37068      input_to_shortpath="${new_path}.exe"
37069    elif test -f "${new_path}.cmd"; then
37070      input_to_shortpath="${new_path}.cmd"
37071    else
37072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
37073$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
37074      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37075$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37076      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37077    fi
37078  else
37079    input_to_shortpath="$new_path"
37080  fi
37081
37082  # Call helper function which possibly converts this using DOS-style short mode.
37083  # If so, the updated path is stored in $new_path.
37084  new_path="$input_to_shortpath"
37085
37086  input_path="$input_to_shortpath"
37087  # Check if we need to convert this using DOS-style short mode. If the path
37088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37089  # take no chances and rewrite it.
37090  # Note: m4 eats our [], so we need to use [ and ] instead.
37091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37092  if test "x$has_forbidden_chars" != x; then
37093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37097      # Going to short mode and back again did indeed matter. Since short mode is
37098      # case insensitive, let's make it lowercase to improve readability.
37099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37100      # Now convert it back to Unix-style (cygpath)
37101      input_path=`$CYGPATH -u "$shortmode_path"`
37102      new_path="$input_path"
37103    fi
37104  fi
37105
37106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37107  if test "x$test_cygdrive_prefix" = x; then
37108    # As a simple fix, exclude /usr/bin since it's not a real path.
37109    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37111      # a path prefixed by /cygdrive for fixpath to work.
37112      new_path="$CYGWIN_ROOT_PATH$input_path"
37113    fi
37114  fi
37115
37116  # remove trailing .exe if any
37117  new_path="${new_path/%.exe/}"
37118
37119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37120
37121  # First separate the path from the arguments. This will split at the first
37122  # space.
37123  complete="$CXXCPP"
37124  path="${complete%% *}"
37125  tmp="$complete EOL"
37126  arguments="${tmp#* }"
37127
37128  # Input might be given as Windows format, start by converting to
37129  # unix format.
37130  new_path="$path"
37131
37132  windows_path="$new_path"
37133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37134    unix_path=`$CYGPATH -u "$windows_path"`
37135    new_path="$unix_path"
37136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37138    new_path="$unix_path"
37139  fi
37140
37141
37142  # Now try to locate executable using which
37143  new_path=`$WHICH "$new_path" 2> /dev/null`
37144
37145  if test "x$new_path" = x; then
37146    # Oops. Which didn't find the executable.
37147    # The splitting of arguments from the executable at a space might have been incorrect,
37148    # since paths with space are more likely in Windows. Give it another try with the whole
37149    # argument.
37150    path="$complete"
37151    arguments="EOL"
37152    new_path="$path"
37153
37154  windows_path="$new_path"
37155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37156    unix_path=`$CYGPATH -u "$windows_path"`
37157    new_path="$unix_path"
37158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37160    new_path="$unix_path"
37161  fi
37162
37163
37164    new_path=`$WHICH "$new_path" 2> /dev/null`
37165    # bat and cmd files are not always considered executable in MSYS causing which
37166    # to not find them
37167    if test "x$new_path" = x \
37168        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37169        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37170      new_path="$path"
37171
37172  windows_path="$new_path"
37173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37174    unix_path=`$CYGPATH -u "$windows_path"`
37175    new_path="$unix_path"
37176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37178    new_path="$unix_path"
37179  fi
37180
37181    fi
37182
37183    if test "x$new_path" = x; then
37184      # It's still not found. Now this is an unrecoverable error.
37185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37186$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37187      has_space=`$ECHO "$complete" | $GREP " "`
37188      if test "x$has_space" != x; then
37189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37191      fi
37192      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37193    fi
37194  fi
37195
37196  # Now new_path has a complete unix path to the binary
37197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37198    # Keep paths in /bin as-is, but remove trailing .exe if any
37199    new_path="${new_path/%.exe/}"
37200    # Do not save /bin paths to all_fixpath_prefixes!
37201  else
37202    # Not in mixed or Windows style, start by that.
37203    new_path=`cmd //c echo $new_path`
37204
37205  input_path="$new_path"
37206  # Check if we need to convert this using DOS-style short mode. If the path
37207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37208  # take no chances and rewrite it.
37209  # Note: m4 eats our [], so we need to use [ and ] instead.
37210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37211  if test "x$has_forbidden_chars" != x; then
37212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37214  fi
37215
37216    # Output is in $new_path
37217
37218  windows_path="$new_path"
37219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37220    unix_path=`$CYGPATH -u "$windows_path"`
37221    new_path="$unix_path"
37222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37224    new_path="$unix_path"
37225  fi
37226
37227    # remove trailing .exe if any
37228    new_path="${new_path/%.exe/}"
37229
37230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37232  fi
37233
37234    else
37235      # We're on a unix platform. Hooray! :)
37236      # First separate the path from the arguments. This will split at the first
37237      # space.
37238      complete="$CXXCPP"
37239      path="${complete%% *}"
37240      tmp="$complete EOL"
37241      arguments="${tmp#* }"
37242
37243      # Cannot rely on the command "which" here since it doesn't always work.
37244      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37245      if test -z "$is_absolute_path"; then
37246        # Path to executable is not absolute. Find it.
37247        IFS_save="$IFS"
37248        IFS=:
37249        for p in $PATH; do
37250          if test -f "$p/$path" && test -x "$p/$path"; then
37251            new_path="$p/$path"
37252            break
37253          fi
37254        done
37255        IFS="$IFS_save"
37256      else
37257        # This is an absolute path, we can use it without further modifications.
37258        new_path="$path"
37259      fi
37260
37261      if test "x$new_path" = x; then
37262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37263$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37264        has_space=`$ECHO "$complete" | $GREP " "`
37265        if test "x$has_space" != x; then
37266          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37268        fi
37269        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37270      fi
37271    fi
37272
37273    # Now join together the path and the arguments once again
37274    if test "x$arguments" != xEOL; then
37275      new_complete="$new_path ${arguments% *}"
37276    else
37277      new_complete="$new_path"
37278    fi
37279
37280    if test "x$complete" != "x$new_complete"; then
37281      CXXCPP="$new_complete"
37282      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37283$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37284    fi
37285  fi
37286
37287
37288  #
37289  # Setup the linker (LD)
37290  #
37291  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37292    # In the Microsoft toolchain we have a separate LD command "link".
37293    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37294    # a cygwin program for something completely different.
37295    # Extract the first word of "link", so it can be a program name with args.
37296set dummy link; ac_word=$2
37297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37298$as_echo_n "checking for $ac_word... " >&6; }
37299if ${ac_cv_prog_LD+:} false; then :
37300  $as_echo_n "(cached) " >&6
37301else
37302  if test -n "$LD"; then
37303  ac_cv_prog_LD="$LD" # Let the user override the test.
37304else
37305  ac_prog_rejected=no
37306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37307for as_dir in $PATH
37308do
37309  IFS=$as_save_IFS
37310  test -z "$as_dir" && as_dir=.
37311    for ac_exec_ext in '' $ac_executable_extensions; do
37312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37313    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37314       ac_prog_rejected=yes
37315       continue
37316     fi
37317    ac_cv_prog_LD="link"
37318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37319    break 2
37320  fi
37321done
37322  done
37323IFS=$as_save_IFS
37324
37325if test $ac_prog_rejected = yes; then
37326  # We found a bogon in the path, so make sure we never use it.
37327  set dummy $ac_cv_prog_LD
37328  shift
37329  if test $# != 0; then
37330    # We chose a different compiler from the bogus one.
37331    # However, it has the same basename, so the bogon will be chosen
37332    # first if we set LD to just the basename; use the full file name.
37333    shift
37334    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37335  fi
37336fi
37337fi
37338fi
37339LD=$ac_cv_prog_LD
37340if test -n "$LD"; then
37341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37342$as_echo "$LD" >&6; }
37343else
37344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37345$as_echo "no" >&6; }
37346fi
37347
37348
37349
37350  # Only process if variable expands to non-empty
37351
37352  if test "x$LD" != x; then
37353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37354
37355  # First separate the path from the arguments. This will split at the first
37356  # space.
37357  complete="$LD"
37358  path="${complete%% *}"
37359  tmp="$complete EOL"
37360  arguments="${tmp#* }"
37361
37362  # Input might be given as Windows format, start by converting to
37363  # unix format.
37364  new_path=`$CYGPATH -u "$path"`
37365
37366  # Now try to locate executable using which
37367  new_path=`$WHICH "$new_path" 2> /dev/null`
37368  # bat and cmd files are not always considered executable in cygwin causing which
37369  # to not find them
37370  if test "x$new_path" = x \
37371      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37372      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37373    new_path=`$CYGPATH -u "$path"`
37374  fi
37375  if test "x$new_path" = x; then
37376    # Oops. Which didn't find the executable.
37377    # The splitting of arguments from the executable at a space might have been incorrect,
37378    # since paths with space are more likely in Windows. Give it another try with the whole
37379    # argument.
37380    path="$complete"
37381    arguments="EOL"
37382    new_path=`$CYGPATH -u "$path"`
37383    new_path=`$WHICH "$new_path" 2> /dev/null`
37384    # bat and cmd files are not always considered executable in cygwin causing which
37385    # to not find them
37386    if test "x$new_path" = x \
37387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37389      new_path=`$CYGPATH -u "$path"`
37390    fi
37391    if test "x$new_path" = x; then
37392      # It's still not found. Now this is an unrecoverable error.
37393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37394$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37395      has_space=`$ECHO "$complete" | $GREP " "`
37396      if test "x$has_space" != x; then
37397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37399      fi
37400      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37401    fi
37402  fi
37403
37404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37407  # "foo.exe" is OK but "foo" is an error.
37408  #
37409  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37410  # It is also a way to make sure we got the proper file name for the real test later on.
37411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37412  if test "x$test_shortpath" = x; then
37413    # Short path failed, file does not exist as specified.
37414    # Try adding .exe or .cmd
37415    if test -f "${new_path}.exe"; then
37416      input_to_shortpath="${new_path}.exe"
37417    elif test -f "${new_path}.cmd"; then
37418      input_to_shortpath="${new_path}.cmd"
37419    else
37420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37421$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37422      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37423$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37424      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37425    fi
37426  else
37427    input_to_shortpath="$new_path"
37428  fi
37429
37430  # Call helper function which possibly converts this using DOS-style short mode.
37431  # If so, the updated path is stored in $new_path.
37432  new_path="$input_to_shortpath"
37433
37434  input_path="$input_to_shortpath"
37435  # Check if we need to convert this using DOS-style short mode. If the path
37436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37437  # take no chances and rewrite it.
37438  # Note: m4 eats our [], so we need to use [ and ] instead.
37439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37440  if test "x$has_forbidden_chars" != x; then
37441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37445      # Going to short mode and back again did indeed matter. Since short mode is
37446      # case insensitive, let's make it lowercase to improve readability.
37447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37448      # Now convert it back to Unix-style (cygpath)
37449      input_path=`$CYGPATH -u "$shortmode_path"`
37450      new_path="$input_path"
37451    fi
37452  fi
37453
37454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37455  if test "x$test_cygdrive_prefix" = x; then
37456    # As a simple fix, exclude /usr/bin since it's not a real path.
37457    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37459      # a path prefixed by /cygdrive for fixpath to work.
37460      new_path="$CYGWIN_ROOT_PATH$input_path"
37461    fi
37462  fi
37463
37464  # remove trailing .exe if any
37465  new_path="${new_path/%.exe/}"
37466
37467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37468
37469  # First separate the path from the arguments. This will split at the first
37470  # space.
37471  complete="$LD"
37472  path="${complete%% *}"
37473  tmp="$complete EOL"
37474  arguments="${tmp#* }"
37475
37476  # Input might be given as Windows format, start by converting to
37477  # unix format.
37478  new_path="$path"
37479
37480  windows_path="$new_path"
37481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37482    unix_path=`$CYGPATH -u "$windows_path"`
37483    new_path="$unix_path"
37484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37486    new_path="$unix_path"
37487  fi
37488
37489
37490  # Now try to locate executable using which
37491  new_path=`$WHICH "$new_path" 2> /dev/null`
37492
37493  if test "x$new_path" = x; then
37494    # Oops. Which didn't find the executable.
37495    # The splitting of arguments from the executable at a space might have been incorrect,
37496    # since paths with space are more likely in Windows. Give it another try with the whole
37497    # argument.
37498    path="$complete"
37499    arguments="EOL"
37500    new_path="$path"
37501
37502  windows_path="$new_path"
37503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37504    unix_path=`$CYGPATH -u "$windows_path"`
37505    new_path="$unix_path"
37506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37508    new_path="$unix_path"
37509  fi
37510
37511
37512    new_path=`$WHICH "$new_path" 2> /dev/null`
37513    # bat and cmd files are not always considered executable in MSYS causing which
37514    # to not find them
37515    if test "x$new_path" = x \
37516        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37517        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37518      new_path="$path"
37519
37520  windows_path="$new_path"
37521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37522    unix_path=`$CYGPATH -u "$windows_path"`
37523    new_path="$unix_path"
37524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37526    new_path="$unix_path"
37527  fi
37528
37529    fi
37530
37531    if test "x$new_path" = x; then
37532      # It's still not found. Now this is an unrecoverable error.
37533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37534$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37535      has_space=`$ECHO "$complete" | $GREP " "`
37536      if test "x$has_space" != x; then
37537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37539      fi
37540      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37541    fi
37542  fi
37543
37544  # Now new_path has a complete unix path to the binary
37545  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37546    # Keep paths in /bin as-is, but remove trailing .exe if any
37547    new_path="${new_path/%.exe/}"
37548    # Do not save /bin paths to all_fixpath_prefixes!
37549  else
37550    # Not in mixed or Windows style, start by that.
37551    new_path=`cmd //c echo $new_path`
37552
37553  input_path="$new_path"
37554  # Check if we need to convert this using DOS-style short mode. If the path
37555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37556  # take no chances and rewrite it.
37557  # Note: m4 eats our [], so we need to use [ and ] instead.
37558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37559  if test "x$has_forbidden_chars" != x; then
37560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37562  fi
37563
37564    # Output is in $new_path
37565
37566  windows_path="$new_path"
37567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37568    unix_path=`$CYGPATH -u "$windows_path"`
37569    new_path="$unix_path"
37570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37572    new_path="$unix_path"
37573  fi
37574
37575    # remove trailing .exe if any
37576    new_path="${new_path/%.exe/}"
37577
37578    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37579    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37580  fi
37581
37582    else
37583      # We're on a unix platform. Hooray! :)
37584      # First separate the path from the arguments. This will split at the first
37585      # space.
37586      complete="$LD"
37587      path="${complete%% *}"
37588      tmp="$complete EOL"
37589      arguments="${tmp#* }"
37590
37591      # Cannot rely on the command "which" here since it doesn't always work.
37592      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37593      if test -z "$is_absolute_path"; then
37594        # Path to executable is not absolute. Find it.
37595        IFS_save="$IFS"
37596        IFS=:
37597        for p in $PATH; do
37598          if test -f "$p/$path" && test -x "$p/$path"; then
37599            new_path="$p/$path"
37600            break
37601          fi
37602        done
37603        IFS="$IFS_save"
37604      else
37605        # This is an absolute path, we can use it without further modifications.
37606        new_path="$path"
37607      fi
37608
37609      if test "x$new_path" = x; then
37610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37611$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37612        has_space=`$ECHO "$complete" | $GREP " "`
37613        if test "x$has_space" != x; then
37614          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37615$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37616        fi
37617        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37618      fi
37619    fi
37620
37621    # Now join together the path and the arguments once again
37622    if test "x$arguments" != xEOL; then
37623      new_complete="$new_path ${arguments% *}"
37624    else
37625      new_complete="$new_path"
37626    fi
37627
37628    if test "x$complete" != "x$new_complete"; then
37629      LD="$new_complete"
37630      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37631$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37632    fi
37633  fi
37634
37635    # Verify that we indeed succeeded with this trick.
37636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37637$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37638    "$LD" --version > /dev/null
37639    if test $? -eq 0 ; then
37640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37641$as_echo "no" >&6; }
37642      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37643    else
37644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37645$as_echo "yes" >&6; }
37646    fi
37647    LDCXX="$LD"
37648  else
37649    # All other toolchains use the compiler to link.
37650    LD="$CC"
37651    LDCXX="$CXX"
37652  fi
37653
37654  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37655
37656
37657  #
37658  # Setup the assembler (AS)
37659  #
37660  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37661
37662
37663  # Publish this variable in the help.
37664
37665
37666  if [ -z "${AS+x}" ]; then
37667    # The variable is not set by user, try to locate tool using the code snippet
37668    for ac_prog in as
37669do
37670  # Extract the first word of "$ac_prog", so it can be a program name with args.
37671set dummy $ac_prog; ac_word=$2
37672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37673$as_echo_n "checking for $ac_word... " >&6; }
37674if ${ac_cv_path_AS+:} false; then :
37675  $as_echo_n "(cached) " >&6
37676else
37677  case $AS in
37678  [\\/]* | ?:[\\/]*)
37679  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37680  ;;
37681  *)
37682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37683for as_dir in $PATH
37684do
37685  IFS=$as_save_IFS
37686  test -z "$as_dir" && as_dir=.
37687    for ac_exec_ext in '' $ac_executable_extensions; do
37688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37689    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37691    break 2
37692  fi
37693done
37694  done
37695IFS=$as_save_IFS
37696
37697  ;;
37698esac
37699fi
37700AS=$ac_cv_path_AS
37701if test -n "$AS"; then
37702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37703$as_echo "$AS" >&6; }
37704else
37705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37706$as_echo "no" >&6; }
37707fi
37708
37709
37710  test -n "$AS" && break
37711done
37712
37713  else
37714    # The variable is set, but is it from the command line or the environment?
37715
37716    # Try to remove the string !AS! from our list.
37717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37719      # If it failed, the variable was not from the command line. Ignore it,
37720      # but warn the user (except for BASH, which is always set by the calling BASH).
37721      if test "xAS" != xBASH; then
37722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37723$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37724      fi
37725      # Try to locate tool using the code snippet
37726      for ac_prog in as
37727do
37728  # Extract the first word of "$ac_prog", so it can be a program name with args.
37729set dummy $ac_prog; ac_word=$2
37730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37731$as_echo_n "checking for $ac_word... " >&6; }
37732if ${ac_cv_path_AS+:} false; then :
37733  $as_echo_n "(cached) " >&6
37734else
37735  case $AS in
37736  [\\/]* | ?:[\\/]*)
37737  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37738  ;;
37739  *)
37740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37741for as_dir in $PATH
37742do
37743  IFS=$as_save_IFS
37744  test -z "$as_dir" && as_dir=.
37745    for ac_exec_ext in '' $ac_executable_extensions; do
37746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37747    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37749    break 2
37750  fi
37751done
37752  done
37753IFS=$as_save_IFS
37754
37755  ;;
37756esac
37757fi
37758AS=$ac_cv_path_AS
37759if test -n "$AS"; then
37760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37761$as_echo "$AS" >&6; }
37762else
37763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37764$as_echo "no" >&6; }
37765fi
37766
37767
37768  test -n "$AS" && break
37769done
37770
37771    else
37772      # If it succeeded, then it was overridden by the user. We will use it
37773      # for the tool.
37774
37775      # First remove it from the list of overridden variables, so we can test
37776      # for unknown variables in the end.
37777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37778
37779      # Check if we try to supply an empty value
37780      if test "x$AS" = x; then
37781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37782$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37784$as_echo_n "checking for AS... " >&6; }
37785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37786$as_echo "disabled" >&6; }
37787      else
37788        # Check if the provided tool contains a complete path.
37789        tool_specified="$AS"
37790        tool_basename="${tool_specified##*/}"
37791        if test "x$tool_basename" = "x$tool_specified"; then
37792          # A command without a complete path is provided, search $PATH.
37793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37794$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37795          # Extract the first word of "$tool_basename", so it can be a program name with args.
37796set dummy $tool_basename; ac_word=$2
37797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37798$as_echo_n "checking for $ac_word... " >&6; }
37799if ${ac_cv_path_AS+:} false; then :
37800  $as_echo_n "(cached) " >&6
37801else
37802  case $AS in
37803  [\\/]* | ?:[\\/]*)
37804  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37805  ;;
37806  *)
37807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37808for as_dir in $PATH
37809do
37810  IFS=$as_save_IFS
37811  test -z "$as_dir" && as_dir=.
37812    for ac_exec_ext in '' $ac_executable_extensions; do
37813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37814    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37816    break 2
37817  fi
37818done
37819  done
37820IFS=$as_save_IFS
37821
37822  ;;
37823esac
37824fi
37825AS=$ac_cv_path_AS
37826if test -n "$AS"; then
37827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37828$as_echo "$AS" >&6; }
37829else
37830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37831$as_echo "no" >&6; }
37832fi
37833
37834
37835          if test "x$AS" = x; then
37836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37837          fi
37838        else
37839          # Otherwise we believe it is a complete path. Use it as it is.
37840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37841$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37843$as_echo_n "checking for AS... " >&6; }
37844          if test ! -x "$tool_specified"; then
37845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37846$as_echo "not found" >&6; }
37847            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37848          fi
37849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37850$as_echo "$tool_specified" >&6; }
37851        fi
37852      fi
37853    fi
37854
37855  fi
37856
37857
37858
37859  # Only process if variable expands to non-empty
37860
37861  if test "x$AS" != x; then
37862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37863
37864  # First separate the path from the arguments. This will split at the first
37865  # space.
37866  complete="$AS"
37867  path="${complete%% *}"
37868  tmp="$complete EOL"
37869  arguments="${tmp#* }"
37870
37871  # Input might be given as Windows format, start by converting to
37872  # unix format.
37873  new_path=`$CYGPATH -u "$path"`
37874
37875  # Now try to locate executable using which
37876  new_path=`$WHICH "$new_path" 2> /dev/null`
37877  # bat and cmd files are not always considered executable in cygwin causing which
37878  # to not find them
37879  if test "x$new_path" = x \
37880      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37881      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37882    new_path=`$CYGPATH -u "$path"`
37883  fi
37884  if test "x$new_path" = x; then
37885    # Oops. Which didn't find the executable.
37886    # The splitting of arguments from the executable at a space might have been incorrect,
37887    # since paths with space are more likely in Windows. Give it another try with the whole
37888    # argument.
37889    path="$complete"
37890    arguments="EOL"
37891    new_path=`$CYGPATH -u "$path"`
37892    new_path=`$WHICH "$new_path" 2> /dev/null`
37893    # bat and cmd files are not always considered executable in cygwin causing which
37894    # to not find them
37895    if test "x$new_path" = x \
37896        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37897        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37898      new_path=`$CYGPATH -u "$path"`
37899    fi
37900    if test "x$new_path" = x; then
37901      # It's still not found. Now this is an unrecoverable error.
37902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37903$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37904      has_space=`$ECHO "$complete" | $GREP " "`
37905      if test "x$has_space" != x; then
37906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37908      fi
37909      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37910    fi
37911  fi
37912
37913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37916  # "foo.exe" is OK but "foo" is an error.
37917  #
37918  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37919  # It is also a way to make sure we got the proper file name for the real test later on.
37920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37921  if test "x$test_shortpath" = x; then
37922    # Short path failed, file does not exist as specified.
37923    # Try adding .exe or .cmd
37924    if test -f "${new_path}.exe"; then
37925      input_to_shortpath="${new_path}.exe"
37926    elif test -f "${new_path}.cmd"; then
37927      input_to_shortpath="${new_path}.cmd"
37928    else
37929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37930$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37931      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37932$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37933      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37934    fi
37935  else
37936    input_to_shortpath="$new_path"
37937  fi
37938
37939  # Call helper function which possibly converts this using DOS-style short mode.
37940  # If so, the updated path is stored in $new_path.
37941  new_path="$input_to_shortpath"
37942
37943  input_path="$input_to_shortpath"
37944  # Check if we need to convert this using DOS-style short mode. If the path
37945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37946  # take no chances and rewrite it.
37947  # Note: m4 eats our [], so we need to use [ and ] instead.
37948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37949  if test "x$has_forbidden_chars" != x; then
37950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37954      # Going to short mode and back again did indeed matter. Since short mode is
37955      # case insensitive, let's make it lowercase to improve readability.
37956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37957      # Now convert it back to Unix-style (cygpath)
37958      input_path=`$CYGPATH -u "$shortmode_path"`
37959      new_path="$input_path"
37960    fi
37961  fi
37962
37963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37964  if test "x$test_cygdrive_prefix" = x; then
37965    # As a simple fix, exclude /usr/bin since it's not a real path.
37966    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37968      # a path prefixed by /cygdrive for fixpath to work.
37969      new_path="$CYGWIN_ROOT_PATH$input_path"
37970    fi
37971  fi
37972
37973  # remove trailing .exe if any
37974  new_path="${new_path/%.exe/}"
37975
37976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37977
37978  # First separate the path from the arguments. This will split at the first
37979  # space.
37980  complete="$AS"
37981  path="${complete%% *}"
37982  tmp="$complete EOL"
37983  arguments="${tmp#* }"
37984
37985  # Input might be given as Windows format, start by converting to
37986  # unix format.
37987  new_path="$path"
37988
37989  windows_path="$new_path"
37990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37991    unix_path=`$CYGPATH -u "$windows_path"`
37992    new_path="$unix_path"
37993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37995    new_path="$unix_path"
37996  fi
37997
37998
37999  # Now try to locate executable using which
38000  new_path=`$WHICH "$new_path" 2> /dev/null`
38001
38002  if test "x$new_path" = x; then
38003    # Oops. Which didn't find the executable.
38004    # The splitting of arguments from the executable at a space might have been incorrect,
38005    # since paths with space are more likely in Windows. Give it another try with the whole
38006    # argument.
38007    path="$complete"
38008    arguments="EOL"
38009    new_path="$path"
38010
38011  windows_path="$new_path"
38012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38013    unix_path=`$CYGPATH -u "$windows_path"`
38014    new_path="$unix_path"
38015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38017    new_path="$unix_path"
38018  fi
38019
38020
38021    new_path=`$WHICH "$new_path" 2> /dev/null`
38022    # bat and cmd files are not always considered executable in MSYS causing which
38023    # to not find them
38024    if test "x$new_path" = x \
38025        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38026        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38027      new_path="$path"
38028
38029  windows_path="$new_path"
38030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38031    unix_path=`$CYGPATH -u "$windows_path"`
38032    new_path="$unix_path"
38033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38035    new_path="$unix_path"
38036  fi
38037
38038    fi
38039
38040    if test "x$new_path" = x; then
38041      # It's still not found. Now this is an unrecoverable error.
38042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38043$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38044      has_space=`$ECHO "$complete" | $GREP " "`
38045      if test "x$has_space" != x; then
38046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38048      fi
38049      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38050    fi
38051  fi
38052
38053  # Now new_path has a complete unix path to the binary
38054  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38055    # Keep paths in /bin as-is, but remove trailing .exe if any
38056    new_path="${new_path/%.exe/}"
38057    # Do not save /bin paths to all_fixpath_prefixes!
38058  else
38059    # Not in mixed or Windows style, start by that.
38060    new_path=`cmd //c echo $new_path`
38061
38062  input_path="$new_path"
38063  # Check if we need to convert this using DOS-style short mode. If the path
38064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38065  # take no chances and rewrite it.
38066  # Note: m4 eats our [], so we need to use [ and ] instead.
38067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38068  if test "x$has_forbidden_chars" != x; then
38069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38071  fi
38072
38073    # Output is in $new_path
38074
38075  windows_path="$new_path"
38076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38077    unix_path=`$CYGPATH -u "$windows_path"`
38078    new_path="$unix_path"
38079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38081    new_path="$unix_path"
38082  fi
38083
38084    # remove trailing .exe if any
38085    new_path="${new_path/%.exe/}"
38086
38087    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38088    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38089  fi
38090
38091    else
38092      # We're on a unix platform. Hooray! :)
38093      # First separate the path from the arguments. This will split at the first
38094      # space.
38095      complete="$AS"
38096      path="${complete%% *}"
38097      tmp="$complete EOL"
38098      arguments="${tmp#* }"
38099
38100      # Cannot rely on the command "which" here since it doesn't always work.
38101      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38102      if test -z "$is_absolute_path"; then
38103        # Path to executable is not absolute. Find it.
38104        IFS_save="$IFS"
38105        IFS=:
38106        for p in $PATH; do
38107          if test -f "$p/$path" && test -x "$p/$path"; then
38108            new_path="$p/$path"
38109            break
38110          fi
38111        done
38112        IFS="$IFS_save"
38113      else
38114        # This is an absolute path, we can use it without further modifications.
38115        new_path="$path"
38116      fi
38117
38118      if test "x$new_path" = x; then
38119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38120$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38121        has_space=`$ECHO "$complete" | $GREP " "`
38122        if test "x$has_space" != x; then
38123          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38124$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38125        fi
38126        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38127      fi
38128    fi
38129
38130    # Now join together the path and the arguments once again
38131    if test "x$arguments" != xEOL; then
38132      new_complete="$new_path ${arguments% *}"
38133    else
38134      new_complete="$new_path"
38135    fi
38136
38137    if test "x$complete" != "x$new_complete"; then
38138      AS="$new_complete"
38139      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38140$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38141    fi
38142  fi
38143
38144    if test "x$AS" = x; then
38145      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38146    fi
38147  else
38148    # FIXME: is this correct for microsoft?
38149    AS="$CC -c"
38150  fi
38151
38152
38153  #
38154  # Setup the archiver (AR)
38155  #
38156  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38157    # The corresponding ar tool is lib.exe (used to create static libraries)
38158    # Extract the first word of "lib", so it can be a program name with args.
38159set dummy lib; ac_word=$2
38160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38161$as_echo_n "checking for $ac_word... " >&6; }
38162if ${ac_cv_prog_AR+:} false; then :
38163  $as_echo_n "(cached) " >&6
38164else
38165  if test -n "$AR"; then
38166  ac_cv_prog_AR="$AR" # Let the user override the test.
38167else
38168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38169for as_dir in $PATH
38170do
38171  IFS=$as_save_IFS
38172  test -z "$as_dir" && as_dir=.
38173    for ac_exec_ext in '' $ac_executable_extensions; do
38174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38175    ac_cv_prog_AR="lib"
38176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38177    break 2
38178  fi
38179done
38180  done
38181IFS=$as_save_IFS
38182
38183fi
38184fi
38185AR=$ac_cv_prog_AR
38186if test -n "$AR"; then
38187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38188$as_echo "$AR" >&6; }
38189else
38190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38191$as_echo "no" >&6; }
38192fi
38193
38194
38195  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38196
38197
38198  # Publish this variable in the help.
38199
38200
38201  if [ -z "${AR+x}" ]; then
38202    # The variable is not set by user, try to locate tool using the code snippet
38203    if test -n "$ac_tool_prefix"; then
38204  for ac_prog in ar gcc-ar
38205  do
38206    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38207set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38209$as_echo_n "checking for $ac_word... " >&6; }
38210if ${ac_cv_prog_AR+:} false; then :
38211  $as_echo_n "(cached) " >&6
38212else
38213  if test -n "$AR"; then
38214  ac_cv_prog_AR="$AR" # Let the user override the test.
38215else
38216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38217for as_dir in $PATH
38218do
38219  IFS=$as_save_IFS
38220  test -z "$as_dir" && as_dir=.
38221    for ac_exec_ext in '' $ac_executable_extensions; do
38222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38223    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38225    break 2
38226  fi
38227done
38228  done
38229IFS=$as_save_IFS
38230
38231fi
38232fi
38233AR=$ac_cv_prog_AR
38234if test -n "$AR"; then
38235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38236$as_echo "$AR" >&6; }
38237else
38238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38239$as_echo "no" >&6; }
38240fi
38241
38242
38243    test -n "$AR" && break
38244  done
38245fi
38246if test -z "$AR"; then
38247  ac_ct_AR=$AR
38248  for ac_prog in ar gcc-ar
38249do
38250  # Extract the first word of "$ac_prog", so it can be a program name with args.
38251set dummy $ac_prog; ac_word=$2
38252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38253$as_echo_n "checking for $ac_word... " >&6; }
38254if ${ac_cv_prog_ac_ct_AR+:} false; then :
38255  $as_echo_n "(cached) " >&6
38256else
38257  if test -n "$ac_ct_AR"; then
38258  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38259else
38260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38261for as_dir in $PATH
38262do
38263  IFS=$as_save_IFS
38264  test -z "$as_dir" && as_dir=.
38265    for ac_exec_ext in '' $ac_executable_extensions; do
38266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38267    ac_cv_prog_ac_ct_AR="$ac_prog"
38268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38269    break 2
38270  fi
38271done
38272  done
38273IFS=$as_save_IFS
38274
38275fi
38276fi
38277ac_ct_AR=$ac_cv_prog_ac_ct_AR
38278if test -n "$ac_ct_AR"; then
38279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38280$as_echo "$ac_ct_AR" >&6; }
38281else
38282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38283$as_echo "no" >&6; }
38284fi
38285
38286
38287  test -n "$ac_ct_AR" && break
38288done
38289
38290  if test "x$ac_ct_AR" = x; then
38291    AR=""
38292  else
38293    case $cross_compiling:$ac_tool_warned in
38294yes:)
38295{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38296$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38297ac_tool_warned=yes ;;
38298esac
38299    AR=$ac_ct_AR
38300  fi
38301fi
38302
38303  else
38304    # The variable is set, but is it from the command line or the environment?
38305
38306    # Try to remove the string !AR! from our list.
38307    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38308    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38309      # If it failed, the variable was not from the command line. Ignore it,
38310      # but warn the user (except for BASH, which is always set by the calling BASH).
38311      if test "xAR" != xBASH; then
38312        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38313$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38314      fi
38315      # Try to locate tool using the code snippet
38316      if test -n "$ac_tool_prefix"; then
38317  for ac_prog in ar gcc-ar
38318  do
38319    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38320set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38322$as_echo_n "checking for $ac_word... " >&6; }
38323if ${ac_cv_prog_AR+:} false; then :
38324  $as_echo_n "(cached) " >&6
38325else
38326  if test -n "$AR"; then
38327  ac_cv_prog_AR="$AR" # Let the user override the test.
38328else
38329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38330for as_dir in $PATH
38331do
38332  IFS=$as_save_IFS
38333  test -z "$as_dir" && as_dir=.
38334    for ac_exec_ext in '' $ac_executable_extensions; do
38335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38336    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38338    break 2
38339  fi
38340done
38341  done
38342IFS=$as_save_IFS
38343
38344fi
38345fi
38346AR=$ac_cv_prog_AR
38347if test -n "$AR"; then
38348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38349$as_echo "$AR" >&6; }
38350else
38351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38352$as_echo "no" >&6; }
38353fi
38354
38355
38356    test -n "$AR" && break
38357  done
38358fi
38359if test -z "$AR"; then
38360  ac_ct_AR=$AR
38361  for ac_prog in ar gcc-ar
38362do
38363  # Extract the first word of "$ac_prog", so it can be a program name with args.
38364set dummy $ac_prog; ac_word=$2
38365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38366$as_echo_n "checking for $ac_word... " >&6; }
38367if ${ac_cv_prog_ac_ct_AR+:} false; then :
38368  $as_echo_n "(cached) " >&6
38369else
38370  if test -n "$ac_ct_AR"; then
38371  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38372else
38373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38374for as_dir in $PATH
38375do
38376  IFS=$as_save_IFS
38377  test -z "$as_dir" && as_dir=.
38378    for ac_exec_ext in '' $ac_executable_extensions; do
38379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38380    ac_cv_prog_ac_ct_AR="$ac_prog"
38381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38382    break 2
38383  fi
38384done
38385  done
38386IFS=$as_save_IFS
38387
38388fi
38389fi
38390ac_ct_AR=$ac_cv_prog_ac_ct_AR
38391if test -n "$ac_ct_AR"; then
38392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38393$as_echo "$ac_ct_AR" >&6; }
38394else
38395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38396$as_echo "no" >&6; }
38397fi
38398
38399
38400  test -n "$ac_ct_AR" && break
38401done
38402
38403  if test "x$ac_ct_AR" = x; then
38404    AR=""
38405  else
38406    case $cross_compiling:$ac_tool_warned in
38407yes:)
38408{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38409$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38410ac_tool_warned=yes ;;
38411esac
38412    AR=$ac_ct_AR
38413  fi
38414fi
38415
38416    else
38417      # If it succeeded, then it was overridden by the user. We will use it
38418      # for the tool.
38419
38420      # First remove it from the list of overridden variables, so we can test
38421      # for unknown variables in the end.
38422      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38423
38424      # Check if we try to supply an empty value
38425      if test "x$AR" = x; then
38426        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38427$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38429$as_echo_n "checking for AR... " >&6; }
38430        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38431$as_echo "disabled" >&6; }
38432      else
38433        # Check if the provided tool contains a complete path.
38434        tool_specified="$AR"
38435        tool_basename="${tool_specified##*/}"
38436        if test "x$tool_basename" = "x$tool_specified"; then
38437          # A command without a complete path is provided, search $PATH.
38438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38439$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38440          # Extract the first word of "$tool_basename", so it can be a program name with args.
38441set dummy $tool_basename; ac_word=$2
38442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38443$as_echo_n "checking for $ac_word... " >&6; }
38444if ${ac_cv_path_AR+:} false; then :
38445  $as_echo_n "(cached) " >&6
38446else
38447  case $AR in
38448  [\\/]* | ?:[\\/]*)
38449  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38450  ;;
38451  *)
38452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38453for as_dir in $PATH
38454do
38455  IFS=$as_save_IFS
38456  test -z "$as_dir" && as_dir=.
38457    for ac_exec_ext in '' $ac_executable_extensions; do
38458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38459    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38461    break 2
38462  fi
38463done
38464  done
38465IFS=$as_save_IFS
38466
38467  ;;
38468esac
38469fi
38470AR=$ac_cv_path_AR
38471if test -n "$AR"; then
38472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38473$as_echo "$AR" >&6; }
38474else
38475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38476$as_echo "no" >&6; }
38477fi
38478
38479
38480          if test "x$AR" = x; then
38481            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38482          fi
38483        else
38484          # Otherwise we believe it is a complete path. Use it as it is.
38485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38486$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38487          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38488$as_echo_n "checking for AR... " >&6; }
38489          if test ! -x "$tool_specified"; then
38490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38491$as_echo "not found" >&6; }
38492            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38493          fi
38494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38495$as_echo "$tool_specified" >&6; }
38496        fi
38497      fi
38498    fi
38499
38500  fi
38501
38502
38503  else
38504
38505
38506  # Publish this variable in the help.
38507
38508
38509  if [ -z "${AR+x}" ]; then
38510    # The variable is not set by user, try to locate tool using the code snippet
38511    if test -n "$ac_tool_prefix"; then
38512  for ac_prog in ar
38513  do
38514    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38515set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38517$as_echo_n "checking for $ac_word... " >&6; }
38518if ${ac_cv_prog_AR+:} false; then :
38519  $as_echo_n "(cached) " >&6
38520else
38521  if test -n "$AR"; then
38522  ac_cv_prog_AR="$AR" # Let the user override the test.
38523else
38524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38525for as_dir in $PATH
38526do
38527  IFS=$as_save_IFS
38528  test -z "$as_dir" && as_dir=.
38529    for ac_exec_ext in '' $ac_executable_extensions; do
38530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38531    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38533    break 2
38534  fi
38535done
38536  done
38537IFS=$as_save_IFS
38538
38539fi
38540fi
38541AR=$ac_cv_prog_AR
38542if test -n "$AR"; then
38543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38544$as_echo "$AR" >&6; }
38545else
38546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38547$as_echo "no" >&6; }
38548fi
38549
38550
38551    test -n "$AR" && break
38552  done
38553fi
38554if test -z "$AR"; then
38555  ac_ct_AR=$AR
38556  for ac_prog in ar
38557do
38558  # Extract the first word of "$ac_prog", so it can be a program name with args.
38559set dummy $ac_prog; ac_word=$2
38560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38561$as_echo_n "checking for $ac_word... " >&6; }
38562if ${ac_cv_prog_ac_ct_AR+:} false; then :
38563  $as_echo_n "(cached) " >&6
38564else
38565  if test -n "$ac_ct_AR"; then
38566  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38567else
38568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38569for as_dir in $PATH
38570do
38571  IFS=$as_save_IFS
38572  test -z "$as_dir" && as_dir=.
38573    for ac_exec_ext in '' $ac_executable_extensions; do
38574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38575    ac_cv_prog_ac_ct_AR="$ac_prog"
38576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38577    break 2
38578  fi
38579done
38580  done
38581IFS=$as_save_IFS
38582
38583fi
38584fi
38585ac_ct_AR=$ac_cv_prog_ac_ct_AR
38586if test -n "$ac_ct_AR"; then
38587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38588$as_echo "$ac_ct_AR" >&6; }
38589else
38590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38591$as_echo "no" >&6; }
38592fi
38593
38594
38595  test -n "$ac_ct_AR" && break
38596done
38597
38598  if test "x$ac_ct_AR" = x; then
38599    AR=""
38600  else
38601    case $cross_compiling:$ac_tool_warned in
38602yes:)
38603{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38604$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38605ac_tool_warned=yes ;;
38606esac
38607    AR=$ac_ct_AR
38608  fi
38609fi
38610
38611  else
38612    # The variable is set, but is it from the command line or the environment?
38613
38614    # Try to remove the string !AR! from our list.
38615    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38616    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38617      # If it failed, the variable was not from the command line. Ignore it,
38618      # but warn the user (except for BASH, which is always set by the calling BASH).
38619      if test "xAR" != xBASH; then
38620        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38621$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38622      fi
38623      # Try to locate tool using the code snippet
38624      if test -n "$ac_tool_prefix"; then
38625  for ac_prog in ar
38626  do
38627    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38628set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38630$as_echo_n "checking for $ac_word... " >&6; }
38631if ${ac_cv_prog_AR+:} false; then :
38632  $as_echo_n "(cached) " >&6
38633else
38634  if test -n "$AR"; then
38635  ac_cv_prog_AR="$AR" # Let the user override the test.
38636else
38637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38638for as_dir in $PATH
38639do
38640  IFS=$as_save_IFS
38641  test -z "$as_dir" && as_dir=.
38642    for ac_exec_ext in '' $ac_executable_extensions; do
38643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38644    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38646    break 2
38647  fi
38648done
38649  done
38650IFS=$as_save_IFS
38651
38652fi
38653fi
38654AR=$ac_cv_prog_AR
38655if test -n "$AR"; then
38656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38657$as_echo "$AR" >&6; }
38658else
38659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38660$as_echo "no" >&6; }
38661fi
38662
38663
38664    test -n "$AR" && break
38665  done
38666fi
38667if test -z "$AR"; then
38668  ac_ct_AR=$AR
38669  for ac_prog in ar
38670do
38671  # Extract the first word of "$ac_prog", so it can be a program name with args.
38672set dummy $ac_prog; ac_word=$2
38673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38674$as_echo_n "checking for $ac_word... " >&6; }
38675if ${ac_cv_prog_ac_ct_AR+:} false; then :
38676  $as_echo_n "(cached) " >&6
38677else
38678  if test -n "$ac_ct_AR"; then
38679  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38680else
38681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38682for as_dir in $PATH
38683do
38684  IFS=$as_save_IFS
38685  test -z "$as_dir" && as_dir=.
38686    for ac_exec_ext in '' $ac_executable_extensions; do
38687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38688    ac_cv_prog_ac_ct_AR="$ac_prog"
38689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38690    break 2
38691  fi
38692done
38693  done
38694IFS=$as_save_IFS
38695
38696fi
38697fi
38698ac_ct_AR=$ac_cv_prog_ac_ct_AR
38699if test -n "$ac_ct_AR"; then
38700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38701$as_echo "$ac_ct_AR" >&6; }
38702else
38703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38704$as_echo "no" >&6; }
38705fi
38706
38707
38708  test -n "$ac_ct_AR" && break
38709done
38710
38711  if test "x$ac_ct_AR" = x; then
38712    AR=""
38713  else
38714    case $cross_compiling:$ac_tool_warned in
38715yes:)
38716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38718ac_tool_warned=yes ;;
38719esac
38720    AR=$ac_ct_AR
38721  fi
38722fi
38723
38724    else
38725      # If it succeeded, then it was overridden by the user. We will use it
38726      # for the tool.
38727
38728      # First remove it from the list of overridden variables, so we can test
38729      # for unknown variables in the end.
38730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38731
38732      # Check if we try to supply an empty value
38733      if test "x$AR" = x; then
38734        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38735$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38736        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38737$as_echo_n "checking for AR... " >&6; }
38738        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38739$as_echo "disabled" >&6; }
38740      else
38741        # Check if the provided tool contains a complete path.
38742        tool_specified="$AR"
38743        tool_basename="${tool_specified##*/}"
38744        if test "x$tool_basename" = "x$tool_specified"; then
38745          # A command without a complete path is provided, search $PATH.
38746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38747$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38748          # Extract the first word of "$tool_basename", so it can be a program name with args.
38749set dummy $tool_basename; ac_word=$2
38750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38751$as_echo_n "checking for $ac_word... " >&6; }
38752if ${ac_cv_path_AR+:} false; then :
38753  $as_echo_n "(cached) " >&6
38754else
38755  case $AR in
38756  [\\/]* | ?:[\\/]*)
38757  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38758  ;;
38759  *)
38760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38761for as_dir in $PATH
38762do
38763  IFS=$as_save_IFS
38764  test -z "$as_dir" && as_dir=.
38765    for ac_exec_ext in '' $ac_executable_extensions; do
38766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38767    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38769    break 2
38770  fi
38771done
38772  done
38773IFS=$as_save_IFS
38774
38775  ;;
38776esac
38777fi
38778AR=$ac_cv_path_AR
38779if test -n "$AR"; then
38780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38781$as_echo "$AR" >&6; }
38782else
38783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38784$as_echo "no" >&6; }
38785fi
38786
38787
38788          if test "x$AR" = x; then
38789            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38790          fi
38791        else
38792          # Otherwise we believe it is a complete path. Use it as it is.
38793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38794$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38795          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38796$as_echo_n "checking for AR... " >&6; }
38797          if test ! -x "$tool_specified"; then
38798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38799$as_echo "not found" >&6; }
38800            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38801          fi
38802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38803$as_echo "$tool_specified" >&6; }
38804        fi
38805      fi
38806    fi
38807
38808  fi
38809
38810
38811  fi
38812
38813  # Only process if variable expands to non-empty
38814
38815  if test "x$AR" != x; then
38816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38817
38818  # First separate the path from the arguments. This will split at the first
38819  # space.
38820  complete="$AR"
38821  path="${complete%% *}"
38822  tmp="$complete EOL"
38823  arguments="${tmp#* }"
38824
38825  # Input might be given as Windows format, start by converting to
38826  # unix format.
38827  new_path=`$CYGPATH -u "$path"`
38828
38829  # Now try to locate executable using which
38830  new_path=`$WHICH "$new_path" 2> /dev/null`
38831  # bat and cmd files are not always considered executable in cygwin causing which
38832  # to not find them
38833  if test "x$new_path" = x \
38834      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38835      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38836    new_path=`$CYGPATH -u "$path"`
38837  fi
38838  if test "x$new_path" = x; then
38839    # Oops. Which didn't find the executable.
38840    # The splitting of arguments from the executable at a space might have been incorrect,
38841    # since paths with space are more likely in Windows. Give it another try with the whole
38842    # argument.
38843    path="$complete"
38844    arguments="EOL"
38845    new_path=`$CYGPATH -u "$path"`
38846    new_path=`$WHICH "$new_path" 2> /dev/null`
38847    # bat and cmd files are not always considered executable in cygwin causing which
38848    # to not find them
38849    if test "x$new_path" = x \
38850        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38851        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38852      new_path=`$CYGPATH -u "$path"`
38853    fi
38854    if test "x$new_path" = x; then
38855      # It's still not found. Now this is an unrecoverable error.
38856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38857$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38858      has_space=`$ECHO "$complete" | $GREP " "`
38859      if test "x$has_space" != x; then
38860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38862      fi
38863      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38864    fi
38865  fi
38866
38867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38870  # "foo.exe" is OK but "foo" is an error.
38871  #
38872  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38873  # It is also a way to make sure we got the proper file name for the real test later on.
38874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38875  if test "x$test_shortpath" = x; then
38876    # Short path failed, file does not exist as specified.
38877    # Try adding .exe or .cmd
38878    if test -f "${new_path}.exe"; then
38879      input_to_shortpath="${new_path}.exe"
38880    elif test -f "${new_path}.cmd"; then
38881      input_to_shortpath="${new_path}.cmd"
38882    else
38883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38884$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38885      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38887      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38888    fi
38889  else
38890    input_to_shortpath="$new_path"
38891  fi
38892
38893  # Call helper function which possibly converts this using DOS-style short mode.
38894  # If so, the updated path is stored in $new_path.
38895  new_path="$input_to_shortpath"
38896
38897  input_path="$input_to_shortpath"
38898  # Check if we need to convert this using DOS-style short mode. If the path
38899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38900  # take no chances and rewrite it.
38901  # Note: m4 eats our [], so we need to use [ and ] instead.
38902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38903  if test "x$has_forbidden_chars" != x; then
38904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38908      # Going to short mode and back again did indeed matter. Since short mode is
38909      # case insensitive, let's make it lowercase to improve readability.
38910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38911      # Now convert it back to Unix-style (cygpath)
38912      input_path=`$CYGPATH -u "$shortmode_path"`
38913      new_path="$input_path"
38914    fi
38915  fi
38916
38917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38918  if test "x$test_cygdrive_prefix" = x; then
38919    # As a simple fix, exclude /usr/bin since it's not a real path.
38920    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38922      # a path prefixed by /cygdrive for fixpath to work.
38923      new_path="$CYGWIN_ROOT_PATH$input_path"
38924    fi
38925  fi
38926
38927  # remove trailing .exe if any
38928  new_path="${new_path/%.exe/}"
38929
38930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38931
38932  # First separate the path from the arguments. This will split at the first
38933  # space.
38934  complete="$AR"
38935  path="${complete%% *}"
38936  tmp="$complete EOL"
38937  arguments="${tmp#* }"
38938
38939  # Input might be given as Windows format, start by converting to
38940  # unix format.
38941  new_path="$path"
38942
38943  windows_path="$new_path"
38944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38945    unix_path=`$CYGPATH -u "$windows_path"`
38946    new_path="$unix_path"
38947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38949    new_path="$unix_path"
38950  fi
38951
38952
38953  # Now try to locate executable using which
38954  new_path=`$WHICH "$new_path" 2> /dev/null`
38955
38956  if test "x$new_path" = x; then
38957    # Oops. Which didn't find the executable.
38958    # The splitting of arguments from the executable at a space might have been incorrect,
38959    # since paths with space are more likely in Windows. Give it another try with the whole
38960    # argument.
38961    path="$complete"
38962    arguments="EOL"
38963    new_path="$path"
38964
38965  windows_path="$new_path"
38966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38967    unix_path=`$CYGPATH -u "$windows_path"`
38968    new_path="$unix_path"
38969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38971    new_path="$unix_path"
38972  fi
38973
38974
38975    new_path=`$WHICH "$new_path" 2> /dev/null`
38976    # bat and cmd files are not always considered executable in MSYS causing which
38977    # to not find them
38978    if test "x$new_path" = x \
38979        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38980        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38981      new_path="$path"
38982
38983  windows_path="$new_path"
38984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38985    unix_path=`$CYGPATH -u "$windows_path"`
38986    new_path="$unix_path"
38987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38989    new_path="$unix_path"
38990  fi
38991
38992    fi
38993
38994    if test "x$new_path" = x; then
38995      # It's still not found. Now this is an unrecoverable error.
38996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38997$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38998      has_space=`$ECHO "$complete" | $GREP " "`
38999      if test "x$has_space" != x; then
39000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39002      fi
39003      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
39004    fi
39005  fi
39006
39007  # Now new_path has a complete unix path to the binary
39008  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39009    # Keep paths in /bin as-is, but remove trailing .exe if any
39010    new_path="${new_path/%.exe/}"
39011    # Do not save /bin paths to all_fixpath_prefixes!
39012  else
39013    # Not in mixed or Windows style, start by that.
39014    new_path=`cmd //c echo $new_path`
39015
39016  input_path="$new_path"
39017  # Check if we need to convert this using DOS-style short mode. If the path
39018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39019  # take no chances and rewrite it.
39020  # Note: m4 eats our [], so we need to use [ and ] instead.
39021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39022  if test "x$has_forbidden_chars" != x; then
39023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39025  fi
39026
39027    # Output is in $new_path
39028
39029  windows_path="$new_path"
39030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39031    unix_path=`$CYGPATH -u "$windows_path"`
39032    new_path="$unix_path"
39033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39035    new_path="$unix_path"
39036  fi
39037
39038    # remove trailing .exe if any
39039    new_path="${new_path/%.exe/}"
39040
39041    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39042    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39043  fi
39044
39045    else
39046      # We're on a unix platform. Hooray! :)
39047      # First separate the path from the arguments. This will split at the first
39048      # space.
39049      complete="$AR"
39050      path="${complete%% *}"
39051      tmp="$complete EOL"
39052      arguments="${tmp#* }"
39053
39054      # Cannot rely on the command "which" here since it doesn't always work.
39055      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39056      if test -z "$is_absolute_path"; then
39057        # Path to executable is not absolute. Find it.
39058        IFS_save="$IFS"
39059        IFS=:
39060        for p in $PATH; do
39061          if test -f "$p/$path" && test -x "$p/$path"; then
39062            new_path="$p/$path"
39063            break
39064          fi
39065        done
39066        IFS="$IFS_save"
39067      else
39068        # This is an absolute path, we can use it without further modifications.
39069        new_path="$path"
39070      fi
39071
39072      if test "x$new_path" = x; then
39073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
39074$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
39075        has_space=`$ECHO "$complete" | $GREP " "`
39076        if test "x$has_space" != x; then
39077          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39078$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39079        fi
39080        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
39081      fi
39082    fi
39083
39084    # Now join together the path and the arguments once again
39085    if test "x$arguments" != xEOL; then
39086      new_complete="$new_path ${arguments% *}"
39087    else
39088      new_complete="$new_path"
39089    fi
39090
39091    if test "x$complete" != "x$new_complete"; then
39092      AR="$new_complete"
39093      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
39094$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
39095    fi
39096  fi
39097
39098
39099
39100  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
39101
39102
39103  # Publish this variable in the help.
39104
39105
39106  if [ -z "${LIPO+x}" ]; then
39107    # The variable is not set by user, try to locate tool using the code snippet
39108    for ac_prog in lipo
39109do
39110  # Extract the first word of "$ac_prog", so it can be a program name with args.
39111set dummy $ac_prog; ac_word=$2
39112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39113$as_echo_n "checking for $ac_word... " >&6; }
39114if ${ac_cv_path_LIPO+:} false; then :
39115  $as_echo_n "(cached) " >&6
39116else
39117  case $LIPO in
39118  [\\/]* | ?:[\\/]*)
39119  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39120  ;;
39121  *)
39122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39123for as_dir in $PATH
39124do
39125  IFS=$as_save_IFS
39126  test -z "$as_dir" && as_dir=.
39127    for ac_exec_ext in '' $ac_executable_extensions; do
39128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39129    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39131    break 2
39132  fi
39133done
39134  done
39135IFS=$as_save_IFS
39136
39137  ;;
39138esac
39139fi
39140LIPO=$ac_cv_path_LIPO
39141if test -n "$LIPO"; then
39142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39143$as_echo "$LIPO" >&6; }
39144else
39145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39146$as_echo "no" >&6; }
39147fi
39148
39149
39150  test -n "$LIPO" && break
39151done
39152
39153  else
39154    # The variable is set, but is it from the command line or the environment?
39155
39156    # Try to remove the string !LIPO! from our list.
39157    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39158    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39159      # If it failed, the variable was not from the command line. Ignore it,
39160      # but warn the user (except for BASH, which is always set by the calling BASH).
39161      if test "xLIPO" != xBASH; then
39162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39163$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39164      fi
39165      # Try to locate tool using the code snippet
39166      for ac_prog in lipo
39167do
39168  # Extract the first word of "$ac_prog", so it can be a program name with args.
39169set dummy $ac_prog; ac_word=$2
39170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39171$as_echo_n "checking for $ac_word... " >&6; }
39172if ${ac_cv_path_LIPO+:} false; then :
39173  $as_echo_n "(cached) " >&6
39174else
39175  case $LIPO in
39176  [\\/]* | ?:[\\/]*)
39177  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39178  ;;
39179  *)
39180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39181for as_dir in $PATH
39182do
39183  IFS=$as_save_IFS
39184  test -z "$as_dir" && as_dir=.
39185    for ac_exec_ext in '' $ac_executable_extensions; do
39186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39187    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39189    break 2
39190  fi
39191done
39192  done
39193IFS=$as_save_IFS
39194
39195  ;;
39196esac
39197fi
39198LIPO=$ac_cv_path_LIPO
39199if test -n "$LIPO"; then
39200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39201$as_echo "$LIPO" >&6; }
39202else
39203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39204$as_echo "no" >&6; }
39205fi
39206
39207
39208  test -n "$LIPO" && break
39209done
39210
39211    else
39212      # If it succeeded, then it was overridden by the user. We will use it
39213      # for the tool.
39214
39215      # First remove it from the list of overridden variables, so we can test
39216      # for unknown variables in the end.
39217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39218
39219      # Check if we try to supply an empty value
39220      if test "x$LIPO" = x; then
39221        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39222$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39224$as_echo_n "checking for LIPO... " >&6; }
39225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39226$as_echo "disabled" >&6; }
39227      else
39228        # Check if the provided tool contains a complete path.
39229        tool_specified="$LIPO"
39230        tool_basename="${tool_specified##*/}"
39231        if test "x$tool_basename" = "x$tool_specified"; then
39232          # A command without a complete path is provided, search $PATH.
39233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39234$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39235          # Extract the first word of "$tool_basename", so it can be a program name with args.
39236set dummy $tool_basename; ac_word=$2
39237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39238$as_echo_n "checking for $ac_word... " >&6; }
39239if ${ac_cv_path_LIPO+:} false; then :
39240  $as_echo_n "(cached) " >&6
39241else
39242  case $LIPO in
39243  [\\/]* | ?:[\\/]*)
39244  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39245  ;;
39246  *)
39247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39248for as_dir in $PATH
39249do
39250  IFS=$as_save_IFS
39251  test -z "$as_dir" && as_dir=.
39252    for ac_exec_ext in '' $ac_executable_extensions; do
39253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39254    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39256    break 2
39257  fi
39258done
39259  done
39260IFS=$as_save_IFS
39261
39262  ;;
39263esac
39264fi
39265LIPO=$ac_cv_path_LIPO
39266if test -n "$LIPO"; then
39267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39268$as_echo "$LIPO" >&6; }
39269else
39270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39271$as_echo "no" >&6; }
39272fi
39273
39274
39275          if test "x$LIPO" = x; then
39276            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39277          fi
39278        else
39279          # Otherwise we believe it is a complete path. Use it as it is.
39280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39281$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39282          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39283$as_echo_n "checking for LIPO... " >&6; }
39284          if test ! -x "$tool_specified"; then
39285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39286$as_echo "not found" >&6; }
39287            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39288          fi
39289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39290$as_echo "$tool_specified" >&6; }
39291        fi
39292      fi
39293    fi
39294
39295  fi
39296
39297
39298
39299  # Only process if variable expands to non-empty
39300
39301  if test "x$LIPO" != x; then
39302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39303
39304  # First separate the path from the arguments. This will split at the first
39305  # space.
39306  complete="$LIPO"
39307  path="${complete%% *}"
39308  tmp="$complete EOL"
39309  arguments="${tmp#* }"
39310
39311  # Input might be given as Windows format, start by converting to
39312  # unix format.
39313  new_path=`$CYGPATH -u "$path"`
39314
39315  # Now try to locate executable using which
39316  new_path=`$WHICH "$new_path" 2> /dev/null`
39317  # bat and cmd files are not always considered executable in cygwin causing which
39318  # to not find them
39319  if test "x$new_path" = x \
39320      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39321      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39322    new_path=`$CYGPATH -u "$path"`
39323  fi
39324  if test "x$new_path" = x; then
39325    # Oops. Which didn't find the executable.
39326    # The splitting of arguments from the executable at a space might have been incorrect,
39327    # since paths with space are more likely in Windows. Give it another try with the whole
39328    # argument.
39329    path="$complete"
39330    arguments="EOL"
39331    new_path=`$CYGPATH -u "$path"`
39332    new_path=`$WHICH "$new_path" 2> /dev/null`
39333    # bat and cmd files are not always considered executable in cygwin causing which
39334    # to not find them
39335    if test "x$new_path" = x \
39336        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39337        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39338      new_path=`$CYGPATH -u "$path"`
39339    fi
39340    if test "x$new_path" = x; then
39341      # It's still not found. Now this is an unrecoverable error.
39342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39343$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39344      has_space=`$ECHO "$complete" | $GREP " "`
39345      if test "x$has_space" != x; then
39346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39348      fi
39349      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39350    fi
39351  fi
39352
39353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39356  # "foo.exe" is OK but "foo" is an error.
39357  #
39358  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39359  # It is also a way to make sure we got the proper file name for the real test later on.
39360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39361  if test "x$test_shortpath" = x; then
39362    # Short path failed, file does not exist as specified.
39363    # Try adding .exe or .cmd
39364    if test -f "${new_path}.exe"; then
39365      input_to_shortpath="${new_path}.exe"
39366    elif test -f "${new_path}.cmd"; then
39367      input_to_shortpath="${new_path}.cmd"
39368    else
39369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39370$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39371      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39372$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39373      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39374    fi
39375  else
39376    input_to_shortpath="$new_path"
39377  fi
39378
39379  # Call helper function which possibly converts this using DOS-style short mode.
39380  # If so, the updated path is stored in $new_path.
39381  new_path="$input_to_shortpath"
39382
39383  input_path="$input_to_shortpath"
39384  # Check if we need to convert this using DOS-style short mode. If the path
39385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39386  # take no chances and rewrite it.
39387  # Note: m4 eats our [], so we need to use [ and ] instead.
39388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39389  if test "x$has_forbidden_chars" != x; then
39390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39394      # Going to short mode and back again did indeed matter. Since short mode is
39395      # case insensitive, let's make it lowercase to improve readability.
39396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39397      # Now convert it back to Unix-style (cygpath)
39398      input_path=`$CYGPATH -u "$shortmode_path"`
39399      new_path="$input_path"
39400    fi
39401  fi
39402
39403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39404  if test "x$test_cygdrive_prefix" = x; then
39405    # As a simple fix, exclude /usr/bin since it's not a real path.
39406    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39408      # a path prefixed by /cygdrive for fixpath to work.
39409      new_path="$CYGWIN_ROOT_PATH$input_path"
39410    fi
39411  fi
39412
39413  # remove trailing .exe if any
39414  new_path="${new_path/%.exe/}"
39415
39416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39417
39418  # First separate the path from the arguments. This will split at the first
39419  # space.
39420  complete="$LIPO"
39421  path="${complete%% *}"
39422  tmp="$complete EOL"
39423  arguments="${tmp#* }"
39424
39425  # Input might be given as Windows format, start by converting to
39426  # unix format.
39427  new_path="$path"
39428
39429  windows_path="$new_path"
39430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39431    unix_path=`$CYGPATH -u "$windows_path"`
39432    new_path="$unix_path"
39433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39435    new_path="$unix_path"
39436  fi
39437
39438
39439  # Now try to locate executable using which
39440  new_path=`$WHICH "$new_path" 2> /dev/null`
39441
39442  if test "x$new_path" = x; then
39443    # Oops. Which didn't find the executable.
39444    # The splitting of arguments from the executable at a space might have been incorrect,
39445    # since paths with space are more likely in Windows. Give it another try with the whole
39446    # argument.
39447    path="$complete"
39448    arguments="EOL"
39449    new_path="$path"
39450
39451  windows_path="$new_path"
39452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39453    unix_path=`$CYGPATH -u "$windows_path"`
39454    new_path="$unix_path"
39455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39457    new_path="$unix_path"
39458  fi
39459
39460
39461    new_path=`$WHICH "$new_path" 2> /dev/null`
39462    # bat and cmd files are not always considered executable in MSYS causing which
39463    # to not find them
39464    if test "x$new_path" = x \
39465        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39466        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39467      new_path="$path"
39468
39469  windows_path="$new_path"
39470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39471    unix_path=`$CYGPATH -u "$windows_path"`
39472    new_path="$unix_path"
39473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39475    new_path="$unix_path"
39476  fi
39477
39478    fi
39479
39480    if test "x$new_path" = x; then
39481      # It's still not found. Now this is an unrecoverable error.
39482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39483$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39484      has_space=`$ECHO "$complete" | $GREP " "`
39485      if test "x$has_space" != x; then
39486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39488      fi
39489      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39490    fi
39491  fi
39492
39493  # Now new_path has a complete unix path to the binary
39494  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39495    # Keep paths in /bin as-is, but remove trailing .exe if any
39496    new_path="${new_path/%.exe/}"
39497    # Do not save /bin paths to all_fixpath_prefixes!
39498  else
39499    # Not in mixed or Windows style, start by that.
39500    new_path=`cmd //c echo $new_path`
39501
39502  input_path="$new_path"
39503  # Check if we need to convert this using DOS-style short mode. If the path
39504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39505  # take no chances and rewrite it.
39506  # Note: m4 eats our [], so we need to use [ and ] instead.
39507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39508  if test "x$has_forbidden_chars" != x; then
39509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39511  fi
39512
39513    # Output is in $new_path
39514
39515  windows_path="$new_path"
39516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39517    unix_path=`$CYGPATH -u "$windows_path"`
39518    new_path="$unix_path"
39519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39521    new_path="$unix_path"
39522  fi
39523
39524    # remove trailing .exe if any
39525    new_path="${new_path/%.exe/}"
39526
39527    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39528    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39529  fi
39530
39531    else
39532      # We're on a unix platform. Hooray! :)
39533      # First separate the path from the arguments. This will split at the first
39534      # space.
39535      complete="$LIPO"
39536      path="${complete%% *}"
39537      tmp="$complete EOL"
39538      arguments="${tmp#* }"
39539
39540      # Cannot rely on the command "which" here since it doesn't always work.
39541      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39542      if test -z "$is_absolute_path"; then
39543        # Path to executable is not absolute. Find it.
39544        IFS_save="$IFS"
39545        IFS=:
39546        for p in $PATH; do
39547          if test -f "$p/$path" && test -x "$p/$path"; then
39548            new_path="$p/$path"
39549            break
39550          fi
39551        done
39552        IFS="$IFS_save"
39553      else
39554        # This is an absolute path, we can use it without further modifications.
39555        new_path="$path"
39556      fi
39557
39558      if test "x$new_path" = x; then
39559        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39560$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39561        has_space=`$ECHO "$complete" | $GREP " "`
39562        if test "x$has_space" != x; then
39563          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39564$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39565        fi
39566        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39567      fi
39568    fi
39569
39570    # Now join together the path and the arguments once again
39571    if test "x$arguments" != xEOL; then
39572      new_complete="$new_path ${arguments% *}"
39573    else
39574      new_complete="$new_path"
39575    fi
39576
39577    if test "x$complete" != "x$new_complete"; then
39578      LIPO="$new_complete"
39579      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39580$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39581    fi
39582  fi
39583
39584  fi
39585
39586  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39587    # Extract the first word of "mt", so it can be a program name with args.
39588set dummy mt; ac_word=$2
39589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39590$as_echo_n "checking for $ac_word... " >&6; }
39591if ${ac_cv_prog_MT+:} false; then :
39592  $as_echo_n "(cached) " >&6
39593else
39594  if test -n "$MT"; then
39595  ac_cv_prog_MT="$MT" # Let the user override the test.
39596else
39597  ac_prog_rejected=no
39598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39599for as_dir in $PATH
39600do
39601  IFS=$as_save_IFS
39602  test -z "$as_dir" && as_dir=.
39603    for ac_exec_ext in '' $ac_executable_extensions; do
39604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39605    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39606       ac_prog_rejected=yes
39607       continue
39608     fi
39609    ac_cv_prog_MT="mt"
39610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39611    break 2
39612  fi
39613done
39614  done
39615IFS=$as_save_IFS
39616
39617if test $ac_prog_rejected = yes; then
39618  # We found a bogon in the path, so make sure we never use it.
39619  set dummy $ac_cv_prog_MT
39620  shift
39621  if test $# != 0; then
39622    # We chose a different compiler from the bogus one.
39623    # However, it has the same basename, so the bogon will be chosen
39624    # first if we set MT to just the basename; use the full file name.
39625    shift
39626    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39627  fi
39628fi
39629fi
39630fi
39631MT=$ac_cv_prog_MT
39632if test -n "$MT"; then
39633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39634$as_echo "$MT" >&6; }
39635else
39636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39637$as_echo "no" >&6; }
39638fi
39639
39640
39641
39642  # Only process if variable expands to non-empty
39643
39644  if test "x$MT" != x; then
39645    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39646
39647  # First separate the path from the arguments. This will split at the first
39648  # space.
39649  complete="$MT"
39650  path="${complete%% *}"
39651  tmp="$complete EOL"
39652  arguments="${tmp#* }"
39653
39654  # Input might be given as Windows format, start by converting to
39655  # unix format.
39656  new_path=`$CYGPATH -u "$path"`
39657
39658  # Now try to locate executable using which
39659  new_path=`$WHICH "$new_path" 2> /dev/null`
39660  # bat and cmd files are not always considered executable in cygwin causing which
39661  # to not find them
39662  if test "x$new_path" = x \
39663      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39664      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39665    new_path=`$CYGPATH -u "$path"`
39666  fi
39667  if test "x$new_path" = x; then
39668    # Oops. Which didn't find the executable.
39669    # The splitting of arguments from the executable at a space might have been incorrect,
39670    # since paths with space are more likely in Windows. Give it another try with the whole
39671    # argument.
39672    path="$complete"
39673    arguments="EOL"
39674    new_path=`$CYGPATH -u "$path"`
39675    new_path=`$WHICH "$new_path" 2> /dev/null`
39676    # bat and cmd files are not always considered executable in cygwin causing which
39677    # to not find them
39678    if test "x$new_path" = x \
39679        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39680        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39681      new_path=`$CYGPATH -u "$path"`
39682    fi
39683    if test "x$new_path" = x; then
39684      # It's still not found. Now this is an unrecoverable error.
39685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39686$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39687      has_space=`$ECHO "$complete" | $GREP " "`
39688      if test "x$has_space" != x; then
39689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39691      fi
39692      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39693    fi
39694  fi
39695
39696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39699  # "foo.exe" is OK but "foo" is an error.
39700  #
39701  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39702  # It is also a way to make sure we got the proper file name for the real test later on.
39703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39704  if test "x$test_shortpath" = x; then
39705    # Short path failed, file does not exist as specified.
39706    # Try adding .exe or .cmd
39707    if test -f "${new_path}.exe"; then
39708      input_to_shortpath="${new_path}.exe"
39709    elif test -f "${new_path}.cmd"; then
39710      input_to_shortpath="${new_path}.cmd"
39711    else
39712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39713$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39714      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39715$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39716      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39717    fi
39718  else
39719    input_to_shortpath="$new_path"
39720  fi
39721
39722  # Call helper function which possibly converts this using DOS-style short mode.
39723  # If so, the updated path is stored in $new_path.
39724  new_path="$input_to_shortpath"
39725
39726  input_path="$input_to_shortpath"
39727  # Check if we need to convert this using DOS-style short mode. If the path
39728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39729  # take no chances and rewrite it.
39730  # Note: m4 eats our [], so we need to use [ and ] instead.
39731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39732  if test "x$has_forbidden_chars" != x; then
39733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39737      # Going to short mode and back again did indeed matter. Since short mode is
39738      # case insensitive, let's make it lowercase to improve readability.
39739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39740      # Now convert it back to Unix-style (cygpath)
39741      input_path=`$CYGPATH -u "$shortmode_path"`
39742      new_path="$input_path"
39743    fi
39744  fi
39745
39746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39747  if test "x$test_cygdrive_prefix" = x; then
39748    # As a simple fix, exclude /usr/bin since it's not a real path.
39749    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39751      # a path prefixed by /cygdrive for fixpath to work.
39752      new_path="$CYGWIN_ROOT_PATH$input_path"
39753    fi
39754  fi
39755
39756  # remove trailing .exe if any
39757  new_path="${new_path/%.exe/}"
39758
39759    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39760
39761  # First separate the path from the arguments. This will split at the first
39762  # space.
39763  complete="$MT"
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="$path"
39771
39772  windows_path="$new_path"
39773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39774    unix_path=`$CYGPATH -u "$windows_path"`
39775    new_path="$unix_path"
39776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39778    new_path="$unix_path"
39779  fi
39780
39781
39782  # Now try to locate executable using which
39783  new_path=`$WHICH "$new_path" 2> /dev/null`
39784
39785  if test "x$new_path" = x; then
39786    # Oops. Which didn't find the executable.
39787    # The splitting of arguments from the executable at a space might have been incorrect,
39788    # since paths with space are more likely in Windows. Give it another try with the whole
39789    # argument.
39790    path="$complete"
39791    arguments="EOL"
39792    new_path="$path"
39793
39794  windows_path="$new_path"
39795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39796    unix_path=`$CYGPATH -u "$windows_path"`
39797    new_path="$unix_path"
39798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39800    new_path="$unix_path"
39801  fi
39802
39803
39804    new_path=`$WHICH "$new_path" 2> /dev/null`
39805    # bat and cmd files are not always considered executable in MSYS causing which
39806    # to not find them
39807    if test "x$new_path" = x \
39808        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39809        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39810      new_path="$path"
39811
39812  windows_path="$new_path"
39813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39814    unix_path=`$CYGPATH -u "$windows_path"`
39815    new_path="$unix_path"
39816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39818    new_path="$unix_path"
39819  fi
39820
39821    fi
39822
39823    if test "x$new_path" = x; then
39824      # It's still not found. Now this is an unrecoverable error.
39825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39826$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39827      has_space=`$ECHO "$complete" | $GREP " "`
39828      if test "x$has_space" != x; then
39829        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39830$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39831      fi
39832      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39833    fi
39834  fi
39835
39836  # Now new_path has a complete unix path to the binary
39837  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39838    # Keep paths in /bin as-is, but remove trailing .exe if any
39839    new_path="${new_path/%.exe/}"
39840    # Do not save /bin paths to all_fixpath_prefixes!
39841  else
39842    # Not in mixed or Windows style, start by that.
39843    new_path=`cmd //c echo $new_path`
39844
39845  input_path="$new_path"
39846  # Check if we need to convert this using DOS-style short mode. If the path
39847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39848  # take no chances and rewrite it.
39849  # Note: m4 eats our [], so we need to use [ and ] instead.
39850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39851  if test "x$has_forbidden_chars" != x; then
39852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39854  fi
39855
39856    # Output is in $new_path
39857
39858  windows_path="$new_path"
39859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39860    unix_path=`$CYGPATH -u "$windows_path"`
39861    new_path="$unix_path"
39862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39864    new_path="$unix_path"
39865  fi
39866
39867    # remove trailing .exe if any
39868    new_path="${new_path/%.exe/}"
39869
39870    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39871    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39872  fi
39873
39874    else
39875      # We're on a unix platform. Hooray! :)
39876      # First separate the path from the arguments. This will split at the first
39877      # space.
39878      complete="$MT"
39879      path="${complete%% *}"
39880      tmp="$complete EOL"
39881      arguments="${tmp#* }"
39882
39883      # Cannot rely on the command "which" here since it doesn't always work.
39884      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39885      if test -z "$is_absolute_path"; then
39886        # Path to executable is not absolute. Find it.
39887        IFS_save="$IFS"
39888        IFS=:
39889        for p in $PATH; do
39890          if test -f "$p/$path" && test -x "$p/$path"; then
39891            new_path="$p/$path"
39892            break
39893          fi
39894        done
39895        IFS="$IFS_save"
39896      else
39897        # This is an absolute path, we can use it without further modifications.
39898        new_path="$path"
39899      fi
39900
39901      if test "x$new_path" = x; then
39902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39903$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39904        has_space=`$ECHO "$complete" | $GREP " "`
39905        if test "x$has_space" != x; then
39906          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39907$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39908        fi
39909        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39910      fi
39911    fi
39912
39913    # Now join together the path and the arguments once again
39914    if test "x$arguments" != xEOL; then
39915      new_complete="$new_path ${arguments% *}"
39916    else
39917      new_complete="$new_path"
39918    fi
39919
39920    if test "x$complete" != "x$new_complete"; then
39921      MT="$new_complete"
39922      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39923$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39924    fi
39925  fi
39926
39927    # Setup the resource compiler (RC)
39928    # Extract the first word of "rc", so it can be a program name with args.
39929set dummy rc; ac_word=$2
39930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39931$as_echo_n "checking for $ac_word... " >&6; }
39932if ${ac_cv_prog_RC+:} false; then :
39933  $as_echo_n "(cached) " >&6
39934else
39935  if test -n "$RC"; then
39936  ac_cv_prog_RC="$RC" # Let the user override the test.
39937else
39938  ac_prog_rejected=no
39939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39940for as_dir in $PATH
39941do
39942  IFS=$as_save_IFS
39943  test -z "$as_dir" && as_dir=.
39944    for ac_exec_ext in '' $ac_executable_extensions; do
39945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39946    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39947       ac_prog_rejected=yes
39948       continue
39949     fi
39950    ac_cv_prog_RC="rc"
39951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39952    break 2
39953  fi
39954done
39955  done
39956IFS=$as_save_IFS
39957
39958if test $ac_prog_rejected = yes; then
39959  # We found a bogon in the path, so make sure we never use it.
39960  set dummy $ac_cv_prog_RC
39961  shift
39962  if test $# != 0; then
39963    # We chose a different compiler from the bogus one.
39964    # However, it has the same basename, so the bogon will be chosen
39965    # first if we set RC to just the basename; use the full file name.
39966    shift
39967    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39968  fi
39969fi
39970fi
39971fi
39972RC=$ac_cv_prog_RC
39973if test -n "$RC"; then
39974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39975$as_echo "$RC" >&6; }
39976else
39977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39978$as_echo "no" >&6; }
39979fi
39980
39981
39982
39983  # Only process if variable expands to non-empty
39984
39985  if test "x$RC" != x; then
39986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39987
39988  # First separate the path from the arguments. This will split at the first
39989  # space.
39990  complete="$RC"
39991  path="${complete%% *}"
39992  tmp="$complete EOL"
39993  arguments="${tmp#* }"
39994
39995  # Input might be given as Windows format, start by converting to
39996  # unix format.
39997  new_path=`$CYGPATH -u "$path"`
39998
39999  # Now try to locate executable using which
40000  new_path=`$WHICH "$new_path" 2> /dev/null`
40001  # bat and cmd files are not always considered executable in cygwin causing which
40002  # to not find them
40003  if test "x$new_path" = x \
40004      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40005      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40006    new_path=`$CYGPATH -u "$path"`
40007  fi
40008  if test "x$new_path" = x; then
40009    # Oops. Which didn't find the executable.
40010    # The splitting of arguments from the executable at a space might have been incorrect,
40011    # since paths with space are more likely in Windows. Give it another try with the whole
40012    # argument.
40013    path="$complete"
40014    arguments="EOL"
40015    new_path=`$CYGPATH -u "$path"`
40016    new_path=`$WHICH "$new_path" 2> /dev/null`
40017    # bat and cmd files are not always considered executable in cygwin causing which
40018    # to not find them
40019    if test "x$new_path" = x \
40020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40022      new_path=`$CYGPATH -u "$path"`
40023    fi
40024    if test "x$new_path" = x; then
40025      # It's still not found. Now this is an unrecoverable error.
40026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40027$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40028      has_space=`$ECHO "$complete" | $GREP " "`
40029      if test "x$has_space" != x; then
40030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40032      fi
40033      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40034    fi
40035  fi
40036
40037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40040  # "foo.exe" is OK but "foo" is an error.
40041  #
40042  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40043  # It is also a way to make sure we got the proper file name for the real test later on.
40044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40045  if test "x$test_shortpath" = x; then
40046    # Short path failed, file does not exist as specified.
40047    # Try adding .exe or .cmd
40048    if test -f "${new_path}.exe"; then
40049      input_to_shortpath="${new_path}.exe"
40050    elif test -f "${new_path}.cmd"; then
40051      input_to_shortpath="${new_path}.cmd"
40052    else
40053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
40054$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
40055      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40056$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40057      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40058    fi
40059  else
40060    input_to_shortpath="$new_path"
40061  fi
40062
40063  # Call helper function which possibly converts this using DOS-style short mode.
40064  # If so, the updated path is stored in $new_path.
40065  new_path="$input_to_shortpath"
40066
40067  input_path="$input_to_shortpath"
40068  # Check if we need to convert this using DOS-style short mode. If the path
40069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40070  # take no chances and rewrite it.
40071  # Note: m4 eats our [], so we need to use [ and ] instead.
40072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40073  if test "x$has_forbidden_chars" != x; then
40074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40078      # Going to short mode and back again did indeed matter. Since short mode is
40079      # case insensitive, let's make it lowercase to improve readability.
40080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40081      # Now convert it back to Unix-style (cygpath)
40082      input_path=`$CYGPATH -u "$shortmode_path"`
40083      new_path="$input_path"
40084    fi
40085  fi
40086
40087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40088  if test "x$test_cygdrive_prefix" = x; then
40089    # As a simple fix, exclude /usr/bin since it's not a real path.
40090    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40092      # a path prefixed by /cygdrive for fixpath to work.
40093      new_path="$CYGWIN_ROOT_PATH$input_path"
40094    fi
40095  fi
40096
40097  # remove trailing .exe if any
40098  new_path="${new_path/%.exe/}"
40099
40100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40101
40102  # First separate the path from the arguments. This will split at the first
40103  # space.
40104  complete="$RC"
40105  path="${complete%% *}"
40106  tmp="$complete EOL"
40107  arguments="${tmp#* }"
40108
40109  # Input might be given as Windows format, start by converting to
40110  # unix format.
40111  new_path="$path"
40112
40113  windows_path="$new_path"
40114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40115    unix_path=`$CYGPATH -u "$windows_path"`
40116    new_path="$unix_path"
40117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40119    new_path="$unix_path"
40120  fi
40121
40122
40123  # Now try to locate executable using which
40124  new_path=`$WHICH "$new_path" 2> /dev/null`
40125
40126  if test "x$new_path" = x; then
40127    # Oops. Which didn't find the executable.
40128    # The splitting of arguments from the executable at a space might have been incorrect,
40129    # since paths with space are more likely in Windows. Give it another try with the whole
40130    # argument.
40131    path="$complete"
40132    arguments="EOL"
40133    new_path="$path"
40134
40135  windows_path="$new_path"
40136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40137    unix_path=`$CYGPATH -u "$windows_path"`
40138    new_path="$unix_path"
40139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40141    new_path="$unix_path"
40142  fi
40143
40144
40145    new_path=`$WHICH "$new_path" 2> /dev/null`
40146    # bat and cmd files are not always considered executable in MSYS causing which
40147    # to not find them
40148    if test "x$new_path" = x \
40149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40151      new_path="$path"
40152
40153  windows_path="$new_path"
40154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40155    unix_path=`$CYGPATH -u "$windows_path"`
40156    new_path="$unix_path"
40157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40159    new_path="$unix_path"
40160  fi
40161
40162    fi
40163
40164    if test "x$new_path" = x; then
40165      # It's still not found. Now this is an unrecoverable error.
40166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40167$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40168      has_space=`$ECHO "$complete" | $GREP " "`
40169      if test "x$has_space" != x; then
40170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40172      fi
40173      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40174    fi
40175  fi
40176
40177  # Now new_path has a complete unix path to the binary
40178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40179    # Keep paths in /bin as-is, but remove trailing .exe if any
40180    new_path="${new_path/%.exe/}"
40181    # Do not save /bin paths to all_fixpath_prefixes!
40182  else
40183    # Not in mixed or Windows style, start by that.
40184    new_path=`cmd //c echo $new_path`
40185
40186  input_path="$new_path"
40187  # Check if we need to convert this using DOS-style short mode. If the path
40188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40189  # take no chances and rewrite it.
40190  # Note: m4 eats our [], so we need to use [ and ] instead.
40191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40192  if test "x$has_forbidden_chars" != x; then
40193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40195  fi
40196
40197    # Output is in $new_path
40198
40199  windows_path="$new_path"
40200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40201    unix_path=`$CYGPATH -u "$windows_path"`
40202    new_path="$unix_path"
40203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40205    new_path="$unix_path"
40206  fi
40207
40208    # remove trailing .exe if any
40209    new_path="${new_path/%.exe/}"
40210
40211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40213  fi
40214
40215    else
40216      # We're on a unix platform. Hooray! :)
40217      # First separate the path from the arguments. This will split at the first
40218      # space.
40219      complete="$RC"
40220      path="${complete%% *}"
40221      tmp="$complete EOL"
40222      arguments="${tmp#* }"
40223
40224      # Cannot rely on the command "which" here since it doesn't always work.
40225      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40226      if test -z "$is_absolute_path"; then
40227        # Path to executable is not absolute. Find it.
40228        IFS_save="$IFS"
40229        IFS=:
40230        for p in $PATH; do
40231          if test -f "$p/$path" && test -x "$p/$path"; then
40232            new_path="$p/$path"
40233            break
40234          fi
40235        done
40236        IFS="$IFS_save"
40237      else
40238        # This is an absolute path, we can use it without further modifications.
40239        new_path="$path"
40240      fi
40241
40242      if test "x$new_path" = x; then
40243        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40244$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40245        has_space=`$ECHO "$complete" | $GREP " "`
40246        if test "x$has_space" != x; then
40247          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40249        fi
40250        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40251      fi
40252    fi
40253
40254    # Now join together the path and the arguments once again
40255    if test "x$arguments" != xEOL; then
40256      new_complete="$new_path ${arguments% *}"
40257    else
40258      new_complete="$new_path"
40259    fi
40260
40261    if test "x$complete" != "x$new_complete"; then
40262      RC="$new_complete"
40263      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40264$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40265    fi
40266  fi
40267
40268    # Extract the first word of "dumpbin", so it can be a program name with args.
40269set dummy dumpbin; ac_word=$2
40270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40271$as_echo_n "checking for $ac_word... " >&6; }
40272if ${ac_cv_prog_DUMPBIN+:} false; then :
40273  $as_echo_n "(cached) " >&6
40274else
40275  if test -n "$DUMPBIN"; then
40276  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40277else
40278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40279for as_dir in $PATH
40280do
40281  IFS=$as_save_IFS
40282  test -z "$as_dir" && as_dir=.
40283    for ac_exec_ext in '' $ac_executable_extensions; do
40284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40285    ac_cv_prog_DUMPBIN="dumpbin"
40286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40287    break 2
40288  fi
40289done
40290  done
40291IFS=$as_save_IFS
40292
40293fi
40294fi
40295DUMPBIN=$ac_cv_prog_DUMPBIN
40296if test -n "$DUMPBIN"; then
40297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40298$as_echo "$DUMPBIN" >&6; }
40299else
40300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40301$as_echo "no" >&6; }
40302fi
40303
40304
40305
40306  # Only process if variable expands to non-empty
40307
40308  if test "x$DUMPBIN" != x; then
40309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40310
40311  # First separate the path from the arguments. This will split at the first
40312  # space.
40313  complete="$DUMPBIN"
40314  path="${complete%% *}"
40315  tmp="$complete EOL"
40316  arguments="${tmp#* }"
40317
40318  # Input might be given as Windows format, start by converting to
40319  # unix format.
40320  new_path=`$CYGPATH -u "$path"`
40321
40322  # Now try to locate executable using which
40323  new_path=`$WHICH "$new_path" 2> /dev/null`
40324  # bat and cmd files are not always considered executable in cygwin causing which
40325  # to not find them
40326  if test "x$new_path" = x \
40327      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40328      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40329    new_path=`$CYGPATH -u "$path"`
40330  fi
40331  if test "x$new_path" = x; then
40332    # Oops. Which didn't find the executable.
40333    # The splitting of arguments from the executable at a space might have been incorrect,
40334    # since paths with space are more likely in Windows. Give it another try with the whole
40335    # argument.
40336    path="$complete"
40337    arguments="EOL"
40338    new_path=`$CYGPATH -u "$path"`
40339    new_path=`$WHICH "$new_path" 2> /dev/null`
40340    # bat and cmd files are not always considered executable in cygwin causing which
40341    # to not find them
40342    if test "x$new_path" = x \
40343        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40344        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40345      new_path=`$CYGPATH -u "$path"`
40346    fi
40347    if test "x$new_path" = x; then
40348      # It's still not found. Now this is an unrecoverable error.
40349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40350$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40351      has_space=`$ECHO "$complete" | $GREP " "`
40352      if test "x$has_space" != x; then
40353        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40354$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40355      fi
40356      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40357    fi
40358  fi
40359
40360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40363  # "foo.exe" is OK but "foo" is an error.
40364  #
40365  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40366  # It is also a way to make sure we got the proper file name for the real test later on.
40367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40368  if test "x$test_shortpath" = x; then
40369    # Short path failed, file does not exist as specified.
40370    # Try adding .exe or .cmd
40371    if test -f "${new_path}.exe"; then
40372      input_to_shortpath="${new_path}.exe"
40373    elif test -f "${new_path}.cmd"; then
40374      input_to_shortpath="${new_path}.cmd"
40375    else
40376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40377$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40378      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40379$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40380      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40381    fi
40382  else
40383    input_to_shortpath="$new_path"
40384  fi
40385
40386  # Call helper function which possibly converts this using DOS-style short mode.
40387  # If so, the updated path is stored in $new_path.
40388  new_path="$input_to_shortpath"
40389
40390  input_path="$input_to_shortpath"
40391  # Check if we need to convert this using DOS-style short mode. If the path
40392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40393  # take no chances and rewrite it.
40394  # Note: m4 eats our [], so we need to use [ and ] instead.
40395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40396  if test "x$has_forbidden_chars" != x; then
40397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40401      # Going to short mode and back again did indeed matter. Since short mode is
40402      # case insensitive, let's make it lowercase to improve readability.
40403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40404      # Now convert it back to Unix-style (cygpath)
40405      input_path=`$CYGPATH -u "$shortmode_path"`
40406      new_path="$input_path"
40407    fi
40408  fi
40409
40410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40411  if test "x$test_cygdrive_prefix" = x; then
40412    # As a simple fix, exclude /usr/bin since it's not a real path.
40413    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40415      # a path prefixed by /cygdrive for fixpath to work.
40416      new_path="$CYGWIN_ROOT_PATH$input_path"
40417    fi
40418  fi
40419
40420  # remove trailing .exe if any
40421  new_path="${new_path/%.exe/}"
40422
40423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40424
40425  # First separate the path from the arguments. This will split at the first
40426  # space.
40427  complete="$DUMPBIN"
40428  path="${complete%% *}"
40429  tmp="$complete EOL"
40430  arguments="${tmp#* }"
40431
40432  # Input might be given as Windows format, start by converting to
40433  # unix format.
40434  new_path="$path"
40435
40436  windows_path="$new_path"
40437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40438    unix_path=`$CYGPATH -u "$windows_path"`
40439    new_path="$unix_path"
40440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40442    new_path="$unix_path"
40443  fi
40444
40445
40446  # Now try to locate executable using which
40447  new_path=`$WHICH "$new_path" 2> /dev/null`
40448
40449  if test "x$new_path" = x; then
40450    # Oops. Which didn't find the executable.
40451    # The splitting of arguments from the executable at a space might have been incorrect,
40452    # since paths with space are more likely in Windows. Give it another try with the whole
40453    # argument.
40454    path="$complete"
40455    arguments="EOL"
40456    new_path="$path"
40457
40458  windows_path="$new_path"
40459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40460    unix_path=`$CYGPATH -u "$windows_path"`
40461    new_path="$unix_path"
40462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40464    new_path="$unix_path"
40465  fi
40466
40467
40468    new_path=`$WHICH "$new_path" 2> /dev/null`
40469    # bat and cmd files are not always considered executable in MSYS causing which
40470    # to not find them
40471    if test "x$new_path" = x \
40472        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40473        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40474      new_path="$path"
40475
40476  windows_path="$new_path"
40477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40478    unix_path=`$CYGPATH -u "$windows_path"`
40479    new_path="$unix_path"
40480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40482    new_path="$unix_path"
40483  fi
40484
40485    fi
40486
40487    if test "x$new_path" = x; then
40488      # It's still not found. Now this is an unrecoverable error.
40489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40490$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40491      has_space=`$ECHO "$complete" | $GREP " "`
40492      if test "x$has_space" != x; then
40493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40495      fi
40496      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40497    fi
40498  fi
40499
40500  # Now new_path has a complete unix path to the binary
40501  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40502    # Keep paths in /bin as-is, but remove trailing .exe if any
40503    new_path="${new_path/%.exe/}"
40504    # Do not save /bin paths to all_fixpath_prefixes!
40505  else
40506    # Not in mixed or Windows style, start by that.
40507    new_path=`cmd //c echo $new_path`
40508
40509  input_path="$new_path"
40510  # Check if we need to convert this using DOS-style short mode. If the path
40511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40512  # take no chances and rewrite it.
40513  # Note: m4 eats our [], so we need to use [ and ] instead.
40514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40515  if test "x$has_forbidden_chars" != x; then
40516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40518  fi
40519
40520    # Output is in $new_path
40521
40522  windows_path="$new_path"
40523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40524    unix_path=`$CYGPATH -u "$windows_path"`
40525    new_path="$unix_path"
40526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40528    new_path="$unix_path"
40529  fi
40530
40531    # remove trailing .exe if any
40532    new_path="${new_path/%.exe/}"
40533
40534    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40535    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40536  fi
40537
40538    else
40539      # We're on a unix platform. Hooray! :)
40540      # First separate the path from the arguments. This will split at the first
40541      # space.
40542      complete="$DUMPBIN"
40543      path="${complete%% *}"
40544      tmp="$complete EOL"
40545      arguments="${tmp#* }"
40546
40547      # Cannot rely on the command "which" here since it doesn't always work.
40548      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40549      if test -z "$is_absolute_path"; then
40550        # Path to executable is not absolute. Find it.
40551        IFS_save="$IFS"
40552        IFS=:
40553        for p in $PATH; do
40554          if test -f "$p/$path" && test -x "$p/$path"; then
40555            new_path="$p/$path"
40556            break
40557          fi
40558        done
40559        IFS="$IFS_save"
40560      else
40561        # This is an absolute path, we can use it without further modifications.
40562        new_path="$path"
40563      fi
40564
40565      if test "x$new_path" = x; then
40566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40567$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40568        has_space=`$ECHO "$complete" | $GREP " "`
40569        if test "x$has_space" != x; then
40570          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40571$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40572        fi
40573        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40574      fi
40575    fi
40576
40577    # Now join together the path and the arguments once again
40578    if test "x$arguments" != xEOL; then
40579      new_complete="$new_path ${arguments% *}"
40580    else
40581      new_complete="$new_path"
40582    fi
40583
40584    if test "x$complete" != "x$new_complete"; then
40585      DUMPBIN="$new_complete"
40586      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40587$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40588    fi
40589  fi
40590
40591    # We need to check for 'msbuild.exe' because at the place where we expect to
40592    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40593    # won't find the 'msbuild.exe' executable in that case (and the
40594    # 'ac_executable_extensions' is unusable due to performance reasons).
40595    # Notice that we intentionally don't fix up the path to MSBUILD because we
40596    # will call it in a DOS shell during freetype detection on Windows (see
40597    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40598    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40599set dummy msbuild.exe; ac_word=$2
40600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40601$as_echo_n "checking for $ac_word... " >&6; }
40602if ${ac_cv_prog_MSBUILD+:} false; then :
40603  $as_echo_n "(cached) " >&6
40604else
40605  if test -n "$MSBUILD"; then
40606  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40607else
40608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40609for as_dir in $PATH
40610do
40611  IFS=$as_save_IFS
40612  test -z "$as_dir" && as_dir=.
40613    for ac_exec_ext in '' $ac_executable_extensions; do
40614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40615    ac_cv_prog_MSBUILD="msbuild.exe"
40616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40617    break 2
40618  fi
40619done
40620  done
40621IFS=$as_save_IFS
40622
40623fi
40624fi
40625MSBUILD=$ac_cv_prog_MSBUILD
40626if test -n "$MSBUILD"; then
40627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40628$as_echo "$MSBUILD" >&6; }
40629else
40630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40631$as_echo "no" >&6; }
40632fi
40633
40634
40635  fi
40636
40637  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40638
40639
40640  # Publish this variable in the help.
40641
40642
40643  if [ -z "${STRIP+x}" ]; then
40644    # The variable is not set by user, try to locate tool using the code snippet
40645    for ac_prog in strip
40646do
40647  # Extract the first word of "$ac_prog", so it can be a program name with args.
40648set dummy $ac_prog; ac_word=$2
40649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40650$as_echo_n "checking for $ac_word... " >&6; }
40651if ${ac_cv_path_STRIP+:} false; then :
40652  $as_echo_n "(cached) " >&6
40653else
40654  case $STRIP in
40655  [\\/]* | ?:[\\/]*)
40656  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40657  ;;
40658  *)
40659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40660for as_dir in $PATH
40661do
40662  IFS=$as_save_IFS
40663  test -z "$as_dir" && as_dir=.
40664    for ac_exec_ext in '' $ac_executable_extensions; do
40665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40666    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40668    break 2
40669  fi
40670done
40671  done
40672IFS=$as_save_IFS
40673
40674  ;;
40675esac
40676fi
40677STRIP=$ac_cv_path_STRIP
40678if test -n "$STRIP"; then
40679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40680$as_echo "$STRIP" >&6; }
40681else
40682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40683$as_echo "no" >&6; }
40684fi
40685
40686
40687  test -n "$STRIP" && break
40688done
40689
40690  else
40691    # The variable is set, but is it from the command line or the environment?
40692
40693    # Try to remove the string !STRIP! from our list.
40694    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40695    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40696      # If it failed, the variable was not from the command line. Ignore it,
40697      # but warn the user (except for BASH, which is always set by the calling BASH).
40698      if test "xSTRIP" != xBASH; then
40699        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40700$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40701      fi
40702      # Try to locate tool using the code snippet
40703      for ac_prog in strip
40704do
40705  # Extract the first word of "$ac_prog", so it can be a program name with args.
40706set dummy $ac_prog; ac_word=$2
40707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40708$as_echo_n "checking for $ac_word... " >&6; }
40709if ${ac_cv_path_STRIP+:} false; then :
40710  $as_echo_n "(cached) " >&6
40711else
40712  case $STRIP in
40713  [\\/]* | ?:[\\/]*)
40714  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40715  ;;
40716  *)
40717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40718for as_dir in $PATH
40719do
40720  IFS=$as_save_IFS
40721  test -z "$as_dir" && as_dir=.
40722    for ac_exec_ext in '' $ac_executable_extensions; do
40723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40724    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40726    break 2
40727  fi
40728done
40729  done
40730IFS=$as_save_IFS
40731
40732  ;;
40733esac
40734fi
40735STRIP=$ac_cv_path_STRIP
40736if test -n "$STRIP"; then
40737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40738$as_echo "$STRIP" >&6; }
40739else
40740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40741$as_echo "no" >&6; }
40742fi
40743
40744
40745  test -n "$STRIP" && break
40746done
40747
40748    else
40749      # If it succeeded, then it was overridden by the user. We will use it
40750      # for the tool.
40751
40752      # First remove it from the list of overridden variables, so we can test
40753      # for unknown variables in the end.
40754      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40755
40756      # Check if we try to supply an empty value
40757      if test "x$STRIP" = x; then
40758        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40759$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40761$as_echo_n "checking for STRIP... " >&6; }
40762        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40763$as_echo "disabled" >&6; }
40764      else
40765        # Check if the provided tool contains a complete path.
40766        tool_specified="$STRIP"
40767        tool_basename="${tool_specified##*/}"
40768        if test "x$tool_basename" = "x$tool_specified"; then
40769          # A command without a complete path is provided, search $PATH.
40770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40771$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40772          # Extract the first word of "$tool_basename", so it can be a program name with args.
40773set dummy $tool_basename; ac_word=$2
40774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40775$as_echo_n "checking for $ac_word... " >&6; }
40776if ${ac_cv_path_STRIP+:} false; then :
40777  $as_echo_n "(cached) " >&6
40778else
40779  case $STRIP in
40780  [\\/]* | ?:[\\/]*)
40781  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40782  ;;
40783  *)
40784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40785for as_dir in $PATH
40786do
40787  IFS=$as_save_IFS
40788  test -z "$as_dir" && as_dir=.
40789    for ac_exec_ext in '' $ac_executable_extensions; do
40790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40791    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40793    break 2
40794  fi
40795done
40796  done
40797IFS=$as_save_IFS
40798
40799  ;;
40800esac
40801fi
40802STRIP=$ac_cv_path_STRIP
40803if test -n "$STRIP"; then
40804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40805$as_echo "$STRIP" >&6; }
40806else
40807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40808$as_echo "no" >&6; }
40809fi
40810
40811
40812          if test "x$STRIP" = x; then
40813            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40814          fi
40815        else
40816          # Otherwise we believe it is a complete path. Use it as it is.
40817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40818$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40819          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40820$as_echo_n "checking for STRIP... " >&6; }
40821          if test ! -x "$tool_specified"; then
40822            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40823$as_echo "not found" >&6; }
40824            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40825          fi
40826          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40827$as_echo "$tool_specified" >&6; }
40828        fi
40829      fi
40830    fi
40831
40832  fi
40833
40834
40835
40836  # Only process if variable expands to non-empty
40837
40838  if test "x$STRIP" != x; then
40839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40840
40841  # First separate the path from the arguments. This will split at the first
40842  # space.
40843  complete="$STRIP"
40844  path="${complete%% *}"
40845  tmp="$complete EOL"
40846  arguments="${tmp#* }"
40847
40848  # Input might be given as Windows format, start by converting to
40849  # unix format.
40850  new_path=`$CYGPATH -u "$path"`
40851
40852  # Now try to locate executable using which
40853  new_path=`$WHICH "$new_path" 2> /dev/null`
40854  # bat and cmd files are not always considered executable in cygwin causing which
40855  # to not find them
40856  if test "x$new_path" = x \
40857      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40858      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40859    new_path=`$CYGPATH -u "$path"`
40860  fi
40861  if test "x$new_path" = x; then
40862    # Oops. Which didn't find the executable.
40863    # The splitting of arguments from the executable at a space might have been incorrect,
40864    # since paths with space are more likely in Windows. Give it another try with the whole
40865    # argument.
40866    path="$complete"
40867    arguments="EOL"
40868    new_path=`$CYGPATH -u "$path"`
40869    new_path=`$WHICH "$new_path" 2> /dev/null`
40870    # bat and cmd files are not always considered executable in cygwin causing which
40871    # to not find them
40872    if test "x$new_path" = x \
40873        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40874        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40875      new_path=`$CYGPATH -u "$path"`
40876    fi
40877    if test "x$new_path" = x; then
40878      # It's still not found. Now this is an unrecoverable error.
40879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40880$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40881      has_space=`$ECHO "$complete" | $GREP " "`
40882      if test "x$has_space" != x; then
40883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40885      fi
40886      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40887    fi
40888  fi
40889
40890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40893  # "foo.exe" is OK but "foo" is an error.
40894  #
40895  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40896  # It is also a way to make sure we got the proper file name for the real test later on.
40897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40898  if test "x$test_shortpath" = x; then
40899    # Short path failed, file does not exist as specified.
40900    # Try adding .exe or .cmd
40901    if test -f "${new_path}.exe"; then
40902      input_to_shortpath="${new_path}.exe"
40903    elif test -f "${new_path}.cmd"; then
40904      input_to_shortpath="${new_path}.cmd"
40905    else
40906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40907$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40908      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40909$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40910      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40911    fi
40912  else
40913    input_to_shortpath="$new_path"
40914  fi
40915
40916  # Call helper function which possibly converts this using DOS-style short mode.
40917  # If so, the updated path is stored in $new_path.
40918  new_path="$input_to_shortpath"
40919
40920  input_path="$input_to_shortpath"
40921  # Check if we need to convert this using DOS-style short mode. If the path
40922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40923  # take no chances and rewrite it.
40924  # Note: m4 eats our [], so we need to use [ and ] instead.
40925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40926  if test "x$has_forbidden_chars" != x; then
40927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40931      # Going to short mode and back again did indeed matter. Since short mode is
40932      # case insensitive, let's make it lowercase to improve readability.
40933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40934      # Now convert it back to Unix-style (cygpath)
40935      input_path=`$CYGPATH -u "$shortmode_path"`
40936      new_path="$input_path"
40937    fi
40938  fi
40939
40940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40941  if test "x$test_cygdrive_prefix" = x; then
40942    # As a simple fix, exclude /usr/bin since it's not a real path.
40943    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40945      # a path prefixed by /cygdrive for fixpath to work.
40946      new_path="$CYGWIN_ROOT_PATH$input_path"
40947    fi
40948  fi
40949
40950  # remove trailing .exe if any
40951  new_path="${new_path/%.exe/}"
40952
40953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40954
40955  # First separate the path from the arguments. This will split at the first
40956  # space.
40957  complete="$STRIP"
40958  path="${complete%% *}"
40959  tmp="$complete EOL"
40960  arguments="${tmp#* }"
40961
40962  # Input might be given as Windows format, start by converting to
40963  # unix format.
40964  new_path="$path"
40965
40966  windows_path="$new_path"
40967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40968    unix_path=`$CYGPATH -u "$windows_path"`
40969    new_path="$unix_path"
40970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40972    new_path="$unix_path"
40973  fi
40974
40975
40976  # Now try to locate executable using which
40977  new_path=`$WHICH "$new_path" 2> /dev/null`
40978
40979  if test "x$new_path" = x; then
40980    # Oops. Which didn't find the executable.
40981    # The splitting of arguments from the executable at a space might have been incorrect,
40982    # since paths with space are more likely in Windows. Give it another try with the whole
40983    # argument.
40984    path="$complete"
40985    arguments="EOL"
40986    new_path="$path"
40987
40988  windows_path="$new_path"
40989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40990    unix_path=`$CYGPATH -u "$windows_path"`
40991    new_path="$unix_path"
40992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40994    new_path="$unix_path"
40995  fi
40996
40997
40998    new_path=`$WHICH "$new_path" 2> /dev/null`
40999    # bat and cmd files are not always considered executable in MSYS causing which
41000    # to not find them
41001    if test "x$new_path" = x \
41002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41004      new_path="$path"
41005
41006  windows_path="$new_path"
41007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41008    unix_path=`$CYGPATH -u "$windows_path"`
41009    new_path="$unix_path"
41010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41012    new_path="$unix_path"
41013  fi
41014
41015    fi
41016
41017    if test "x$new_path" = x; then
41018      # It's still not found. Now this is an unrecoverable error.
41019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41020$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41021      has_space=`$ECHO "$complete" | $GREP " "`
41022      if test "x$has_space" != x; then
41023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41025      fi
41026      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41027    fi
41028  fi
41029
41030  # Now new_path has a complete unix path to the binary
41031  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41032    # Keep paths in /bin as-is, but remove trailing .exe if any
41033    new_path="${new_path/%.exe/}"
41034    # Do not save /bin paths to all_fixpath_prefixes!
41035  else
41036    # Not in mixed or Windows style, start by that.
41037    new_path=`cmd //c echo $new_path`
41038
41039  input_path="$new_path"
41040  # Check if we need to convert this using DOS-style short mode. If the path
41041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41042  # take no chances and rewrite it.
41043  # Note: m4 eats our [], so we need to use [ and ] instead.
41044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41045  if test "x$has_forbidden_chars" != x; then
41046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41048  fi
41049
41050    # Output is in $new_path
41051
41052  windows_path="$new_path"
41053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41054    unix_path=`$CYGPATH -u "$windows_path"`
41055    new_path="$unix_path"
41056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41058    new_path="$unix_path"
41059  fi
41060
41061    # remove trailing .exe if any
41062    new_path="${new_path/%.exe/}"
41063
41064    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41065    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41066  fi
41067
41068    else
41069      # We're on a unix platform. Hooray! :)
41070      # First separate the path from the arguments. This will split at the first
41071      # space.
41072      complete="$STRIP"
41073      path="${complete%% *}"
41074      tmp="$complete EOL"
41075      arguments="${tmp#* }"
41076
41077      # Cannot rely on the command "which" here since it doesn't always work.
41078      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41079      if test -z "$is_absolute_path"; then
41080        # Path to executable is not absolute. Find it.
41081        IFS_save="$IFS"
41082        IFS=:
41083        for p in $PATH; do
41084          if test -f "$p/$path" && test -x "$p/$path"; then
41085            new_path="$p/$path"
41086            break
41087          fi
41088        done
41089        IFS="$IFS_save"
41090      else
41091        # This is an absolute path, we can use it without further modifications.
41092        new_path="$path"
41093      fi
41094
41095      if test "x$new_path" = x; then
41096        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41097$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41098        has_space=`$ECHO "$complete" | $GREP " "`
41099        if test "x$has_space" != x; then
41100          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41101$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41102        fi
41103        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41104      fi
41105    fi
41106
41107    # Now join together the path and the arguments once again
41108    if test "x$arguments" != xEOL; then
41109      new_complete="$new_path ${arguments% *}"
41110    else
41111      new_complete="$new_path"
41112    fi
41113
41114    if test "x$complete" != "x$new_complete"; then
41115      STRIP="$new_complete"
41116      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41117$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41118    fi
41119  fi
41120
41121
41122
41123  # Publish this variable in the help.
41124
41125
41126  if [ -z "${NM+x}" ]; then
41127    # The variable is not set by user, try to locate tool using the code snippet
41128    for ac_prog in nm
41129do
41130  # Extract the first word of "$ac_prog", so it can be a program name with args.
41131set dummy $ac_prog; ac_word=$2
41132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41133$as_echo_n "checking for $ac_word... " >&6; }
41134if ${ac_cv_path_NM+:} false; then :
41135  $as_echo_n "(cached) " >&6
41136else
41137  case $NM in
41138  [\\/]* | ?:[\\/]*)
41139  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41140  ;;
41141  *)
41142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41143for as_dir in $PATH
41144do
41145  IFS=$as_save_IFS
41146  test -z "$as_dir" && as_dir=.
41147    for ac_exec_ext in '' $ac_executable_extensions; do
41148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41149    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41151    break 2
41152  fi
41153done
41154  done
41155IFS=$as_save_IFS
41156
41157  ;;
41158esac
41159fi
41160NM=$ac_cv_path_NM
41161if test -n "$NM"; then
41162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41163$as_echo "$NM" >&6; }
41164else
41165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41166$as_echo "no" >&6; }
41167fi
41168
41169
41170  test -n "$NM" && break
41171done
41172
41173  else
41174    # The variable is set, but is it from the command line or the environment?
41175
41176    # Try to remove the string !NM! from our list.
41177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41179      # If it failed, the variable was not from the command line. Ignore it,
41180      # but warn the user (except for BASH, which is always set by the calling BASH).
41181      if test "xNM" != xBASH; then
41182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41183$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41184      fi
41185      # Try to locate tool using the code snippet
41186      for ac_prog in nm
41187do
41188  # Extract the first word of "$ac_prog", so it can be a program name with args.
41189set dummy $ac_prog; ac_word=$2
41190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41191$as_echo_n "checking for $ac_word... " >&6; }
41192if ${ac_cv_path_NM+:} false; then :
41193  $as_echo_n "(cached) " >&6
41194else
41195  case $NM in
41196  [\\/]* | ?:[\\/]*)
41197  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41198  ;;
41199  *)
41200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41201for as_dir in $PATH
41202do
41203  IFS=$as_save_IFS
41204  test -z "$as_dir" && as_dir=.
41205    for ac_exec_ext in '' $ac_executable_extensions; do
41206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41207    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41209    break 2
41210  fi
41211done
41212  done
41213IFS=$as_save_IFS
41214
41215  ;;
41216esac
41217fi
41218NM=$ac_cv_path_NM
41219if test -n "$NM"; then
41220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41221$as_echo "$NM" >&6; }
41222else
41223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41224$as_echo "no" >&6; }
41225fi
41226
41227
41228  test -n "$NM" && break
41229done
41230
41231    else
41232      # If it succeeded, then it was overridden by the user. We will use it
41233      # for the tool.
41234
41235      # First remove it from the list of overridden variables, so we can test
41236      # for unknown variables in the end.
41237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41238
41239      # Check if we try to supply an empty value
41240      if test "x$NM" = x; then
41241        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41242$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41243        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41244$as_echo_n "checking for NM... " >&6; }
41245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41246$as_echo "disabled" >&6; }
41247      else
41248        # Check if the provided tool contains a complete path.
41249        tool_specified="$NM"
41250        tool_basename="${tool_specified##*/}"
41251        if test "x$tool_basename" = "x$tool_specified"; then
41252          # A command without a complete path is provided, search $PATH.
41253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41254$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41255          # Extract the first word of "$tool_basename", so it can be a program name with args.
41256set dummy $tool_basename; ac_word=$2
41257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41258$as_echo_n "checking for $ac_word... " >&6; }
41259if ${ac_cv_path_NM+:} false; then :
41260  $as_echo_n "(cached) " >&6
41261else
41262  case $NM in
41263  [\\/]* | ?:[\\/]*)
41264  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41265  ;;
41266  *)
41267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41268for as_dir in $PATH
41269do
41270  IFS=$as_save_IFS
41271  test -z "$as_dir" && as_dir=.
41272    for ac_exec_ext in '' $ac_executable_extensions; do
41273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41274    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41276    break 2
41277  fi
41278done
41279  done
41280IFS=$as_save_IFS
41281
41282  ;;
41283esac
41284fi
41285NM=$ac_cv_path_NM
41286if test -n "$NM"; then
41287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41288$as_echo "$NM" >&6; }
41289else
41290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41291$as_echo "no" >&6; }
41292fi
41293
41294
41295          if test "x$NM" = x; then
41296            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41297          fi
41298        else
41299          # Otherwise we believe it is a complete path. Use it as it is.
41300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41301$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41302          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41303$as_echo_n "checking for NM... " >&6; }
41304          if test ! -x "$tool_specified"; then
41305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41306$as_echo "not found" >&6; }
41307            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41308          fi
41309          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41310$as_echo "$tool_specified" >&6; }
41311        fi
41312      fi
41313    fi
41314
41315  fi
41316
41317
41318
41319  # Only process if variable expands to non-empty
41320
41321  if test "x$NM" != x; then
41322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41323
41324  # First separate the path from the arguments. This will split at the first
41325  # space.
41326  complete="$NM"
41327  path="${complete%% *}"
41328  tmp="$complete EOL"
41329  arguments="${tmp#* }"
41330
41331  # Input might be given as Windows format, start by converting to
41332  # unix format.
41333  new_path=`$CYGPATH -u "$path"`
41334
41335  # Now try to locate executable using which
41336  new_path=`$WHICH "$new_path" 2> /dev/null`
41337  # bat and cmd files are not always considered executable in cygwin causing which
41338  # to not find them
41339  if test "x$new_path" = x \
41340      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41341      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41342    new_path=`$CYGPATH -u "$path"`
41343  fi
41344  if test "x$new_path" = x; then
41345    # Oops. Which didn't find the executable.
41346    # The splitting of arguments from the executable at a space might have been incorrect,
41347    # since paths with space are more likely in Windows. Give it another try with the whole
41348    # argument.
41349    path="$complete"
41350    arguments="EOL"
41351    new_path=`$CYGPATH -u "$path"`
41352    new_path=`$WHICH "$new_path" 2> /dev/null`
41353    # bat and cmd files are not always considered executable in cygwin causing which
41354    # to not find them
41355    if test "x$new_path" = x \
41356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41358      new_path=`$CYGPATH -u "$path"`
41359    fi
41360    if test "x$new_path" = x; then
41361      # It's still not found. Now this is an unrecoverable error.
41362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41363$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41364      has_space=`$ECHO "$complete" | $GREP " "`
41365      if test "x$has_space" != x; then
41366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41368      fi
41369      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41370    fi
41371  fi
41372
41373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41376  # "foo.exe" is OK but "foo" is an error.
41377  #
41378  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41379  # It is also a way to make sure we got the proper file name for the real test later on.
41380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41381  if test "x$test_shortpath" = x; then
41382    # Short path failed, file does not exist as specified.
41383    # Try adding .exe or .cmd
41384    if test -f "${new_path}.exe"; then
41385      input_to_shortpath="${new_path}.exe"
41386    elif test -f "${new_path}.cmd"; then
41387      input_to_shortpath="${new_path}.cmd"
41388    else
41389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41390$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41393      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41394    fi
41395  else
41396    input_to_shortpath="$new_path"
41397  fi
41398
41399  # Call helper function which possibly converts this using DOS-style short mode.
41400  # If so, the updated path is stored in $new_path.
41401  new_path="$input_to_shortpath"
41402
41403  input_path="$input_to_shortpath"
41404  # Check if we need to convert this using DOS-style short mode. If the path
41405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41406  # take no chances and rewrite it.
41407  # Note: m4 eats our [], so we need to use [ and ] instead.
41408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41409  if test "x$has_forbidden_chars" != x; then
41410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41414      # Going to short mode and back again did indeed matter. Since short mode is
41415      # case insensitive, let's make it lowercase to improve readability.
41416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41417      # Now convert it back to Unix-style (cygpath)
41418      input_path=`$CYGPATH -u "$shortmode_path"`
41419      new_path="$input_path"
41420    fi
41421  fi
41422
41423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41424  if test "x$test_cygdrive_prefix" = x; then
41425    # As a simple fix, exclude /usr/bin since it's not a real path.
41426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41428      # a path prefixed by /cygdrive for fixpath to work.
41429      new_path="$CYGWIN_ROOT_PATH$input_path"
41430    fi
41431  fi
41432
41433  # remove trailing .exe if any
41434  new_path="${new_path/%.exe/}"
41435
41436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41437
41438  # First separate the path from the arguments. This will split at the first
41439  # space.
41440  complete="$NM"
41441  path="${complete%% *}"
41442  tmp="$complete EOL"
41443  arguments="${tmp#* }"
41444
41445  # Input might be given as Windows format, start by converting to
41446  # unix format.
41447  new_path="$path"
41448
41449  windows_path="$new_path"
41450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41451    unix_path=`$CYGPATH -u "$windows_path"`
41452    new_path="$unix_path"
41453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41455    new_path="$unix_path"
41456  fi
41457
41458
41459  # Now try to locate executable using which
41460  new_path=`$WHICH "$new_path" 2> /dev/null`
41461
41462  if test "x$new_path" = x; then
41463    # Oops. Which didn't find the executable.
41464    # The splitting of arguments from the executable at a space might have been incorrect,
41465    # since paths with space are more likely in Windows. Give it another try with the whole
41466    # argument.
41467    path="$complete"
41468    arguments="EOL"
41469    new_path="$path"
41470
41471  windows_path="$new_path"
41472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41473    unix_path=`$CYGPATH -u "$windows_path"`
41474    new_path="$unix_path"
41475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41477    new_path="$unix_path"
41478  fi
41479
41480
41481    new_path=`$WHICH "$new_path" 2> /dev/null`
41482    # bat and cmd files are not always considered executable in MSYS causing which
41483    # to not find them
41484    if test "x$new_path" = x \
41485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41487      new_path="$path"
41488
41489  windows_path="$new_path"
41490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41491    unix_path=`$CYGPATH -u "$windows_path"`
41492    new_path="$unix_path"
41493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41495    new_path="$unix_path"
41496  fi
41497
41498    fi
41499
41500    if test "x$new_path" = x; then
41501      # It's still not found. Now this is an unrecoverable error.
41502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41503$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41504      has_space=`$ECHO "$complete" | $GREP " "`
41505      if test "x$has_space" != x; then
41506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41508      fi
41509      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41510    fi
41511  fi
41512
41513  # Now new_path has a complete unix path to the binary
41514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41515    # Keep paths in /bin as-is, but remove trailing .exe if any
41516    new_path="${new_path/%.exe/}"
41517    # Do not save /bin paths to all_fixpath_prefixes!
41518  else
41519    # Not in mixed or Windows style, start by that.
41520    new_path=`cmd //c echo $new_path`
41521
41522  input_path="$new_path"
41523  # Check if we need to convert this using DOS-style short mode. If the path
41524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41525  # take no chances and rewrite it.
41526  # Note: m4 eats our [], so we need to use [ and ] instead.
41527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41528  if test "x$has_forbidden_chars" != x; then
41529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41531  fi
41532
41533    # Output is in $new_path
41534
41535  windows_path="$new_path"
41536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41537    unix_path=`$CYGPATH -u "$windows_path"`
41538    new_path="$unix_path"
41539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41541    new_path="$unix_path"
41542  fi
41543
41544    # remove trailing .exe if any
41545    new_path="${new_path/%.exe/}"
41546
41547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41549  fi
41550
41551    else
41552      # We're on a unix platform. Hooray! :)
41553      # First separate the path from the arguments. This will split at the first
41554      # space.
41555      complete="$NM"
41556      path="${complete%% *}"
41557      tmp="$complete EOL"
41558      arguments="${tmp#* }"
41559
41560      # Cannot rely on the command "which" here since it doesn't always work.
41561      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41562      if test -z "$is_absolute_path"; then
41563        # Path to executable is not absolute. Find it.
41564        IFS_save="$IFS"
41565        IFS=:
41566        for p in $PATH; do
41567          if test -f "$p/$path" && test -x "$p/$path"; then
41568            new_path="$p/$path"
41569            break
41570          fi
41571        done
41572        IFS="$IFS_save"
41573      else
41574        # This is an absolute path, we can use it without further modifications.
41575        new_path="$path"
41576      fi
41577
41578      if test "x$new_path" = x; then
41579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41580$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41581        has_space=`$ECHO "$complete" | $GREP " "`
41582        if test "x$has_space" != x; then
41583          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41585        fi
41586        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41587      fi
41588    fi
41589
41590    # Now join together the path and the arguments once again
41591    if test "x$arguments" != xEOL; then
41592      new_complete="$new_path ${arguments% *}"
41593    else
41594      new_complete="$new_path"
41595    fi
41596
41597    if test "x$complete" != "x$new_complete"; then
41598      NM="$new_complete"
41599      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41600$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41601    fi
41602  fi
41603
41604
41605
41606  # Publish this variable in the help.
41607
41608
41609  if [ -z "${GNM+x}" ]; then
41610    # The variable is not set by user, try to locate tool using the code snippet
41611    for ac_prog in gnm
41612do
41613  # Extract the first word of "$ac_prog", so it can be a program name with args.
41614set dummy $ac_prog; ac_word=$2
41615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41616$as_echo_n "checking for $ac_word... " >&6; }
41617if ${ac_cv_path_GNM+:} false; then :
41618  $as_echo_n "(cached) " >&6
41619else
41620  case $GNM in
41621  [\\/]* | ?:[\\/]*)
41622  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41623  ;;
41624  *)
41625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41626for as_dir in $PATH
41627do
41628  IFS=$as_save_IFS
41629  test -z "$as_dir" && as_dir=.
41630    for ac_exec_ext in '' $ac_executable_extensions; do
41631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41632    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41634    break 2
41635  fi
41636done
41637  done
41638IFS=$as_save_IFS
41639
41640  ;;
41641esac
41642fi
41643GNM=$ac_cv_path_GNM
41644if test -n "$GNM"; then
41645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41646$as_echo "$GNM" >&6; }
41647else
41648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41649$as_echo "no" >&6; }
41650fi
41651
41652
41653  test -n "$GNM" && break
41654done
41655
41656  else
41657    # The variable is set, but is it from the command line or the environment?
41658
41659    # Try to remove the string !GNM! from our list.
41660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41662      # If it failed, the variable was not from the command line. Ignore it,
41663      # but warn the user (except for BASH, which is always set by the calling BASH).
41664      if test "xGNM" != xBASH; then
41665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41666$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41667      fi
41668      # Try to locate tool using the code snippet
41669      for ac_prog in gnm
41670do
41671  # Extract the first word of "$ac_prog", so it can be a program name with args.
41672set dummy $ac_prog; ac_word=$2
41673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41674$as_echo_n "checking for $ac_word... " >&6; }
41675if ${ac_cv_path_GNM+:} false; then :
41676  $as_echo_n "(cached) " >&6
41677else
41678  case $GNM in
41679  [\\/]* | ?:[\\/]*)
41680  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41681  ;;
41682  *)
41683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41684for as_dir in $PATH
41685do
41686  IFS=$as_save_IFS
41687  test -z "$as_dir" && as_dir=.
41688    for ac_exec_ext in '' $ac_executable_extensions; do
41689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41690    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41692    break 2
41693  fi
41694done
41695  done
41696IFS=$as_save_IFS
41697
41698  ;;
41699esac
41700fi
41701GNM=$ac_cv_path_GNM
41702if test -n "$GNM"; then
41703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41704$as_echo "$GNM" >&6; }
41705else
41706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41707$as_echo "no" >&6; }
41708fi
41709
41710
41711  test -n "$GNM" && break
41712done
41713
41714    else
41715      # If it succeeded, then it was overridden by the user. We will use it
41716      # for the tool.
41717
41718      # First remove it from the list of overridden variables, so we can test
41719      # for unknown variables in the end.
41720      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41721
41722      # Check if we try to supply an empty value
41723      if test "x$GNM" = x; then
41724        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41725$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41727$as_echo_n "checking for GNM... " >&6; }
41728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41729$as_echo "disabled" >&6; }
41730      else
41731        # Check if the provided tool contains a complete path.
41732        tool_specified="$GNM"
41733        tool_basename="${tool_specified##*/}"
41734        if test "x$tool_basename" = "x$tool_specified"; then
41735          # A command without a complete path is provided, search $PATH.
41736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41737$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41738          # Extract the first word of "$tool_basename", so it can be a program name with args.
41739set dummy $tool_basename; ac_word=$2
41740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41741$as_echo_n "checking for $ac_word... " >&6; }
41742if ${ac_cv_path_GNM+:} false; then :
41743  $as_echo_n "(cached) " >&6
41744else
41745  case $GNM in
41746  [\\/]* | ?:[\\/]*)
41747  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41748  ;;
41749  *)
41750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41751for as_dir in $PATH
41752do
41753  IFS=$as_save_IFS
41754  test -z "$as_dir" && as_dir=.
41755    for ac_exec_ext in '' $ac_executable_extensions; do
41756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41757    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41759    break 2
41760  fi
41761done
41762  done
41763IFS=$as_save_IFS
41764
41765  ;;
41766esac
41767fi
41768GNM=$ac_cv_path_GNM
41769if test -n "$GNM"; then
41770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41771$as_echo "$GNM" >&6; }
41772else
41773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41774$as_echo "no" >&6; }
41775fi
41776
41777
41778          if test "x$GNM" = x; then
41779            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41780          fi
41781        else
41782          # Otherwise we believe it is a complete path. Use it as it is.
41783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41784$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41785          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41786$as_echo_n "checking for GNM... " >&6; }
41787          if test ! -x "$tool_specified"; then
41788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41789$as_echo "not found" >&6; }
41790            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41791          fi
41792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41793$as_echo "$tool_specified" >&6; }
41794        fi
41795      fi
41796    fi
41797
41798  fi
41799
41800
41801
41802  # Only process if variable expands to non-empty
41803
41804  if test "x$GNM" != x; then
41805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41806
41807  # First separate the path from the arguments. This will split at the first
41808  # space.
41809  complete="$GNM"
41810  path="${complete%% *}"
41811  tmp="$complete EOL"
41812  arguments="${tmp#* }"
41813
41814  # Input might be given as Windows format, start by converting to
41815  # unix format.
41816  new_path=`$CYGPATH -u "$path"`
41817
41818  # Now try to locate executable using which
41819  new_path=`$WHICH "$new_path" 2> /dev/null`
41820  # bat and cmd files are not always considered executable in cygwin causing which
41821  # to not find them
41822  if test "x$new_path" = x \
41823      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41824      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41825    new_path=`$CYGPATH -u "$path"`
41826  fi
41827  if test "x$new_path" = x; then
41828    # Oops. Which didn't find the executable.
41829    # The splitting of arguments from the executable at a space might have been incorrect,
41830    # since paths with space are more likely in Windows. Give it another try with the whole
41831    # argument.
41832    path="$complete"
41833    arguments="EOL"
41834    new_path=`$CYGPATH -u "$path"`
41835    new_path=`$WHICH "$new_path" 2> /dev/null`
41836    # bat and cmd files are not always considered executable in cygwin causing which
41837    # to not find them
41838    if test "x$new_path" = x \
41839        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41840        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41841      new_path=`$CYGPATH -u "$path"`
41842    fi
41843    if test "x$new_path" = x; then
41844      # It's still not found. Now this is an unrecoverable error.
41845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41846$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41847      has_space=`$ECHO "$complete" | $GREP " "`
41848      if test "x$has_space" != x; then
41849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41851      fi
41852      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41853    fi
41854  fi
41855
41856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41859  # "foo.exe" is OK but "foo" is an error.
41860  #
41861  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41862  # It is also a way to make sure we got the proper file name for the real test later on.
41863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41864  if test "x$test_shortpath" = x; then
41865    # Short path failed, file does not exist as specified.
41866    # Try adding .exe or .cmd
41867    if test -f "${new_path}.exe"; then
41868      input_to_shortpath="${new_path}.exe"
41869    elif test -f "${new_path}.cmd"; then
41870      input_to_shortpath="${new_path}.cmd"
41871    else
41872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41873$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41874      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41875$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41876      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41877    fi
41878  else
41879    input_to_shortpath="$new_path"
41880  fi
41881
41882  # Call helper function which possibly converts this using DOS-style short mode.
41883  # If so, the updated path is stored in $new_path.
41884  new_path="$input_to_shortpath"
41885
41886  input_path="$input_to_shortpath"
41887  # Check if we need to convert this using DOS-style short mode. If the path
41888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41889  # take no chances and rewrite it.
41890  # Note: m4 eats our [], so we need to use [ and ] instead.
41891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41892  if test "x$has_forbidden_chars" != x; then
41893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41897      # Going to short mode and back again did indeed matter. Since short mode is
41898      # case insensitive, let's make it lowercase to improve readability.
41899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41900      # Now convert it back to Unix-style (cygpath)
41901      input_path=`$CYGPATH -u "$shortmode_path"`
41902      new_path="$input_path"
41903    fi
41904  fi
41905
41906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41907  if test "x$test_cygdrive_prefix" = x; then
41908    # As a simple fix, exclude /usr/bin since it's not a real path.
41909    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41911      # a path prefixed by /cygdrive for fixpath to work.
41912      new_path="$CYGWIN_ROOT_PATH$input_path"
41913    fi
41914  fi
41915
41916  # remove trailing .exe if any
41917  new_path="${new_path/%.exe/}"
41918
41919    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41920
41921  # First separate the path from the arguments. This will split at the first
41922  # space.
41923  complete="$GNM"
41924  path="${complete%% *}"
41925  tmp="$complete EOL"
41926  arguments="${tmp#* }"
41927
41928  # Input might be given as Windows format, start by converting to
41929  # unix format.
41930  new_path="$path"
41931
41932  windows_path="$new_path"
41933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41934    unix_path=`$CYGPATH -u "$windows_path"`
41935    new_path="$unix_path"
41936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41938    new_path="$unix_path"
41939  fi
41940
41941
41942  # Now try to locate executable using which
41943  new_path=`$WHICH "$new_path" 2> /dev/null`
41944
41945  if test "x$new_path" = x; then
41946    # Oops. Which didn't find the executable.
41947    # The splitting of arguments from the executable at a space might have been incorrect,
41948    # since paths with space are more likely in Windows. Give it another try with the whole
41949    # argument.
41950    path="$complete"
41951    arguments="EOL"
41952    new_path="$path"
41953
41954  windows_path="$new_path"
41955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41956    unix_path=`$CYGPATH -u "$windows_path"`
41957    new_path="$unix_path"
41958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41960    new_path="$unix_path"
41961  fi
41962
41963
41964    new_path=`$WHICH "$new_path" 2> /dev/null`
41965    # bat and cmd files are not always considered executable in MSYS causing which
41966    # to not find them
41967    if test "x$new_path" = x \
41968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41970      new_path="$path"
41971
41972  windows_path="$new_path"
41973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41974    unix_path=`$CYGPATH -u "$windows_path"`
41975    new_path="$unix_path"
41976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41978    new_path="$unix_path"
41979  fi
41980
41981    fi
41982
41983    if test "x$new_path" = x; then
41984      # It's still not found. Now this is an unrecoverable error.
41985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41986$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41987      has_space=`$ECHO "$complete" | $GREP " "`
41988      if test "x$has_space" != x; then
41989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41991      fi
41992      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41993    fi
41994  fi
41995
41996  # Now new_path has a complete unix path to the binary
41997  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41998    # Keep paths in /bin as-is, but remove trailing .exe if any
41999    new_path="${new_path/%.exe/}"
42000    # Do not save /bin paths to all_fixpath_prefixes!
42001  else
42002    # Not in mixed or Windows style, start by that.
42003    new_path=`cmd //c echo $new_path`
42004
42005  input_path="$new_path"
42006  # Check if we need to convert this using DOS-style short mode. If the path
42007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42008  # take no chances and rewrite it.
42009  # Note: m4 eats our [], so we need to use [ and ] instead.
42010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42011  if test "x$has_forbidden_chars" != x; then
42012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42014  fi
42015
42016    # Output is in $new_path
42017
42018  windows_path="$new_path"
42019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42020    unix_path=`$CYGPATH -u "$windows_path"`
42021    new_path="$unix_path"
42022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42024    new_path="$unix_path"
42025  fi
42026
42027    # remove trailing .exe if any
42028    new_path="${new_path/%.exe/}"
42029
42030    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42031    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42032  fi
42033
42034    else
42035      # We're on a unix platform. Hooray! :)
42036      # First separate the path from the arguments. This will split at the first
42037      # space.
42038      complete="$GNM"
42039      path="${complete%% *}"
42040      tmp="$complete EOL"
42041      arguments="${tmp#* }"
42042
42043      # Cannot rely on the command "which" here since it doesn't always work.
42044      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42045      if test -z "$is_absolute_path"; then
42046        # Path to executable is not absolute. Find it.
42047        IFS_save="$IFS"
42048        IFS=:
42049        for p in $PATH; do
42050          if test -f "$p/$path" && test -x "$p/$path"; then
42051            new_path="$p/$path"
42052            break
42053          fi
42054        done
42055        IFS="$IFS_save"
42056      else
42057        # This is an absolute path, we can use it without further modifications.
42058        new_path="$path"
42059      fi
42060
42061      if test "x$new_path" = x; then
42062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
42063$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
42064        has_space=`$ECHO "$complete" | $GREP " "`
42065        if test "x$has_space" != x; then
42066          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42067$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42068        fi
42069        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42070      fi
42071    fi
42072
42073    # Now join together the path and the arguments once again
42074    if test "x$arguments" != xEOL; then
42075      new_complete="$new_path ${arguments% *}"
42076    else
42077      new_complete="$new_path"
42078    fi
42079
42080    if test "x$complete" != "x$new_complete"; then
42081      GNM="$new_complete"
42082      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
42083$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
42084    fi
42085  fi
42086
42087  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
42088    # FIXME: we should unify this with the solaris case above.
42089
42090
42091  # Publish this variable in the help.
42092
42093
42094  if [ -z "${STRIP+x}" ]; then
42095    # The variable is not set by user, try to locate tool using the code snippet
42096    if test -n "$ac_tool_prefix"; then
42097  for ac_prog in strip
42098  do
42099    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42100set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42102$as_echo_n "checking for $ac_word... " >&6; }
42103if ${ac_cv_prog_STRIP+:} false; then :
42104  $as_echo_n "(cached) " >&6
42105else
42106  if test -n "$STRIP"; then
42107  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42108else
42109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42110for as_dir in $PATH
42111do
42112  IFS=$as_save_IFS
42113  test -z "$as_dir" && as_dir=.
42114    for ac_exec_ext in '' $ac_executable_extensions; do
42115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42116    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42118    break 2
42119  fi
42120done
42121  done
42122IFS=$as_save_IFS
42123
42124fi
42125fi
42126STRIP=$ac_cv_prog_STRIP
42127if test -n "$STRIP"; then
42128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42129$as_echo "$STRIP" >&6; }
42130else
42131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42132$as_echo "no" >&6; }
42133fi
42134
42135
42136    test -n "$STRIP" && break
42137  done
42138fi
42139if test -z "$STRIP"; then
42140  ac_ct_STRIP=$STRIP
42141  for ac_prog in strip
42142do
42143  # Extract the first word of "$ac_prog", so it can be a program name with args.
42144set dummy $ac_prog; ac_word=$2
42145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42146$as_echo_n "checking for $ac_word... " >&6; }
42147if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42148  $as_echo_n "(cached) " >&6
42149else
42150  if test -n "$ac_ct_STRIP"; then
42151  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42152else
42153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42154for as_dir in $PATH
42155do
42156  IFS=$as_save_IFS
42157  test -z "$as_dir" && as_dir=.
42158    for ac_exec_ext in '' $ac_executable_extensions; do
42159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42160    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42162    break 2
42163  fi
42164done
42165  done
42166IFS=$as_save_IFS
42167
42168fi
42169fi
42170ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42171if test -n "$ac_ct_STRIP"; then
42172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42173$as_echo "$ac_ct_STRIP" >&6; }
42174else
42175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42176$as_echo "no" >&6; }
42177fi
42178
42179
42180  test -n "$ac_ct_STRIP" && break
42181done
42182
42183  if test "x$ac_ct_STRIP" = x; then
42184    STRIP=""
42185  else
42186    case $cross_compiling:$ac_tool_warned in
42187yes:)
42188{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42189$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42190ac_tool_warned=yes ;;
42191esac
42192    STRIP=$ac_ct_STRIP
42193  fi
42194fi
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 !STRIP! from our list.
42200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
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 "xSTRIP" != xBASH; then
42205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42206$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42207      fi
42208      # Try to locate tool using the code snippet
42209      if test -n "$ac_tool_prefix"; then
42210  for ac_prog in strip
42211  do
42212    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42213set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42215$as_echo_n "checking for $ac_word... " >&6; }
42216if ${ac_cv_prog_STRIP+:} false; then :
42217  $as_echo_n "(cached) " >&6
42218else
42219  if test -n "$STRIP"; then
42220  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42221else
42222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42223for as_dir in $PATH
42224do
42225  IFS=$as_save_IFS
42226  test -z "$as_dir" && as_dir=.
42227    for ac_exec_ext in '' $ac_executable_extensions; do
42228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42229    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42231    break 2
42232  fi
42233done
42234  done
42235IFS=$as_save_IFS
42236
42237fi
42238fi
42239STRIP=$ac_cv_prog_STRIP
42240if test -n "$STRIP"; then
42241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42242$as_echo "$STRIP" >&6; }
42243else
42244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42245$as_echo "no" >&6; }
42246fi
42247
42248
42249    test -n "$STRIP" && break
42250  done
42251fi
42252if test -z "$STRIP"; then
42253  ac_ct_STRIP=$STRIP
42254  for ac_prog in strip
42255do
42256  # Extract the first word of "$ac_prog", so it can be a program name with args.
42257set dummy $ac_prog; ac_word=$2
42258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42259$as_echo_n "checking for $ac_word... " >&6; }
42260if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42261  $as_echo_n "(cached) " >&6
42262else
42263  if test -n "$ac_ct_STRIP"; then
42264  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42265else
42266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42267for as_dir in $PATH
42268do
42269  IFS=$as_save_IFS
42270  test -z "$as_dir" && as_dir=.
42271    for ac_exec_ext in '' $ac_executable_extensions; do
42272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42273    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42275    break 2
42276  fi
42277done
42278  done
42279IFS=$as_save_IFS
42280
42281fi
42282fi
42283ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42284if test -n "$ac_ct_STRIP"; then
42285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42286$as_echo "$ac_ct_STRIP" >&6; }
42287else
42288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42289$as_echo "no" >&6; }
42290fi
42291
42292
42293  test -n "$ac_ct_STRIP" && break
42294done
42295
42296  if test "x$ac_ct_STRIP" = x; then
42297    STRIP=""
42298  else
42299    case $cross_compiling:$ac_tool_warned in
42300yes:)
42301{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42302$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42303ac_tool_warned=yes ;;
42304esac
42305    STRIP=$ac_ct_STRIP
42306  fi
42307fi
42308
42309    else
42310      # If it succeeded, then it was overridden by the user. We will use it
42311      # for the tool.
42312
42313      # First remove it from the list of overridden variables, so we can test
42314      # for unknown variables in the end.
42315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42316
42317      # Check if we try to supply an empty value
42318      if test "x$STRIP" = x; then
42319        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42320$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42322$as_echo_n "checking for STRIP... " >&6; }
42323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42324$as_echo "disabled" >&6; }
42325      else
42326        # Check if the provided tool contains a complete path.
42327        tool_specified="$STRIP"
42328        tool_basename="${tool_specified##*/}"
42329        if test "x$tool_basename" = "x$tool_specified"; then
42330          # A command without a complete path is provided, search $PATH.
42331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42332$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42333          # Extract the first word of "$tool_basename", so it can be a program name with args.
42334set dummy $tool_basename; ac_word=$2
42335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42336$as_echo_n "checking for $ac_word... " >&6; }
42337if ${ac_cv_path_STRIP+:} false; then :
42338  $as_echo_n "(cached) " >&6
42339else
42340  case $STRIP in
42341  [\\/]* | ?:[\\/]*)
42342  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42343  ;;
42344  *)
42345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42346for as_dir in $PATH
42347do
42348  IFS=$as_save_IFS
42349  test -z "$as_dir" && as_dir=.
42350    for ac_exec_ext in '' $ac_executable_extensions; do
42351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42352    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42354    break 2
42355  fi
42356done
42357  done
42358IFS=$as_save_IFS
42359
42360  ;;
42361esac
42362fi
42363STRIP=$ac_cv_path_STRIP
42364if test -n "$STRIP"; then
42365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42366$as_echo "$STRIP" >&6; }
42367else
42368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42369$as_echo "no" >&6; }
42370fi
42371
42372
42373          if test "x$STRIP" = x; then
42374            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42375          fi
42376        else
42377          # Otherwise we believe it is a complete path. Use it as it is.
42378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42379$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42380          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42381$as_echo_n "checking for STRIP... " >&6; }
42382          if test ! -x "$tool_specified"; then
42383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42384$as_echo "not found" >&6; }
42385            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42386          fi
42387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42388$as_echo "$tool_specified" >&6; }
42389        fi
42390      fi
42391    fi
42392
42393  fi
42394
42395
42396
42397  # Only process if variable expands to non-empty
42398
42399  if test "x$STRIP" != x; then
42400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42401
42402  # First separate the path from the arguments. This will split at the first
42403  # space.
42404  complete="$STRIP"
42405  path="${complete%% *}"
42406  tmp="$complete EOL"
42407  arguments="${tmp#* }"
42408
42409  # Input might be given as Windows format, start by converting to
42410  # unix format.
42411  new_path=`$CYGPATH -u "$path"`
42412
42413  # Now try to locate executable using which
42414  new_path=`$WHICH "$new_path" 2> /dev/null`
42415  # bat and cmd files are not always considered executable in cygwin causing which
42416  # to not find them
42417  if test "x$new_path" = x \
42418      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42419      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42420    new_path=`$CYGPATH -u "$path"`
42421  fi
42422  if test "x$new_path" = x; then
42423    # Oops. Which didn't find the executable.
42424    # The splitting of arguments from the executable at a space might have been incorrect,
42425    # since paths with space are more likely in Windows. Give it another try with the whole
42426    # argument.
42427    path="$complete"
42428    arguments="EOL"
42429    new_path=`$CYGPATH -u "$path"`
42430    new_path=`$WHICH "$new_path" 2> /dev/null`
42431    # bat and cmd files are not always considered executable in cygwin causing which
42432    # to not find them
42433    if test "x$new_path" = x \
42434        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42435        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42436      new_path=`$CYGPATH -u "$path"`
42437    fi
42438    if test "x$new_path" = x; then
42439      # It's still not found. Now this is an unrecoverable error.
42440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42441$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42442      has_space=`$ECHO "$complete" | $GREP " "`
42443      if test "x$has_space" != x; then
42444        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42445$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42446      fi
42447      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42448    fi
42449  fi
42450
42451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42454  # "foo.exe" is OK but "foo" is an error.
42455  #
42456  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42457  # It is also a way to make sure we got the proper file name for the real test later on.
42458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42459  if test "x$test_shortpath" = x; then
42460    # Short path failed, file does not exist as specified.
42461    # Try adding .exe or .cmd
42462    if test -f "${new_path}.exe"; then
42463      input_to_shortpath="${new_path}.exe"
42464    elif test -f "${new_path}.cmd"; then
42465      input_to_shortpath="${new_path}.cmd"
42466    else
42467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42468$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42469      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42470$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42471      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42472    fi
42473  else
42474    input_to_shortpath="$new_path"
42475  fi
42476
42477  # Call helper function which possibly converts this using DOS-style short mode.
42478  # If so, the updated path is stored in $new_path.
42479  new_path="$input_to_shortpath"
42480
42481  input_path="$input_to_shortpath"
42482  # Check if we need to convert this using DOS-style short mode. If the path
42483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42484  # take no chances and rewrite it.
42485  # Note: m4 eats our [], so we need to use [ and ] instead.
42486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42487  if test "x$has_forbidden_chars" != x; then
42488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42492      # Going to short mode and back again did indeed matter. Since short mode is
42493      # case insensitive, let's make it lowercase to improve readability.
42494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42495      # Now convert it back to Unix-style (cygpath)
42496      input_path=`$CYGPATH -u "$shortmode_path"`
42497      new_path="$input_path"
42498    fi
42499  fi
42500
42501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42502  if test "x$test_cygdrive_prefix" = x; then
42503    # As a simple fix, exclude /usr/bin since it's not a real path.
42504    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42506      # a path prefixed by /cygdrive for fixpath to work.
42507      new_path="$CYGWIN_ROOT_PATH$input_path"
42508    fi
42509  fi
42510
42511  # remove trailing .exe if any
42512  new_path="${new_path/%.exe/}"
42513
42514    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42515
42516  # First separate the path from the arguments. This will split at the first
42517  # space.
42518  complete="$STRIP"
42519  path="${complete%% *}"
42520  tmp="$complete EOL"
42521  arguments="${tmp#* }"
42522
42523  # Input might be given as Windows format, start by converting to
42524  # unix format.
42525  new_path="$path"
42526
42527  windows_path="$new_path"
42528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42529    unix_path=`$CYGPATH -u "$windows_path"`
42530    new_path="$unix_path"
42531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42533    new_path="$unix_path"
42534  fi
42535
42536
42537  # Now try to locate executable using which
42538  new_path=`$WHICH "$new_path" 2> /dev/null`
42539
42540  if test "x$new_path" = x; then
42541    # Oops. Which didn't find the executable.
42542    # The splitting of arguments from the executable at a space might have been incorrect,
42543    # since paths with space are more likely in Windows. Give it another try with the whole
42544    # argument.
42545    path="$complete"
42546    arguments="EOL"
42547    new_path="$path"
42548
42549  windows_path="$new_path"
42550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42551    unix_path=`$CYGPATH -u "$windows_path"`
42552    new_path="$unix_path"
42553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42555    new_path="$unix_path"
42556  fi
42557
42558
42559    new_path=`$WHICH "$new_path" 2> /dev/null`
42560    # bat and cmd files are not always considered executable in MSYS causing which
42561    # to not find them
42562    if test "x$new_path" = x \
42563        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42564        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42565      new_path="$path"
42566
42567  windows_path="$new_path"
42568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42569    unix_path=`$CYGPATH -u "$windows_path"`
42570    new_path="$unix_path"
42571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42573    new_path="$unix_path"
42574  fi
42575
42576    fi
42577
42578    if test "x$new_path" = x; then
42579      # It's still not found. Now this is an unrecoverable error.
42580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42581$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42582      has_space=`$ECHO "$complete" | $GREP " "`
42583      if test "x$has_space" != x; then
42584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42586      fi
42587      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42588    fi
42589  fi
42590
42591  # Now new_path has a complete unix path to the binary
42592  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42593    # Keep paths in /bin as-is, but remove trailing .exe if any
42594    new_path="${new_path/%.exe/}"
42595    # Do not save /bin paths to all_fixpath_prefixes!
42596  else
42597    # Not in mixed or Windows style, start by that.
42598    new_path=`cmd //c echo $new_path`
42599
42600  input_path="$new_path"
42601  # Check if we need to convert this using DOS-style short mode. If the path
42602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42603  # take no chances and rewrite it.
42604  # Note: m4 eats our [], so we need to use [ and ] instead.
42605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42606  if test "x$has_forbidden_chars" != x; then
42607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42609  fi
42610
42611    # Output is in $new_path
42612
42613  windows_path="$new_path"
42614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42615    unix_path=`$CYGPATH -u "$windows_path"`
42616    new_path="$unix_path"
42617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42619    new_path="$unix_path"
42620  fi
42621
42622    # remove trailing .exe if any
42623    new_path="${new_path/%.exe/}"
42624
42625    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42626    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42627  fi
42628
42629    else
42630      # We're on a unix platform. Hooray! :)
42631      # First separate the path from the arguments. This will split at the first
42632      # space.
42633      complete="$STRIP"
42634      path="${complete%% *}"
42635      tmp="$complete EOL"
42636      arguments="${tmp#* }"
42637
42638      # Cannot rely on the command "which" here since it doesn't always work.
42639      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42640      if test -z "$is_absolute_path"; then
42641        # Path to executable is not absolute. Find it.
42642        IFS_save="$IFS"
42643        IFS=:
42644        for p in $PATH; do
42645          if test -f "$p/$path" && test -x "$p/$path"; then
42646            new_path="$p/$path"
42647            break
42648          fi
42649        done
42650        IFS="$IFS_save"
42651      else
42652        # This is an absolute path, we can use it without further modifications.
42653        new_path="$path"
42654      fi
42655
42656      if test "x$new_path" = x; then
42657        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42658$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42659        has_space=`$ECHO "$complete" | $GREP " "`
42660        if test "x$has_space" != x; then
42661          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42662$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42663        fi
42664        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42665      fi
42666    fi
42667
42668    # Now join together the path and the arguments once again
42669    if test "x$arguments" != xEOL; then
42670      new_complete="$new_path ${arguments% *}"
42671    else
42672      new_complete="$new_path"
42673    fi
42674
42675    if test "x$complete" != "x$new_complete"; then
42676      STRIP="$new_complete"
42677      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42678$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42679    fi
42680  fi
42681
42682    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42683
42684
42685  # Publish this variable in the help.
42686
42687
42688  if [ -z "${NM+x}" ]; then
42689    # The variable is not set by user, try to locate tool using the code snippet
42690    if test -n "$ac_tool_prefix"; then
42691  for ac_prog in nm gcc-nm
42692  do
42693    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42694set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42696$as_echo_n "checking for $ac_word... " >&6; }
42697if ${ac_cv_prog_NM+:} false; then :
42698  $as_echo_n "(cached) " >&6
42699else
42700  if test -n "$NM"; then
42701  ac_cv_prog_NM="$NM" # Let the user override the test.
42702else
42703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42704for as_dir in $PATH
42705do
42706  IFS=$as_save_IFS
42707  test -z "$as_dir" && as_dir=.
42708    for ac_exec_ext in '' $ac_executable_extensions; do
42709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42710    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42712    break 2
42713  fi
42714done
42715  done
42716IFS=$as_save_IFS
42717
42718fi
42719fi
42720NM=$ac_cv_prog_NM
42721if test -n "$NM"; then
42722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42723$as_echo "$NM" >&6; }
42724else
42725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42726$as_echo "no" >&6; }
42727fi
42728
42729
42730    test -n "$NM" && break
42731  done
42732fi
42733if test -z "$NM"; then
42734  ac_ct_NM=$NM
42735  for ac_prog in nm gcc-nm
42736do
42737  # Extract the first word of "$ac_prog", so it can be a program name with args.
42738set dummy $ac_prog; ac_word=$2
42739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42740$as_echo_n "checking for $ac_word... " >&6; }
42741if ${ac_cv_prog_ac_ct_NM+:} false; then :
42742  $as_echo_n "(cached) " >&6
42743else
42744  if test -n "$ac_ct_NM"; then
42745  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42746else
42747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42748for as_dir in $PATH
42749do
42750  IFS=$as_save_IFS
42751  test -z "$as_dir" && as_dir=.
42752    for ac_exec_ext in '' $ac_executable_extensions; do
42753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42754    ac_cv_prog_ac_ct_NM="$ac_prog"
42755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42756    break 2
42757  fi
42758done
42759  done
42760IFS=$as_save_IFS
42761
42762fi
42763fi
42764ac_ct_NM=$ac_cv_prog_ac_ct_NM
42765if test -n "$ac_ct_NM"; then
42766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42767$as_echo "$ac_ct_NM" >&6; }
42768else
42769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42770$as_echo "no" >&6; }
42771fi
42772
42773
42774  test -n "$ac_ct_NM" && break
42775done
42776
42777  if test "x$ac_ct_NM" = x; then
42778    NM=""
42779  else
42780    case $cross_compiling:$ac_tool_warned in
42781yes:)
42782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42784ac_tool_warned=yes ;;
42785esac
42786    NM=$ac_ct_NM
42787  fi
42788fi
42789
42790  else
42791    # The variable is set, but is it from the command line or the environment?
42792
42793    # Try to remove the string !NM! from our list.
42794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42796      # If it failed, the variable was not from the command line. Ignore it,
42797      # but warn the user (except for BASH, which is always set by the calling BASH).
42798      if test "xNM" != xBASH; then
42799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42800$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42801      fi
42802      # Try to locate tool using the code snippet
42803      if test -n "$ac_tool_prefix"; then
42804  for ac_prog in nm gcc-nm
42805  do
42806    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42807set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42809$as_echo_n "checking for $ac_word... " >&6; }
42810if ${ac_cv_prog_NM+:} false; then :
42811  $as_echo_n "(cached) " >&6
42812else
42813  if test -n "$NM"; then
42814  ac_cv_prog_NM="$NM" # Let the user override the test.
42815else
42816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42817for as_dir in $PATH
42818do
42819  IFS=$as_save_IFS
42820  test -z "$as_dir" && as_dir=.
42821    for ac_exec_ext in '' $ac_executable_extensions; do
42822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42823    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42825    break 2
42826  fi
42827done
42828  done
42829IFS=$as_save_IFS
42830
42831fi
42832fi
42833NM=$ac_cv_prog_NM
42834if test -n "$NM"; then
42835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42836$as_echo "$NM" >&6; }
42837else
42838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42839$as_echo "no" >&6; }
42840fi
42841
42842
42843    test -n "$NM" && break
42844  done
42845fi
42846if test -z "$NM"; then
42847  ac_ct_NM=$NM
42848  for ac_prog in nm gcc-nm
42849do
42850  # Extract the first word of "$ac_prog", so it can be a program name with args.
42851set dummy $ac_prog; ac_word=$2
42852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42853$as_echo_n "checking for $ac_word... " >&6; }
42854if ${ac_cv_prog_ac_ct_NM+:} false; then :
42855  $as_echo_n "(cached) " >&6
42856else
42857  if test -n "$ac_ct_NM"; then
42858  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42859else
42860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42861for as_dir in $PATH
42862do
42863  IFS=$as_save_IFS
42864  test -z "$as_dir" && as_dir=.
42865    for ac_exec_ext in '' $ac_executable_extensions; do
42866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42867    ac_cv_prog_ac_ct_NM="$ac_prog"
42868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42869    break 2
42870  fi
42871done
42872  done
42873IFS=$as_save_IFS
42874
42875fi
42876fi
42877ac_ct_NM=$ac_cv_prog_ac_ct_NM
42878if test -n "$ac_ct_NM"; then
42879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42880$as_echo "$ac_ct_NM" >&6; }
42881else
42882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42883$as_echo "no" >&6; }
42884fi
42885
42886
42887  test -n "$ac_ct_NM" && break
42888done
42889
42890  if test "x$ac_ct_NM" = x; then
42891    NM=""
42892  else
42893    case $cross_compiling:$ac_tool_warned in
42894yes:)
42895{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42896$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42897ac_tool_warned=yes ;;
42898esac
42899    NM=$ac_ct_NM
42900  fi
42901fi
42902
42903    else
42904      # If it succeeded, then it was overridden by the user. We will use it
42905      # for the tool.
42906
42907      # First remove it from the list of overridden variables, so we can test
42908      # for unknown variables in the end.
42909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42910
42911      # Check if we try to supply an empty value
42912      if test "x$NM" = x; then
42913        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42914$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42916$as_echo_n "checking for NM... " >&6; }
42917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42918$as_echo "disabled" >&6; }
42919      else
42920        # Check if the provided tool contains a complete path.
42921        tool_specified="$NM"
42922        tool_basename="${tool_specified##*/}"
42923        if test "x$tool_basename" = "x$tool_specified"; then
42924          # A command without a complete path is provided, search $PATH.
42925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42926$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42927          # Extract the first word of "$tool_basename", so it can be a program name with args.
42928set dummy $tool_basename; ac_word=$2
42929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42930$as_echo_n "checking for $ac_word... " >&6; }
42931if ${ac_cv_path_NM+:} false; then :
42932  $as_echo_n "(cached) " >&6
42933else
42934  case $NM in
42935  [\\/]* | ?:[\\/]*)
42936  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42937  ;;
42938  *)
42939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42940for as_dir in $PATH
42941do
42942  IFS=$as_save_IFS
42943  test -z "$as_dir" && as_dir=.
42944    for ac_exec_ext in '' $ac_executable_extensions; do
42945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42946    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42948    break 2
42949  fi
42950done
42951  done
42952IFS=$as_save_IFS
42953
42954  ;;
42955esac
42956fi
42957NM=$ac_cv_path_NM
42958if test -n "$NM"; then
42959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42960$as_echo "$NM" >&6; }
42961else
42962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42963$as_echo "no" >&6; }
42964fi
42965
42966
42967          if test "x$NM" = x; then
42968            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42969          fi
42970        else
42971          # Otherwise we believe it is a complete path. Use it as it is.
42972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42973$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42974          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42975$as_echo_n "checking for NM... " >&6; }
42976          if test ! -x "$tool_specified"; then
42977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42978$as_echo "not found" >&6; }
42979            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42980          fi
42981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42982$as_echo "$tool_specified" >&6; }
42983        fi
42984      fi
42985    fi
42986
42987  fi
42988
42989
42990    else
42991
42992
42993  # Publish this variable in the help.
42994
42995
42996  if [ -z "${NM+x}" ]; then
42997    # The variable is not set by user, try to locate tool using the code snippet
42998    if test -n "$ac_tool_prefix"; then
42999  for ac_prog in nm
43000  do
43001    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43002set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43004$as_echo_n "checking for $ac_word... " >&6; }
43005if ${ac_cv_prog_NM+:} false; then :
43006  $as_echo_n "(cached) " >&6
43007else
43008  if test -n "$NM"; then
43009  ac_cv_prog_NM="$NM" # Let the user override the test.
43010else
43011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43012for as_dir in $PATH
43013do
43014  IFS=$as_save_IFS
43015  test -z "$as_dir" && as_dir=.
43016    for ac_exec_ext in '' $ac_executable_extensions; do
43017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43018    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43020    break 2
43021  fi
43022done
43023  done
43024IFS=$as_save_IFS
43025
43026fi
43027fi
43028NM=$ac_cv_prog_NM
43029if test -n "$NM"; then
43030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43031$as_echo "$NM" >&6; }
43032else
43033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43034$as_echo "no" >&6; }
43035fi
43036
43037
43038    test -n "$NM" && break
43039  done
43040fi
43041if test -z "$NM"; then
43042  ac_ct_NM=$NM
43043  for ac_prog in nm
43044do
43045  # Extract the first word of "$ac_prog", so it can be a program name with args.
43046set dummy $ac_prog; ac_word=$2
43047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43048$as_echo_n "checking for $ac_word... " >&6; }
43049if ${ac_cv_prog_ac_ct_NM+:} false; then :
43050  $as_echo_n "(cached) " >&6
43051else
43052  if test -n "$ac_ct_NM"; then
43053  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43054else
43055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43056for as_dir in $PATH
43057do
43058  IFS=$as_save_IFS
43059  test -z "$as_dir" && as_dir=.
43060    for ac_exec_ext in '' $ac_executable_extensions; do
43061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43062    ac_cv_prog_ac_ct_NM="$ac_prog"
43063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43064    break 2
43065  fi
43066done
43067  done
43068IFS=$as_save_IFS
43069
43070fi
43071fi
43072ac_ct_NM=$ac_cv_prog_ac_ct_NM
43073if test -n "$ac_ct_NM"; then
43074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43075$as_echo "$ac_ct_NM" >&6; }
43076else
43077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43078$as_echo "no" >&6; }
43079fi
43080
43081
43082  test -n "$ac_ct_NM" && break
43083done
43084
43085  if test "x$ac_ct_NM" = x; then
43086    NM=""
43087  else
43088    case $cross_compiling:$ac_tool_warned in
43089yes:)
43090{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43091$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43092ac_tool_warned=yes ;;
43093esac
43094    NM=$ac_ct_NM
43095  fi
43096fi
43097
43098  else
43099    # The variable is set, but is it from the command line or the environment?
43100
43101    # Try to remove the string !NM! from our list.
43102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
43103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43104      # If it failed, the variable was not from the command line. Ignore it,
43105      # but warn the user (except for BASH, which is always set by the calling BASH).
43106      if test "xNM" != xBASH; then
43107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
43108$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
43109      fi
43110      # Try to locate tool using the code snippet
43111      if test -n "$ac_tool_prefix"; then
43112  for ac_prog in nm
43113  do
43114    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43115set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43117$as_echo_n "checking for $ac_word... " >&6; }
43118if ${ac_cv_prog_NM+:} false; then :
43119  $as_echo_n "(cached) " >&6
43120else
43121  if test -n "$NM"; then
43122  ac_cv_prog_NM="$NM" # Let the user override the test.
43123else
43124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43125for as_dir in $PATH
43126do
43127  IFS=$as_save_IFS
43128  test -z "$as_dir" && as_dir=.
43129    for ac_exec_ext in '' $ac_executable_extensions; do
43130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43131    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43133    break 2
43134  fi
43135done
43136  done
43137IFS=$as_save_IFS
43138
43139fi
43140fi
43141NM=$ac_cv_prog_NM
43142if test -n "$NM"; then
43143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43144$as_echo "$NM" >&6; }
43145else
43146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43147$as_echo "no" >&6; }
43148fi
43149
43150
43151    test -n "$NM" && break
43152  done
43153fi
43154if test -z "$NM"; then
43155  ac_ct_NM=$NM
43156  for ac_prog in nm
43157do
43158  # Extract the first word of "$ac_prog", so it can be a program name with args.
43159set dummy $ac_prog; ac_word=$2
43160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43161$as_echo_n "checking for $ac_word... " >&6; }
43162if ${ac_cv_prog_ac_ct_NM+:} false; then :
43163  $as_echo_n "(cached) " >&6
43164else
43165  if test -n "$ac_ct_NM"; then
43166  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43167else
43168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43169for as_dir in $PATH
43170do
43171  IFS=$as_save_IFS
43172  test -z "$as_dir" && as_dir=.
43173    for ac_exec_ext in '' $ac_executable_extensions; do
43174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43175    ac_cv_prog_ac_ct_NM="$ac_prog"
43176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43177    break 2
43178  fi
43179done
43180  done
43181IFS=$as_save_IFS
43182
43183fi
43184fi
43185ac_ct_NM=$ac_cv_prog_ac_ct_NM
43186if test -n "$ac_ct_NM"; then
43187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43188$as_echo "$ac_ct_NM" >&6; }
43189else
43190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43191$as_echo "no" >&6; }
43192fi
43193
43194
43195  test -n "$ac_ct_NM" && break
43196done
43197
43198  if test "x$ac_ct_NM" = x; then
43199    NM=""
43200  else
43201    case $cross_compiling:$ac_tool_warned in
43202yes:)
43203{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43204$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43205ac_tool_warned=yes ;;
43206esac
43207    NM=$ac_ct_NM
43208  fi
43209fi
43210
43211    else
43212      # If it succeeded, then it was overridden by the user. We will use it
43213      # for the tool.
43214
43215      # First remove it from the list of overridden variables, so we can test
43216      # for unknown variables in the end.
43217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43218
43219      # Check if we try to supply an empty value
43220      if test "x$NM" = x; then
43221        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43222$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43224$as_echo_n "checking for NM... " >&6; }
43225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43226$as_echo "disabled" >&6; }
43227      else
43228        # Check if the provided tool contains a complete path.
43229        tool_specified="$NM"
43230        tool_basename="${tool_specified##*/}"
43231        if test "x$tool_basename" = "x$tool_specified"; then
43232          # A command without a complete path is provided, search $PATH.
43233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43234$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43235          # Extract the first word of "$tool_basename", so it can be a program name with args.
43236set dummy $tool_basename; ac_word=$2
43237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43238$as_echo_n "checking for $ac_word... " >&6; }
43239if ${ac_cv_path_NM+:} false; then :
43240  $as_echo_n "(cached) " >&6
43241else
43242  case $NM in
43243  [\\/]* | ?:[\\/]*)
43244  ac_cv_path_NM="$NM" # Let the user override the test with a path.
43245  ;;
43246  *)
43247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43248for as_dir in $PATH
43249do
43250  IFS=$as_save_IFS
43251  test -z "$as_dir" && as_dir=.
43252    for ac_exec_ext in '' $ac_executable_extensions; do
43253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43254    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43256    break 2
43257  fi
43258done
43259  done
43260IFS=$as_save_IFS
43261
43262  ;;
43263esac
43264fi
43265NM=$ac_cv_path_NM
43266if test -n "$NM"; then
43267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43268$as_echo "$NM" >&6; }
43269else
43270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43271$as_echo "no" >&6; }
43272fi
43273
43274
43275          if test "x$NM" = x; then
43276            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43277          fi
43278        else
43279          # Otherwise we believe it is a complete path. Use it as it is.
43280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43281$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43282          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43283$as_echo_n "checking for NM... " >&6; }
43284          if test ! -x "$tool_specified"; then
43285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43286$as_echo "not found" >&6; }
43287            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43288          fi
43289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43290$as_echo "$tool_specified" >&6; }
43291        fi
43292      fi
43293    fi
43294
43295  fi
43296
43297
43298    fi
43299
43300  # Only process if variable expands to non-empty
43301
43302  if test "x$NM" != x; then
43303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43304
43305  # First separate the path from the arguments. This will split at the first
43306  # space.
43307  complete="$NM"
43308  path="${complete%% *}"
43309  tmp="$complete EOL"
43310  arguments="${tmp#* }"
43311
43312  # Input might be given as Windows format, start by converting to
43313  # unix format.
43314  new_path=`$CYGPATH -u "$path"`
43315
43316  # Now try to locate executable using which
43317  new_path=`$WHICH "$new_path" 2> /dev/null`
43318  # bat and cmd files are not always considered executable in cygwin causing which
43319  # to not find them
43320  if test "x$new_path" = x \
43321      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43322      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43323    new_path=`$CYGPATH -u "$path"`
43324  fi
43325  if test "x$new_path" = x; then
43326    # Oops. Which didn't find the executable.
43327    # The splitting of arguments from the executable at a space might have been incorrect,
43328    # since paths with space are more likely in Windows. Give it another try with the whole
43329    # argument.
43330    path="$complete"
43331    arguments="EOL"
43332    new_path=`$CYGPATH -u "$path"`
43333    new_path=`$WHICH "$new_path" 2> /dev/null`
43334    # bat and cmd files are not always considered executable in cygwin causing which
43335    # to not find them
43336    if test "x$new_path" = x \
43337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43339      new_path=`$CYGPATH -u "$path"`
43340    fi
43341    if test "x$new_path" = x; then
43342      # It's still not found. Now this is an unrecoverable error.
43343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43344$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43345      has_space=`$ECHO "$complete" | $GREP " "`
43346      if test "x$has_space" != x; then
43347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43349      fi
43350      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43351    fi
43352  fi
43353
43354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43357  # "foo.exe" is OK but "foo" is an error.
43358  #
43359  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43360  # It is also a way to make sure we got the proper file name for the real test later on.
43361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43362  if test "x$test_shortpath" = x; then
43363    # Short path failed, file does not exist as specified.
43364    # Try adding .exe or .cmd
43365    if test -f "${new_path}.exe"; then
43366      input_to_shortpath="${new_path}.exe"
43367    elif test -f "${new_path}.cmd"; then
43368      input_to_shortpath="${new_path}.cmd"
43369    else
43370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43371$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43372      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43373$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43374      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43375    fi
43376  else
43377    input_to_shortpath="$new_path"
43378  fi
43379
43380  # Call helper function which possibly converts this using DOS-style short mode.
43381  # If so, the updated path is stored in $new_path.
43382  new_path="$input_to_shortpath"
43383
43384  input_path="$input_to_shortpath"
43385  # Check if we need to convert this using DOS-style short mode. If the path
43386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43387  # take no chances and rewrite it.
43388  # Note: m4 eats our [], so we need to use [ and ] instead.
43389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43390  if test "x$has_forbidden_chars" != x; then
43391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43395      # Going to short mode and back again did indeed matter. Since short mode is
43396      # case insensitive, let's make it lowercase to improve readability.
43397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43398      # Now convert it back to Unix-style (cygpath)
43399      input_path=`$CYGPATH -u "$shortmode_path"`
43400      new_path="$input_path"
43401    fi
43402  fi
43403
43404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43405  if test "x$test_cygdrive_prefix" = x; then
43406    # As a simple fix, exclude /usr/bin since it's not a real path.
43407    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43409      # a path prefixed by /cygdrive for fixpath to work.
43410      new_path="$CYGWIN_ROOT_PATH$input_path"
43411    fi
43412  fi
43413
43414  # remove trailing .exe if any
43415  new_path="${new_path/%.exe/}"
43416
43417    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43418
43419  # First separate the path from the arguments. This will split at the first
43420  # space.
43421  complete="$NM"
43422  path="${complete%% *}"
43423  tmp="$complete EOL"
43424  arguments="${tmp#* }"
43425
43426  # Input might be given as Windows format, start by converting to
43427  # unix format.
43428  new_path="$path"
43429
43430  windows_path="$new_path"
43431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43432    unix_path=`$CYGPATH -u "$windows_path"`
43433    new_path="$unix_path"
43434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43436    new_path="$unix_path"
43437  fi
43438
43439
43440  # Now try to locate executable using which
43441  new_path=`$WHICH "$new_path" 2> /dev/null`
43442
43443  if test "x$new_path" = x; then
43444    # Oops. Which didn't find the executable.
43445    # The splitting of arguments from the executable at a space might have been incorrect,
43446    # since paths with space are more likely in Windows. Give it another try with the whole
43447    # argument.
43448    path="$complete"
43449    arguments="EOL"
43450    new_path="$path"
43451
43452  windows_path="$new_path"
43453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43454    unix_path=`$CYGPATH -u "$windows_path"`
43455    new_path="$unix_path"
43456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43458    new_path="$unix_path"
43459  fi
43460
43461
43462    new_path=`$WHICH "$new_path" 2> /dev/null`
43463    # bat and cmd files are not always considered executable in MSYS causing which
43464    # to not find them
43465    if test "x$new_path" = x \
43466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43468      new_path="$path"
43469
43470  windows_path="$new_path"
43471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43472    unix_path=`$CYGPATH -u "$windows_path"`
43473    new_path="$unix_path"
43474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43476    new_path="$unix_path"
43477  fi
43478
43479    fi
43480
43481    if test "x$new_path" = x; then
43482      # It's still not found. Now this is an unrecoverable error.
43483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43484$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43485      has_space=`$ECHO "$complete" | $GREP " "`
43486      if test "x$has_space" != x; then
43487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43489      fi
43490      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43491    fi
43492  fi
43493
43494  # Now new_path has a complete unix path to the binary
43495  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43496    # Keep paths in /bin as-is, but remove trailing .exe if any
43497    new_path="${new_path/%.exe/}"
43498    # Do not save /bin paths to all_fixpath_prefixes!
43499  else
43500    # Not in mixed or Windows style, start by that.
43501    new_path=`cmd //c echo $new_path`
43502
43503  input_path="$new_path"
43504  # Check if we need to convert this using DOS-style short mode. If the path
43505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43506  # take no chances and rewrite it.
43507  # Note: m4 eats our [], so we need to use [ and ] instead.
43508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43509  if test "x$has_forbidden_chars" != x; then
43510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43512  fi
43513
43514    # Output is in $new_path
43515
43516  windows_path="$new_path"
43517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43518    unix_path=`$CYGPATH -u "$windows_path"`
43519    new_path="$unix_path"
43520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43522    new_path="$unix_path"
43523  fi
43524
43525    # remove trailing .exe if any
43526    new_path="${new_path/%.exe/}"
43527
43528    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43529    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43530  fi
43531
43532    else
43533      # We're on a unix platform. Hooray! :)
43534      # First separate the path from the arguments. This will split at the first
43535      # space.
43536      complete="$NM"
43537      path="${complete%% *}"
43538      tmp="$complete EOL"
43539      arguments="${tmp#* }"
43540
43541      # Cannot rely on the command "which" here since it doesn't always work.
43542      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43543      if test -z "$is_absolute_path"; then
43544        # Path to executable is not absolute. Find it.
43545        IFS_save="$IFS"
43546        IFS=:
43547        for p in $PATH; do
43548          if test -f "$p/$path" && test -x "$p/$path"; then
43549            new_path="$p/$path"
43550            break
43551          fi
43552        done
43553        IFS="$IFS_save"
43554      else
43555        # This is an absolute path, we can use it without further modifications.
43556        new_path="$path"
43557      fi
43558
43559      if test "x$new_path" = x; then
43560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43561$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43562        has_space=`$ECHO "$complete" | $GREP " "`
43563        if test "x$has_space" != x; then
43564          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43565$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43566        fi
43567        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43568      fi
43569    fi
43570
43571    # Now join together the path and the arguments once again
43572    if test "x$arguments" != xEOL; then
43573      new_complete="$new_path ${arguments% *}"
43574    else
43575      new_complete="$new_path"
43576    fi
43577
43578    if test "x$complete" != "x$new_complete"; then
43579      NM="$new_complete"
43580      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43581$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43582    fi
43583  fi
43584
43585    GNM="$NM"
43586
43587  fi
43588
43589  # objcopy is used for moving debug symbols to separate files when
43590  # full debug symbols are enabled.
43591  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43592
43593
43594  # Publish this variable in the help.
43595
43596
43597  if [ -z "${OBJCOPY+x}" ]; then
43598    # The variable is not set by user, try to locate tool using the code snippet
43599    if test -n "$ac_tool_prefix"; then
43600  for ac_prog in gobjcopy objcopy
43601  do
43602    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43603set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43605$as_echo_n "checking for $ac_word... " >&6; }
43606if ${ac_cv_prog_OBJCOPY+:} false; then :
43607  $as_echo_n "(cached) " >&6
43608else
43609  if test -n "$OBJCOPY"; then
43610  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43611else
43612as_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_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
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
43627fi
43628fi
43629OBJCOPY=$ac_cv_prog_OBJCOPY
43630if test -n "$OBJCOPY"; then
43631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43632$as_echo "$OBJCOPY" >&6; }
43633else
43634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43635$as_echo "no" >&6; }
43636fi
43637
43638
43639    test -n "$OBJCOPY" && break
43640  done
43641fi
43642if test -z "$OBJCOPY"; then
43643  ac_ct_OBJCOPY=$OBJCOPY
43644  for ac_prog in gobjcopy objcopy
43645do
43646  # Extract the first word of "$ac_prog", so it can be a program name with args.
43647set dummy $ac_prog; ac_word=$2
43648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43649$as_echo_n "checking for $ac_word... " >&6; }
43650if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43651  $as_echo_n "(cached) " >&6
43652else
43653  if test -n "$ac_ct_OBJCOPY"; then
43654  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43655else
43656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43657for as_dir in $PATH
43658do
43659  IFS=$as_save_IFS
43660  test -z "$as_dir" && as_dir=.
43661    for ac_exec_ext in '' $ac_executable_extensions; do
43662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43663    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43665    break 2
43666  fi
43667done
43668  done
43669IFS=$as_save_IFS
43670
43671fi
43672fi
43673ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43674if test -n "$ac_ct_OBJCOPY"; then
43675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43676$as_echo "$ac_ct_OBJCOPY" >&6; }
43677else
43678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43679$as_echo "no" >&6; }
43680fi
43681
43682
43683  test -n "$ac_ct_OBJCOPY" && break
43684done
43685
43686  if test "x$ac_ct_OBJCOPY" = x; then
43687    OBJCOPY=""
43688  else
43689    case $cross_compiling:$ac_tool_warned in
43690yes:)
43691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43693ac_tool_warned=yes ;;
43694esac
43695    OBJCOPY=$ac_ct_OBJCOPY
43696  fi
43697fi
43698
43699  else
43700    # The variable is set, but is it from the command line or the environment?
43701
43702    # Try to remove the string !OBJCOPY! from our list.
43703    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43704    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43705      # If it failed, the variable was not from the command line. Ignore it,
43706      # but warn the user (except for BASH, which is always set by the calling BASH).
43707      if test "xOBJCOPY" != xBASH; then
43708        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43709$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43710      fi
43711      # Try to locate tool using the code snippet
43712      if test -n "$ac_tool_prefix"; then
43713  for ac_prog in gobjcopy objcopy
43714  do
43715    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43716set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43718$as_echo_n "checking for $ac_word... " >&6; }
43719if ${ac_cv_prog_OBJCOPY+:} false; then :
43720  $as_echo_n "(cached) " >&6
43721else
43722  if test -n "$OBJCOPY"; then
43723  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43724else
43725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43726for as_dir in $PATH
43727do
43728  IFS=$as_save_IFS
43729  test -z "$as_dir" && as_dir=.
43730    for ac_exec_ext in '' $ac_executable_extensions; do
43731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43732    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43734    break 2
43735  fi
43736done
43737  done
43738IFS=$as_save_IFS
43739
43740fi
43741fi
43742OBJCOPY=$ac_cv_prog_OBJCOPY
43743if test -n "$OBJCOPY"; then
43744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43745$as_echo "$OBJCOPY" >&6; }
43746else
43747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43748$as_echo "no" >&6; }
43749fi
43750
43751
43752    test -n "$OBJCOPY" && break
43753  done
43754fi
43755if test -z "$OBJCOPY"; then
43756  ac_ct_OBJCOPY=$OBJCOPY
43757  for ac_prog in gobjcopy objcopy
43758do
43759  # Extract the first word of "$ac_prog", so it can be a program name with args.
43760set dummy $ac_prog; ac_word=$2
43761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43762$as_echo_n "checking for $ac_word... " >&6; }
43763if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43764  $as_echo_n "(cached) " >&6
43765else
43766  if test -n "$ac_ct_OBJCOPY"; then
43767  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43768else
43769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43770for as_dir in $PATH
43771do
43772  IFS=$as_save_IFS
43773  test -z "$as_dir" && as_dir=.
43774    for ac_exec_ext in '' $ac_executable_extensions; do
43775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43776    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43778    break 2
43779  fi
43780done
43781  done
43782IFS=$as_save_IFS
43783
43784fi
43785fi
43786ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43787if test -n "$ac_ct_OBJCOPY"; then
43788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43789$as_echo "$ac_ct_OBJCOPY" >&6; }
43790else
43791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43792$as_echo "no" >&6; }
43793fi
43794
43795
43796  test -n "$ac_ct_OBJCOPY" && break
43797done
43798
43799  if test "x$ac_ct_OBJCOPY" = x; then
43800    OBJCOPY=""
43801  else
43802    case $cross_compiling:$ac_tool_warned in
43803yes:)
43804{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43805$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43806ac_tool_warned=yes ;;
43807esac
43808    OBJCOPY=$ac_ct_OBJCOPY
43809  fi
43810fi
43811
43812    else
43813      # If it succeeded, then it was overridden by the user. We will use it
43814      # for the tool.
43815
43816      # First remove it from the list of overridden variables, so we can test
43817      # for unknown variables in the end.
43818      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43819
43820      # Check if we try to supply an empty value
43821      if test "x$OBJCOPY" = x; then
43822        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43823$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43824        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43825$as_echo_n "checking for OBJCOPY... " >&6; }
43826        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43827$as_echo "disabled" >&6; }
43828      else
43829        # Check if the provided tool contains a complete path.
43830        tool_specified="$OBJCOPY"
43831        tool_basename="${tool_specified##*/}"
43832        if test "x$tool_basename" = "x$tool_specified"; then
43833          # A command without a complete path is provided, search $PATH.
43834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43835$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43836          # Extract the first word of "$tool_basename", so it can be a program name with args.
43837set dummy $tool_basename; ac_word=$2
43838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43839$as_echo_n "checking for $ac_word... " >&6; }
43840if ${ac_cv_path_OBJCOPY+:} false; then :
43841  $as_echo_n "(cached) " >&6
43842else
43843  case $OBJCOPY in
43844  [\\/]* | ?:[\\/]*)
43845  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43846  ;;
43847  *)
43848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43849for as_dir in $PATH
43850do
43851  IFS=$as_save_IFS
43852  test -z "$as_dir" && as_dir=.
43853    for ac_exec_ext in '' $ac_executable_extensions; do
43854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43855    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43857    break 2
43858  fi
43859done
43860  done
43861IFS=$as_save_IFS
43862
43863  ;;
43864esac
43865fi
43866OBJCOPY=$ac_cv_path_OBJCOPY
43867if test -n "$OBJCOPY"; then
43868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43869$as_echo "$OBJCOPY" >&6; }
43870else
43871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43872$as_echo "no" >&6; }
43873fi
43874
43875
43876          if test "x$OBJCOPY" = x; then
43877            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43878          fi
43879        else
43880          # Otherwise we believe it is a complete path. Use it as it is.
43881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43882$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43883          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43884$as_echo_n "checking for OBJCOPY... " >&6; }
43885          if test ! -x "$tool_specified"; then
43886            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43887$as_echo "not found" >&6; }
43888            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43889          fi
43890          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43891$as_echo "$tool_specified" >&6; }
43892        fi
43893      fi
43894    fi
43895
43896  fi
43897
43898
43899    # Only call fixup if objcopy was found.
43900    if test -n "$OBJCOPY"; then
43901
43902  # Only process if variable expands to non-empty
43903
43904  if test "x$OBJCOPY" != x; then
43905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43906
43907  # First separate the path from the arguments. This will split at the first
43908  # space.
43909  complete="$OBJCOPY"
43910  path="${complete%% *}"
43911  tmp="$complete EOL"
43912  arguments="${tmp#* }"
43913
43914  # Input might be given as Windows format, start by converting to
43915  # unix format.
43916  new_path=`$CYGPATH -u "$path"`
43917
43918  # Now try to locate executable using which
43919  new_path=`$WHICH "$new_path" 2> /dev/null`
43920  # bat and cmd files are not always considered executable in cygwin causing which
43921  # to not find them
43922  if test "x$new_path" = x \
43923      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43924      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43925    new_path=`$CYGPATH -u "$path"`
43926  fi
43927  if test "x$new_path" = x; then
43928    # Oops. Which didn't find the executable.
43929    # The splitting of arguments from the executable at a space might have been incorrect,
43930    # since paths with space are more likely in Windows. Give it another try with the whole
43931    # argument.
43932    path="$complete"
43933    arguments="EOL"
43934    new_path=`$CYGPATH -u "$path"`
43935    new_path=`$WHICH "$new_path" 2> /dev/null`
43936    # bat and cmd files are not always considered executable in cygwin causing which
43937    # to not find them
43938    if test "x$new_path" = x \
43939        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43940        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43941      new_path=`$CYGPATH -u "$path"`
43942    fi
43943    if test "x$new_path" = x; then
43944      # It's still not found. Now this is an unrecoverable error.
43945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43946$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43947      has_space=`$ECHO "$complete" | $GREP " "`
43948      if test "x$has_space" != x; then
43949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43951      fi
43952      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43953    fi
43954  fi
43955
43956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43959  # "foo.exe" is OK but "foo" is an error.
43960  #
43961  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43962  # It is also a way to make sure we got the proper file name for the real test later on.
43963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43964  if test "x$test_shortpath" = x; then
43965    # Short path failed, file does not exist as specified.
43966    # Try adding .exe or .cmd
43967    if test -f "${new_path}.exe"; then
43968      input_to_shortpath="${new_path}.exe"
43969    elif test -f "${new_path}.cmd"; then
43970      input_to_shortpath="${new_path}.cmd"
43971    else
43972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43973$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43974      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43975$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43976      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43977    fi
43978  else
43979    input_to_shortpath="$new_path"
43980  fi
43981
43982  # Call helper function which possibly converts this using DOS-style short mode.
43983  # If so, the updated path is stored in $new_path.
43984  new_path="$input_to_shortpath"
43985
43986  input_path="$input_to_shortpath"
43987  # Check if we need to convert this using DOS-style short mode. If the path
43988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43989  # take no chances and rewrite it.
43990  # Note: m4 eats our [], so we need to use [ and ] instead.
43991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43992  if test "x$has_forbidden_chars" != x; then
43993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43997      # Going to short mode and back again did indeed matter. Since short mode is
43998      # case insensitive, let's make it lowercase to improve readability.
43999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44000      # Now convert it back to Unix-style (cygpath)
44001      input_path=`$CYGPATH -u "$shortmode_path"`
44002      new_path="$input_path"
44003    fi
44004  fi
44005
44006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44007  if test "x$test_cygdrive_prefix" = x; then
44008    # As a simple fix, exclude /usr/bin since it's not a real path.
44009    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44011      # a path prefixed by /cygdrive for fixpath to work.
44012      new_path="$CYGWIN_ROOT_PATH$input_path"
44013    fi
44014  fi
44015
44016  # remove trailing .exe if any
44017  new_path="${new_path/%.exe/}"
44018
44019    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44020
44021  # First separate the path from the arguments. This will split at the first
44022  # space.
44023  complete="$OBJCOPY"
44024  path="${complete%% *}"
44025  tmp="$complete EOL"
44026  arguments="${tmp#* }"
44027
44028  # Input might be given as Windows format, start by converting to
44029  # unix format.
44030  new_path="$path"
44031
44032  windows_path="$new_path"
44033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44034    unix_path=`$CYGPATH -u "$windows_path"`
44035    new_path="$unix_path"
44036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44038    new_path="$unix_path"
44039  fi
44040
44041
44042  # Now try to locate executable using which
44043  new_path=`$WHICH "$new_path" 2> /dev/null`
44044
44045  if test "x$new_path" = x; then
44046    # Oops. Which didn't find the executable.
44047    # The splitting of arguments from the executable at a space might have been incorrect,
44048    # since paths with space are more likely in Windows. Give it another try with the whole
44049    # argument.
44050    path="$complete"
44051    arguments="EOL"
44052    new_path="$path"
44053
44054  windows_path="$new_path"
44055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44056    unix_path=`$CYGPATH -u "$windows_path"`
44057    new_path="$unix_path"
44058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44060    new_path="$unix_path"
44061  fi
44062
44063
44064    new_path=`$WHICH "$new_path" 2> /dev/null`
44065    # bat and cmd files are not always considered executable in MSYS causing which
44066    # to not find them
44067    if test "x$new_path" = x \
44068        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44069        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44070      new_path="$path"
44071
44072  windows_path="$new_path"
44073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44074    unix_path=`$CYGPATH -u "$windows_path"`
44075    new_path="$unix_path"
44076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44078    new_path="$unix_path"
44079  fi
44080
44081    fi
44082
44083    if test "x$new_path" = x; then
44084      # It's still not found. Now this is an unrecoverable error.
44085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44086$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44087      has_space=`$ECHO "$complete" | $GREP " "`
44088      if test "x$has_space" != x; then
44089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44091      fi
44092      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44093    fi
44094  fi
44095
44096  # Now new_path has a complete unix path to the binary
44097  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44098    # Keep paths in /bin as-is, but remove trailing .exe if any
44099    new_path="${new_path/%.exe/}"
44100    # Do not save /bin paths to all_fixpath_prefixes!
44101  else
44102    # Not in mixed or Windows style, start by that.
44103    new_path=`cmd //c echo $new_path`
44104
44105  input_path="$new_path"
44106  # Check if we need to convert this using DOS-style short mode. If the path
44107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44108  # take no chances and rewrite it.
44109  # Note: m4 eats our [], so we need to use [ and ] instead.
44110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44111  if test "x$has_forbidden_chars" != x; then
44112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44114  fi
44115
44116    # Output is in $new_path
44117
44118  windows_path="$new_path"
44119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44120    unix_path=`$CYGPATH -u "$windows_path"`
44121    new_path="$unix_path"
44122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44124    new_path="$unix_path"
44125  fi
44126
44127    # remove trailing .exe if any
44128    new_path="${new_path/%.exe/}"
44129
44130    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44131    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44132  fi
44133
44134    else
44135      # We're on a unix platform. Hooray! :)
44136      # First separate the path from the arguments. This will split at the first
44137      # space.
44138      complete="$OBJCOPY"
44139      path="${complete%% *}"
44140      tmp="$complete EOL"
44141      arguments="${tmp#* }"
44142
44143      # Cannot rely on the command "which" here since it doesn't always work.
44144      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44145      if test -z "$is_absolute_path"; then
44146        # Path to executable is not absolute. Find it.
44147        IFS_save="$IFS"
44148        IFS=:
44149        for p in $PATH; do
44150          if test -f "$p/$path" && test -x "$p/$path"; then
44151            new_path="$p/$path"
44152            break
44153          fi
44154        done
44155        IFS="$IFS_save"
44156      else
44157        # This is an absolute path, we can use it without further modifications.
44158        new_path="$path"
44159      fi
44160
44161      if test "x$new_path" = x; then
44162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44163$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44164        has_space=`$ECHO "$complete" | $GREP " "`
44165        if test "x$has_space" != x; then
44166          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44167$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44168        fi
44169        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44170      fi
44171    fi
44172
44173    # Now join together the path and the arguments once again
44174    if test "x$arguments" != xEOL; then
44175      new_complete="$new_path ${arguments% *}"
44176    else
44177      new_complete="$new_path"
44178    fi
44179
44180    if test "x$complete" != "x$new_complete"; then
44181      OBJCOPY="$new_complete"
44182      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44183$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44184    fi
44185  fi
44186
44187      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44188        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44189        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44190        # - version number is last blank separate word on first line
44191        # - version number formats that have been seen:
44192        #   - <major>.<minor>
44193        #   - <major>.<minor>.<micro>
44194        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44195        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44196         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44197              -e 's/.* //' \
44198              -e '/^[01]\./b bad' \
44199              -e '/^2\./{' \
44200              -e '  s/^2\.//' \
44201              -e '  /^[0-9]$/b bad' \
44202              -e '  /^[0-9]\./b bad' \
44203              -e '  /^1[0-9]$/b bad' \
44204              -e '  /^1[0-9]\./b bad' \
44205              -e '  /^20\./b bad' \
44206              -e '  /^21\.0$/b bad' \
44207              -e '  /^21\.0\./b bad' \
44208              -e '}' \
44209              -e ':good' \
44210              -e 's/.*/VALID_VERSION/p' \
44211              -e 'q' \
44212              -e ':bad' \
44213              -e 's/.*/BAD_VERSION/p' \
44214              -e 'q'`
44215        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44216          OBJCOPY=
44217          { $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
44218$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44219          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44220$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44221          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44222$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44223          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44224$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44225          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44226$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44227        fi
44228      fi
44229    fi
44230  fi
44231
44232
44233
44234  # Publish this variable in the help.
44235
44236
44237  if [ -z "${OBJDUMP+x}" ]; then
44238    # The variable is not set by user, try to locate tool using the code snippet
44239    if test -n "$ac_tool_prefix"; then
44240  for ac_prog in gobjdump objdump
44241  do
44242    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44243set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44245$as_echo_n "checking for $ac_word... " >&6; }
44246if ${ac_cv_prog_OBJDUMP+:} false; then :
44247  $as_echo_n "(cached) " >&6
44248else
44249  if test -n "$OBJDUMP"; then
44250  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44251else
44252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44253for as_dir in $PATH
44254do
44255  IFS=$as_save_IFS
44256  test -z "$as_dir" && as_dir=.
44257    for ac_exec_ext in '' $ac_executable_extensions; do
44258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44259    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44261    break 2
44262  fi
44263done
44264  done
44265IFS=$as_save_IFS
44266
44267fi
44268fi
44269OBJDUMP=$ac_cv_prog_OBJDUMP
44270if test -n "$OBJDUMP"; then
44271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44272$as_echo "$OBJDUMP" >&6; }
44273else
44274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44275$as_echo "no" >&6; }
44276fi
44277
44278
44279    test -n "$OBJDUMP" && break
44280  done
44281fi
44282if test -z "$OBJDUMP"; then
44283  ac_ct_OBJDUMP=$OBJDUMP
44284  for ac_prog in gobjdump objdump
44285do
44286  # Extract the first word of "$ac_prog", so it can be a program name with args.
44287set dummy $ac_prog; ac_word=$2
44288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44289$as_echo_n "checking for $ac_word... " >&6; }
44290if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44291  $as_echo_n "(cached) " >&6
44292else
44293  if test -n "$ac_ct_OBJDUMP"; then
44294  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44295else
44296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44297for as_dir in $PATH
44298do
44299  IFS=$as_save_IFS
44300  test -z "$as_dir" && as_dir=.
44301    for ac_exec_ext in '' $ac_executable_extensions; do
44302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44303    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44305    break 2
44306  fi
44307done
44308  done
44309IFS=$as_save_IFS
44310
44311fi
44312fi
44313ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44314if test -n "$ac_ct_OBJDUMP"; then
44315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44316$as_echo "$ac_ct_OBJDUMP" >&6; }
44317else
44318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44319$as_echo "no" >&6; }
44320fi
44321
44322
44323  test -n "$ac_ct_OBJDUMP" && break
44324done
44325
44326  if test "x$ac_ct_OBJDUMP" = x; then
44327    OBJDUMP=""
44328  else
44329    case $cross_compiling:$ac_tool_warned in
44330yes:)
44331{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44332$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44333ac_tool_warned=yes ;;
44334esac
44335    OBJDUMP=$ac_ct_OBJDUMP
44336  fi
44337fi
44338
44339  else
44340    # The variable is set, but is it from the command line or the environment?
44341
44342    # Try to remove the string !OBJDUMP! from our list.
44343    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44344    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44345      # If it failed, the variable was not from the command line. Ignore it,
44346      # but warn the user (except for BASH, which is always set by the calling BASH).
44347      if test "xOBJDUMP" != xBASH; then
44348        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44349$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44350      fi
44351      # Try to locate tool using the code snippet
44352      if test -n "$ac_tool_prefix"; then
44353  for ac_prog in gobjdump objdump
44354  do
44355    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44356set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44358$as_echo_n "checking for $ac_word... " >&6; }
44359if ${ac_cv_prog_OBJDUMP+:} false; then :
44360  $as_echo_n "(cached) " >&6
44361else
44362  if test -n "$OBJDUMP"; then
44363  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44364else
44365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44366for as_dir in $PATH
44367do
44368  IFS=$as_save_IFS
44369  test -z "$as_dir" && as_dir=.
44370    for ac_exec_ext in '' $ac_executable_extensions; do
44371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44372    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44374    break 2
44375  fi
44376done
44377  done
44378IFS=$as_save_IFS
44379
44380fi
44381fi
44382OBJDUMP=$ac_cv_prog_OBJDUMP
44383if test -n "$OBJDUMP"; then
44384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44385$as_echo "$OBJDUMP" >&6; }
44386else
44387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44388$as_echo "no" >&6; }
44389fi
44390
44391
44392    test -n "$OBJDUMP" && break
44393  done
44394fi
44395if test -z "$OBJDUMP"; then
44396  ac_ct_OBJDUMP=$OBJDUMP
44397  for ac_prog in gobjdump objdump
44398do
44399  # Extract the first word of "$ac_prog", so it can be a program name with args.
44400set dummy $ac_prog; ac_word=$2
44401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44402$as_echo_n "checking for $ac_word... " >&6; }
44403if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44404  $as_echo_n "(cached) " >&6
44405else
44406  if test -n "$ac_ct_OBJDUMP"; then
44407  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44408else
44409as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44410for as_dir in $PATH
44411do
44412  IFS=$as_save_IFS
44413  test -z "$as_dir" && as_dir=.
44414    for ac_exec_ext in '' $ac_executable_extensions; do
44415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44416    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44418    break 2
44419  fi
44420done
44421  done
44422IFS=$as_save_IFS
44423
44424fi
44425fi
44426ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44427if test -n "$ac_ct_OBJDUMP"; then
44428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44429$as_echo "$ac_ct_OBJDUMP" >&6; }
44430else
44431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44432$as_echo "no" >&6; }
44433fi
44434
44435
44436  test -n "$ac_ct_OBJDUMP" && break
44437done
44438
44439  if test "x$ac_ct_OBJDUMP" = x; then
44440    OBJDUMP=""
44441  else
44442    case $cross_compiling:$ac_tool_warned in
44443yes:)
44444{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44445$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44446ac_tool_warned=yes ;;
44447esac
44448    OBJDUMP=$ac_ct_OBJDUMP
44449  fi
44450fi
44451
44452    else
44453      # If it succeeded, then it was overridden by the user. We will use it
44454      # for the tool.
44455
44456      # First remove it from the list of overridden variables, so we can test
44457      # for unknown variables in the end.
44458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44459
44460      # Check if we try to supply an empty value
44461      if test "x$OBJDUMP" = x; then
44462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44463$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44465$as_echo_n "checking for OBJDUMP... " >&6; }
44466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44467$as_echo "disabled" >&6; }
44468      else
44469        # Check if the provided tool contains a complete path.
44470        tool_specified="$OBJDUMP"
44471        tool_basename="${tool_specified##*/}"
44472        if test "x$tool_basename" = "x$tool_specified"; then
44473          # A command without a complete path is provided, search $PATH.
44474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44475$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44476          # Extract the first word of "$tool_basename", so it can be a program name with args.
44477set dummy $tool_basename; ac_word=$2
44478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44479$as_echo_n "checking for $ac_word... " >&6; }
44480if ${ac_cv_path_OBJDUMP+:} false; then :
44481  $as_echo_n "(cached) " >&6
44482else
44483  case $OBJDUMP in
44484  [\\/]* | ?:[\\/]*)
44485  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44486  ;;
44487  *)
44488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44489for as_dir in $PATH
44490do
44491  IFS=$as_save_IFS
44492  test -z "$as_dir" && as_dir=.
44493    for ac_exec_ext in '' $ac_executable_extensions; do
44494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44495    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44497    break 2
44498  fi
44499done
44500  done
44501IFS=$as_save_IFS
44502
44503  ;;
44504esac
44505fi
44506OBJDUMP=$ac_cv_path_OBJDUMP
44507if test -n "$OBJDUMP"; then
44508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44509$as_echo "$OBJDUMP" >&6; }
44510else
44511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44512$as_echo "no" >&6; }
44513fi
44514
44515
44516          if test "x$OBJDUMP" = x; then
44517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44518          fi
44519        else
44520          # Otherwise we believe it is a complete path. Use it as it is.
44521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44522$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44524$as_echo_n "checking for OBJDUMP... " >&6; }
44525          if test ! -x "$tool_specified"; then
44526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44527$as_echo "not found" >&6; }
44528            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44529          fi
44530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44531$as_echo "$tool_specified" >&6; }
44532        fi
44533      fi
44534    fi
44535
44536  fi
44537
44538
44539  if test "x$OBJDUMP" != x; then
44540    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44541    # bails if argument is missing.
44542
44543  # Only process if variable expands to non-empty
44544
44545  if test "x$OBJDUMP" != x; then
44546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44547
44548  # First separate the path from the arguments. This will split at the first
44549  # space.
44550  complete="$OBJDUMP"
44551  path="${complete%% *}"
44552  tmp="$complete EOL"
44553  arguments="${tmp#* }"
44554
44555  # Input might be given as Windows format, start by converting to
44556  # unix format.
44557  new_path=`$CYGPATH -u "$path"`
44558
44559  # Now try to locate executable using which
44560  new_path=`$WHICH "$new_path" 2> /dev/null`
44561  # bat and cmd files are not always considered executable in cygwin causing which
44562  # to not find them
44563  if test "x$new_path" = x \
44564      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44565      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44566    new_path=`$CYGPATH -u "$path"`
44567  fi
44568  if test "x$new_path" = x; then
44569    # Oops. Which didn't find the executable.
44570    # The splitting of arguments from the executable at a space might have been incorrect,
44571    # since paths with space are more likely in Windows. Give it another try with the whole
44572    # argument.
44573    path="$complete"
44574    arguments="EOL"
44575    new_path=`$CYGPATH -u "$path"`
44576    new_path=`$WHICH "$new_path" 2> /dev/null`
44577    # bat and cmd files are not always considered executable in cygwin causing which
44578    # to not find them
44579    if test "x$new_path" = x \
44580        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44581        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44582      new_path=`$CYGPATH -u "$path"`
44583    fi
44584    if test "x$new_path" = x; then
44585      # It's still not found. Now this is an unrecoverable error.
44586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44587$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44588      has_space=`$ECHO "$complete" | $GREP " "`
44589      if test "x$has_space" != x; then
44590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44592      fi
44593      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44594    fi
44595  fi
44596
44597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44600  # "foo.exe" is OK but "foo" is an error.
44601  #
44602  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44603  # It is also a way to make sure we got the proper file name for the real test later on.
44604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44605  if test "x$test_shortpath" = x; then
44606    # Short path failed, file does not exist as specified.
44607    # Try adding .exe or .cmd
44608    if test -f "${new_path}.exe"; then
44609      input_to_shortpath="${new_path}.exe"
44610    elif test -f "${new_path}.cmd"; then
44611      input_to_shortpath="${new_path}.cmd"
44612    else
44613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44614$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44615      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44616$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44617      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44618    fi
44619  else
44620    input_to_shortpath="$new_path"
44621  fi
44622
44623  # Call helper function which possibly converts this using DOS-style short mode.
44624  # If so, the updated path is stored in $new_path.
44625  new_path="$input_to_shortpath"
44626
44627  input_path="$input_to_shortpath"
44628  # Check if we need to convert this using DOS-style short mode. If the path
44629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44630  # take no chances and rewrite it.
44631  # Note: m4 eats our [], so we need to use [ and ] instead.
44632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44633  if test "x$has_forbidden_chars" != x; then
44634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44638      # Going to short mode and back again did indeed matter. Since short mode is
44639      # case insensitive, let's make it lowercase to improve readability.
44640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44641      # Now convert it back to Unix-style (cygpath)
44642      input_path=`$CYGPATH -u "$shortmode_path"`
44643      new_path="$input_path"
44644    fi
44645  fi
44646
44647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44648  if test "x$test_cygdrive_prefix" = x; then
44649    # As a simple fix, exclude /usr/bin since it's not a real path.
44650    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44652      # a path prefixed by /cygdrive for fixpath to work.
44653      new_path="$CYGWIN_ROOT_PATH$input_path"
44654    fi
44655  fi
44656
44657  # remove trailing .exe if any
44658  new_path="${new_path/%.exe/}"
44659
44660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44661
44662  # First separate the path from the arguments. This will split at the first
44663  # space.
44664  complete="$OBJDUMP"
44665  path="${complete%% *}"
44666  tmp="$complete EOL"
44667  arguments="${tmp#* }"
44668
44669  # Input might be given as Windows format, start by converting to
44670  # unix format.
44671  new_path="$path"
44672
44673  windows_path="$new_path"
44674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44675    unix_path=`$CYGPATH -u "$windows_path"`
44676    new_path="$unix_path"
44677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44679    new_path="$unix_path"
44680  fi
44681
44682
44683  # Now try to locate executable using which
44684  new_path=`$WHICH "$new_path" 2> /dev/null`
44685
44686  if test "x$new_path" = x; then
44687    # Oops. Which didn't find the executable.
44688    # The splitting of arguments from the executable at a space might have been incorrect,
44689    # since paths with space are more likely in Windows. Give it another try with the whole
44690    # argument.
44691    path="$complete"
44692    arguments="EOL"
44693    new_path="$path"
44694
44695  windows_path="$new_path"
44696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44697    unix_path=`$CYGPATH -u "$windows_path"`
44698    new_path="$unix_path"
44699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44701    new_path="$unix_path"
44702  fi
44703
44704
44705    new_path=`$WHICH "$new_path" 2> /dev/null`
44706    # bat and cmd files are not always considered executable in MSYS causing which
44707    # to not find them
44708    if test "x$new_path" = x \
44709        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44710        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44711      new_path="$path"
44712
44713  windows_path="$new_path"
44714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44715    unix_path=`$CYGPATH -u "$windows_path"`
44716    new_path="$unix_path"
44717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44719    new_path="$unix_path"
44720  fi
44721
44722    fi
44723
44724    if test "x$new_path" = x; then
44725      # It's still not found. Now this is an unrecoverable error.
44726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44727$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44728      has_space=`$ECHO "$complete" | $GREP " "`
44729      if test "x$has_space" != x; then
44730        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44731$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44732      fi
44733      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44734    fi
44735  fi
44736
44737  # Now new_path has a complete unix path to the binary
44738  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44739    # Keep paths in /bin as-is, but remove trailing .exe if any
44740    new_path="${new_path/%.exe/}"
44741    # Do not save /bin paths to all_fixpath_prefixes!
44742  else
44743    # Not in mixed or Windows style, start by that.
44744    new_path=`cmd //c echo $new_path`
44745
44746  input_path="$new_path"
44747  # Check if we need to convert this using DOS-style short mode. If the path
44748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44749  # take no chances and rewrite it.
44750  # Note: m4 eats our [], so we need to use [ and ] instead.
44751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44752  if test "x$has_forbidden_chars" != x; then
44753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44755  fi
44756
44757    # Output is in $new_path
44758
44759  windows_path="$new_path"
44760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44761    unix_path=`$CYGPATH -u "$windows_path"`
44762    new_path="$unix_path"
44763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44765    new_path="$unix_path"
44766  fi
44767
44768    # remove trailing .exe if any
44769    new_path="${new_path/%.exe/}"
44770
44771    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44772    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44773  fi
44774
44775    else
44776      # We're on a unix platform. Hooray! :)
44777      # First separate the path from the arguments. This will split at the first
44778      # space.
44779      complete="$OBJDUMP"
44780      path="${complete%% *}"
44781      tmp="$complete EOL"
44782      arguments="${tmp#* }"
44783
44784      # Cannot rely on the command "which" here since it doesn't always work.
44785      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44786      if test -z "$is_absolute_path"; then
44787        # Path to executable is not absolute. Find it.
44788        IFS_save="$IFS"
44789        IFS=:
44790        for p in $PATH; do
44791          if test -f "$p/$path" && test -x "$p/$path"; then
44792            new_path="$p/$path"
44793            break
44794          fi
44795        done
44796        IFS="$IFS_save"
44797      else
44798        # This is an absolute path, we can use it without further modifications.
44799        new_path="$path"
44800      fi
44801
44802      if test "x$new_path" = x; then
44803        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44804$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44805        has_space=`$ECHO "$complete" | $GREP " "`
44806        if test "x$has_space" != x; then
44807          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44808$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44809        fi
44810        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44811      fi
44812    fi
44813
44814    # Now join together the path and the arguments once again
44815    if test "x$arguments" != xEOL; then
44816      new_complete="$new_path ${arguments% *}"
44817    else
44818      new_complete="$new_path"
44819    fi
44820
44821    if test "x$complete" != "x$new_complete"; then
44822      OBJDUMP="$new_complete"
44823      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44824$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44825    fi
44826  fi
44827
44828  fi
44829
44830
44831  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44832  # to remain in place. Otherwise the compiler will not work in some siutations
44833  # in later configure checks.
44834  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44835    PATH="$OLD_PATH"
44836  fi
44837
44838  # Restore the flags to the user specified values.
44839  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44840  CFLAGS="$ORG_CFLAGS"
44841  CXXFLAGS="$ORG_CXXFLAGS"
44842
44843
44844# Finally do some processing after the detection phase
44845
44846  if test "x$COMPILE_TYPE" = "xcross"; then
44847    # Now we need to find a C/C++ compiler that can build executables for the
44848    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44849    # used once. Also, we need to do this without adding a tools dir to the
44850    # path, otherwise we might pick up cross-compilers which don't use standard
44851    # naming.
44852
44853    OLDPATH="$PATH"
44854
44855
44856# Check whether --with-build-devkit was given.
44857if test "${with_build_devkit+set}" = set; then :
44858  withval=$with_build_devkit;
44859fi
44860
44861    if test "x$with_build_devkit" = "xyes"; then
44862      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44863    elif test -n "$with_build_devkit"; then
44864      if test ! -d "$with_build_devkit"; then
44865        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44866      else
44867
44868  # Only process if variable expands to non-empty
44869
44870  if test "x$with_build_devkit" != x; then
44871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44872
44873  # Input might be given as Windows format, start by converting to
44874  # unix format.
44875  path="$with_build_devkit"
44876  new_path=`$CYGPATH -u "$path"`
44877
44878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44881  # "foo.exe" is OK but "foo" is an error.
44882  #
44883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44884  # It is also a way to make sure we got the proper file name for the real test later on.
44885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44886  if test "x$test_shortpath" = x; then
44887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44888$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44889    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44890  fi
44891
44892  # Call helper function which possibly converts this using DOS-style short mode.
44893  # If so, the updated path is stored in $new_path.
44894
44895  input_path="$new_path"
44896  # Check if we need to convert this using DOS-style short mode. If the path
44897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44898  # take no chances and rewrite it.
44899  # Note: m4 eats our [], so we need to use [ and ] instead.
44900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44901  if test "x$has_forbidden_chars" != x; then
44902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44906      # Going to short mode and back again did indeed matter. Since short mode is
44907      # case insensitive, let's make it lowercase to improve readability.
44908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44909      # Now convert it back to Unix-style (cygpath)
44910      input_path=`$CYGPATH -u "$shortmode_path"`
44911      new_path="$input_path"
44912    fi
44913  fi
44914
44915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44916  if test "x$test_cygdrive_prefix" = x; then
44917    # As a simple fix, exclude /usr/bin since it's not a real path.
44918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44920      # a path prefixed by /cygdrive for fixpath to work.
44921      new_path="$CYGWIN_ROOT_PATH$input_path"
44922    fi
44923  fi
44924
44925
44926  if test "x$path" != "x$new_path"; then
44927    with_build_devkit="$new_path"
44928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44929$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44930  fi
44931
44932    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44933
44934  path="$with_build_devkit"
44935  has_colon=`$ECHO $path | $GREP ^.:`
44936  new_path="$path"
44937  if test "x$has_colon" = x; then
44938    # Not in mixed or Windows style, start by that.
44939    new_path=`cmd //c echo $path`
44940  fi
44941
44942
44943  input_path="$new_path"
44944  # Check if we need to convert this using DOS-style short mode. If the path
44945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44946  # take no chances and rewrite it.
44947  # Note: m4 eats our [], so we need to use [ and ] instead.
44948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44949  if test "x$has_forbidden_chars" != x; then
44950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44952  fi
44953
44954
44955  windows_path="$new_path"
44956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44957    unix_path=`$CYGPATH -u "$windows_path"`
44958    new_path="$unix_path"
44959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44961    new_path="$unix_path"
44962  fi
44963
44964  if test "x$path" != "x$new_path"; then
44965    with_build_devkit="$new_path"
44966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44967$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44968  fi
44969
44970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44972
44973    else
44974      # We're on a unix platform. Hooray! :)
44975      path="$with_build_devkit"
44976      has_space=`$ECHO "$path" | $GREP " "`
44977      if test "x$has_space" != x; then
44978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44979$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44980        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44981      fi
44982
44983      # Use eval to expand a potential ~
44984      eval path="$path"
44985      if test ! -f "$path" && test ! -d "$path"; then
44986        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44987      fi
44988
44989      if test -d "$path"; then
44990        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44991      else
44992        dir="`$DIRNAME "$path"`"
44993        base="`$BASENAME "$path"`"
44994        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44995      fi
44996    fi
44997  fi
44998
44999        BUILD_DEVKIT_ROOT="$with_build_devkit"
45000        # Check for a meta data info file in the root of the devkit
45001        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
45002          # Process devkit.info so that existing devkit variables are not
45003          # modified by this
45004          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
45005              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
45006              -e "s/\$host/\$build/g" \
45007              $BUILD_DEVKIT_ROOT/devkit.info \
45008              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
45009          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
45010          # This potentially sets the following:
45011          # A descriptive name of the devkit
45012
45013  if test "x$BUILD_DEVKIT_NAME" = x; then
45014    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
45015  fi
45016
45017          # Corresponds to --with-extra-path
45018
45019  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
45020    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
45021  fi
45022
45023          # Corresponds to --with-toolchain-path
45024
45025  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45026    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
45027  fi
45028
45029          # Corresponds to --with-sysroot
45030
45031  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
45032    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
45033  fi
45034
45035          # Skip the Window specific parts
45036        fi
45037
45038        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
45039$as_echo_n "checking for build platform devkit... " >&6; }
45040        if test "x$BUILD_DEVKIT_NAME" != x; then
45041          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
45042$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
45043        else
45044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
45045$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
45046        fi
45047
45048        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
45049
45050  if test "x$BUILD_SYSROOT" != "x"; then
45051    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45052      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45053        # Solaris Studio does not have a concept of sysroot. Instead we must
45054        # make sure the default include and lib dirs are appended to each
45055        # compile and link command line. Must also add -I-xbuiltin to enable
45056        # inlining of system functions and intrinsics.
45057        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
45058        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
45059            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
45060      fi
45061    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
45062      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
45063      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
45064    elif test "x$TOOLCHAIN_TYPE" = xclang; then
45065      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
45066      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
45067    fi
45068    # The global CFLAGS and LDFLAGS variables need these for configure to function
45069    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
45070    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
45071    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
45072    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
45073  fi
45074
45075  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45076    # We also need -iframework<path>/System/Library/Frameworks
45077    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
45078    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
45079    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
45080    # set this here so it doesn't have to be peppered throughout the forest
45081    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45082    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45083  fi
45084
45085
45086
45087
45088
45089         # Fallback default of just /bin if DEVKIT_PATH is not defined
45090        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45091          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
45092        fi
45093        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
45094      fi
45095    fi
45096
45097    # FIXME: we should list the discovered compilers as an exclude pattern!
45098    # If we do that, we can do this detection before POST_DETECTION, and still
45099    # find the build compilers in the tools dir, if needed.
45100
45101
45102
45103  # Publish this variable in the help.
45104
45105
45106  if [ -z "${BUILD_CC+x}" ]; then
45107    # The variable is not set by user, try to locate tool using the code snippet
45108    for ac_prog in cl cc gcc
45109do
45110  # Extract the first word of "$ac_prog", so it can be a program name with args.
45111set dummy $ac_prog; ac_word=$2
45112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45113$as_echo_n "checking for $ac_word... " >&6; }
45114if ${ac_cv_path_BUILD_CC+:} false; then :
45115  $as_echo_n "(cached) " >&6
45116else
45117  case $BUILD_CC in
45118  [\\/]* | ?:[\\/]*)
45119  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45120  ;;
45121  *)
45122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45123for as_dir in $PATH
45124do
45125  IFS=$as_save_IFS
45126  test -z "$as_dir" && as_dir=.
45127    for ac_exec_ext in '' $ac_executable_extensions; do
45128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45129    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45131    break 2
45132  fi
45133done
45134  done
45135IFS=$as_save_IFS
45136
45137  ;;
45138esac
45139fi
45140BUILD_CC=$ac_cv_path_BUILD_CC
45141if test -n "$BUILD_CC"; then
45142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45143$as_echo "$BUILD_CC" >&6; }
45144else
45145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45146$as_echo "no" >&6; }
45147fi
45148
45149
45150  test -n "$BUILD_CC" && break
45151done
45152
45153  else
45154    # The variable is set, but is it from the command line or the environment?
45155
45156    # Try to remove the string !BUILD_CC! from our list.
45157    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45158    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45159      # If it failed, the variable was not from the command line. Ignore it,
45160      # but warn the user (except for BASH, which is always set by the calling BASH).
45161      if test "xBUILD_CC" != xBASH; then
45162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45163$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45164      fi
45165      # Try to locate tool using the code snippet
45166      for ac_prog in cl cc gcc
45167do
45168  # Extract the first word of "$ac_prog", so it can be a program name with args.
45169set dummy $ac_prog; ac_word=$2
45170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45171$as_echo_n "checking for $ac_word... " >&6; }
45172if ${ac_cv_path_BUILD_CC+:} false; then :
45173  $as_echo_n "(cached) " >&6
45174else
45175  case $BUILD_CC in
45176  [\\/]* | ?:[\\/]*)
45177  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45178  ;;
45179  *)
45180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45181for as_dir in $PATH
45182do
45183  IFS=$as_save_IFS
45184  test -z "$as_dir" && as_dir=.
45185    for ac_exec_ext in '' $ac_executable_extensions; do
45186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45187    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45189    break 2
45190  fi
45191done
45192  done
45193IFS=$as_save_IFS
45194
45195  ;;
45196esac
45197fi
45198BUILD_CC=$ac_cv_path_BUILD_CC
45199if test -n "$BUILD_CC"; then
45200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45201$as_echo "$BUILD_CC" >&6; }
45202else
45203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45204$as_echo "no" >&6; }
45205fi
45206
45207
45208  test -n "$BUILD_CC" && break
45209done
45210
45211    else
45212      # If it succeeded, then it was overridden by the user. We will use it
45213      # for the tool.
45214
45215      # First remove it from the list of overridden variables, so we can test
45216      # for unknown variables in the end.
45217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45218
45219      # Check if we try to supply an empty value
45220      if test "x$BUILD_CC" = x; then
45221        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45222$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45224$as_echo_n "checking for BUILD_CC... " >&6; }
45225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45226$as_echo "disabled" >&6; }
45227      else
45228        # Check if the provided tool contains a complete path.
45229        tool_specified="$BUILD_CC"
45230        tool_basename="${tool_specified##*/}"
45231        if test "x$tool_basename" = "x$tool_specified"; then
45232          # A command without a complete path is provided, search $PATH.
45233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45234$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45235          # Extract the first word of "$tool_basename", so it can be a program name with args.
45236set dummy $tool_basename; ac_word=$2
45237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45238$as_echo_n "checking for $ac_word... " >&6; }
45239if ${ac_cv_path_BUILD_CC+:} false; then :
45240  $as_echo_n "(cached) " >&6
45241else
45242  case $BUILD_CC in
45243  [\\/]* | ?:[\\/]*)
45244  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45245  ;;
45246  *)
45247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45248for as_dir in $PATH
45249do
45250  IFS=$as_save_IFS
45251  test -z "$as_dir" && as_dir=.
45252    for ac_exec_ext in '' $ac_executable_extensions; do
45253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45254    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45256    break 2
45257  fi
45258done
45259  done
45260IFS=$as_save_IFS
45261
45262  ;;
45263esac
45264fi
45265BUILD_CC=$ac_cv_path_BUILD_CC
45266if test -n "$BUILD_CC"; then
45267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45268$as_echo "$BUILD_CC" >&6; }
45269else
45270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45271$as_echo "no" >&6; }
45272fi
45273
45274
45275          if test "x$BUILD_CC" = x; then
45276            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45277          fi
45278        else
45279          # Otherwise we believe it is a complete path. Use it as it is.
45280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45281$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45282          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45283$as_echo_n "checking for BUILD_CC... " >&6; }
45284          if test ! -x "$tool_specified"; then
45285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45286$as_echo "not found" >&6; }
45287            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45288          fi
45289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45290$as_echo "$tool_specified" >&6; }
45291        fi
45292      fi
45293    fi
45294
45295  fi
45296
45297
45298
45299  if test "x$BUILD_CC" = x; then
45300    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45301  fi
45302
45303
45304
45305  # Only process if variable expands to non-empty
45306
45307  if test "x$BUILD_CC" != x; then
45308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45309
45310  # First separate the path from the arguments. This will split at the first
45311  # space.
45312  complete="$BUILD_CC"
45313  path="${complete%% *}"
45314  tmp="$complete EOL"
45315  arguments="${tmp#* }"
45316
45317  # Input might be given as Windows format, start by converting to
45318  # unix format.
45319  new_path=`$CYGPATH -u "$path"`
45320
45321  # Now try to locate executable using which
45322  new_path=`$WHICH "$new_path" 2> /dev/null`
45323  # bat and cmd files are not always considered executable in cygwin causing which
45324  # to not find them
45325  if test "x$new_path" = x \
45326      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45327      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45328    new_path=`$CYGPATH -u "$path"`
45329  fi
45330  if test "x$new_path" = x; then
45331    # Oops. Which didn't find the executable.
45332    # The splitting of arguments from the executable at a space might have been incorrect,
45333    # since paths with space are more likely in Windows. Give it another try with the whole
45334    # argument.
45335    path="$complete"
45336    arguments="EOL"
45337    new_path=`$CYGPATH -u "$path"`
45338    new_path=`$WHICH "$new_path" 2> /dev/null`
45339    # bat and cmd files are not always considered executable in cygwin causing which
45340    # to not find them
45341    if test "x$new_path" = x \
45342        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45343        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45344      new_path=`$CYGPATH -u "$path"`
45345    fi
45346    if test "x$new_path" = x; then
45347      # It's still not found. Now this is an unrecoverable error.
45348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45349$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45350      has_space=`$ECHO "$complete" | $GREP " "`
45351      if test "x$has_space" != x; then
45352        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45353$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45354      fi
45355      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45356    fi
45357  fi
45358
45359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45362  # "foo.exe" is OK but "foo" is an error.
45363  #
45364  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45365  # It is also a way to make sure we got the proper file name for the real test later on.
45366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45367  if test "x$test_shortpath" = x; then
45368    # Short path failed, file does not exist as specified.
45369    # Try adding .exe or .cmd
45370    if test -f "${new_path}.exe"; then
45371      input_to_shortpath="${new_path}.exe"
45372    elif test -f "${new_path}.cmd"; then
45373      input_to_shortpath="${new_path}.cmd"
45374    else
45375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45376$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45377      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45378$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45379      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45380    fi
45381  else
45382    input_to_shortpath="$new_path"
45383  fi
45384
45385  # Call helper function which possibly converts this using DOS-style short mode.
45386  # If so, the updated path is stored in $new_path.
45387  new_path="$input_to_shortpath"
45388
45389  input_path="$input_to_shortpath"
45390  # Check if we need to convert this using DOS-style short mode. If the path
45391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45392  # take no chances and rewrite it.
45393  # Note: m4 eats our [], so we need to use [ and ] instead.
45394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45395  if test "x$has_forbidden_chars" != x; then
45396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45400      # Going to short mode and back again did indeed matter. Since short mode is
45401      # case insensitive, let's make it lowercase to improve readability.
45402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45403      # Now convert it back to Unix-style (cygpath)
45404      input_path=`$CYGPATH -u "$shortmode_path"`
45405      new_path="$input_path"
45406    fi
45407  fi
45408
45409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45410  if test "x$test_cygdrive_prefix" = x; then
45411    # As a simple fix, exclude /usr/bin since it's not a real path.
45412    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45414      # a path prefixed by /cygdrive for fixpath to work.
45415      new_path="$CYGWIN_ROOT_PATH$input_path"
45416    fi
45417  fi
45418
45419  # remove trailing .exe if any
45420  new_path="${new_path/%.exe/}"
45421
45422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45423
45424  # First separate the path from the arguments. This will split at the first
45425  # space.
45426  complete="$BUILD_CC"
45427  path="${complete%% *}"
45428  tmp="$complete EOL"
45429  arguments="${tmp#* }"
45430
45431  # Input might be given as Windows format, start by converting to
45432  # unix format.
45433  new_path="$path"
45434
45435  windows_path="$new_path"
45436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45437    unix_path=`$CYGPATH -u "$windows_path"`
45438    new_path="$unix_path"
45439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45441    new_path="$unix_path"
45442  fi
45443
45444
45445  # Now try to locate executable using which
45446  new_path=`$WHICH "$new_path" 2> /dev/null`
45447
45448  if test "x$new_path" = x; then
45449    # Oops. Which didn't find the executable.
45450    # The splitting of arguments from the executable at a space might have been incorrect,
45451    # since paths with space are more likely in Windows. Give it another try with the whole
45452    # argument.
45453    path="$complete"
45454    arguments="EOL"
45455    new_path="$path"
45456
45457  windows_path="$new_path"
45458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45459    unix_path=`$CYGPATH -u "$windows_path"`
45460    new_path="$unix_path"
45461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45463    new_path="$unix_path"
45464  fi
45465
45466
45467    new_path=`$WHICH "$new_path" 2> /dev/null`
45468    # bat and cmd files are not always considered executable in MSYS causing which
45469    # to not find them
45470    if test "x$new_path" = x \
45471        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45472        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45473      new_path="$path"
45474
45475  windows_path="$new_path"
45476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45477    unix_path=`$CYGPATH -u "$windows_path"`
45478    new_path="$unix_path"
45479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45481    new_path="$unix_path"
45482  fi
45483
45484    fi
45485
45486    if test "x$new_path" = x; then
45487      # It's still not found. Now this is an unrecoverable error.
45488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45489$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45490      has_space=`$ECHO "$complete" | $GREP " "`
45491      if test "x$has_space" != x; then
45492        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45493$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45494      fi
45495      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45496    fi
45497  fi
45498
45499  # Now new_path has a complete unix path to the binary
45500  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45501    # Keep paths in /bin as-is, but remove trailing .exe if any
45502    new_path="${new_path/%.exe/}"
45503    # Do not save /bin paths to all_fixpath_prefixes!
45504  else
45505    # Not in mixed or Windows style, start by that.
45506    new_path=`cmd //c echo $new_path`
45507
45508  input_path="$new_path"
45509  # Check if we need to convert this using DOS-style short mode. If the path
45510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45511  # take no chances and rewrite it.
45512  # Note: m4 eats our [], so we need to use [ and ] instead.
45513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45514  if test "x$has_forbidden_chars" != x; then
45515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45517  fi
45518
45519    # Output is in $new_path
45520
45521  windows_path="$new_path"
45522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45523    unix_path=`$CYGPATH -u "$windows_path"`
45524    new_path="$unix_path"
45525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45527    new_path="$unix_path"
45528  fi
45529
45530    # remove trailing .exe if any
45531    new_path="${new_path/%.exe/}"
45532
45533    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45534    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45535  fi
45536
45537    else
45538      # We're on a unix platform. Hooray! :)
45539      # First separate the path from the arguments. This will split at the first
45540      # space.
45541      complete="$BUILD_CC"
45542      path="${complete%% *}"
45543      tmp="$complete EOL"
45544      arguments="${tmp#* }"
45545
45546      # Cannot rely on the command "which" here since it doesn't always work.
45547      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45548      if test -z "$is_absolute_path"; then
45549        # Path to executable is not absolute. Find it.
45550        IFS_save="$IFS"
45551        IFS=:
45552        for p in $PATH; do
45553          if test -f "$p/$path" && test -x "$p/$path"; then
45554            new_path="$p/$path"
45555            break
45556          fi
45557        done
45558        IFS="$IFS_save"
45559      else
45560        # This is an absolute path, we can use it without further modifications.
45561        new_path="$path"
45562      fi
45563
45564      if test "x$new_path" = x; then
45565        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45566$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45567        has_space=`$ECHO "$complete" | $GREP " "`
45568        if test "x$has_space" != x; then
45569          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45570$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45571        fi
45572        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45573      fi
45574    fi
45575
45576    # Now join together the path and the arguments once again
45577    if test "x$arguments" != xEOL; then
45578      new_complete="$new_path ${arguments% *}"
45579    else
45580      new_complete="$new_path"
45581    fi
45582
45583    if test "x$complete" != "x$new_complete"; then
45584      BUILD_CC="$new_complete"
45585      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45586$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45587    fi
45588  fi
45589
45590
45591
45592
45593  # Publish this variable in the help.
45594
45595
45596  if [ -z "${BUILD_CXX+x}" ]; then
45597    # The variable is not set by user, try to locate tool using the code snippet
45598    for ac_prog in cl CC g++
45599do
45600  # Extract the first word of "$ac_prog", so it can be a program name with args.
45601set dummy $ac_prog; ac_word=$2
45602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45603$as_echo_n "checking for $ac_word... " >&6; }
45604if ${ac_cv_path_BUILD_CXX+:} false; then :
45605  $as_echo_n "(cached) " >&6
45606else
45607  case $BUILD_CXX in
45608  [\\/]* | ?:[\\/]*)
45609  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45610  ;;
45611  *)
45612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45613for as_dir in $PATH
45614do
45615  IFS=$as_save_IFS
45616  test -z "$as_dir" && as_dir=.
45617    for ac_exec_ext in '' $ac_executable_extensions; do
45618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45619    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45621    break 2
45622  fi
45623done
45624  done
45625IFS=$as_save_IFS
45626
45627  ;;
45628esac
45629fi
45630BUILD_CXX=$ac_cv_path_BUILD_CXX
45631if test -n "$BUILD_CXX"; then
45632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45633$as_echo "$BUILD_CXX" >&6; }
45634else
45635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45636$as_echo "no" >&6; }
45637fi
45638
45639
45640  test -n "$BUILD_CXX" && break
45641done
45642
45643  else
45644    # The variable is set, but is it from the command line or the environment?
45645
45646    # Try to remove the string !BUILD_CXX! from our list.
45647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45649      # If it failed, the variable was not from the command line. Ignore it,
45650      # but warn the user (except for BASH, which is always set by the calling BASH).
45651      if test "xBUILD_CXX" != xBASH; then
45652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45653$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45654      fi
45655      # Try to locate tool using the code snippet
45656      for ac_prog in cl CC g++
45657do
45658  # Extract the first word of "$ac_prog", so it can be a program name with args.
45659set dummy $ac_prog; ac_word=$2
45660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45661$as_echo_n "checking for $ac_word... " >&6; }
45662if ${ac_cv_path_BUILD_CXX+:} false; then :
45663  $as_echo_n "(cached) " >&6
45664else
45665  case $BUILD_CXX in
45666  [\\/]* | ?:[\\/]*)
45667  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45668  ;;
45669  *)
45670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45671for as_dir in $PATH
45672do
45673  IFS=$as_save_IFS
45674  test -z "$as_dir" && as_dir=.
45675    for ac_exec_ext in '' $ac_executable_extensions; do
45676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45677    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45679    break 2
45680  fi
45681done
45682  done
45683IFS=$as_save_IFS
45684
45685  ;;
45686esac
45687fi
45688BUILD_CXX=$ac_cv_path_BUILD_CXX
45689if test -n "$BUILD_CXX"; then
45690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45691$as_echo "$BUILD_CXX" >&6; }
45692else
45693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45694$as_echo "no" >&6; }
45695fi
45696
45697
45698  test -n "$BUILD_CXX" && break
45699done
45700
45701    else
45702      # If it succeeded, then it was overridden by the user. We will use it
45703      # for the tool.
45704
45705      # First remove it from the list of overridden variables, so we can test
45706      # for unknown variables in the end.
45707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45708
45709      # Check if we try to supply an empty value
45710      if test "x$BUILD_CXX" = x; then
45711        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45712$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45714$as_echo_n "checking for BUILD_CXX... " >&6; }
45715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45716$as_echo "disabled" >&6; }
45717      else
45718        # Check if the provided tool contains a complete path.
45719        tool_specified="$BUILD_CXX"
45720        tool_basename="${tool_specified##*/}"
45721        if test "x$tool_basename" = "x$tool_specified"; then
45722          # A command without a complete path is provided, search $PATH.
45723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45724$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45725          # Extract the first word of "$tool_basename", so it can be a program name with args.
45726set dummy $tool_basename; ac_word=$2
45727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45728$as_echo_n "checking for $ac_word... " >&6; }
45729if ${ac_cv_path_BUILD_CXX+:} false; then :
45730  $as_echo_n "(cached) " >&6
45731else
45732  case $BUILD_CXX in
45733  [\\/]* | ?:[\\/]*)
45734  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45735  ;;
45736  *)
45737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45738for as_dir in $PATH
45739do
45740  IFS=$as_save_IFS
45741  test -z "$as_dir" && as_dir=.
45742    for ac_exec_ext in '' $ac_executable_extensions; do
45743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45744    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45746    break 2
45747  fi
45748done
45749  done
45750IFS=$as_save_IFS
45751
45752  ;;
45753esac
45754fi
45755BUILD_CXX=$ac_cv_path_BUILD_CXX
45756if test -n "$BUILD_CXX"; then
45757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45758$as_echo "$BUILD_CXX" >&6; }
45759else
45760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45761$as_echo "no" >&6; }
45762fi
45763
45764
45765          if test "x$BUILD_CXX" = x; then
45766            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45767          fi
45768        else
45769          # Otherwise we believe it is a complete path. Use it as it is.
45770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45771$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45772          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45773$as_echo_n "checking for BUILD_CXX... " >&6; }
45774          if test ! -x "$tool_specified"; then
45775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45776$as_echo "not found" >&6; }
45777            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45778          fi
45779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45780$as_echo "$tool_specified" >&6; }
45781        fi
45782      fi
45783    fi
45784
45785  fi
45786
45787
45788
45789  if test "x$BUILD_CXX" = x; then
45790    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45791  fi
45792
45793
45794
45795  # Only process if variable expands to non-empty
45796
45797  if test "x$BUILD_CXX" != x; then
45798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45799
45800  # First separate the path from the arguments. This will split at the first
45801  # space.
45802  complete="$BUILD_CXX"
45803  path="${complete%% *}"
45804  tmp="$complete EOL"
45805  arguments="${tmp#* }"
45806
45807  # Input might be given as Windows format, start by converting to
45808  # unix format.
45809  new_path=`$CYGPATH -u "$path"`
45810
45811  # Now try to locate executable using which
45812  new_path=`$WHICH "$new_path" 2> /dev/null`
45813  # bat and cmd files are not always considered executable in cygwin causing which
45814  # to not find them
45815  if test "x$new_path" = x \
45816      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45817      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45818    new_path=`$CYGPATH -u "$path"`
45819  fi
45820  if test "x$new_path" = x; then
45821    # Oops. Which didn't find the executable.
45822    # The splitting of arguments from the executable at a space might have been incorrect,
45823    # since paths with space are more likely in Windows. Give it another try with the whole
45824    # argument.
45825    path="$complete"
45826    arguments="EOL"
45827    new_path=`$CYGPATH -u "$path"`
45828    new_path=`$WHICH "$new_path" 2> /dev/null`
45829    # bat and cmd files are not always considered executable in cygwin causing which
45830    # to not find them
45831    if test "x$new_path" = x \
45832        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45833        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45834      new_path=`$CYGPATH -u "$path"`
45835    fi
45836    if test "x$new_path" = x; then
45837      # It's still not found. Now this is an unrecoverable error.
45838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45839$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45840      has_space=`$ECHO "$complete" | $GREP " "`
45841      if test "x$has_space" != x; then
45842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45844      fi
45845      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45846    fi
45847  fi
45848
45849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45852  # "foo.exe" is OK but "foo" is an error.
45853  #
45854  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45855  # It is also a way to make sure we got the proper file name for the real test later on.
45856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45857  if test "x$test_shortpath" = x; then
45858    # Short path failed, file does not exist as specified.
45859    # Try adding .exe or .cmd
45860    if test -f "${new_path}.exe"; then
45861      input_to_shortpath="${new_path}.exe"
45862    elif test -f "${new_path}.cmd"; then
45863      input_to_shortpath="${new_path}.cmd"
45864    else
45865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45866$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45867      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45868$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45869      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45870    fi
45871  else
45872    input_to_shortpath="$new_path"
45873  fi
45874
45875  # Call helper function which possibly converts this using DOS-style short mode.
45876  # If so, the updated path is stored in $new_path.
45877  new_path="$input_to_shortpath"
45878
45879  input_path="$input_to_shortpath"
45880  # Check if we need to convert this using DOS-style short mode. If the path
45881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45882  # take no chances and rewrite it.
45883  # Note: m4 eats our [], so we need to use [ and ] instead.
45884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45885  if test "x$has_forbidden_chars" != x; then
45886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45890      # Going to short mode and back again did indeed matter. Since short mode is
45891      # case insensitive, let's make it lowercase to improve readability.
45892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45893      # Now convert it back to Unix-style (cygpath)
45894      input_path=`$CYGPATH -u "$shortmode_path"`
45895      new_path="$input_path"
45896    fi
45897  fi
45898
45899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45900  if test "x$test_cygdrive_prefix" = x; then
45901    # As a simple fix, exclude /usr/bin since it's not a real path.
45902    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45904      # a path prefixed by /cygdrive for fixpath to work.
45905      new_path="$CYGWIN_ROOT_PATH$input_path"
45906    fi
45907  fi
45908
45909  # remove trailing .exe if any
45910  new_path="${new_path/%.exe/}"
45911
45912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45913
45914  # First separate the path from the arguments. This will split at the first
45915  # space.
45916  complete="$BUILD_CXX"
45917  path="${complete%% *}"
45918  tmp="$complete EOL"
45919  arguments="${tmp#* }"
45920
45921  # Input might be given as Windows format, start by converting to
45922  # unix format.
45923  new_path="$path"
45924
45925  windows_path="$new_path"
45926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45927    unix_path=`$CYGPATH -u "$windows_path"`
45928    new_path="$unix_path"
45929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45931    new_path="$unix_path"
45932  fi
45933
45934
45935  # Now try to locate executable using which
45936  new_path=`$WHICH "$new_path" 2> /dev/null`
45937
45938  if test "x$new_path" = x; then
45939    # Oops. Which didn't find the executable.
45940    # The splitting of arguments from the executable at a space might have been incorrect,
45941    # since paths with space are more likely in Windows. Give it another try with the whole
45942    # argument.
45943    path="$complete"
45944    arguments="EOL"
45945    new_path="$path"
45946
45947  windows_path="$new_path"
45948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45949    unix_path=`$CYGPATH -u "$windows_path"`
45950    new_path="$unix_path"
45951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45953    new_path="$unix_path"
45954  fi
45955
45956
45957    new_path=`$WHICH "$new_path" 2> /dev/null`
45958    # bat and cmd files are not always considered executable in MSYS causing which
45959    # to not find them
45960    if test "x$new_path" = x \
45961        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45962        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45963      new_path="$path"
45964
45965  windows_path="$new_path"
45966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45967    unix_path=`$CYGPATH -u "$windows_path"`
45968    new_path="$unix_path"
45969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45971    new_path="$unix_path"
45972  fi
45973
45974    fi
45975
45976    if test "x$new_path" = x; then
45977      # It's still not found. Now this is an unrecoverable error.
45978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45979$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45980      has_space=`$ECHO "$complete" | $GREP " "`
45981      if test "x$has_space" != x; then
45982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45984      fi
45985      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45986    fi
45987  fi
45988
45989  # Now new_path has a complete unix path to the binary
45990  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45991    # Keep paths in /bin as-is, but remove trailing .exe if any
45992    new_path="${new_path/%.exe/}"
45993    # Do not save /bin paths to all_fixpath_prefixes!
45994  else
45995    # Not in mixed or Windows style, start by that.
45996    new_path=`cmd //c echo $new_path`
45997
45998  input_path="$new_path"
45999  # Check if we need to convert this using DOS-style short mode. If the path
46000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46001  # take no chances and rewrite it.
46002  # Note: m4 eats our [], so we need to use [ and ] instead.
46003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46004  if test "x$has_forbidden_chars" != x; then
46005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46007  fi
46008
46009    # Output is in $new_path
46010
46011  windows_path="$new_path"
46012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46013    unix_path=`$CYGPATH -u "$windows_path"`
46014    new_path="$unix_path"
46015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46017    new_path="$unix_path"
46018  fi
46019
46020    # remove trailing .exe if any
46021    new_path="${new_path/%.exe/}"
46022
46023    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46024    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46025  fi
46026
46027    else
46028      # We're on a unix platform. Hooray! :)
46029      # First separate the path from the arguments. This will split at the first
46030      # space.
46031      complete="$BUILD_CXX"
46032      path="${complete%% *}"
46033      tmp="$complete EOL"
46034      arguments="${tmp#* }"
46035
46036      # Cannot rely on the command "which" here since it doesn't always work.
46037      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46038      if test -z "$is_absolute_path"; then
46039        # Path to executable is not absolute. Find it.
46040        IFS_save="$IFS"
46041        IFS=:
46042        for p in $PATH; do
46043          if test -f "$p/$path" && test -x "$p/$path"; then
46044            new_path="$p/$path"
46045            break
46046          fi
46047        done
46048        IFS="$IFS_save"
46049      else
46050        # This is an absolute path, we can use it without further modifications.
46051        new_path="$path"
46052      fi
46053
46054      if test "x$new_path" = x; then
46055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
46056$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
46057        has_space=`$ECHO "$complete" | $GREP " "`
46058        if test "x$has_space" != x; then
46059          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46060$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46061        fi
46062        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
46063      fi
46064    fi
46065
46066    # Now join together the path and the arguments once again
46067    if test "x$arguments" != xEOL; then
46068      new_complete="$new_path ${arguments% *}"
46069    else
46070      new_complete="$new_path"
46071    fi
46072
46073    if test "x$complete" != "x$new_complete"; then
46074      BUILD_CXX="$new_complete"
46075      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
46076$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
46077    fi
46078  fi
46079
46080
46081
46082  # Publish this variable in the help.
46083
46084
46085  if [ -z "${BUILD_NM+x}" ]; then
46086    # The variable is not set by user, try to locate tool using the code snippet
46087    for ac_prog in nm gcc-nm
46088do
46089  # Extract the first word of "$ac_prog", so it can be a program name with args.
46090set dummy $ac_prog; ac_word=$2
46091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46092$as_echo_n "checking for $ac_word... " >&6; }
46093if ${ac_cv_path_BUILD_NM+:} false; then :
46094  $as_echo_n "(cached) " >&6
46095else
46096  case $BUILD_NM in
46097  [\\/]* | ?:[\\/]*)
46098  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46099  ;;
46100  *)
46101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46102for as_dir in $PATH
46103do
46104  IFS=$as_save_IFS
46105  test -z "$as_dir" && as_dir=.
46106    for ac_exec_ext in '' $ac_executable_extensions; do
46107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46108    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46110    break 2
46111  fi
46112done
46113  done
46114IFS=$as_save_IFS
46115
46116  ;;
46117esac
46118fi
46119BUILD_NM=$ac_cv_path_BUILD_NM
46120if test -n "$BUILD_NM"; then
46121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46122$as_echo "$BUILD_NM" >&6; }
46123else
46124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46125$as_echo "no" >&6; }
46126fi
46127
46128
46129  test -n "$BUILD_NM" && break
46130done
46131
46132  else
46133    # The variable is set, but is it from the command line or the environment?
46134
46135    # Try to remove the string !BUILD_NM! from our list.
46136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46138      # If it failed, the variable was not from the command line. Ignore it,
46139      # but warn the user (except for BASH, which is always set by the calling BASH).
46140      if test "xBUILD_NM" != xBASH; then
46141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46142$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46143      fi
46144      # Try to locate tool using the code snippet
46145      for ac_prog in nm gcc-nm
46146do
46147  # Extract the first word of "$ac_prog", so it can be a program name with args.
46148set dummy $ac_prog; ac_word=$2
46149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46150$as_echo_n "checking for $ac_word... " >&6; }
46151if ${ac_cv_path_BUILD_NM+:} false; then :
46152  $as_echo_n "(cached) " >&6
46153else
46154  case $BUILD_NM in
46155  [\\/]* | ?:[\\/]*)
46156  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46157  ;;
46158  *)
46159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46160for as_dir in $PATH
46161do
46162  IFS=$as_save_IFS
46163  test -z "$as_dir" && as_dir=.
46164    for ac_exec_ext in '' $ac_executable_extensions; do
46165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46166    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46168    break 2
46169  fi
46170done
46171  done
46172IFS=$as_save_IFS
46173
46174  ;;
46175esac
46176fi
46177BUILD_NM=$ac_cv_path_BUILD_NM
46178if test -n "$BUILD_NM"; then
46179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46180$as_echo "$BUILD_NM" >&6; }
46181else
46182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46183$as_echo "no" >&6; }
46184fi
46185
46186
46187  test -n "$BUILD_NM" && break
46188done
46189
46190    else
46191      # If it succeeded, then it was overridden by the user. We will use it
46192      # for the tool.
46193
46194      # First remove it from the list of overridden variables, so we can test
46195      # for unknown variables in the end.
46196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46197
46198      # Check if we try to supply an empty value
46199      if test "x$BUILD_NM" = x; then
46200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46201$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46203$as_echo_n "checking for BUILD_NM... " >&6; }
46204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46205$as_echo "disabled" >&6; }
46206      else
46207        # Check if the provided tool contains a complete path.
46208        tool_specified="$BUILD_NM"
46209        tool_basename="${tool_specified##*/}"
46210        if test "x$tool_basename" = "x$tool_specified"; then
46211          # A command without a complete path is provided, search $PATH.
46212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46213$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46214          # Extract the first word of "$tool_basename", so it can be a program name with args.
46215set dummy $tool_basename; ac_word=$2
46216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46217$as_echo_n "checking for $ac_word... " >&6; }
46218if ${ac_cv_path_BUILD_NM+:} false; then :
46219  $as_echo_n "(cached) " >&6
46220else
46221  case $BUILD_NM in
46222  [\\/]* | ?:[\\/]*)
46223  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46224  ;;
46225  *)
46226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46227for as_dir in $PATH
46228do
46229  IFS=$as_save_IFS
46230  test -z "$as_dir" && as_dir=.
46231    for ac_exec_ext in '' $ac_executable_extensions; do
46232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46233    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46235    break 2
46236  fi
46237done
46238  done
46239IFS=$as_save_IFS
46240
46241  ;;
46242esac
46243fi
46244BUILD_NM=$ac_cv_path_BUILD_NM
46245if test -n "$BUILD_NM"; then
46246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46247$as_echo "$BUILD_NM" >&6; }
46248else
46249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46250$as_echo "no" >&6; }
46251fi
46252
46253
46254          if test "x$BUILD_NM" = x; then
46255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46256          fi
46257        else
46258          # Otherwise we believe it is a complete path. Use it as it is.
46259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46260$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46262$as_echo_n "checking for BUILD_NM... " >&6; }
46263          if test ! -x "$tool_specified"; then
46264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46265$as_echo "not found" >&6; }
46266            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46267          fi
46268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46269$as_echo "$tool_specified" >&6; }
46270        fi
46271      fi
46272    fi
46273
46274  fi
46275
46276
46277
46278  # Only process if variable expands to non-empty
46279
46280  if test "x$BUILD_NM" != x; then
46281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46282
46283  # First separate the path from the arguments. This will split at the first
46284  # space.
46285  complete="$BUILD_NM"
46286  path="${complete%% *}"
46287  tmp="$complete EOL"
46288  arguments="${tmp#* }"
46289
46290  # Input might be given as Windows format, start by converting to
46291  # unix format.
46292  new_path=`$CYGPATH -u "$path"`
46293
46294  # Now try to locate executable using which
46295  new_path=`$WHICH "$new_path" 2> /dev/null`
46296  # bat and cmd files are not always considered executable in cygwin causing which
46297  # to not find them
46298  if test "x$new_path" = x \
46299      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46300      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46301    new_path=`$CYGPATH -u "$path"`
46302  fi
46303  if test "x$new_path" = x; then
46304    # Oops. Which didn't find the executable.
46305    # The splitting of arguments from the executable at a space might have been incorrect,
46306    # since paths with space are more likely in Windows. Give it another try with the whole
46307    # argument.
46308    path="$complete"
46309    arguments="EOL"
46310    new_path=`$CYGPATH -u "$path"`
46311    new_path=`$WHICH "$new_path" 2> /dev/null`
46312    # bat and cmd files are not always considered executable in cygwin causing which
46313    # to not find them
46314    if test "x$new_path" = x \
46315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46317      new_path=`$CYGPATH -u "$path"`
46318    fi
46319    if test "x$new_path" = x; then
46320      # It's still not found. Now this is an unrecoverable error.
46321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46322$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46323      has_space=`$ECHO "$complete" | $GREP " "`
46324      if test "x$has_space" != x; then
46325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46327      fi
46328      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46329    fi
46330  fi
46331
46332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46335  # "foo.exe" is OK but "foo" is an error.
46336  #
46337  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46338  # It is also a way to make sure we got the proper file name for the real test later on.
46339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46340  if test "x$test_shortpath" = x; then
46341    # Short path failed, file does not exist as specified.
46342    # Try adding .exe or .cmd
46343    if test -f "${new_path}.exe"; then
46344      input_to_shortpath="${new_path}.exe"
46345    elif test -f "${new_path}.cmd"; then
46346      input_to_shortpath="${new_path}.cmd"
46347    else
46348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46349$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46350      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46351$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46352      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46353    fi
46354  else
46355    input_to_shortpath="$new_path"
46356  fi
46357
46358  # Call helper function which possibly converts this using DOS-style short mode.
46359  # If so, the updated path is stored in $new_path.
46360  new_path="$input_to_shortpath"
46361
46362  input_path="$input_to_shortpath"
46363  # Check if we need to convert this using DOS-style short mode. If the path
46364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46365  # take no chances and rewrite it.
46366  # Note: m4 eats our [], so we need to use [ and ] instead.
46367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46368  if test "x$has_forbidden_chars" != x; then
46369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46373      # Going to short mode and back again did indeed matter. Since short mode is
46374      # case insensitive, let's make it lowercase to improve readability.
46375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46376      # Now convert it back to Unix-style (cygpath)
46377      input_path=`$CYGPATH -u "$shortmode_path"`
46378      new_path="$input_path"
46379    fi
46380  fi
46381
46382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46383  if test "x$test_cygdrive_prefix" = x; then
46384    # As a simple fix, exclude /usr/bin since it's not a real path.
46385    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46387      # a path prefixed by /cygdrive for fixpath to work.
46388      new_path="$CYGWIN_ROOT_PATH$input_path"
46389    fi
46390  fi
46391
46392  # remove trailing .exe if any
46393  new_path="${new_path/%.exe/}"
46394
46395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46396
46397  # First separate the path from the arguments. This will split at the first
46398  # space.
46399  complete="$BUILD_NM"
46400  path="${complete%% *}"
46401  tmp="$complete EOL"
46402  arguments="${tmp#* }"
46403
46404  # Input might be given as Windows format, start by converting to
46405  # unix format.
46406  new_path="$path"
46407
46408  windows_path="$new_path"
46409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46410    unix_path=`$CYGPATH -u "$windows_path"`
46411    new_path="$unix_path"
46412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46414    new_path="$unix_path"
46415  fi
46416
46417
46418  # Now try to locate executable using which
46419  new_path=`$WHICH "$new_path" 2> /dev/null`
46420
46421  if test "x$new_path" = x; then
46422    # Oops. Which didn't find the executable.
46423    # The splitting of arguments from the executable at a space might have been incorrect,
46424    # since paths with space are more likely in Windows. Give it another try with the whole
46425    # argument.
46426    path="$complete"
46427    arguments="EOL"
46428    new_path="$path"
46429
46430  windows_path="$new_path"
46431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46432    unix_path=`$CYGPATH -u "$windows_path"`
46433    new_path="$unix_path"
46434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46436    new_path="$unix_path"
46437  fi
46438
46439
46440    new_path=`$WHICH "$new_path" 2> /dev/null`
46441    # bat and cmd files are not always considered executable in MSYS causing which
46442    # to not find them
46443    if test "x$new_path" = x \
46444        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46445        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46446      new_path="$path"
46447
46448  windows_path="$new_path"
46449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46450    unix_path=`$CYGPATH -u "$windows_path"`
46451    new_path="$unix_path"
46452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46454    new_path="$unix_path"
46455  fi
46456
46457    fi
46458
46459    if test "x$new_path" = x; then
46460      # It's still not found. Now this is an unrecoverable error.
46461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46462$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46463      has_space=`$ECHO "$complete" | $GREP " "`
46464      if test "x$has_space" != x; then
46465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46467      fi
46468      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46469    fi
46470  fi
46471
46472  # Now new_path has a complete unix path to the binary
46473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46474    # Keep paths in /bin as-is, but remove trailing .exe if any
46475    new_path="${new_path/%.exe/}"
46476    # Do not save /bin paths to all_fixpath_prefixes!
46477  else
46478    # Not in mixed or Windows style, start by that.
46479    new_path=`cmd //c echo $new_path`
46480
46481  input_path="$new_path"
46482  # Check if we need to convert this using DOS-style short mode. If the path
46483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46484  # take no chances and rewrite it.
46485  # Note: m4 eats our [], so we need to use [ and ] instead.
46486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46487  if test "x$has_forbidden_chars" != x; then
46488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46490  fi
46491
46492    # Output is in $new_path
46493
46494  windows_path="$new_path"
46495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46496    unix_path=`$CYGPATH -u "$windows_path"`
46497    new_path="$unix_path"
46498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46500    new_path="$unix_path"
46501  fi
46502
46503    # remove trailing .exe if any
46504    new_path="${new_path/%.exe/}"
46505
46506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46508  fi
46509
46510    else
46511      # We're on a unix platform. Hooray! :)
46512      # First separate the path from the arguments. This will split at the first
46513      # space.
46514      complete="$BUILD_NM"
46515      path="${complete%% *}"
46516      tmp="$complete EOL"
46517      arguments="${tmp#* }"
46518
46519      # Cannot rely on the command "which" here since it doesn't always work.
46520      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46521      if test -z "$is_absolute_path"; then
46522        # Path to executable is not absolute. Find it.
46523        IFS_save="$IFS"
46524        IFS=:
46525        for p in $PATH; do
46526          if test -f "$p/$path" && test -x "$p/$path"; then
46527            new_path="$p/$path"
46528            break
46529          fi
46530        done
46531        IFS="$IFS_save"
46532      else
46533        # This is an absolute path, we can use it without further modifications.
46534        new_path="$path"
46535      fi
46536
46537      if test "x$new_path" = x; then
46538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46539$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46540        has_space=`$ECHO "$complete" | $GREP " "`
46541        if test "x$has_space" != x; then
46542          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46544        fi
46545        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46546      fi
46547    fi
46548
46549    # Now join together the path and the arguments once again
46550    if test "x$arguments" != xEOL; then
46551      new_complete="$new_path ${arguments% *}"
46552    else
46553      new_complete="$new_path"
46554    fi
46555
46556    if test "x$complete" != "x$new_complete"; then
46557      BUILD_NM="$new_complete"
46558      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46559$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46560    fi
46561  fi
46562
46563
46564
46565  # Publish this variable in the help.
46566
46567
46568  if [ -z "${BUILD_AR+x}" ]; then
46569    # The variable is not set by user, try to locate tool using the code snippet
46570    for ac_prog in ar gcc-ar
46571do
46572  # Extract the first word of "$ac_prog", so it can be a program name with args.
46573set dummy $ac_prog; ac_word=$2
46574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46575$as_echo_n "checking for $ac_word... " >&6; }
46576if ${ac_cv_path_BUILD_AR+:} false; then :
46577  $as_echo_n "(cached) " >&6
46578else
46579  case $BUILD_AR in
46580  [\\/]* | ?:[\\/]*)
46581  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46582  ;;
46583  *)
46584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46585for as_dir in $PATH
46586do
46587  IFS=$as_save_IFS
46588  test -z "$as_dir" && as_dir=.
46589    for ac_exec_ext in '' $ac_executable_extensions; do
46590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46591    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46593    break 2
46594  fi
46595done
46596  done
46597IFS=$as_save_IFS
46598
46599  ;;
46600esac
46601fi
46602BUILD_AR=$ac_cv_path_BUILD_AR
46603if test -n "$BUILD_AR"; then
46604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46605$as_echo "$BUILD_AR" >&6; }
46606else
46607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46608$as_echo "no" >&6; }
46609fi
46610
46611
46612  test -n "$BUILD_AR" && break
46613done
46614
46615  else
46616    # The variable is set, but is it from the command line or the environment?
46617
46618    # Try to remove the string !BUILD_AR! from our list.
46619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46621      # If it failed, the variable was not from the command line. Ignore it,
46622      # but warn the user (except for BASH, which is always set by the calling BASH).
46623      if test "xBUILD_AR" != xBASH; then
46624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46625$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46626      fi
46627      # Try to locate tool using the code snippet
46628      for ac_prog in ar gcc-ar
46629do
46630  # Extract the first word of "$ac_prog", so it can be a program name with args.
46631set dummy $ac_prog; ac_word=$2
46632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46633$as_echo_n "checking for $ac_word... " >&6; }
46634if ${ac_cv_path_BUILD_AR+:} false; then :
46635  $as_echo_n "(cached) " >&6
46636else
46637  case $BUILD_AR in
46638  [\\/]* | ?:[\\/]*)
46639  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46640  ;;
46641  *)
46642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46643for as_dir in $PATH
46644do
46645  IFS=$as_save_IFS
46646  test -z "$as_dir" && as_dir=.
46647    for ac_exec_ext in '' $ac_executable_extensions; do
46648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46649    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46651    break 2
46652  fi
46653done
46654  done
46655IFS=$as_save_IFS
46656
46657  ;;
46658esac
46659fi
46660BUILD_AR=$ac_cv_path_BUILD_AR
46661if test -n "$BUILD_AR"; then
46662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46663$as_echo "$BUILD_AR" >&6; }
46664else
46665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46666$as_echo "no" >&6; }
46667fi
46668
46669
46670  test -n "$BUILD_AR" && break
46671done
46672
46673    else
46674      # If it succeeded, then it was overridden by the user. We will use it
46675      # for the tool.
46676
46677      # First remove it from the list of overridden variables, so we can test
46678      # for unknown variables in the end.
46679      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46680
46681      # Check if we try to supply an empty value
46682      if test "x$BUILD_AR" = x; then
46683        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46684$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46685        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46686$as_echo_n "checking for BUILD_AR... " >&6; }
46687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46688$as_echo "disabled" >&6; }
46689      else
46690        # Check if the provided tool contains a complete path.
46691        tool_specified="$BUILD_AR"
46692        tool_basename="${tool_specified##*/}"
46693        if test "x$tool_basename" = "x$tool_specified"; then
46694          # A command without a complete path is provided, search $PATH.
46695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46696$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46697          # Extract the first word of "$tool_basename", so it can be a program name with args.
46698set dummy $tool_basename; ac_word=$2
46699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46700$as_echo_n "checking for $ac_word... " >&6; }
46701if ${ac_cv_path_BUILD_AR+:} false; then :
46702  $as_echo_n "(cached) " >&6
46703else
46704  case $BUILD_AR in
46705  [\\/]* | ?:[\\/]*)
46706  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46707  ;;
46708  *)
46709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46710for as_dir in $PATH
46711do
46712  IFS=$as_save_IFS
46713  test -z "$as_dir" && as_dir=.
46714    for ac_exec_ext in '' $ac_executable_extensions; do
46715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46716    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46718    break 2
46719  fi
46720done
46721  done
46722IFS=$as_save_IFS
46723
46724  ;;
46725esac
46726fi
46727BUILD_AR=$ac_cv_path_BUILD_AR
46728if test -n "$BUILD_AR"; then
46729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46730$as_echo "$BUILD_AR" >&6; }
46731else
46732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46733$as_echo "no" >&6; }
46734fi
46735
46736
46737          if test "x$BUILD_AR" = x; then
46738            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46739          fi
46740        else
46741          # Otherwise we believe it is a complete path. Use it as it is.
46742          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46743$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46744          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46745$as_echo_n "checking for BUILD_AR... " >&6; }
46746          if test ! -x "$tool_specified"; then
46747            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46748$as_echo "not found" >&6; }
46749            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46750          fi
46751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46752$as_echo "$tool_specified" >&6; }
46753        fi
46754      fi
46755    fi
46756
46757  fi
46758
46759
46760
46761  # Only process if variable expands to non-empty
46762
46763  if test "x$BUILD_AR" != x; then
46764    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46765
46766  # First separate the path from the arguments. This will split at the first
46767  # space.
46768  complete="$BUILD_AR"
46769  path="${complete%% *}"
46770  tmp="$complete EOL"
46771  arguments="${tmp#* }"
46772
46773  # Input might be given as Windows format, start by converting to
46774  # unix format.
46775  new_path=`$CYGPATH -u "$path"`
46776
46777  # Now try to locate executable using which
46778  new_path=`$WHICH "$new_path" 2> /dev/null`
46779  # bat and cmd files are not always considered executable in cygwin causing which
46780  # to not find them
46781  if test "x$new_path" = x \
46782      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46783      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46784    new_path=`$CYGPATH -u "$path"`
46785  fi
46786  if test "x$new_path" = x; then
46787    # Oops. Which didn't find the executable.
46788    # The splitting of arguments from the executable at a space might have been incorrect,
46789    # since paths with space are more likely in Windows. Give it another try with the whole
46790    # argument.
46791    path="$complete"
46792    arguments="EOL"
46793    new_path=`$CYGPATH -u "$path"`
46794    new_path=`$WHICH "$new_path" 2> /dev/null`
46795    # bat and cmd files are not always considered executable in cygwin causing which
46796    # to not find them
46797    if test "x$new_path" = x \
46798        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46799        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46800      new_path=`$CYGPATH -u "$path"`
46801    fi
46802    if test "x$new_path" = x; then
46803      # It's still not found. Now this is an unrecoverable error.
46804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46805$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46806      has_space=`$ECHO "$complete" | $GREP " "`
46807      if test "x$has_space" != x; then
46808        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46809$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46810      fi
46811      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46812    fi
46813  fi
46814
46815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46818  # "foo.exe" is OK but "foo" is an error.
46819  #
46820  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46821  # It is also a way to make sure we got the proper file name for the real test later on.
46822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46823  if test "x$test_shortpath" = x; then
46824    # Short path failed, file does not exist as specified.
46825    # Try adding .exe or .cmd
46826    if test -f "${new_path}.exe"; then
46827      input_to_shortpath="${new_path}.exe"
46828    elif test -f "${new_path}.cmd"; then
46829      input_to_shortpath="${new_path}.cmd"
46830    else
46831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46832$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46833      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46834$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46835      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46836    fi
46837  else
46838    input_to_shortpath="$new_path"
46839  fi
46840
46841  # Call helper function which possibly converts this using DOS-style short mode.
46842  # If so, the updated path is stored in $new_path.
46843  new_path="$input_to_shortpath"
46844
46845  input_path="$input_to_shortpath"
46846  # Check if we need to convert this using DOS-style short mode. If the path
46847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46848  # take no chances and rewrite it.
46849  # Note: m4 eats our [], so we need to use [ and ] instead.
46850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46851  if test "x$has_forbidden_chars" != x; then
46852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46856      # Going to short mode and back again did indeed matter. Since short mode is
46857      # case insensitive, let's make it lowercase to improve readability.
46858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46859      # Now convert it back to Unix-style (cygpath)
46860      input_path=`$CYGPATH -u "$shortmode_path"`
46861      new_path="$input_path"
46862    fi
46863  fi
46864
46865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46866  if test "x$test_cygdrive_prefix" = x; then
46867    # As a simple fix, exclude /usr/bin since it's not a real path.
46868    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46870      # a path prefixed by /cygdrive for fixpath to work.
46871      new_path="$CYGWIN_ROOT_PATH$input_path"
46872    fi
46873  fi
46874
46875  # remove trailing .exe if any
46876  new_path="${new_path/%.exe/}"
46877
46878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46879
46880  # First separate the path from the arguments. This will split at the first
46881  # space.
46882  complete="$BUILD_AR"
46883  path="${complete%% *}"
46884  tmp="$complete EOL"
46885  arguments="${tmp#* }"
46886
46887  # Input might be given as Windows format, start by converting to
46888  # unix format.
46889  new_path="$path"
46890
46891  windows_path="$new_path"
46892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46893    unix_path=`$CYGPATH -u "$windows_path"`
46894    new_path="$unix_path"
46895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46897    new_path="$unix_path"
46898  fi
46899
46900
46901  # Now try to locate executable using which
46902  new_path=`$WHICH "$new_path" 2> /dev/null`
46903
46904  if test "x$new_path" = x; then
46905    # Oops. Which didn't find the executable.
46906    # The splitting of arguments from the executable at a space might have been incorrect,
46907    # since paths with space are more likely in Windows. Give it another try with the whole
46908    # argument.
46909    path="$complete"
46910    arguments="EOL"
46911    new_path="$path"
46912
46913  windows_path="$new_path"
46914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46915    unix_path=`$CYGPATH -u "$windows_path"`
46916    new_path="$unix_path"
46917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46919    new_path="$unix_path"
46920  fi
46921
46922
46923    new_path=`$WHICH "$new_path" 2> /dev/null`
46924    # bat and cmd files are not always considered executable in MSYS causing which
46925    # to not find them
46926    if test "x$new_path" = x \
46927        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46928        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46929      new_path="$path"
46930
46931  windows_path="$new_path"
46932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46933    unix_path=`$CYGPATH -u "$windows_path"`
46934    new_path="$unix_path"
46935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46937    new_path="$unix_path"
46938  fi
46939
46940    fi
46941
46942    if test "x$new_path" = x; then
46943      # It's still not found. Now this is an unrecoverable error.
46944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46945$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46946      has_space=`$ECHO "$complete" | $GREP " "`
46947      if test "x$has_space" != x; then
46948        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46949$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46950      fi
46951      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46952    fi
46953  fi
46954
46955  # Now new_path has a complete unix path to the binary
46956  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46957    # Keep paths in /bin as-is, but remove trailing .exe if any
46958    new_path="${new_path/%.exe/}"
46959    # Do not save /bin paths to all_fixpath_prefixes!
46960  else
46961    # Not in mixed or Windows style, start by that.
46962    new_path=`cmd //c echo $new_path`
46963
46964  input_path="$new_path"
46965  # Check if we need to convert this using DOS-style short mode. If the path
46966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46967  # take no chances and rewrite it.
46968  # Note: m4 eats our [], so we need to use [ and ] instead.
46969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46970  if test "x$has_forbidden_chars" != x; then
46971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46973  fi
46974
46975    # Output is in $new_path
46976
46977  windows_path="$new_path"
46978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46979    unix_path=`$CYGPATH -u "$windows_path"`
46980    new_path="$unix_path"
46981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46983    new_path="$unix_path"
46984  fi
46985
46986    # remove trailing .exe if any
46987    new_path="${new_path/%.exe/}"
46988
46989    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46990    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46991  fi
46992
46993    else
46994      # We're on a unix platform. Hooray! :)
46995      # First separate the path from the arguments. This will split at the first
46996      # space.
46997      complete="$BUILD_AR"
46998      path="${complete%% *}"
46999      tmp="$complete EOL"
47000      arguments="${tmp#* }"
47001
47002      # Cannot rely on the command "which" here since it doesn't always work.
47003      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47004      if test -z "$is_absolute_path"; then
47005        # Path to executable is not absolute. Find it.
47006        IFS_save="$IFS"
47007        IFS=:
47008        for p in $PATH; do
47009          if test -f "$p/$path" && test -x "$p/$path"; then
47010            new_path="$p/$path"
47011            break
47012          fi
47013        done
47014        IFS="$IFS_save"
47015      else
47016        # This is an absolute path, we can use it without further modifications.
47017        new_path="$path"
47018      fi
47019
47020      if test "x$new_path" = x; then
47021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
47022$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
47023        has_space=`$ECHO "$complete" | $GREP " "`
47024        if test "x$has_space" != x; then
47025          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47026$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47027        fi
47028        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
47029      fi
47030    fi
47031
47032    # Now join together the path and the arguments once again
47033    if test "x$arguments" != xEOL; then
47034      new_complete="$new_path ${arguments% *}"
47035    else
47036      new_complete="$new_path"
47037    fi
47038
47039    if test "x$complete" != "x$new_complete"; then
47040      BUILD_AR="$new_complete"
47041      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
47042$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
47043    fi
47044  fi
47045
47046
47047
47048  # Publish this variable in the help.
47049
47050
47051  if [ -z "${BUILD_OBJCOPY+x}" ]; then
47052    # The variable is not set by user, try to locate tool using the code snippet
47053    for ac_prog in objcopy
47054do
47055  # Extract the first word of "$ac_prog", so it can be a program name with args.
47056set dummy $ac_prog; ac_word=$2
47057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47058$as_echo_n "checking for $ac_word... " >&6; }
47059if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47060  $as_echo_n "(cached) " >&6
47061else
47062  case $BUILD_OBJCOPY in
47063  [\\/]* | ?:[\\/]*)
47064  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47065  ;;
47066  *)
47067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47068for as_dir in $PATH
47069do
47070  IFS=$as_save_IFS
47071  test -z "$as_dir" && as_dir=.
47072    for ac_exec_ext in '' $ac_executable_extensions; do
47073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47074    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47076    break 2
47077  fi
47078done
47079  done
47080IFS=$as_save_IFS
47081
47082  ;;
47083esac
47084fi
47085BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47086if test -n "$BUILD_OBJCOPY"; then
47087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47088$as_echo "$BUILD_OBJCOPY" >&6; }
47089else
47090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47091$as_echo "no" >&6; }
47092fi
47093
47094
47095  test -n "$BUILD_OBJCOPY" && break
47096done
47097
47098  else
47099    # The variable is set, but is it from the command line or the environment?
47100
47101    # Try to remove the string !BUILD_OBJCOPY! from our list.
47102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
47103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47104      # If it failed, the variable was not from the command line. Ignore it,
47105      # but warn the user (except for BASH, which is always set by the calling BASH).
47106      if test "xBUILD_OBJCOPY" != xBASH; then
47107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
47108$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
47109      fi
47110      # Try to locate tool using the code snippet
47111      for ac_prog in objcopy
47112do
47113  # Extract the first word of "$ac_prog", so it can be a program name with args.
47114set dummy $ac_prog; ac_word=$2
47115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47116$as_echo_n "checking for $ac_word... " >&6; }
47117if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47118  $as_echo_n "(cached) " >&6
47119else
47120  case $BUILD_OBJCOPY in
47121  [\\/]* | ?:[\\/]*)
47122  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47123  ;;
47124  *)
47125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47126for as_dir in $PATH
47127do
47128  IFS=$as_save_IFS
47129  test -z "$as_dir" && as_dir=.
47130    for ac_exec_ext in '' $ac_executable_extensions; do
47131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47132    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47134    break 2
47135  fi
47136done
47137  done
47138IFS=$as_save_IFS
47139
47140  ;;
47141esac
47142fi
47143BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47144if test -n "$BUILD_OBJCOPY"; then
47145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47146$as_echo "$BUILD_OBJCOPY" >&6; }
47147else
47148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47149$as_echo "no" >&6; }
47150fi
47151
47152
47153  test -n "$BUILD_OBJCOPY" && break
47154done
47155
47156    else
47157      # If it succeeded, then it was overridden by the user. We will use it
47158      # for the tool.
47159
47160      # First remove it from the list of overridden variables, so we can test
47161      # for unknown variables in the end.
47162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47163
47164      # Check if we try to supply an empty value
47165      if test "x$BUILD_OBJCOPY" = x; then
47166        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47167$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47169$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47171$as_echo "disabled" >&6; }
47172      else
47173        # Check if the provided tool contains a complete path.
47174        tool_specified="$BUILD_OBJCOPY"
47175        tool_basename="${tool_specified##*/}"
47176        if test "x$tool_basename" = "x$tool_specified"; then
47177          # A command without a complete path is provided, search $PATH.
47178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47179$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47180          # Extract the first word of "$tool_basename", so it can be a program name with args.
47181set dummy $tool_basename; ac_word=$2
47182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47183$as_echo_n "checking for $ac_word... " >&6; }
47184if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47185  $as_echo_n "(cached) " >&6
47186else
47187  case $BUILD_OBJCOPY in
47188  [\\/]* | ?:[\\/]*)
47189  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47190  ;;
47191  *)
47192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47193for as_dir in $PATH
47194do
47195  IFS=$as_save_IFS
47196  test -z "$as_dir" && as_dir=.
47197    for ac_exec_ext in '' $ac_executable_extensions; do
47198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47199    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47201    break 2
47202  fi
47203done
47204  done
47205IFS=$as_save_IFS
47206
47207  ;;
47208esac
47209fi
47210BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47211if test -n "$BUILD_OBJCOPY"; then
47212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47213$as_echo "$BUILD_OBJCOPY" >&6; }
47214else
47215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47216$as_echo "no" >&6; }
47217fi
47218
47219
47220          if test "x$BUILD_OBJCOPY" = x; then
47221            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47222          fi
47223        else
47224          # Otherwise we believe it is a complete path. Use it as it is.
47225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47226$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47227          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47228$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47229          if test ! -x "$tool_specified"; then
47230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47231$as_echo "not found" >&6; }
47232            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47233          fi
47234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47235$as_echo "$tool_specified" >&6; }
47236        fi
47237      fi
47238    fi
47239
47240  fi
47241
47242
47243
47244  # Only process if variable expands to non-empty
47245
47246  if test "x$BUILD_OBJCOPY" != x; then
47247    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47248
47249  # First separate the path from the arguments. This will split at the first
47250  # space.
47251  complete="$BUILD_OBJCOPY"
47252  path="${complete%% *}"
47253  tmp="$complete EOL"
47254  arguments="${tmp#* }"
47255
47256  # Input might be given as Windows format, start by converting to
47257  # unix format.
47258  new_path=`$CYGPATH -u "$path"`
47259
47260  # Now try to locate executable using which
47261  new_path=`$WHICH "$new_path" 2> /dev/null`
47262  # bat and cmd files are not always considered executable in cygwin causing which
47263  # to not find them
47264  if test "x$new_path" = x \
47265      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47266      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47267    new_path=`$CYGPATH -u "$path"`
47268  fi
47269  if test "x$new_path" = x; then
47270    # Oops. Which didn't find the executable.
47271    # The splitting of arguments from the executable at a space might have been incorrect,
47272    # since paths with space are more likely in Windows. Give it another try with the whole
47273    # argument.
47274    path="$complete"
47275    arguments="EOL"
47276    new_path=`$CYGPATH -u "$path"`
47277    new_path=`$WHICH "$new_path" 2> /dev/null`
47278    # bat and cmd files are not always considered executable in cygwin causing which
47279    # to not find them
47280    if test "x$new_path" = x \
47281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47283      new_path=`$CYGPATH -u "$path"`
47284    fi
47285    if test "x$new_path" = x; then
47286      # It's still not found. Now this is an unrecoverable error.
47287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47288$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47289      has_space=`$ECHO "$complete" | $GREP " "`
47290      if test "x$has_space" != x; then
47291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47293      fi
47294      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47295    fi
47296  fi
47297
47298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47301  # "foo.exe" is OK but "foo" is an error.
47302  #
47303  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47304  # It is also a way to make sure we got the proper file name for the real test later on.
47305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47306  if test "x$test_shortpath" = x; then
47307    # Short path failed, file does not exist as specified.
47308    # Try adding .exe or .cmd
47309    if test -f "${new_path}.exe"; then
47310      input_to_shortpath="${new_path}.exe"
47311    elif test -f "${new_path}.cmd"; then
47312      input_to_shortpath="${new_path}.cmd"
47313    else
47314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47315$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47318      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47319    fi
47320  else
47321    input_to_shortpath="$new_path"
47322  fi
47323
47324  # Call helper function which possibly converts this using DOS-style short mode.
47325  # If so, the updated path is stored in $new_path.
47326  new_path="$input_to_shortpath"
47327
47328  input_path="$input_to_shortpath"
47329  # Check if we need to convert this using DOS-style short mode. If the path
47330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47331  # take no chances and rewrite it.
47332  # Note: m4 eats our [], so we need to use [ and ] instead.
47333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47334  if test "x$has_forbidden_chars" != x; then
47335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47339      # Going to short mode and back again did indeed matter. Since short mode is
47340      # case insensitive, let's make it lowercase to improve readability.
47341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47342      # Now convert it back to Unix-style (cygpath)
47343      input_path=`$CYGPATH -u "$shortmode_path"`
47344      new_path="$input_path"
47345    fi
47346  fi
47347
47348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47349  if test "x$test_cygdrive_prefix" = x; then
47350    # As a simple fix, exclude /usr/bin since it's not a real path.
47351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47353      # a path prefixed by /cygdrive for fixpath to work.
47354      new_path="$CYGWIN_ROOT_PATH$input_path"
47355    fi
47356  fi
47357
47358  # remove trailing .exe if any
47359  new_path="${new_path/%.exe/}"
47360
47361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47362
47363  # First separate the path from the arguments. This will split at the first
47364  # space.
47365  complete="$BUILD_OBJCOPY"
47366  path="${complete%% *}"
47367  tmp="$complete EOL"
47368  arguments="${tmp#* }"
47369
47370  # Input might be given as Windows format, start by converting to
47371  # unix format.
47372  new_path="$path"
47373
47374  windows_path="$new_path"
47375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47376    unix_path=`$CYGPATH -u "$windows_path"`
47377    new_path="$unix_path"
47378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47380    new_path="$unix_path"
47381  fi
47382
47383
47384  # Now try to locate executable using which
47385  new_path=`$WHICH "$new_path" 2> /dev/null`
47386
47387  if test "x$new_path" = x; then
47388    # Oops. Which didn't find the executable.
47389    # The splitting of arguments from the executable at a space might have been incorrect,
47390    # since paths with space are more likely in Windows. Give it another try with the whole
47391    # argument.
47392    path="$complete"
47393    arguments="EOL"
47394    new_path="$path"
47395
47396  windows_path="$new_path"
47397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47398    unix_path=`$CYGPATH -u "$windows_path"`
47399    new_path="$unix_path"
47400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47402    new_path="$unix_path"
47403  fi
47404
47405
47406    new_path=`$WHICH "$new_path" 2> /dev/null`
47407    # bat and cmd files are not always considered executable in MSYS causing which
47408    # to not find them
47409    if test "x$new_path" = x \
47410        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47411        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47412      new_path="$path"
47413
47414  windows_path="$new_path"
47415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47416    unix_path=`$CYGPATH -u "$windows_path"`
47417    new_path="$unix_path"
47418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47420    new_path="$unix_path"
47421  fi
47422
47423    fi
47424
47425    if test "x$new_path" = x; then
47426      # It's still not found. Now this is an unrecoverable error.
47427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47428$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47429      has_space=`$ECHO "$complete" | $GREP " "`
47430      if test "x$has_space" != x; then
47431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47433      fi
47434      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47435    fi
47436  fi
47437
47438  # Now new_path has a complete unix path to the binary
47439  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47440    # Keep paths in /bin as-is, but remove trailing .exe if any
47441    new_path="${new_path/%.exe/}"
47442    # Do not save /bin paths to all_fixpath_prefixes!
47443  else
47444    # Not in mixed or Windows style, start by that.
47445    new_path=`cmd //c echo $new_path`
47446
47447  input_path="$new_path"
47448  # Check if we need to convert this using DOS-style short mode. If the path
47449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47450  # take no chances and rewrite it.
47451  # Note: m4 eats our [], so we need to use [ and ] instead.
47452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47453  if test "x$has_forbidden_chars" != x; then
47454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47456  fi
47457
47458    # Output is in $new_path
47459
47460  windows_path="$new_path"
47461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47462    unix_path=`$CYGPATH -u "$windows_path"`
47463    new_path="$unix_path"
47464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47466    new_path="$unix_path"
47467  fi
47468
47469    # remove trailing .exe if any
47470    new_path="${new_path/%.exe/}"
47471
47472    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47473    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47474  fi
47475
47476    else
47477      # We're on a unix platform. Hooray! :)
47478      # First separate the path from the arguments. This will split at the first
47479      # space.
47480      complete="$BUILD_OBJCOPY"
47481      path="${complete%% *}"
47482      tmp="$complete EOL"
47483      arguments="${tmp#* }"
47484
47485      # Cannot rely on the command "which" here since it doesn't always work.
47486      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47487      if test -z "$is_absolute_path"; then
47488        # Path to executable is not absolute. Find it.
47489        IFS_save="$IFS"
47490        IFS=:
47491        for p in $PATH; do
47492          if test -f "$p/$path" && test -x "$p/$path"; then
47493            new_path="$p/$path"
47494            break
47495          fi
47496        done
47497        IFS="$IFS_save"
47498      else
47499        # This is an absolute path, we can use it without further modifications.
47500        new_path="$path"
47501      fi
47502
47503      if test "x$new_path" = x; then
47504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47505$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47506        has_space=`$ECHO "$complete" | $GREP " "`
47507        if test "x$has_space" != x; then
47508          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47509$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47510        fi
47511        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47512      fi
47513    fi
47514
47515    # Now join together the path and the arguments once again
47516    if test "x$arguments" != xEOL; then
47517      new_complete="$new_path ${arguments% *}"
47518    else
47519      new_complete="$new_path"
47520    fi
47521
47522    if test "x$complete" != "x$new_complete"; then
47523      BUILD_OBJCOPY="$new_complete"
47524      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47525$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47526    fi
47527  fi
47528
47529
47530
47531  # Publish this variable in the help.
47532
47533
47534  if [ -z "${BUILD_STRIP+x}" ]; then
47535    # The variable is not set by user, try to locate tool using the code snippet
47536    for ac_prog in strip
47537do
47538  # Extract the first word of "$ac_prog", so it can be a program name with args.
47539set dummy $ac_prog; ac_word=$2
47540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47541$as_echo_n "checking for $ac_word... " >&6; }
47542if ${ac_cv_path_BUILD_STRIP+:} false; then :
47543  $as_echo_n "(cached) " >&6
47544else
47545  case $BUILD_STRIP in
47546  [\\/]* | ?:[\\/]*)
47547  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47548  ;;
47549  *)
47550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47551for as_dir in $PATH
47552do
47553  IFS=$as_save_IFS
47554  test -z "$as_dir" && as_dir=.
47555    for ac_exec_ext in '' $ac_executable_extensions; do
47556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47557    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47559    break 2
47560  fi
47561done
47562  done
47563IFS=$as_save_IFS
47564
47565  ;;
47566esac
47567fi
47568BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47569if test -n "$BUILD_STRIP"; then
47570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47571$as_echo "$BUILD_STRIP" >&6; }
47572else
47573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47574$as_echo "no" >&6; }
47575fi
47576
47577
47578  test -n "$BUILD_STRIP" && break
47579done
47580
47581  else
47582    # The variable is set, but is it from the command line or the environment?
47583
47584    # Try to remove the string !BUILD_STRIP! from our list.
47585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47587      # If it failed, the variable was not from the command line. Ignore it,
47588      # but warn the user (except for BASH, which is always set by the calling BASH).
47589      if test "xBUILD_STRIP" != xBASH; then
47590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47591$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47592      fi
47593      # Try to locate tool using the code snippet
47594      for ac_prog in strip
47595do
47596  # Extract the first word of "$ac_prog", so it can be a program name with args.
47597set dummy $ac_prog; ac_word=$2
47598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47599$as_echo_n "checking for $ac_word... " >&6; }
47600if ${ac_cv_path_BUILD_STRIP+:} false; then :
47601  $as_echo_n "(cached) " >&6
47602else
47603  case $BUILD_STRIP in
47604  [\\/]* | ?:[\\/]*)
47605  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47606  ;;
47607  *)
47608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47609for as_dir in $PATH
47610do
47611  IFS=$as_save_IFS
47612  test -z "$as_dir" && as_dir=.
47613    for ac_exec_ext in '' $ac_executable_extensions; do
47614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47615    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47617    break 2
47618  fi
47619done
47620  done
47621IFS=$as_save_IFS
47622
47623  ;;
47624esac
47625fi
47626BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47627if test -n "$BUILD_STRIP"; then
47628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47629$as_echo "$BUILD_STRIP" >&6; }
47630else
47631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47632$as_echo "no" >&6; }
47633fi
47634
47635
47636  test -n "$BUILD_STRIP" && break
47637done
47638
47639    else
47640      # If it succeeded, then it was overridden by the user. We will use it
47641      # for the tool.
47642
47643      # First remove it from the list of overridden variables, so we can test
47644      # for unknown variables in the end.
47645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47646
47647      # Check if we try to supply an empty value
47648      if test "x$BUILD_STRIP" = x; then
47649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47650$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47652$as_echo_n "checking for BUILD_STRIP... " >&6; }
47653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47654$as_echo "disabled" >&6; }
47655      else
47656        # Check if the provided tool contains a complete path.
47657        tool_specified="$BUILD_STRIP"
47658        tool_basename="${tool_specified##*/}"
47659        if test "x$tool_basename" = "x$tool_specified"; then
47660          # A command without a complete path is provided, search $PATH.
47661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47662$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47663          # Extract the first word of "$tool_basename", so it can be a program name with args.
47664set dummy $tool_basename; ac_word=$2
47665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47666$as_echo_n "checking for $ac_word... " >&6; }
47667if ${ac_cv_path_BUILD_STRIP+:} false; then :
47668  $as_echo_n "(cached) " >&6
47669else
47670  case $BUILD_STRIP in
47671  [\\/]* | ?:[\\/]*)
47672  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47673  ;;
47674  *)
47675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47676for as_dir in $PATH
47677do
47678  IFS=$as_save_IFS
47679  test -z "$as_dir" && as_dir=.
47680    for ac_exec_ext in '' $ac_executable_extensions; do
47681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47682    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47684    break 2
47685  fi
47686done
47687  done
47688IFS=$as_save_IFS
47689
47690  ;;
47691esac
47692fi
47693BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47694if test -n "$BUILD_STRIP"; then
47695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47696$as_echo "$BUILD_STRIP" >&6; }
47697else
47698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47699$as_echo "no" >&6; }
47700fi
47701
47702
47703          if test "x$BUILD_STRIP" = x; then
47704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47705          fi
47706        else
47707          # Otherwise we believe it is a complete path. Use it as it is.
47708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47709$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47711$as_echo_n "checking for BUILD_STRIP... " >&6; }
47712          if test ! -x "$tool_specified"; then
47713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47714$as_echo "not found" >&6; }
47715            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47716          fi
47717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47718$as_echo "$tool_specified" >&6; }
47719        fi
47720      fi
47721    fi
47722
47723  fi
47724
47725
47726
47727  # Only process if variable expands to non-empty
47728
47729  if test "x$BUILD_STRIP" != x; then
47730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47731
47732  # First separate the path from the arguments. This will split at the first
47733  # space.
47734  complete="$BUILD_STRIP"
47735  path="${complete%% *}"
47736  tmp="$complete EOL"
47737  arguments="${tmp#* }"
47738
47739  # Input might be given as Windows format, start by converting to
47740  # unix format.
47741  new_path=`$CYGPATH -u "$path"`
47742
47743  # Now try to locate executable using which
47744  new_path=`$WHICH "$new_path" 2> /dev/null`
47745  # bat and cmd files are not always considered executable in cygwin causing which
47746  # to not find them
47747  if test "x$new_path" = x \
47748      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47749      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47750    new_path=`$CYGPATH -u "$path"`
47751  fi
47752  if test "x$new_path" = x; then
47753    # Oops. Which didn't find the executable.
47754    # The splitting of arguments from the executable at a space might have been incorrect,
47755    # since paths with space are more likely in Windows. Give it another try with the whole
47756    # argument.
47757    path="$complete"
47758    arguments="EOL"
47759    new_path=`$CYGPATH -u "$path"`
47760    new_path=`$WHICH "$new_path" 2> /dev/null`
47761    # bat and cmd files are not always considered executable in cygwin causing which
47762    # to not find them
47763    if test "x$new_path" = x \
47764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47766      new_path=`$CYGPATH -u "$path"`
47767    fi
47768    if test "x$new_path" = x; then
47769      # It's still not found. Now this is an unrecoverable error.
47770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47771$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47772      has_space=`$ECHO "$complete" | $GREP " "`
47773      if test "x$has_space" != x; then
47774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47776      fi
47777      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47778    fi
47779  fi
47780
47781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47784  # "foo.exe" is OK but "foo" is an error.
47785  #
47786  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47787  # It is also a way to make sure we got the proper file name for the real test later on.
47788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47789  if test "x$test_shortpath" = x; then
47790    # Short path failed, file does not exist as specified.
47791    # Try adding .exe or .cmd
47792    if test -f "${new_path}.exe"; then
47793      input_to_shortpath="${new_path}.exe"
47794    elif test -f "${new_path}.cmd"; then
47795      input_to_shortpath="${new_path}.cmd"
47796    else
47797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47798$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47799      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47800$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47801      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47802    fi
47803  else
47804    input_to_shortpath="$new_path"
47805  fi
47806
47807  # Call helper function which possibly converts this using DOS-style short mode.
47808  # If so, the updated path is stored in $new_path.
47809  new_path="$input_to_shortpath"
47810
47811  input_path="$input_to_shortpath"
47812  # Check if we need to convert this using DOS-style short mode. If the path
47813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47814  # take no chances and rewrite it.
47815  # Note: m4 eats our [], so we need to use [ and ] instead.
47816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47817  if test "x$has_forbidden_chars" != x; then
47818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47822      # Going to short mode and back again did indeed matter. Since short mode is
47823      # case insensitive, let's make it lowercase to improve readability.
47824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47825      # Now convert it back to Unix-style (cygpath)
47826      input_path=`$CYGPATH -u "$shortmode_path"`
47827      new_path="$input_path"
47828    fi
47829  fi
47830
47831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47832  if test "x$test_cygdrive_prefix" = x; then
47833    # As a simple fix, exclude /usr/bin since it's not a real path.
47834    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47836      # a path prefixed by /cygdrive for fixpath to work.
47837      new_path="$CYGWIN_ROOT_PATH$input_path"
47838    fi
47839  fi
47840
47841  # remove trailing .exe if any
47842  new_path="${new_path/%.exe/}"
47843
47844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47845
47846  # First separate the path from the arguments. This will split at the first
47847  # space.
47848  complete="$BUILD_STRIP"
47849  path="${complete%% *}"
47850  tmp="$complete EOL"
47851  arguments="${tmp#* }"
47852
47853  # Input might be given as Windows format, start by converting to
47854  # unix format.
47855  new_path="$path"
47856
47857  windows_path="$new_path"
47858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47859    unix_path=`$CYGPATH -u "$windows_path"`
47860    new_path="$unix_path"
47861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47863    new_path="$unix_path"
47864  fi
47865
47866
47867  # Now try to locate executable using which
47868  new_path=`$WHICH "$new_path" 2> /dev/null`
47869
47870  if test "x$new_path" = x; then
47871    # Oops. Which didn't find the executable.
47872    # The splitting of arguments from the executable at a space might have been incorrect,
47873    # since paths with space are more likely in Windows. Give it another try with the whole
47874    # argument.
47875    path="$complete"
47876    arguments="EOL"
47877    new_path="$path"
47878
47879  windows_path="$new_path"
47880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47881    unix_path=`$CYGPATH -u "$windows_path"`
47882    new_path="$unix_path"
47883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47885    new_path="$unix_path"
47886  fi
47887
47888
47889    new_path=`$WHICH "$new_path" 2> /dev/null`
47890    # bat and cmd files are not always considered executable in MSYS causing which
47891    # to not find them
47892    if test "x$new_path" = x \
47893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47895      new_path="$path"
47896
47897  windows_path="$new_path"
47898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47899    unix_path=`$CYGPATH -u "$windows_path"`
47900    new_path="$unix_path"
47901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47903    new_path="$unix_path"
47904  fi
47905
47906    fi
47907
47908    if test "x$new_path" = x; then
47909      # It's still not found. Now this is an unrecoverable error.
47910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47911$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47912      has_space=`$ECHO "$complete" | $GREP " "`
47913      if test "x$has_space" != x; then
47914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47916      fi
47917      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47918    fi
47919  fi
47920
47921  # Now new_path has a complete unix path to the binary
47922  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47923    # Keep paths in /bin as-is, but remove trailing .exe if any
47924    new_path="${new_path/%.exe/}"
47925    # Do not save /bin paths to all_fixpath_prefixes!
47926  else
47927    # Not in mixed or Windows style, start by that.
47928    new_path=`cmd //c echo $new_path`
47929
47930  input_path="$new_path"
47931  # Check if we need to convert this using DOS-style short mode. If the path
47932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47933  # take no chances and rewrite it.
47934  # Note: m4 eats our [], so we need to use [ and ] instead.
47935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47936  if test "x$has_forbidden_chars" != x; then
47937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47939  fi
47940
47941    # Output is in $new_path
47942
47943  windows_path="$new_path"
47944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47945    unix_path=`$CYGPATH -u "$windows_path"`
47946    new_path="$unix_path"
47947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47949    new_path="$unix_path"
47950  fi
47951
47952    # remove trailing .exe if any
47953    new_path="${new_path/%.exe/}"
47954
47955    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47956    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47957  fi
47958
47959    else
47960      # We're on a unix platform. Hooray! :)
47961      # First separate the path from the arguments. This will split at the first
47962      # space.
47963      complete="$BUILD_STRIP"
47964      path="${complete%% *}"
47965      tmp="$complete EOL"
47966      arguments="${tmp#* }"
47967
47968      # Cannot rely on the command "which" here since it doesn't always work.
47969      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47970      if test -z "$is_absolute_path"; then
47971        # Path to executable is not absolute. Find it.
47972        IFS_save="$IFS"
47973        IFS=:
47974        for p in $PATH; do
47975          if test -f "$p/$path" && test -x "$p/$path"; then
47976            new_path="$p/$path"
47977            break
47978          fi
47979        done
47980        IFS="$IFS_save"
47981      else
47982        # This is an absolute path, we can use it without further modifications.
47983        new_path="$path"
47984      fi
47985
47986      if test "x$new_path" = x; then
47987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47988$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47989        has_space=`$ECHO "$complete" | $GREP " "`
47990        if test "x$has_space" != x; then
47991          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47993        fi
47994        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47995      fi
47996    fi
47997
47998    # Now join together the path and the arguments once again
47999    if test "x$arguments" != xEOL; then
48000      new_complete="$new_path ${arguments% *}"
48001    else
48002      new_complete="$new_path"
48003    fi
48004
48005    if test "x$complete" != "x$new_complete"; then
48006      BUILD_STRIP="$new_complete"
48007      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
48008$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
48009    fi
48010  fi
48011
48012    # Assume the C compiler is the assembler
48013    BUILD_AS="$BUILD_CC -c"
48014    # Just like for the target compiler, use the compiler as linker
48015    BUILD_LD="$BUILD_CC"
48016    BUILD_LDCXX="$BUILD_CXX"
48017
48018    PATH="$OLDPATH"
48019
48020
48021  COMPILER=$BUILD_CC
48022  COMPILER_NAME=BuildC
48023
48024  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48025    # cc -V output typically looks like
48026    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48027    # or
48028    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48029    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48030    # Check that this is likely to be the Solaris Studio cc.
48031    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48032    if test $? -ne 0; then
48033      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48034      { $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
48035$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48036      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48037$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48038      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48039$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48040      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48041    fi
48042    # Remove usage instructions (if present), and
48043    # collapse compiler output into a single line
48044    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48045        $SED -e 's/ *[Uu]sage:.*//'`
48046    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48047        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48048  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48049    # xlc -qversion output typically looks like
48050    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48051    #     Version: 11.01.0000.0015
48052    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48053    # Check that this is likely to be the IBM XL C compiler.
48054    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48055    if test $? -ne 0; then
48056      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48057      { $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
48058$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48059      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48060$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48061      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48062$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48063      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48064    fi
48065    # Collapse compiler output into a single line
48066    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48067    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48068        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48069  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48070    # There is no specific version flag, but all output starts with a version string.
48071    # First line typically looks something like:
48072    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48073    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48074    # Check that this is likely to be Microsoft CL.EXE.
48075    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48076    if test $? -ne 0; then
48077      { $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
48078$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48079      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48080$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48081      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48082    fi
48083    # Collapse compiler output into a single line
48084    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48085    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48086        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48087  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48088    # gcc --version output typically looks like
48089    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48090    #     Copyright (C) 2013 Free Software Foundation, Inc.
48091    #     This is free software; see the source for copying conditions.  There is NO
48092    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48093    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48094    # Check that this is likely to be GCC.
48095    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48096    if test $? -ne 0; then
48097      { $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
48098$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48099      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48100$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48101      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48102    fi
48103    # Remove Copyright and legalese from version string, and
48104    # collapse into a single line
48105    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48106        $SED -e 's/ *Copyright .*//'`
48107    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48108        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48109  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48110    # clang --version output typically looks like
48111    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48112    #    clang version 3.3 (tags/RELEASE_33/final)
48113    # or
48114    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48115    #    Target: x86_64-pc-linux-gnu
48116    #    Thread model: posix
48117    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48118    # Check that this is likely to be clang
48119    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48120    if test $? -ne 0; then
48121      { $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
48122$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48123      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48124$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48125      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48126    fi
48127    # Collapse compiler output into a single line
48128    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48129    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48130        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48131  else
48132      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48133  fi
48134  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48135  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48136  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48137  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48138
48139  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48140$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48141
48142
48143  COMPILER=$BUILD_CXX
48144  COMPILER_NAME=BuildC++
48145
48146  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48147    # cc -V output typically looks like
48148    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48149    # or
48150    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48151    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48152    # Check that this is likely to be the Solaris Studio cc.
48153    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48154    if test $? -ne 0; then
48155      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48156      { $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
48157$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48158      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48159$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48160      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48161$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48162      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48163    fi
48164    # Remove usage instructions (if present), and
48165    # collapse compiler output into a single line
48166    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48167        $SED -e 's/ *[Uu]sage:.*//'`
48168    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48169        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48170  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48171    # xlc -qversion output typically looks like
48172    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48173    #     Version: 11.01.0000.0015
48174    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48175    # Check that this is likely to be the IBM XL C compiler.
48176    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48177    if test $? -ne 0; then
48178      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48179      { $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
48180$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48181      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48182$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48183      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48184$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48185      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48186    fi
48187    # Collapse compiler output into a single line
48188    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48189    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48190        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48191  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48192    # There is no specific version flag, but all output starts with a version string.
48193    # First line typically looks something like:
48194    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48195    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48196    # Check that this is likely to be Microsoft CL.EXE.
48197    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48198    if test $? -ne 0; then
48199      { $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
48200$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48201      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48202$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48203      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48204    fi
48205    # Collapse compiler output into a single line
48206    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48207    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48208        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48209  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48210    # gcc --version output typically looks like
48211    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48212    #     Copyright (C) 2013 Free Software Foundation, Inc.
48213    #     This is free software; see the source for copying conditions.  There is NO
48214    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48215    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48216    # Check that this is likely to be GCC.
48217    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48218    if test $? -ne 0; then
48219      { $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
48220$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48221      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48222$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48223      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48224    fi
48225    # Remove Copyright and legalese from version string, and
48226    # collapse into a single line
48227    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48228        $SED -e 's/ *Copyright .*//'`
48229    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48230        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48231  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48232    # clang --version output typically looks like
48233    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48234    #    clang version 3.3 (tags/RELEASE_33/final)
48235    # or
48236    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48237    #    Target: x86_64-pc-linux-gnu
48238    #    Thread model: posix
48239    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48240    # Check that this is likely to be clang
48241    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48242    if test $? -ne 0; then
48243      { $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
48244$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48245      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48246$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48247      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48248    fi
48249    # Collapse compiler output into a single line
48250    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48251    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48252        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48253  else
48254      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48255  fi
48256  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48257  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48258  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48259  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48260
48261  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48262$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48263
48264
48265  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48266    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
48267$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48268    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48269$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48270  fi
48271
48272  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48273  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48274    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48275$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48276  fi
48277
48278  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48279    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48280$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48281  fi
48282
48283  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48284
48285  else
48286    # If we are not cross compiling, use the normal target compilers for
48287    # building the build platform executables.
48288    BUILD_CC="$CC"
48289    BUILD_CXX="$CXX"
48290    BUILD_LD="$LD"
48291    BUILD_LDCXX="$LDCXX"
48292    BUILD_NM="$NM"
48293    BUILD_AS="$AS"
48294    BUILD_OBJCOPY="$OBJCOPY"
48295    BUILD_STRIP="$STRIP"
48296    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48297    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48298    BUILD_AR="$AR"
48299
48300
48301  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48302    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48303$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48304    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48305$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48306  fi
48307
48308  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48309  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48310    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48311$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48312  fi
48313
48314  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48315    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48316$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48317  fi
48318
48319  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48320
48321  fi
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336  # The package path is used only on macosx?
48337  # FIXME: clean this up, and/or move it elsewhere.
48338  PACKAGE_PATH=/opt/local
48339
48340
48341  # Check for extra potential brokenness.
48342  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48343    # On Windows, double-check that we got the right compiler.
48344    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48345    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48346    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48347      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48348        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
48349      fi
48350    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48351      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48352        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48353      fi
48354    fi
48355  fi
48356
48357  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48358    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48359    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48360    # This is later checked when setting flags.
48361
48362    # "-Og" suppported for GCC 4.8 and later
48363    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48364
48365
48366
48367
48368
48369
48370
48371
48372
48373
48374
48375
48376
48377
48378
48379
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405
48406
48407
48408
48409
48410
48411    # Execute function body
48412
48413
48414
48415
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439
48440
48441
48442
48443
48444
48445
48446
48447
48448
48449
48450
48451
48452
48453
48454
48455
48456
48457
48458
48459
48460    # Execute function body
48461
48462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48463$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48464  supports=yes
48465
48466  saved_cflags="$CFLAGS"
48467  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48468  ac_ext=c
48469ac_cpp='$CPP $CPPFLAGS'
48470ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48471ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48472ac_compiler_gnu=$ac_cv_c_compiler_gnu
48473
48474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48475/* end confdefs.h.  */
48476int i;
48477_ACEOF
48478if ac_fn_c_try_compile "$LINENO"; then :
48479
48480else
48481  supports=no
48482fi
48483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48484  ac_ext=cpp
48485ac_cpp='$CXXCPP $CPPFLAGS'
48486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48489
48490  CFLAGS="$saved_cflags"
48491
48492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48493$as_echo "$supports" >&6; }
48494  if test "x$supports" = "xyes" ; then
48495    :
48496    C_COMP_SUPPORTS="yes"
48497  else
48498    :
48499    C_COMP_SUPPORTS="no"
48500  fi
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560    # Execute function body
48561
48562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48563$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48564  supports=yes
48565
48566  saved_cxxflags="$CXXFLAGS"
48567  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48568  ac_ext=cpp
48569ac_cpp='$CXXCPP $CPPFLAGS'
48570ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48571ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48572ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48573
48574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48575/* end confdefs.h.  */
48576int i;
48577_ACEOF
48578if ac_fn_cxx_try_compile "$LINENO"; then :
48579
48580else
48581  supports=no
48582fi
48583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48584  ac_ext=cpp
48585ac_cpp='$CXXCPP $CPPFLAGS'
48586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48589
48590  CXXFLAGS="$saved_cxxflags"
48591
48592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48593$as_echo "$supports" >&6; }
48594  if test "x$supports" = "xyes" ; then
48595    :
48596    CXX_COMP_SUPPORTS="yes"
48597  else
48598    :
48599    CXX_COMP_SUPPORTS="no"
48600  fi
48601
48602
48603
48604
48605
48606
48607
48608
48609
48610
48611
48612
48613
48614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48615$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48616  supports=no
48617  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48618
48619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48620$as_echo "$supports" >&6; }
48621  if test "x$supports" = "xyes" ; then
48622    :
48623    HAS_CFLAG_OPTIMIZE_DEBUG=true
48624  else
48625    :
48626    HAS_CFLAG_OPTIMIZE_DEBUG=false
48627  fi
48628
48629
48630
48631
48632
48633
48634
48635    # "-z relro" supported in GNU binutils 2.17 and later
48636    LINKER_RELRO_FLAG="-Wl,-z,relro"
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674
48675
48676
48677
48678
48679
48680
48681
48682
48683
48684    # Execute function body
48685
48686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48687$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48688  supports=yes
48689
48690  saved_ldflags="$LDFLAGS"
48691  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48692  ac_ext=c
48693ac_cpp='$CPP $CPPFLAGS'
48694ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48695ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48696ac_compiler_gnu=$ac_cv_c_compiler_gnu
48697
48698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48699/* end confdefs.h.  */
48700
48701int
48702main ()
48703{
48704
48705  ;
48706  return 0;
48707}
48708_ACEOF
48709if ac_fn_c_try_link "$LINENO"; then :
48710
48711else
48712  supports=no
48713fi
48714rm -f core conftest.err conftest.$ac_objext \
48715    conftest$ac_exeext conftest.$ac_ext
48716  ac_ext=cpp
48717ac_cpp='$CXXCPP $CPPFLAGS'
48718ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48719ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48720ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48721
48722  LDFLAGS="$saved_ldflags"
48723
48724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48725$as_echo "$supports" >&6; }
48726  if test "x$supports" = "xyes" ; then
48727    :
48728    HAS_LINKER_RELRO=true
48729  else
48730    :
48731    HAS_LINKER_RELRO=false
48732  fi
48733
48734
48735
48736
48737
48738
48739
48740
48741
48742
48743
48744
48745
48746    # "-z now" supported in GNU binutils 2.11 and later
48747    LINKER_NOW_FLAG="-Wl,-z,now"
48748
48749
48750
48751
48752
48753
48754
48755
48756
48757
48758
48759
48760
48761
48762
48763
48764
48765
48766
48767
48768
48769
48770
48771
48772
48773
48774
48775
48776
48777
48778
48779
48780
48781
48782
48783
48784
48785
48786
48787
48788
48789
48790
48791
48792
48793
48794
48795    # Execute function body
48796
48797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48798$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48799  supports=yes
48800
48801  saved_ldflags="$LDFLAGS"
48802  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48803  ac_ext=c
48804ac_cpp='$CPP $CPPFLAGS'
48805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48807ac_compiler_gnu=$ac_cv_c_compiler_gnu
48808
48809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48810/* end confdefs.h.  */
48811
48812int
48813main ()
48814{
48815
48816  ;
48817  return 0;
48818}
48819_ACEOF
48820if ac_fn_c_try_link "$LINENO"; then :
48821
48822else
48823  supports=no
48824fi
48825rm -f core conftest.err conftest.$ac_objext \
48826    conftest$ac_exeext conftest.$ac_ext
48827  ac_ext=cpp
48828ac_cpp='$CXXCPP $CPPFLAGS'
48829ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48830ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48831ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48832
48833  LDFLAGS="$saved_ldflags"
48834
48835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48836$as_echo "$supports" >&6; }
48837  if test "x$supports" = "xyes" ; then
48838    :
48839    HAS_LINKER_NOW=true
48840  else
48841    :
48842    HAS_LINKER_NOW=false
48843  fi
48844
48845
48846
48847
48848
48849
48850
48851
48852
48853
48854
48855
48856  fi
48857
48858  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48859  # in executable.'
48860  USING_BROKEN_SUSE_LD=no
48861  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48863$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48864    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48865    $ECHO "int main() { }" > main.c
48866    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48868$as_echo "no" >&6; }
48869      USING_BROKEN_SUSE_LD=no
48870    else
48871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48872$as_echo "yes" >&6; }
48873      USING_BROKEN_SUSE_LD=yes
48874    fi
48875    $RM version-script.map main.c a.out
48876  fi
48877
48878
48879  # Setup hotspot lecagy names for toolchains
48880  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48881  if test "x$TOOLCHAIN_TYPE" = xclang; then
48882    HOTSPOT_TOOLCHAIN_TYPE=gcc
48883  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48884    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48885  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48886    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48887  fi
48888
48889
48890
48891# Setup the JTReg Regression Test Harness.
48892
48893
48894# Check whether --with-jtreg was given.
48895if test "${with_jtreg+set}" = set; then :
48896  withval=$with_jtreg;
48897fi
48898
48899
48900  if test "x$with_jtreg" = xno; then
48901    # jtreg disabled
48902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48903$as_echo_n "checking for jtreg test harness... " >&6; }
48904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48905$as_echo "no, disabled" >&6; }
48906  elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48907    # An explicit path is specified, use it.
48908    JT_HOME="$with_jtreg"
48909    if test ! -d "$JT_HOME"; then
48910      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48911    fi
48912
48913    if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48914      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48915    fi
48916
48917    JTREGEXE="$JT_HOME/bin/jtreg"
48918    if test ! -x "$JTREGEXE"; then
48919      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48920    fi
48921
48922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48923$as_echo_n "checking for jtreg test harness... " >&6; }
48924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48925$as_echo "$JT_HOME" >&6; }
48926  else
48927    # Try to locate jtreg
48928    if test "x$JT_HOME" != x; then
48929      # JT_HOME set in environment, use it
48930      if test ! -d "$JT_HOME"; then
48931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48932$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48933        JT_HOME=
48934      else
48935        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48936          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48937$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48938          JT_HOME=
48939        elif test ! -x "$JT_HOME/bin/jtreg"; then
48940          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48941$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48942          JT_HOME=
48943        else
48944          JTREGEXE="$JT_HOME/bin/jtreg"
48945          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48946$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48947        fi
48948      fi
48949    fi
48950
48951    if test "x$JT_HOME" = x; then
48952      # JT_HOME is not set in environment, or was deemed invalid.
48953      # Try to find jtreg on path
48954
48955
48956  # Publish this variable in the help.
48957
48958
48959  if [ -z "${JTREGEXE+x}" ]; then
48960    # The variable is not set by user, try to locate tool using the code snippet
48961    for ac_prog in jtreg
48962do
48963  # Extract the first word of "$ac_prog", so it can be a program name with args.
48964set dummy $ac_prog; ac_word=$2
48965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48966$as_echo_n "checking for $ac_word... " >&6; }
48967if ${ac_cv_path_JTREGEXE+:} false; then :
48968  $as_echo_n "(cached) " >&6
48969else
48970  case $JTREGEXE in
48971  [\\/]* | ?:[\\/]*)
48972  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48973  ;;
48974  *)
48975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48976for as_dir in $PATH
48977do
48978  IFS=$as_save_IFS
48979  test -z "$as_dir" && as_dir=.
48980    for ac_exec_ext in '' $ac_executable_extensions; do
48981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48982    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48984    break 2
48985  fi
48986done
48987  done
48988IFS=$as_save_IFS
48989
48990  ;;
48991esac
48992fi
48993JTREGEXE=$ac_cv_path_JTREGEXE
48994if test -n "$JTREGEXE"; then
48995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48996$as_echo "$JTREGEXE" >&6; }
48997else
48998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48999$as_echo "no" >&6; }
49000fi
49001
49002
49003  test -n "$JTREGEXE" && break
49004done
49005
49006  else
49007    # The variable is set, but is it from the command line or the environment?
49008
49009    # Try to remove the string !JTREGEXE! from our list.
49010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
49011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49012      # If it failed, the variable was not from the command line. Ignore it,
49013      # but warn the user (except for BASH, which is always set by the calling BASH).
49014      if test "xJTREGEXE" != xBASH; then
49015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
49016$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
49017      fi
49018      # Try to locate tool using the code snippet
49019      for ac_prog in jtreg
49020do
49021  # Extract the first word of "$ac_prog", so it can be a program name with args.
49022set dummy $ac_prog; ac_word=$2
49023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49024$as_echo_n "checking for $ac_word... " >&6; }
49025if ${ac_cv_path_JTREGEXE+:} false; then :
49026  $as_echo_n "(cached) " >&6
49027else
49028  case $JTREGEXE in
49029  [\\/]* | ?:[\\/]*)
49030  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49031  ;;
49032  *)
49033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49034for as_dir in $PATH
49035do
49036  IFS=$as_save_IFS
49037  test -z "$as_dir" && as_dir=.
49038    for ac_exec_ext in '' $ac_executable_extensions; do
49039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49040    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49042    break 2
49043  fi
49044done
49045  done
49046IFS=$as_save_IFS
49047
49048  ;;
49049esac
49050fi
49051JTREGEXE=$ac_cv_path_JTREGEXE
49052if test -n "$JTREGEXE"; then
49053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49054$as_echo "$JTREGEXE" >&6; }
49055else
49056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49057$as_echo "no" >&6; }
49058fi
49059
49060
49061  test -n "$JTREGEXE" && break
49062done
49063
49064    else
49065      # If it succeeded, then it was overridden by the user. We will use it
49066      # for the tool.
49067
49068      # First remove it from the list of overridden variables, so we can test
49069      # for unknown variables in the end.
49070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49071
49072      # Check if we try to supply an empty value
49073      if test "x$JTREGEXE" = x; then
49074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
49075$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
49076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49077$as_echo_n "checking for JTREGEXE... " >&6; }
49078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
49079$as_echo "disabled" >&6; }
49080      else
49081        # Check if the provided tool contains a complete path.
49082        tool_specified="$JTREGEXE"
49083        tool_basename="${tool_specified##*/}"
49084        if test "x$tool_basename" = "x$tool_specified"; then
49085          # A command without a complete path is provided, search $PATH.
49086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
49087$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
49088          # Extract the first word of "$tool_basename", so it can be a program name with args.
49089set dummy $tool_basename; ac_word=$2
49090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49091$as_echo_n "checking for $ac_word... " >&6; }
49092if ${ac_cv_path_JTREGEXE+:} false; then :
49093  $as_echo_n "(cached) " >&6
49094else
49095  case $JTREGEXE in
49096  [\\/]* | ?:[\\/]*)
49097  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49098  ;;
49099  *)
49100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49101for as_dir in $PATH
49102do
49103  IFS=$as_save_IFS
49104  test -z "$as_dir" && as_dir=.
49105    for ac_exec_ext in '' $ac_executable_extensions; do
49106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49107    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49109    break 2
49110  fi
49111done
49112  done
49113IFS=$as_save_IFS
49114
49115  ;;
49116esac
49117fi
49118JTREGEXE=$ac_cv_path_JTREGEXE
49119if test -n "$JTREGEXE"; then
49120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49121$as_echo "$JTREGEXE" >&6; }
49122else
49123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49124$as_echo "no" >&6; }
49125fi
49126
49127
49128          if test "x$JTREGEXE" = x; then
49129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49130          fi
49131        else
49132          # Otherwise we believe it is a complete path. Use it as it is.
49133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49134$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49136$as_echo_n "checking for JTREGEXE... " >&6; }
49137          if test ! -x "$tool_specified"; then
49138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49139$as_echo "not found" >&6; }
49140            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49141          fi
49142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49143$as_echo "$tool_specified" >&6; }
49144        fi
49145      fi
49146    fi
49147
49148  fi
49149
49150
49151      if test "x$JTREGEXE" != x; then
49152        # That's good, now try to derive JT_HOME
49153        JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49154        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49155          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49156$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49157          JT_HOME=
49158          JTREGEXE=
49159        else
49160          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49161$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49162        fi
49163      fi
49164    fi
49165
49166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49167$as_echo_n "checking for jtreg test harness... " >&6; }
49168    if test "x$JT_HOME" != x; then
49169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49170$as_echo "$JT_HOME" >&6; }
49171    else
49172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49173$as_echo "no, not found" >&6; }
49174
49175      if test "x$with_jtreg" = xyes; then
49176        as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49177      fi
49178    fi
49179  fi
49180
49181
49182  # Only process if variable expands to non-empty
49183
49184  if test "x$JTREGEXE" != x; then
49185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49186
49187  # First separate the path from the arguments. This will split at the first
49188  # space.
49189  complete="$JTREGEXE"
49190  path="${complete%% *}"
49191  tmp="$complete EOL"
49192  arguments="${tmp#* }"
49193
49194  # Input might be given as Windows format, start by converting to
49195  # unix format.
49196  new_path=`$CYGPATH -u "$path"`
49197
49198  # Now try to locate executable using which
49199  new_path=`$WHICH "$new_path" 2> /dev/null`
49200  # bat and cmd files are not always considered executable in cygwin causing which
49201  # to not find them
49202  if test "x$new_path" = x \
49203      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49204      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49205    new_path=`$CYGPATH -u "$path"`
49206  fi
49207  if test "x$new_path" = x; then
49208    # Oops. Which didn't find the executable.
49209    # The splitting of arguments from the executable at a space might have been incorrect,
49210    # since paths with space are more likely in Windows. Give it another try with the whole
49211    # argument.
49212    path="$complete"
49213    arguments="EOL"
49214    new_path=`$CYGPATH -u "$path"`
49215    new_path=`$WHICH "$new_path" 2> /dev/null`
49216    # bat and cmd files are not always considered executable in cygwin causing which
49217    # to not find them
49218    if test "x$new_path" = x \
49219        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49220        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49221      new_path=`$CYGPATH -u "$path"`
49222    fi
49223    if test "x$new_path" = x; then
49224      # It's still not found. Now this is an unrecoverable error.
49225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49226$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49227      has_space=`$ECHO "$complete" | $GREP " "`
49228      if test "x$has_space" != x; then
49229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49231      fi
49232      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49233    fi
49234  fi
49235
49236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49239  # "foo.exe" is OK but "foo" is an error.
49240  #
49241  # This test is therefore slightly more accurate than "test -f" to check for file presence.
49242  # It is also a way to make sure we got the proper file name for the real test later on.
49243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49244  if test "x$test_shortpath" = x; then
49245    # Short path failed, file does not exist as specified.
49246    # Try adding .exe or .cmd
49247    if test -f "${new_path}.exe"; then
49248      input_to_shortpath="${new_path}.exe"
49249    elif test -f "${new_path}.cmd"; then
49250      input_to_shortpath="${new_path}.cmd"
49251    else
49252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49253$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49254      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49255$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49256      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49257    fi
49258  else
49259    input_to_shortpath="$new_path"
49260  fi
49261
49262  # Call helper function which possibly converts this using DOS-style short mode.
49263  # If so, the updated path is stored in $new_path.
49264  new_path="$input_to_shortpath"
49265
49266  input_path="$input_to_shortpath"
49267  # Check if we need to convert this using DOS-style short mode. If the path
49268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49269  # take no chances and rewrite it.
49270  # Note: m4 eats our [], so we need to use [ and ] instead.
49271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49272  if test "x$has_forbidden_chars" != x; then
49273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49277      # Going to short mode and back again did indeed matter. Since short mode is
49278      # case insensitive, let's make it lowercase to improve readability.
49279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49280      # Now convert it back to Unix-style (cygpath)
49281      input_path=`$CYGPATH -u "$shortmode_path"`
49282      new_path="$input_path"
49283    fi
49284  fi
49285
49286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49287  if test "x$test_cygdrive_prefix" = x; then
49288    # As a simple fix, exclude /usr/bin since it's not a real path.
49289    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49291      # a path prefixed by /cygdrive for fixpath to work.
49292      new_path="$CYGWIN_ROOT_PATH$input_path"
49293    fi
49294  fi
49295
49296  # remove trailing .exe if any
49297  new_path="${new_path/%.exe/}"
49298
49299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49300
49301  # First separate the path from the arguments. This will split at the first
49302  # space.
49303  complete="$JTREGEXE"
49304  path="${complete%% *}"
49305  tmp="$complete EOL"
49306  arguments="${tmp#* }"
49307
49308  # Input might be given as Windows format, start by converting to
49309  # unix format.
49310  new_path="$path"
49311
49312  windows_path="$new_path"
49313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49314    unix_path=`$CYGPATH -u "$windows_path"`
49315    new_path="$unix_path"
49316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49318    new_path="$unix_path"
49319  fi
49320
49321
49322  # Now try to locate executable using which
49323  new_path=`$WHICH "$new_path" 2> /dev/null`
49324
49325  if test "x$new_path" = x; then
49326    # Oops. Which didn't find the executable.
49327    # The splitting of arguments from the executable at a space might have been incorrect,
49328    # since paths with space are more likely in Windows. Give it another try with the whole
49329    # argument.
49330    path="$complete"
49331    arguments="EOL"
49332    new_path="$path"
49333
49334  windows_path="$new_path"
49335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49336    unix_path=`$CYGPATH -u "$windows_path"`
49337    new_path="$unix_path"
49338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49340    new_path="$unix_path"
49341  fi
49342
49343
49344    new_path=`$WHICH "$new_path" 2> /dev/null`
49345    # bat and cmd files are not always considered executable in MSYS causing which
49346    # to not find them
49347    if test "x$new_path" = x \
49348        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49349        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49350      new_path="$path"
49351
49352  windows_path="$new_path"
49353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49354    unix_path=`$CYGPATH -u "$windows_path"`
49355    new_path="$unix_path"
49356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49358    new_path="$unix_path"
49359  fi
49360
49361    fi
49362
49363    if test "x$new_path" = x; then
49364      # It's still not found. Now this is an unrecoverable error.
49365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49366$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49367      has_space=`$ECHO "$complete" | $GREP " "`
49368      if test "x$has_space" != x; then
49369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49371      fi
49372      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49373    fi
49374  fi
49375
49376  # Now new_path has a complete unix path to the binary
49377  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49378    # Keep paths in /bin as-is, but remove trailing .exe if any
49379    new_path="${new_path/%.exe/}"
49380    # Do not save /bin paths to all_fixpath_prefixes!
49381  else
49382    # Not in mixed or Windows style, start by that.
49383    new_path=`cmd //c echo $new_path`
49384
49385  input_path="$new_path"
49386  # Check if we need to convert this using DOS-style short mode. If the path
49387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49388  # take no chances and rewrite it.
49389  # Note: m4 eats our [], so we need to use [ and ] instead.
49390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49391  if test "x$has_forbidden_chars" != x; then
49392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49394  fi
49395
49396    # Output is in $new_path
49397
49398  windows_path="$new_path"
49399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49400    unix_path=`$CYGPATH -u "$windows_path"`
49401    new_path="$unix_path"
49402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49404    new_path="$unix_path"
49405  fi
49406
49407    # remove trailing .exe if any
49408    new_path="${new_path/%.exe/}"
49409
49410    # Save the first 10 bytes of this path to the storage, so fixpath can work.
49411    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49412  fi
49413
49414    else
49415      # We're on a unix platform. Hooray! :)
49416      # First separate the path from the arguments. This will split at the first
49417      # space.
49418      complete="$JTREGEXE"
49419      path="${complete%% *}"
49420      tmp="$complete EOL"
49421      arguments="${tmp#* }"
49422
49423      # Cannot rely on the command "which" here since it doesn't always work.
49424      is_absolute_path=`$ECHO "$path" | $GREP ^/`
49425      if test -z "$is_absolute_path"; then
49426        # Path to executable is not absolute. Find it.
49427        IFS_save="$IFS"
49428        IFS=:
49429        for p in $PATH; do
49430          if test -f "$p/$path" && test -x "$p/$path"; then
49431            new_path="$p/$path"
49432            break
49433          fi
49434        done
49435        IFS="$IFS_save"
49436      else
49437        # This is an absolute path, we can use it without further modifications.
49438        new_path="$path"
49439      fi
49440
49441      if test "x$new_path" = x; then
49442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49443$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49444        has_space=`$ECHO "$complete" | $GREP " "`
49445        if test "x$has_space" != x; then
49446          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49447$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49448        fi
49449        as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49450      fi
49451    fi
49452
49453    # Now join together the path and the arguments once again
49454    if test "x$arguments" != xEOL; then
49455      new_complete="$new_path ${arguments% *}"
49456    else
49457      new_complete="$new_path"
49458    fi
49459
49460    if test "x$complete" != "x$new_complete"; then
49461      JTREGEXE="$new_complete"
49462      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49463$as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49464    fi
49465  fi
49466
49467
49468  # Only process if variable expands to non-empty
49469
49470  if test "x$JT_HOME" != x; then
49471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49472
49473  # Input might be given as Windows format, start by converting to
49474  # unix format.
49475  path="$JT_HOME"
49476  new_path=`$CYGPATH -u "$path"`
49477
49478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49481  # "foo.exe" is OK but "foo" is an error.
49482  #
49483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49484  # It is also a way to make sure we got the proper file name for the real test later on.
49485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49486  if test "x$test_shortpath" = x; then
49487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49488$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49489    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49490  fi
49491
49492  # Call helper function which possibly converts this using DOS-style short mode.
49493  # If so, the updated path is stored in $new_path.
49494
49495  input_path="$new_path"
49496  # Check if we need to convert this using DOS-style short mode. If the path
49497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49498  # take no chances and rewrite it.
49499  # Note: m4 eats our [], so we need to use [ and ] instead.
49500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49501  if test "x$has_forbidden_chars" != x; then
49502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49506      # Going to short mode and back again did indeed matter. Since short mode is
49507      # case insensitive, let's make it lowercase to improve readability.
49508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49509      # Now convert it back to Unix-style (cygpath)
49510      input_path=`$CYGPATH -u "$shortmode_path"`
49511      new_path="$input_path"
49512    fi
49513  fi
49514
49515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49516  if test "x$test_cygdrive_prefix" = x; then
49517    # As a simple fix, exclude /usr/bin since it's not a real path.
49518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49520      # a path prefixed by /cygdrive for fixpath to work.
49521      new_path="$CYGWIN_ROOT_PATH$input_path"
49522    fi
49523  fi
49524
49525
49526  if test "x$path" != "x$new_path"; then
49527    JT_HOME="$new_path"
49528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49529$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49530  fi
49531
49532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49533
49534  path="$JT_HOME"
49535  has_colon=`$ECHO $path | $GREP ^.:`
49536  new_path="$path"
49537  if test "x$has_colon" = x; then
49538    # Not in mixed or Windows style, start by that.
49539    new_path=`cmd //c echo $path`
49540  fi
49541
49542
49543  input_path="$new_path"
49544  # Check if we need to convert this using DOS-style short mode. If the path
49545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49546  # take no chances and rewrite it.
49547  # Note: m4 eats our [], so we need to use [ and ] instead.
49548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49549  if test "x$has_forbidden_chars" != x; then
49550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49552  fi
49553
49554
49555  windows_path="$new_path"
49556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49557    unix_path=`$CYGPATH -u "$windows_path"`
49558    new_path="$unix_path"
49559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49561    new_path="$unix_path"
49562  fi
49563
49564  if test "x$path" != "x$new_path"; then
49565    JT_HOME="$new_path"
49566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49567$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49568  fi
49569
49570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49572
49573    else
49574      # We're on a unix platform. Hooray! :)
49575      path="$JT_HOME"
49576      has_space=`$ECHO "$path" | $GREP " "`
49577      if test "x$has_space" != x; then
49578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49579$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49580        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49581      fi
49582
49583      # Use eval to expand a potential ~
49584      eval path="$path"
49585      if test ! -f "$path" && test ! -d "$path"; then
49586        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49587      fi
49588
49589      if test -d "$path"; then
49590        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49591      else
49592        dir="`$DIRNAME "$path"`"
49593        base="`$BASENAME "$path"`"
49594        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49595      fi
49596    fi
49597  fi
49598
49599
49600
49601
49602
49603# Setup Jib dependency tool
49604
49605
49606# Check whether --with-jib was given.
49607if test "${with_jib+set}" = set; then :
49608  withval=$with_jib;
49609fi
49610
49611
49612  if test "x$with_jib" = xno || test "x$with_jib" = x; then
49613    # jib disabled
49614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49615$as_echo_n "checking for jib... " >&6; }
49616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49617$as_echo "no" >&6; }
49618  elif test "x$with_jib" = xyes; then
49619    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49620  else
49621    JIB_HOME="${with_jib}"
49622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49623$as_echo_n "checking for jib... " >&6; }
49624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49625$as_echo "${JIB_HOME}" >&6; }
49626    if test ! -d "${JIB_HOME}"; then
49627      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49628    fi
49629    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49630    if test ! -f "${JIB_JAR}"; then
49631      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49632    fi
49633  fi
49634
49635
49636
49637
49638
49639  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49640  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49641  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49642  #                              commands produced by the link step (currently AIX only)
49643  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49644    COMPILER_TARGET_BITS_FLAG="-q"
49645    COMPILER_COMMAND_FILE_FLAG="-f"
49646    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49647  else
49648    COMPILER_TARGET_BITS_FLAG="-m"
49649    COMPILER_COMMAND_FILE_FLAG="@"
49650    COMPILER_BINDCMD_FILE_FLAG=""
49651
49652    # The solstudio linker does not support @-files.
49653    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49654      COMPILER_COMMAND_FILE_FLAG=
49655    fi
49656
49657    # Check if @file is supported by gcc
49658    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49659      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49660$as_echo_n "checking if @file is supported by gcc... " >&6; }
49661      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49662      $ECHO "" "--version" > command.file
49663      if $CXX @command.file 2>&5 >&5; then
49664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49665$as_echo "yes" >&6; }
49666        COMPILER_COMMAND_FILE_FLAG="@"
49667      else
49668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49669$as_echo "no" >&6; }
49670        COMPILER_COMMAND_FILE_FLAG=
49671      fi
49672      $RM command.file
49673    fi
49674  fi
49675
49676
49677
49678
49679  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49680  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49681    ARFLAGS="-r"
49682  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49683    ARFLAGS="-X64"
49684  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49685    # lib.exe is used as AR to create static libraries.
49686    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49687  else
49688    ARFLAGS=""
49689  fi
49690
49691
49692  ## Setup strip.
49693  # FIXME: should this really be per platform, or should it be per toolchain type?
49694  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49695  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49696  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49697    STRIPFLAGS="-g"
49698  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49699    STRIPFLAGS="-x"
49700  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49701    STRIPFLAGS="-S"
49702  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49703    STRIPFLAGS="-X32_64"
49704  fi
49705
49706
49707
49708  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49709    CC_OUT_OPTION=-Fo
49710    EXE_OUT_OPTION=-out:
49711    LD_OUT_OPTION=-out:
49712    AR_OUT_OPTION=-out:
49713  else
49714    # The option used to specify the target .o,.a or .so file.
49715    # When compiling, how to specify the to be created object file.
49716    CC_OUT_OPTION='-o$(SPACE)'
49717    # When linking, how to specify the to be created executable.
49718    EXE_OUT_OPTION='-o$(SPACE)'
49719    # When linking, how to specify the to be created dynamically linkable library.
49720    LD_OUT_OPTION='-o$(SPACE)'
49721    # When archiving, how to specify the to be create static archive for object files.
49722    AR_OUT_OPTION='rcs$(SPACE)'
49723  fi
49724
49725
49726
49727
49728
49729  # On Windows, we need to set RC flags.
49730  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49731    RC_FLAGS="-nologo -l0x409"
49732    JVM_RCFLAGS="-nologo"
49733    if test "x$DEBUG_LEVEL" = xrelease; then
49734      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49735      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49736    fi
49737
49738    # The version variables used to create RC_FLAGS may be overridden
49739    # in a custom configure script, or possibly the command line.
49740    # Let those variables be expanded at make time in spec.gmk.
49741    # The \$ are escaped to the shell, and the $(...) variables
49742    # are evaluated by make.
49743    RC_FLAGS="$RC_FLAGS \
49744        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49745        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49746        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49747        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49748        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49749        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49750        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49751
49752    JVM_RCFLAGS="$JVM_RCFLAGS \
49753        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49754        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49755        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49756        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49757        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49758        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49759        -D\"HS_FNAME=jvm.dll\" \
49760        -D\"HS_INTERNAL_NAME=jvm\""
49761  fi
49762
49763
49764
49765  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49766    # silence copyright notice and other headers.
49767    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49768  fi
49769
49770
49771# Now we can test some aspects on the target using configure macros.
49772
49773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49774$as_echo_n "checking for ANSI C header files... " >&6; }
49775if ${ac_cv_header_stdc+:} false; then :
49776  $as_echo_n "(cached) " >&6
49777else
49778  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49779/* end confdefs.h.  */
49780#include <stdlib.h>
49781#include <stdarg.h>
49782#include <string.h>
49783#include <float.h>
49784
49785int
49786main ()
49787{
49788
49789  ;
49790  return 0;
49791}
49792_ACEOF
49793if ac_fn_cxx_try_compile "$LINENO"; then :
49794  ac_cv_header_stdc=yes
49795else
49796  ac_cv_header_stdc=no
49797fi
49798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49799
49800if test $ac_cv_header_stdc = yes; then
49801  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49803/* end confdefs.h.  */
49804#include <string.h>
49805
49806_ACEOF
49807if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49808  $EGREP "memchr" >/dev/null 2>&1; then :
49809
49810else
49811  ac_cv_header_stdc=no
49812fi
49813rm -f conftest*
49814
49815fi
49816
49817if test $ac_cv_header_stdc = yes; then
49818  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49820/* end confdefs.h.  */
49821#include <stdlib.h>
49822
49823_ACEOF
49824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49825  $EGREP "free" >/dev/null 2>&1; then :
49826
49827else
49828  ac_cv_header_stdc=no
49829fi
49830rm -f conftest*
49831
49832fi
49833
49834if test $ac_cv_header_stdc = yes; then
49835  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49836  if test "$cross_compiling" = yes; then :
49837  :
49838else
49839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49840/* end confdefs.h.  */
49841#include <ctype.h>
49842#include <stdlib.h>
49843#if ((' ' & 0x0FF) == 0x020)
49844# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49845# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49846#else
49847# define ISLOWER(c) \
49848		   (('a' <= (c) && (c) <= 'i') \
49849		     || ('j' <= (c) && (c) <= 'r') \
49850		     || ('s' <= (c) && (c) <= 'z'))
49851# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49852#endif
49853
49854#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49855int
49856main ()
49857{
49858  int i;
49859  for (i = 0; i < 256; i++)
49860    if (XOR (islower (i), ISLOWER (i))
49861	|| toupper (i) != TOUPPER (i))
49862      return 2;
49863  return 0;
49864}
49865_ACEOF
49866if ac_fn_cxx_try_run "$LINENO"; then :
49867
49868else
49869  ac_cv_header_stdc=no
49870fi
49871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49872  conftest.$ac_objext conftest.beam conftest.$ac_ext
49873fi
49874
49875fi
49876fi
49877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49878$as_echo "$ac_cv_header_stdc" >&6; }
49879if test $ac_cv_header_stdc = yes; then
49880
49881$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49882
49883fi
49884
49885# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49886for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49887		  inttypes.h stdint.h unistd.h
49888do :
49889  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49890ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49891"
49892if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49893  cat >>confdefs.h <<_ACEOF
49894#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49895_ACEOF
49896
49897fi
49898
49899done
49900
49901
49902
49903  ###############################################################################
49904  #
49905  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49906  # (The JVM can use 32 or 64 bit Java pointers but that decision
49907  # is made at runtime.)
49908  #
49909
49910  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49911    # Always specify -m flag on Solaris
49912    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49913
49914  # When we add flags to the "official" CFLAGS etc, we need to
49915  # keep track of these additions in ADDED_CFLAGS etc. These
49916  # will later be checked to make sure only controlled additions
49917  # have been made to CFLAGS etc.
49918  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49919  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49920  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49921
49922  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49923  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49924  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49925
49926  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49927  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49928  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49929
49930  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49931  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49932  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49933
49934  elif test "x$COMPILE_TYPE" = xreduced; then
49935    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49936      # Specify -m if running reduced on unix platforms
49937
49938  # When we add flags to the "official" CFLAGS etc, we need to
49939  # keep track of these additions in ADDED_CFLAGS etc. These
49940  # will later be checked to make sure only controlled additions
49941  # have been made to CFLAGS etc.
49942  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49943  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49944  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49945
49946  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49947  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49948  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49949
49950  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49951  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49952  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49953
49954  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49955  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49956  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49957
49958    fi
49959  fi
49960  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49961    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49962    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49963    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49964  fi
49965
49966  # Make compilation sanity check
49967  for ac_header in stdio.h
49968do :
49969  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49970if test "x$ac_cv_header_stdio_h" = xyes; then :
49971  cat >>confdefs.h <<_ACEOF
49972#define HAVE_STDIO_H 1
49973_ACEOF
49974
49975else
49976
49977    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49978$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49979    if test "x$COMPILE_TYPE" = xreduced; then
49980
49981  # Print a helpful message on how to acquire the necessary build dependency.
49982  # reduced is the help tag: freetype, cups, alsa etc
49983  MISSING_DEPENDENCY=reduced
49984
49985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49986    cygwin_help $MISSING_DEPENDENCY
49987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49988    msys_help $MISSING_DEPENDENCY
49989  else
49990    PKGHANDLER_COMMAND=
49991
49992    case $PKGHANDLER in
49993      apt-get)
49994        apt_help     $MISSING_DEPENDENCY ;;
49995      yum)
49996        yum_help     $MISSING_DEPENDENCY ;;
49997      brew)
49998        brew_help    $MISSING_DEPENDENCY ;;
49999      port)
50000        port_help    $MISSING_DEPENDENCY ;;
50001      pkgutil)
50002        pkgutil_help $MISSING_DEPENDENCY ;;
50003      pkgadd)
50004        pkgadd_help  $MISSING_DEPENDENCY ;;
50005    esac
50006
50007    if test "x$PKGHANDLER_COMMAND" != x; then
50008      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50009    fi
50010  fi
50011
50012      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50013$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50014    elif test "x$COMPILE_TYPE" = xcross; then
50015      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50016$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50017    fi
50018    as_fn_error $? "Cannot continue." "$LINENO" 5
50019
50020fi
50021
50022done
50023
50024
50025  # The cast to long int works around a bug in the HP C Compiler
50026# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50027# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50028# This bug is HP SR number 8606223364.
50029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50030$as_echo_n "checking size of int *... " >&6; }
50031if ${ac_cv_sizeof_int_p+:} false; then :
50032  $as_echo_n "(cached) " >&6
50033else
50034  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50035
50036else
50037  if test "$ac_cv_type_int_p" = yes; then
50038     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50040as_fn_error 77 "cannot compute sizeof (int *)
50041See \`config.log' for more details" "$LINENO" 5; }
50042   else
50043     ac_cv_sizeof_int_p=0
50044   fi
50045fi
50046
50047fi
50048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50049$as_echo "$ac_cv_sizeof_int_p" >&6; }
50050
50051
50052
50053cat >>confdefs.h <<_ACEOF
50054#define SIZEOF_INT_P $ac_cv_sizeof_int_p
50055_ACEOF
50056
50057
50058
50059  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
50060  if test "x$ac_cv_sizeof_int_p" = x; then
50061    # The test failed, lets stick to the assumed value.
50062    { $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
50063$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
50064  else
50065    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50066
50067    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50068      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
50069      # Let's try to implicitely set the compilers target architecture and retry the test
50070      { $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
50071$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;}
50072      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
50073$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
50074
50075  # When we add flags to the "official" CFLAGS etc, we need to
50076  # keep track of these additions in ADDED_CFLAGS etc. These
50077  # will later be checked to make sure only controlled additions
50078  # have been made to CFLAGS etc.
50079  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50080  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50081  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50082
50083  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
50084  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
50085  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
50086
50087  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
50088  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
50089  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
50090
50091  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
50092  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
50093  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
50094
50095
50096      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
50097      unset ac_cv_sizeof_int_p
50098      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
50099      cat >>confdefs.h <<_ACEOF
50100#undef SIZEOF_INT_P
50101_ACEOF
50102
50103      # The cast to long int works around a bug in the HP C Compiler
50104# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50105# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50106# This bug is HP SR number 8606223364.
50107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50108$as_echo_n "checking size of int *... " >&6; }
50109if ${ac_cv_sizeof_int_p+:} false; then :
50110  $as_echo_n "(cached) " >&6
50111else
50112  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50113
50114else
50115  if test "$ac_cv_type_int_p" = yes; then
50116     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50117$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50118as_fn_error 77 "cannot compute sizeof (int *)
50119See \`config.log' for more details" "$LINENO" 5; }
50120   else
50121     ac_cv_sizeof_int_p=0
50122   fi
50123fi
50124
50125fi
50126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50127$as_echo "$ac_cv_sizeof_int_p" >&6; }
50128
50129
50130
50131cat >>confdefs.h <<_ACEOF
50132#define SIZEOF_INT_P $ac_cv_sizeof_int_p
50133_ACEOF
50134
50135
50136
50137      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50138
50139      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50140        { $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
50141$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;}
50142        if test "x$COMPILE_TYPE" = xreduced; then
50143
50144  # Print a helpful message on how to acquire the necessary build dependency.
50145  # reduced is the help tag: freetype, cups, alsa etc
50146  MISSING_DEPENDENCY=reduced
50147
50148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50149    cygwin_help $MISSING_DEPENDENCY
50150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50151    msys_help $MISSING_DEPENDENCY
50152  else
50153    PKGHANDLER_COMMAND=
50154
50155    case $PKGHANDLER in
50156      apt-get)
50157        apt_help     $MISSING_DEPENDENCY ;;
50158      yum)
50159        yum_help     $MISSING_DEPENDENCY ;;
50160      brew)
50161        brew_help    $MISSING_DEPENDENCY ;;
50162      port)
50163        port_help    $MISSING_DEPENDENCY ;;
50164      pkgutil)
50165        pkgutil_help $MISSING_DEPENDENCY ;;
50166      pkgadd)
50167        pkgadd_help  $MISSING_DEPENDENCY ;;
50168    esac
50169
50170    if test "x$PKGHANDLER_COMMAND" != x; then
50171      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50172    fi
50173  fi
50174
50175          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50176$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50177        elif test "x$COMPILE_TYPE" = xcross; then
50178          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50179$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50180        fi
50181        as_fn_error $? "Cannot continue." "$LINENO" 5
50182      fi
50183    fi
50184  fi
50185
50186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50187$as_echo_n "checking for target address size... " >&6; }
50188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50189$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50190
50191
50192  ###############################################################################
50193  #
50194  # Is the target little of big endian?
50195  #
50196   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50197$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50198if ${ac_cv_c_bigendian+:} false; then :
50199  $as_echo_n "(cached) " >&6
50200else
50201  ac_cv_c_bigendian=unknown
50202    # See if we're dealing with a universal compiler.
50203    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50204/* end confdefs.h.  */
50205#ifndef __APPLE_CC__
50206	       not a universal capable compiler
50207	     #endif
50208	     typedef int dummy;
50209
50210_ACEOF
50211if ac_fn_cxx_try_compile "$LINENO"; then :
50212
50213	# Check for potential -arch flags.  It is not universal unless
50214	# there are at least two -arch flags with different values.
50215	ac_arch=
50216	ac_prev=
50217	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50218	 if test -n "$ac_prev"; then
50219	   case $ac_word in
50220	     i?86 | x86_64 | ppc | ppc64)
50221	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50222		 ac_arch=$ac_word
50223	       else
50224		 ac_cv_c_bigendian=universal
50225		 break
50226	       fi
50227	       ;;
50228	   esac
50229	   ac_prev=
50230	 elif test "x$ac_word" = "x-arch"; then
50231	   ac_prev=arch
50232	 fi
50233       done
50234fi
50235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50236    if test $ac_cv_c_bigendian = unknown; then
50237      # See if sys/param.h defines the BYTE_ORDER macro.
50238      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50239/* end confdefs.h.  */
50240#include <sys/types.h>
50241	     #include <sys/param.h>
50242
50243int
50244main ()
50245{
50246#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50247		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50248		     && LITTLE_ENDIAN)
50249	      bogus endian macros
50250	     #endif
50251
50252  ;
50253  return 0;
50254}
50255_ACEOF
50256if ac_fn_cxx_try_compile "$LINENO"; then :
50257  # It does; now see whether it defined to BIG_ENDIAN or not.
50258	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50259/* end confdefs.h.  */
50260#include <sys/types.h>
50261		#include <sys/param.h>
50262
50263int
50264main ()
50265{
50266#if BYTE_ORDER != BIG_ENDIAN
50267		 not big endian
50268		#endif
50269
50270  ;
50271  return 0;
50272}
50273_ACEOF
50274if ac_fn_cxx_try_compile "$LINENO"; then :
50275  ac_cv_c_bigendian=yes
50276else
50277  ac_cv_c_bigendian=no
50278fi
50279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50280fi
50281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50282    fi
50283    if test $ac_cv_c_bigendian = unknown; then
50284      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50285      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50286/* end confdefs.h.  */
50287#include <limits.h>
50288
50289int
50290main ()
50291{
50292#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50293	      bogus endian macros
50294	     #endif
50295
50296  ;
50297  return 0;
50298}
50299_ACEOF
50300if ac_fn_cxx_try_compile "$LINENO"; then :
50301  # It does; now see whether it defined to _BIG_ENDIAN or not.
50302	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50303/* end confdefs.h.  */
50304#include <limits.h>
50305
50306int
50307main ()
50308{
50309#ifndef _BIG_ENDIAN
50310		 not big endian
50311		#endif
50312
50313  ;
50314  return 0;
50315}
50316_ACEOF
50317if ac_fn_cxx_try_compile "$LINENO"; then :
50318  ac_cv_c_bigendian=yes
50319else
50320  ac_cv_c_bigendian=no
50321fi
50322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50323fi
50324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50325    fi
50326    if test $ac_cv_c_bigendian = unknown; then
50327      # Compile a test program.
50328      if test "$cross_compiling" = yes; then :
50329  # Try to guess by grepping values from an object file.
50330	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50331/* end confdefs.h.  */
50332short int ascii_mm[] =
50333		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50334		short int ascii_ii[] =
50335		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50336		int use_ascii (int i) {
50337		  return ascii_mm[i] + ascii_ii[i];
50338		}
50339		short int ebcdic_ii[] =
50340		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50341		short int ebcdic_mm[] =
50342		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50343		int use_ebcdic (int i) {
50344		  return ebcdic_mm[i] + ebcdic_ii[i];
50345		}
50346		extern int foo;
50347
50348int
50349main ()
50350{
50351return use_ascii (foo) == use_ebcdic (foo);
50352  ;
50353  return 0;
50354}
50355_ACEOF
50356if ac_fn_cxx_try_compile "$LINENO"; then :
50357  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50358	      ac_cv_c_bigendian=yes
50359	    fi
50360	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50361	      if test "$ac_cv_c_bigendian" = unknown; then
50362		ac_cv_c_bigendian=no
50363	      else
50364		# finding both strings is unlikely to happen, but who knows?
50365		ac_cv_c_bigendian=unknown
50366	      fi
50367	    fi
50368fi
50369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50370else
50371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50372/* end confdefs.h.  */
50373$ac_includes_default
50374int
50375main ()
50376{
50377
50378	     /* Are we little or big endian?  From Harbison&Steele.  */
50379	     union
50380	     {
50381	       long int l;
50382	       char c[sizeof (long int)];
50383	     } u;
50384	     u.l = 1;
50385	     return u.c[sizeof (long int) - 1] == 1;
50386
50387  ;
50388  return 0;
50389}
50390_ACEOF
50391if ac_fn_cxx_try_run "$LINENO"; then :
50392  ac_cv_c_bigendian=no
50393else
50394  ac_cv_c_bigendian=yes
50395fi
50396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50397  conftest.$ac_objext conftest.beam conftest.$ac_ext
50398fi
50399
50400    fi
50401fi
50402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50403$as_echo "$ac_cv_c_bigendian" >&6; }
50404 case $ac_cv_c_bigendian in #(
50405   yes)
50406     ENDIAN="big";; #(
50407   no)
50408     ENDIAN="little" ;; #(
50409   universal)
50410     ENDIAN="universal_endianness"
50411     ;; #(
50412   *)
50413     ENDIAN="unknown" ;;
50414 esac
50415
50416
50417  if test "x$ENDIAN" = xuniversal_endianness; then
50418    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50419  fi
50420  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50421    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
50422  fi
50423
50424
50425# Configure flags for the tools
50426
50427  ###############################################################################
50428  #
50429  # How to compile shared libraries.
50430  #
50431
50432  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50433    PICFLAG="-fPIC"
50434    C_FLAG_REORDER=''
50435    CXX_FLAG_REORDER=''
50436
50437    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50438      # Linking is different on MacOSX
50439      if test "x$STATIC_BUILD" = xtrue; then
50440        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50441      else
50442        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50443        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50444      fi
50445      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50446      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50447      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50448      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50449    else
50450      # Default works for linux, might work on other platforms as well.
50451      SHARED_LIBRARY_FLAGS='-shared'
50452      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50453      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50454      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50455      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50456    fi
50457  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50458    C_FLAG_REORDER=''
50459    CXX_FLAG_REORDER=''
50460
50461    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50462      # Linking is different on MacOSX
50463      PICFLAG=''
50464      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50465      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50466      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50467      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50468      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50469
50470      if test "x$STATIC_BUILD" = xfalse; then
50471        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50472      fi
50473    else
50474      # Default works for linux, might work on other platforms as well.
50475      PICFLAG='-fPIC'
50476      SHARED_LIBRARY_FLAGS='-shared'
50477      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50478      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50479      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50480
50481      # arm specific settings
50482      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50483        # '-Wl,-z,origin' isn't used on arm.
50484        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50485      else
50486        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50487      fi
50488
50489    fi
50490  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50491    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50492      PICFLAG="-xcode=pic32"
50493    else
50494      PICFLAG="-KPIC"
50495    fi
50496    C_FLAG_REORDER='-xF'
50497    CXX_FLAG_REORDER='-xF'
50498    SHARED_LIBRARY_FLAGS="-G"
50499    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50500    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50501    SET_SHARED_LIBRARY_NAME='-h $1'
50502    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50503  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50504    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50505    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50506    # will have to patch this single instruction with a call to some out-of-order code which
50507    # does the load from the TOC. This is of course slow. But in that case we also would have
50508    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50509    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50510    # can be patched directly by the linker and does not require a jump to out-of-order code.
50511    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50512    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50513    # loads for accessing a global variable). But there are rumors that this may be seen as a
50514    # 'performance feature' because of improved code locality of the symbols used in a
50515    # compilation unit.
50516    PICFLAG="-qpic"
50517    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50518    C_FLAG_REORDER=''
50519    CXX_FLAG_REORDER=''
50520    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50521    SET_EXECUTABLE_ORIGIN=""
50522    SET_SHARED_LIBRARY_ORIGIN=''
50523    SET_SHARED_LIBRARY_NAME=''
50524    SET_SHARED_LIBRARY_MAPFILE=''
50525  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50526    PICFLAG=""
50527    C_FLAG_REORDER=''
50528    CXX_FLAG_REORDER=''
50529    SHARED_LIBRARY_FLAGS="-dll"
50530    SET_EXECUTABLE_ORIGIN=''
50531    SET_SHARED_LIBRARY_ORIGIN=''
50532    SET_SHARED_LIBRARY_NAME=''
50533    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50534  fi
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544  # The (cross) compiler is now configured, we can now test capabilities
50545  # of the target platform.
50546
50547
50548
50549  ###############################################################################
50550  #
50551  # Setup the opt flags for different compilers
50552  # and different operating systems.
50553  #
50554
50555  # FIXME: this was indirectly the old default, but just inherited.
50556  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50557  #   C_FLAG_DEPS="-MMD -MF"
50558  # fi
50559
50560  # Generate make dependency files
50561  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50562    C_FLAG_DEPS="-MMD -MF"
50563  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50564    C_FLAG_DEPS="-MMD -MF"
50565  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50566    C_FLAG_DEPS="-xMMD -xMF"
50567  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50568    C_FLAG_DEPS="-qmakedep=gcc -MF"
50569  fi
50570  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50571
50572
50573
50574  # Debug symbols
50575  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50576    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50577      # reduce from default "-g2" option to save space
50578      CFLAGS_DEBUG_SYMBOLS="-g1"
50579      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50580    else
50581      CFLAGS_DEBUG_SYMBOLS="-g"
50582      CXXFLAGS_DEBUG_SYMBOLS="-g"
50583    fi
50584  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50585    CFLAGS_DEBUG_SYMBOLS="-g"
50586    CXXFLAGS_DEBUG_SYMBOLS="-g"
50587  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50588    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50589    # -g0 enables debug symbols without disabling inlining.
50590    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50591  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50592    CFLAGS_DEBUG_SYMBOLS="-g"
50593    CXXFLAGS_DEBUG_SYMBOLS="-g"
50594  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50595    CFLAGS_DEBUG_SYMBOLS="-Zi"
50596    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50597  fi
50598
50599
50600
50601  # Debug symbols for JVM_CFLAGS
50602  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50603    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50604    if test "x$DEBUG_LEVEL" = xslowdebug; then
50605      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50606    else
50607      # -g0 does not disable inlining, which -g does.
50608      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50609    fi
50610  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50611    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50612  else
50613    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50614  fi
50615
50616
50617  # bounds, memory and behavior checking options
50618  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50619    case $DEBUG_LEVEL in
50620    release )
50621      # no adjustment
50622      ;;
50623    fastdebug )
50624      # no adjustment
50625      ;;
50626    slowdebug )
50627      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50628      # get's added conditionally on whether we produce debug symbols or not.
50629      # This is most likely not really correct.
50630
50631      # Add runtime stack smashing and undefined behavior checks.
50632      # Not all versions of gcc support -fstack-protector
50633      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676    # Execute function body
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725    # Execute function body
50726
50727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50728$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50729  supports=yes
50730
50731  saved_cflags="$CFLAGS"
50732  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50733  ac_ext=c
50734ac_cpp='$CPP $CPPFLAGS'
50735ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50736ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50737ac_compiler_gnu=$ac_cv_c_compiler_gnu
50738
50739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50740/* end confdefs.h.  */
50741int i;
50742_ACEOF
50743if ac_fn_c_try_compile "$LINENO"; then :
50744
50745else
50746  supports=no
50747fi
50748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50749  ac_ext=cpp
50750ac_cpp='$CXXCPP $CPPFLAGS'
50751ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50752ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50753ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50754
50755  CFLAGS="$saved_cflags"
50756
50757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50758$as_echo "$supports" >&6; }
50759  if test "x$supports" = "xyes" ; then
50760    :
50761    C_COMP_SUPPORTS="yes"
50762  else
50763    :
50764    C_COMP_SUPPORTS="no"
50765  fi
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788
50789
50790
50791
50792
50793
50794
50795
50796
50797
50798
50799
50800
50801
50802
50803
50804
50805
50806
50807
50808
50809
50810
50811
50812
50813
50814
50815
50816
50817
50818
50819
50820
50821
50822
50823
50824
50825    # Execute function body
50826
50827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50828$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50829  supports=yes
50830
50831  saved_cxxflags="$CXXFLAGS"
50832  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50833  ac_ext=cpp
50834ac_cpp='$CXXCPP $CPPFLAGS'
50835ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50836ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50837ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50838
50839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50840/* end confdefs.h.  */
50841int i;
50842_ACEOF
50843if ac_fn_cxx_try_compile "$LINENO"; then :
50844
50845else
50846  supports=no
50847fi
50848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50849  ac_ext=cpp
50850ac_cpp='$CXXCPP $CPPFLAGS'
50851ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50852ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50853ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50854
50855  CXXFLAGS="$saved_cxxflags"
50856
50857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50858$as_echo "$supports" >&6; }
50859  if test "x$supports" = "xyes" ; then
50860    :
50861    CXX_COMP_SUPPORTS="yes"
50862  else
50863    :
50864    CXX_COMP_SUPPORTS="no"
50865  fi
50866
50867
50868
50869
50870
50871
50872
50873
50874
50875
50876
50877
50878
50879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50880$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50881  supports=no
50882  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50883
50884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50885$as_echo "$supports" >&6; }
50886  if test "x$supports" = "xyes" ; then
50887    :
50888
50889  else
50890    :
50891    STACK_PROTECTOR_CFLAG=""
50892  fi
50893
50894
50895
50896
50897
50898
50899
50900      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50901      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50902      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50903        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50904      fi
50905      ;;
50906    esac
50907  fi
50908
50909  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50910    if test "x$DEBUG_LEVEL" != xrelease; then
50911      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50912        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50913      fi
50914    fi
50915  fi
50916
50917  # Optimization levels
50918  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50919    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50920
50921    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50922      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50923      C_O_FLAG_HIGHEST_JVM="-xO4"
50924      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50925      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50926      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50927      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50928      C_O_FLAG_DEBUG_JVM=""
50929      C_O_FLAG_NONE="-xregs=no%frameptr"
50930      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50931      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50932      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50933      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50934      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50935      CXX_O_FLAG_DEBUG_JVM=""
50936      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50937      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50938        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50939        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50940      fi
50941    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50942      C_O_FLAG_HIGHEST_JVM="-xO4"
50943      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50944      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50945      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50946      C_O_FLAG_DEBUG=""
50947      C_O_FLAG_DEBUG_JVM=""
50948      C_O_FLAG_NONE=""
50949      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50950      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50951      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50952      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50953      CXX_O_FLAG_DEBUG=""
50954      CXX_O_FLAG_DEBUG_JVM=""
50955      CXX_O_FLAG_NONE=""
50956    fi
50957  else
50958    # The remaining toolchains share opt flags between CC and CXX;
50959    # setup for C and duplicate afterwards.
50960    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50961      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50962        # On MacOSX we optimize for size, something
50963        # we should do for all platforms?
50964        C_O_FLAG_HIGHEST_JVM="-Os"
50965        C_O_FLAG_HIGHEST="-Os"
50966        C_O_FLAG_HI="-Os"
50967        C_O_FLAG_NORM="-Os"
50968        C_O_FLAG_SIZE="-Os"
50969      else
50970        C_O_FLAG_HIGHEST_JVM="-O3"
50971        C_O_FLAG_HIGHEST="-O3"
50972        C_O_FLAG_HI="-O3"
50973        C_O_FLAG_NORM="-O2"
50974        C_O_FLAG_SIZE="-Os"
50975      fi
50976      C_O_FLAG_DEBUG="-O0"
50977      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50978        C_O_FLAG_DEBUG_JVM=""
50979      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50980        C_O_FLAG_DEBUG_JVM="-O0"
50981      fi
50982      C_O_FLAG_NONE="-O0"
50983    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50984      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50985        # On MacOSX we optimize for size, something
50986        # we should do for all platforms?
50987        C_O_FLAG_HIGHEST_JVM="-Os"
50988        C_O_FLAG_HIGHEST="-Os"
50989        C_O_FLAG_HI="-Os"
50990        C_O_FLAG_NORM="-Os"
50991        C_O_FLAG_SIZE="-Os"
50992      else
50993        C_O_FLAG_HIGHEST_JVM="-O3"
50994        C_O_FLAG_HIGHEST="-O3"
50995        C_O_FLAG_HI="-O3"
50996        C_O_FLAG_NORM="-O2"
50997        C_O_FLAG_SIZE="-Os"
50998      fi
50999      C_O_FLAG_DEBUG="-O0"
51000      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51001        C_O_FLAG_DEBUG_JVM=""
51002      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51003        C_O_FLAG_DEBUG_JVM="-O0"
51004      fi
51005      C_O_FLAG_NONE="-O0"
51006    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51007      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
51008      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
51009      C_O_FLAG_HI="-O3 -qinline -qinlglue"
51010      C_O_FLAG_NORM="-O2"
51011      C_O_FLAG_DEBUG="-qnoopt"
51012      # FIXME: Value below not verified.
51013      C_O_FLAG_DEBUG_JVM=""
51014      C_O_FLAG_NONE="-qnoopt"
51015    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51016      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
51017      C_O_FLAG_HIGHEST="-O2"
51018      C_O_FLAG_HI="-O1"
51019      C_O_FLAG_NORM="-O1"
51020      C_O_FLAG_DEBUG="-Od"
51021      C_O_FLAG_DEBUG_JVM=""
51022      C_O_FLAG_NONE="-Od"
51023      C_O_FLAG_SIZE="-Os"
51024    fi
51025    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
51026    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
51027    CXX_O_FLAG_HI="$C_O_FLAG_HI"
51028    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
51029    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
51030    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
51031    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
51032    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
51033  fi
51034
51035  # Adjust optimization flags according to debug level.
51036  case $DEBUG_LEVEL in
51037    release )
51038      # no adjustment
51039      ;;
51040    fastdebug )
51041      # Not quite so much optimization
51042      C_O_FLAG_HI="$C_O_FLAG_NORM"
51043      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
51044      ;;
51045    slowdebug )
51046      # Disable optimization
51047      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
51048      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
51049      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
51050      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
51051      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
51052      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
51053      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
51054      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
51055      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
51056      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
51057      ;;
51058  esac
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079# Check whether --with-abi-profile was given.
51080if test "${with_abi_profile+set}" = set; then :
51081  withval=$with_abi_profile;
51082fi
51083
51084
51085  if test "x$with_abi_profile" != x; then
51086    if test "x$OPENJDK_TARGET_CPU" != xarm && \
51087        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
51088      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
51089    fi
51090
51091    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
51092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
51093$as_echo_n "checking for ABI profle... " >&6; }
51094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
51095$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
51096
51097    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
51098      ARM_FLOAT_TYPE=vfp-sflt
51099      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51100    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
51101      ARM_FLOAT_TYPE=vfp-hflt
51102      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51103    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
51104      ARM_FLOAT_TYPE=sflt
51105      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51106    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
51107      ARM_FLOAT_TYPE=vfp-sflt
51108      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51109    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
51110      ARM_FLOAT_TYPE=vfp-hflt
51111      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
51112    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
51113      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51114      ARM_FLOAT_TYPE=
51115      ARM_ARCH_TYPE_FLAGS=
51116    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
51117      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51118      ARM_FLOAT_TYPE=
51119      ARM_ARCH_TYPE_FLAGS=
51120    else
51121      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51122    fi
51123
51124    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51125      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51126    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51127      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51128    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51129      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51130    fi
51131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51132$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51134$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51135
51136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51137$as_echo_n "checking for arch type flags... " >&6; }
51138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51139$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51140
51141    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51142    # autoconf target triplet.
51143     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51144    # Sanity check that it is a known ABI.
51145    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51146        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51147        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51148          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51149$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51150    fi
51151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51152$as_echo_n "checking for ABI property name... " >&6; }
51153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51154$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51155
51156
51157    # Pass these on to the open part of configure as if they were set using
51158    # --with-extra-c[xx]flags.
51159    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51160    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51161    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51162    # FIXME: This should not really be set using extra_cflags.
51163    if test "x$OPENJDK_TARGET_CPU" = xarm; then
51164        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51165        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51166    fi
51167    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51168    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51169    # And pass the architecture flags to the linker as well
51170    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51171  fi
51172
51173  # When building with an abi profile, the name of that profile is appended on the
51174  # bundle platform, which is used in bundle names.
51175  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51176    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51177  fi
51178
51179
51180  # Optional POSIX functionality needed by the JVM
51181  #
51182  # Check if clock_gettime is available and in which library. This indicates
51183  # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
51184  # don't let it update LIBS.
51185  save_LIBS="$LIBS"
51186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
51187$as_echo_n "checking for library containing clock_gettime... " >&6; }
51188if ${ac_cv_search_clock_gettime+:} false; then :
51189  $as_echo_n "(cached) " >&6
51190else
51191  ac_func_search_save_LIBS=$LIBS
51192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51193/* end confdefs.h.  */
51194
51195/* Override any GCC internal prototype to avoid an error.
51196   Use char because int might match the return type of a GCC
51197   builtin and then its argument prototype would still apply.  */
51198#ifdef __cplusplus
51199extern "C"
51200#endif
51201char clock_gettime ();
51202int
51203main ()
51204{
51205return clock_gettime ();
51206  ;
51207  return 0;
51208}
51209_ACEOF
51210for ac_lib in '' rt; do
51211  if test -z "$ac_lib"; then
51212    ac_res="none required"
51213  else
51214    ac_res=-l$ac_lib
51215    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
51216  fi
51217  if ac_fn_cxx_try_link "$LINENO"; then :
51218  ac_cv_search_clock_gettime=$ac_res
51219fi
51220rm -f core conftest.err conftest.$ac_objext \
51221    conftest$ac_exeext
51222  if ${ac_cv_search_clock_gettime+:} false; then :
51223  break
51224fi
51225done
51226if ${ac_cv_search_clock_gettime+:} false; then :
51227
51228else
51229  ac_cv_search_clock_gettime=no
51230fi
51231rm conftest.$ac_ext
51232LIBS=$ac_func_search_save_LIBS
51233fi
51234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
51235$as_echo "$ac_cv_search_clock_gettime" >&6; }
51236ac_res=$ac_cv_search_clock_gettime
51237if test "$ac_res" != no; then :
51238  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
51239  HAS_CLOCK_GETTIME=true
51240fi
51241
51242  if test "x$LIBS" = "x-lrt "; then
51243    CLOCK_GETTIME_IN_LIBRT=true
51244  fi
51245  LIBS="$save_LIBS"
51246
51247
51248  # Special extras...
51249  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51250    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51251      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51252      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51253    fi
51254    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51255    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51256  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51257    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51258    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51259  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51260    CXXSTD_CXXFLAG="-std=gnu++98"
51261
51262
51263
51264
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303    # Execute function body
51304
51305  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51306$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51307  supports=yes
51308
51309  saved_cxxflags="$CXXFLAGS"
51310  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51311  ac_ext=cpp
51312ac_cpp='$CXXCPP $CPPFLAGS'
51313ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51314ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51315ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51316
51317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51318/* end confdefs.h.  */
51319int i;
51320_ACEOF
51321if ac_fn_cxx_try_compile "$LINENO"; then :
51322
51323else
51324  supports=no
51325fi
51326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51327  ac_ext=cpp
51328ac_cpp='$CXXCPP $CPPFLAGS'
51329ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51330ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51331ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51332
51333  CXXFLAGS="$saved_cxxflags"
51334
51335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51336$as_echo "$supports" >&6; }
51337  if test "x$supports" = "xyes" ; then
51338    :
51339
51340  else
51341    :
51342    CXXSTD_CXXFLAG=""
51343  fi
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51357    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51358
51359  fi
51360  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51361    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51362    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51363  fi
51364
51365  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51366  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51367  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51368
51369  ###############################################################################
51370  #
51371  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51372  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51373  #
51374
51375  # Setup compiler/platform specific flags into
51376  #    CFLAGS_JDK    - C Compiler flags
51377  #    CXXFLAGS_JDK  - C++ Compiler flags
51378  #    COMMON_CCXXFLAGS_JDK - common to C and C++
51379  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51380    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51381    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51382    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51383    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51384      # Force compatibility with i586 on 32 bit intel platforms.
51385      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51386      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51387    fi
51388    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51389        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51390    case $OPENJDK_TARGET_CPU_ARCH in
51391      arm )
51392        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51393        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51394        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51395        ;;
51396      ppc )
51397        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51398        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51399        ;;
51400      s390 )
51401        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51402        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51403        ;;
51404      * )
51405        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51406        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51407        ;;
51408    esac
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463    # Execute function body
51464
51465  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51466  REFERENCE_VERSION=6
51467
51468  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51469    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51470  fi
51471
51472  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51473    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51474  fi
51475
51476  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51477  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51478
51479  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51480    :
51481
51482  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51483  # runs afoul of the more aggressive versions of these optimisations.
51484  # Notably, value range propagation now assumes that the this pointer of C++
51485  # member functions is non-null.
51486  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51487        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51488        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51489$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51490  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51491  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51492
51493  else
51494    :
51495
51496  fi
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51512    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51513
51514    # Restrict the debug information created by Clang to avoid
51515    # too big object files and speed the build up a little bit
51516    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51517    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51518    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51519      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51520        # Force compatibility with i586 on 32 bit intel platforms.
51521        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51522        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51523      fi
51524      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51525      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51526          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51527      case $OPENJDK_TARGET_CPU_ARCH in
51528        ppc )
51529          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51530          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51531          ;;
51532        * )
51533          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51534          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51535          ;;
51536      esac
51537    fi
51538  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51539    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51540    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51541    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51542      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51543    fi
51544
51545    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51546    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51547  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51548    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51549    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51550    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51551  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51552    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51553        -MD -Zc:wchar_t- -W3 -wd4800 \
51554        -DWIN32_LEAN_AND_MEAN \
51555        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51556        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51557        -DWIN32 -DIAL"
51558    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51559      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51560    else
51561      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51562    fi
51563    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51564    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51565    # studio.
51566    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51567      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51568      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51569      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51570    fi
51571  fi
51572
51573  ###############################################################################
51574
51575  # Adjust flags according to debug level.
51576  case $DEBUG_LEVEL in
51577    fastdebug | slowdebug )
51578      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51579      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51580      ;;
51581    release )
51582      ;;
51583    * )
51584      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51585      ;;
51586  esac
51587
51588  # Set some common defines. These works for all compilers, but assume
51589  # -D is universally accepted.
51590
51591  # Setup endianness
51592  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51593    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51594    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51595    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51596    #   Note: -Dmacro         is the same as    #define macro 1
51597    #         -Dmacro=        is the same as    #define macro
51598    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51599      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51600    else
51601      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51602    fi
51603  else
51604    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51605    # are defined in the system?
51606    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51607      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51608    else
51609      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51610    fi
51611  fi
51612
51613  # Always enable optional macros for VM.
51614  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
51615  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
51616  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
51617
51618  # Setup target OS define. Use OS target name but in upper case.
51619  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51620  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51621
51622  # Setup target CPU
51623  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51624      $OPENJDK_TARGET_ADD_LP64 \
51625      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51626
51627  # Setup debug/release defines
51628  if test "x$DEBUG_LEVEL" = xrelease; then
51629    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51630    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51631      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51632    fi
51633  else
51634    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51635  fi
51636
51637  # Optional POSIX functionality needed by the VM
51638
51639  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
51640    JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
51641    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
51642      JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
51643    fi
51644  fi
51645
51646
51647  # Set some additional per-OS defines.
51648  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51649    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51650    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51651        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51652  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51653    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51654    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51655        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
51656  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51657    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51658    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51659    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51660    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51661        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51662        -fno-omit-frame-pointer"
51663  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51664    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51665    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51666        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51667        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51668    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51669    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51670    # so for slowdebug we build with '-qpic=large -bbigtoc'.
51671    if test "x$DEBUG_LEVEL" = xslowdebug; then
51672      JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
51673    fi
51674  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51675    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51676  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51677    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51678    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51679  fi
51680
51681  # Set some additional per-CPU defines.
51682  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51683    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51684  elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xsolaris-sparcv9; then
51685    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51686  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51687    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51688      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51689      # fixes `relocation truncated to fit' error for gcc 4.1.
51690      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51691      # Use ppc64 instructions, but schedule for power5
51692      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51693    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51694      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51695    fi
51696  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51697    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51698      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51699      # Little endian machine uses ELFv2 ABI.
51700      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51701      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51702      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51703    fi
51704  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51705    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51706      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51707    fi
51708  fi
51709
51710  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51711    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51712  fi
51713
51714  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51715    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51716      # Solaris does not have _LP64=1 in the old build.
51717      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51718      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51719    fi
51720  fi
51721
51722  # Set JVM_CFLAGS warning handling
51723  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51724    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51725        -Wunused-value -Woverloaded-virtual"
51726
51727    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782    # Execute function body
51783
51784  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51785  REFERENCE_VERSION=4.8
51786
51787  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51788    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51789  fi
51790
51791  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51792    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51793  fi
51794
51795  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51796  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51797
51798  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51799    :
51800
51801            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51802            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51803
51804
51805  else
51806    :
51807
51808  fi
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823    fi
51824    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51825      # Non-zero builds have stricter warnings
51826      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51827    else
51828      if test "x$TOOLCHAIN_TYPE" = xclang; then
51829        # Some versions of llvm do not like -Wundef
51830        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51831      fi
51832    fi
51833  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51834    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51835        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51836  fi
51837
51838  # Additional macosx handling
51839  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51840    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
51841    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
51842    # JDK can be built and makes the linked binaries compatible even if built on
51843    # a newer version of the OS.
51844    MACOSX_VERSION_MIN=10.7.0
51845
51846
51847    # Setting --with-macosx-version-max=<version> makes it an error to build or
51848    # link to macosx APIs that are newer than the given OS version. The expected
51849    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
51850
51851# Check whether --with-macosx-version-max was given.
51852if test "${with_macosx_version_max+set}" = set; then :
51853  withval=$with_macosx_version_max;
51854          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
51855              MACOSX_VERSION_MAX=$with_macosx_version_max
51856          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
51857              MACOSX_VERSION_MAX=$with_macosx_version_max
51858          elif test "x$with_macosx_version_max" = "xno"; then
51859              # Use build system default
51860              MACOSX_VERSION_MAX=
51861          else
51862              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
51863          fi
51864
51865else
51866  MACOSX_VERSION_MAX=
51867
51868fi
51869
51870
51871
51872    # Let the flags variables get resolved in make for easier override on make
51873    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
51874    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51875        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51876        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51877    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51878    JVM_CFLAGS="$JVM_CFLAGS \
51879        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51880        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51881
51882    if test -n "$MACOSX_VERSION_MAX"; then
51883        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51884            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51885        JVM_CFLAGS="$JVM_CFLAGS \
51886            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51887    fi
51888  fi
51889
51890  # Setup some hard coded includes
51891  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51892      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51893      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51894      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51895      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51896      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51897      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51898
51899  # The shared libraries are compiled using the picflag.
51900  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51901      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51902  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51903      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51904
51905  # Executable flags
51906  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51907  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51908
51909
51910
51911
51912
51913
51914  # Setup LDFLAGS et al.
51915  #
51916
51917  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51918    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51919    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51920    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51921    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51922      LDFLAGS_SAFESH="-safeseh"
51923      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51924      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51925      # NOTE: Old build added -machine. Probably not needed.
51926      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51927    else
51928      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51929    fi
51930  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51931      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51932      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51933        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51934        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51935    fi
51936  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51937    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51938    # We have previously set HAS_GNU_HASH if this is the case
51939    if test -n "$HAS_GNU_HASH"; then
51940      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51941      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51942      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51943    fi
51944      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51945        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51946    fi
51947    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51948      # And since we now know that the linker is gnu, then add -z defs, to forbid
51949      # undefined symbols in object files.
51950      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51951      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51952      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51953      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51954      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51955      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51956        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51957      fi
51958      case $DEBUG_LEVEL in
51959        release )
51960          # tell linker to optimize libraries.
51961          # Should this be supplied to the OSS linker as well?
51962          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51963          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51964          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51965          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51966            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51967          fi
51968          ;;
51969        slowdebug )
51970          # Hotspot always let the linker optimize
51971          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51972          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51973            # do relocations at load
51974            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51975            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51976            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51977          fi
51978          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51979            # mark relocations read only
51980            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51981            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51982            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51983          fi
51984          ;;
51985        fastdebug )
51986          # Hotspot always let the linker optimize
51987          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51988          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51989            # mark relocations read only
51990            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51991            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51992            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51993          fi
51994          ;;
51995        * )
51996          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51997          ;;
51998        esac
51999    fi
52000  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52001    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52002    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52003    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52004    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52005    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52006    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
52007      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
52008    fi
52009  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52010    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52011    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
52012    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
52013    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52014    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52015    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52016    if test "x$DEBUG_LEVEL" = xslowdebug; then
52017      JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
52018    fi
52019  fi
52020
52021  # Customize LDFLAGS for executables
52022
52023  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
52024
52025  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52026    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
52027      LDFLAGS_STACK_SIZE=1048576
52028    else
52029      LDFLAGS_STACK_SIZE=327680
52030    fi
52031    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52032  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
52033    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52034  fi
52035
52036  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
52037
52038  # Customize LDFLAGS for libs
52039  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
52040
52041  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52042  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52043    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52044        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52045    JDKLIB_LIBS=""
52046  else
52047    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52048        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52049
52050    if test "xTARGET" = "xTARGET"; then
52051      # On some platforms (mac) the linker warns about non existing -L dirs.
52052      # For any of the variants server, client or minimal, the dir matches the
52053      # variant name. The "main" variant should be used for linking. For the
52054      # rest, the dir is just server.
52055      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52056          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52057        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52058            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52059      else
52060        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52061            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52062      fi
52063    elif test "xTARGET" = "xBUILD"; then
52064      # When building a buildjdk, it's always only the server variant
52065      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52066          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52067    fi
52068
52069    JDKLIB_LIBS="-ljava -ljvm"
52070    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52071      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
52072    fi
52073
52074  fi
52075
52076LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
52077
52078  # Set JVM_LIBS (per os)
52079  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52080    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
52081  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
52082    # FIXME: This hard-coded path is not really proper.
52083    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52084      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52085    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
52086      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52087    fi
52088    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52089        -lthread -ldoor -lc -ldemangle -lnsl -lrt"
52090  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52091    JVM_LIBS="$JVM_LIBS -lm"
52092  elif test "x$OPENJDK_TARGET_OS" = xaix; then
52093    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52094  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
52095    JVM_LIBS="$JVM_LIBS -lm"
52096  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
52097    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52098        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52099        wsock32.lib winmm.lib version.lib psapi.lib"
52100    fi
52101
52102  # Set JVM_ASFLAGS
52103  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52104    if test "x$OPENJDK_TARGET_CPU" = xx86; then
52105      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
52106    fi
52107  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52108    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52109  fi
52110
52111  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127  # Special extras...
52128  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52129    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52130      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52131      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52132    fi
52133    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52134    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52135  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52136    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52137    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52138  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52139    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182    # Execute function body
52183
52184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
52185$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
52186  supports=yes
52187
52188  saved_cxxflags="$CXXFLAGS"
52189  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
52190  ac_ext=cpp
52191ac_cpp='$CXXCPP $CPPFLAGS'
52192ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52193ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52194ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52195
52196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52197/* end confdefs.h.  */
52198int i;
52199_ACEOF
52200if ac_fn_cxx_try_compile "$LINENO"; then :
52201
52202else
52203  supports=no
52204fi
52205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52206  ac_ext=cpp
52207ac_cpp='$CXXCPP $CPPFLAGS'
52208ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52209ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52210ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52211
52212  CXXFLAGS="$saved_cxxflags"
52213
52214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52215$as_echo "$supports" >&6; }
52216  if test "x$supports" = "xyes" ; then
52217    :
52218
52219  else
52220    :
52221    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
52222  fi
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52236    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52237
52238  fi
52239  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52240    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
52241    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
52242  fi
52243
52244  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
52245  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
52246  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
52247
52248  ###############################################################################
52249  #
52250  # Now setup the CFLAGS and LDFLAGS for the JDK build.
52251  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52252  #
52253
52254  # Setup compiler/platform specific flags into
52255  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52256  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52257  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52258  if test "x$TOOLCHAIN_TYPE" = xgcc; then
52259    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52260    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52261    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52262    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52263      # Force compatibility with i586 on 32 bit intel platforms.
52264      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52265      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52266    fi
52267    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52268        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52269    case $OPENJDK_BUILD_CPU_ARCH in
52270      arm )
52271        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52272        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52273        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52274        ;;
52275      ppc )
52276        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52277        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52278        ;;
52279      s390 )
52280        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52281        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52282        ;;
52283      * )
52284        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52285        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52286        ;;
52287    esac
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342    # Execute function body
52343
52344  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52345  REFERENCE_VERSION=6
52346
52347  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52348    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52349  fi
52350
52351  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52352    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52353  fi
52354
52355  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52356  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52357
52358  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52359    :
52360
52361  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52362  # runs afoul of the more aggressive versions of these optimisations.
52363  # Notably, value range propagation now assumes that the this pointer of C++
52364  # member functions is non-null.
52365  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52366        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52367        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52368$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52369  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52370  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52371
52372  else
52373    :
52374
52375  fi
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52391    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52392
52393    # Restrict the debug information created by Clang to avoid
52394    # too big object files and speed the build up a little bit
52395    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52396    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52397    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52398      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52399        # Force compatibility with i586 on 32 bit intel platforms.
52400        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52401        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52402      fi
52403      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52404      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52405          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52406      case $OPENJDK_BUILD_CPU_ARCH in
52407        ppc )
52408          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52409          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52410          ;;
52411        * )
52412          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52413          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52414          ;;
52415      esac
52416    fi
52417  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52418    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52419    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52420    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52421      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52422    fi
52423
52424    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52425    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52426  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52427    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52428    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52429    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52430  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52431    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52432        -MD -Zc:wchar_t- -W3 -wd4800 \
52433        -DWIN32_LEAN_AND_MEAN \
52434        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52435        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52436        -DWIN32 -DIAL"
52437    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52438      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52439    else
52440      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52441    fi
52442    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52443    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52444    # studio.
52445    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52446      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52447      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52448      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52449    fi
52450  fi
52451
52452  ###############################################################################
52453
52454  # Adjust flags according to debug level.
52455  case $DEBUG_LEVEL in
52456    fastdebug | slowdebug )
52457      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52458      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52459      ;;
52460    release )
52461      ;;
52462    * )
52463      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52464      ;;
52465  esac
52466
52467  # Set some common defines. These works for all compilers, but assume
52468  # -D is universally accepted.
52469
52470  # Setup endianness
52471  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52472    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52473    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52474    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52475    #   Note: -Dmacro         is the same as    #define macro 1
52476    #         -Dmacro=        is the same as    #define macro
52477    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52478      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52479    else
52480      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52481    fi
52482  else
52483    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52484    # are defined in the system?
52485    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52486      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52487    else
52488      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52489    fi
52490  fi
52491
52492  # Always enable optional macros for VM.
52493  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52494  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52495  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52496
52497  # Setup target OS define. Use OS target name but in upper case.
52498  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52499  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52500
52501  # Setup target CPU
52502  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52503      $OPENJDK_BUILD_ADD_LP64 \
52504      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52505
52506  # Setup debug/release defines
52507  if test "x$DEBUG_LEVEL" = xrelease; then
52508    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52509    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52510      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52511    fi
52512  else
52513    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52514  fi
52515
52516  # Optional POSIX functionality needed by the VM
52517
52518  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52519    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52520    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52521      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
52522    fi
52523  fi
52524
52525
52526  # Set some additional per-OS defines.
52527  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52528    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52529    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52530        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52531  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52532    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52533    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52534        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52535  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52536    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52537    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52538    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52539    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52540        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52541        -fno-omit-frame-pointer"
52542  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52543    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52544    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52545        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52546        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52547    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52548    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52549    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52550    if test "x$DEBUG_LEVEL" = xslowdebug; then
52551      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
52552    fi
52553  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52554    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52555  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52556    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52557    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52558  fi
52559
52560  # Set some additional per-CPU defines.
52561  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52562    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52563  elif test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xsolaris-sparcv9; then
52564    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52565  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52566    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52567      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52568      # fixes `relocation truncated to fit' error for gcc 4.1.
52569      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52570      # Use ppc64 instructions, but schedule for power5
52571      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52572    elif test "x$OPENJDK_BUILD_OS" = xaix; then
52573      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52574    fi
52575  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52576    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52577      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52578      # Little endian machine uses ELFv2 ABI.
52579      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52580      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52581      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52582    fi
52583  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52584    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52585      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52586    fi
52587  fi
52588
52589  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52590    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52591  fi
52592
52593  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52594    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52595      # Solaris does not have _LP64=1 in the old build.
52596      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52597      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52598    fi
52599  fi
52600
52601  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52602  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52603    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52604        -Wunused-value -Woverloaded-virtual"
52605
52606    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644
52645
52646
52647
52648
52649
52650
52651
52652
52653
52654
52655
52656
52657
52658
52659
52660
52661    # Execute function body
52662
52663  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52664  REFERENCE_VERSION=4.8
52665
52666  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52667    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52668  fi
52669
52670  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52671    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52672  fi
52673
52674  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52675  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52676
52677  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52678    :
52679
52680            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52681            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52682
52683
52684  else
52685    :
52686
52687  fi
52688
52689
52690
52691
52692
52693
52694
52695
52696
52697
52698
52699
52700
52701
52702    fi
52703    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52704      # Non-zero builds have stricter warnings
52705      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52706    else
52707      if test "x$TOOLCHAIN_TYPE" = xclang; then
52708        # Some versions of llvm do not like -Wundef
52709        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52710      fi
52711    fi
52712  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52713    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52714        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52715  fi
52716
52717  # Additional macosx handling
52718  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52719    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52720    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52721    # JDK can be built and makes the linked binaries compatible even if built on
52722    # a newer version of the OS.
52723    MACOSX_VERSION_MIN=10.7.0
52724
52725
52726    # Setting --with-macosx-version-max=<version> makes it an error to build or
52727    # link to macosx APIs that are newer than the given OS version. The expected
52728    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
52729
52730# Check whether --with-macosx-version-max was given.
52731if test "${with_macosx_version_max+set}" = set; then :
52732  withval=$with_macosx_version_max;
52733          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
52734              MACOSX_VERSION_MAX=$with_macosx_version_max
52735          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
52736              MACOSX_VERSION_MAX=$with_macosx_version_max
52737          elif test "x$with_macosx_version_max" = "xno"; then
52738              # Use build system default
52739              MACOSX_VERSION_MAX=
52740          else
52741              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
52742          fi
52743
52744else
52745  MACOSX_VERSION_MAX=
52746
52747fi
52748
52749
52750
52751    # Let the flags variables get resolved in make for easier override on make
52752    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
52753    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52754        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52755        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52756    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52757    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52758        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52759        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52760
52761    if test -n "$MACOSX_VERSION_MAX"; then
52762        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52763            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52764        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52765            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52766    fi
52767  fi
52768
52769  # Setup some hard coded includes
52770  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52771      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52772      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52773      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52774      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52775      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52776      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52777
52778  # The shared libraries are compiled using the picflag.
52779  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52780      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52781  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52782      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52783
52784  # Executable flags
52785  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52786  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52787
52788
52789
52790
52791
52792
52793  # Setup LDFLAGS et al.
52794  #
52795
52796  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52797    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52798    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52799    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52800    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52801      LDFLAGS_SAFESH="-safeseh"
52802      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52803      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52804      # NOTE: Old build added -machine. Probably not needed.
52805      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52806    else
52807      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52808    fi
52809  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52810      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52811      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52812        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52813        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52814    fi
52815  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52816    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52817    # We have previously set HAS_GNU_HASH if this is the case
52818    if test -n "$HAS_GNU_HASH"; then
52819      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52820      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52821      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52822    fi
52823      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52824        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52825    fi
52826    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52827      # And since we now know that the linker is gnu, then add -z defs, to forbid
52828      # undefined symbols in object files.
52829      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52830      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52831      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52832      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52833      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52834      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52835        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52836      fi
52837      case $DEBUG_LEVEL in
52838        release )
52839          # tell linker to optimize libraries.
52840          # Should this be supplied to the OSS linker as well?
52841          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52842          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52843          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52844          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52845            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52846          fi
52847          ;;
52848        slowdebug )
52849          # Hotspot always let the linker optimize
52850          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52851          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52852            # do relocations at load
52853            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52854            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52855            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52856          fi
52857          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52858            # mark relocations read only
52859            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52860            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52861            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52862          fi
52863          ;;
52864        fastdebug )
52865          # Hotspot always let the linker optimize
52866          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52867          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52868            # mark relocations read only
52869            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52870            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52871            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52872          fi
52873          ;;
52874        * )
52875          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52876          ;;
52877        esac
52878    fi
52879  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52880    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52881    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52882    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52883    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52884    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52885    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52886      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52887    fi
52888  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52889    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52890    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52891    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52892    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52893    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52894    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52895    if test "x$DEBUG_LEVEL" = xslowdebug; then
52896      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
52897    fi
52898  fi
52899
52900  # Customize LDFLAGS for executables
52901
52902  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52903
52904  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52905    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52906      LDFLAGS_STACK_SIZE=1048576
52907    else
52908      LDFLAGS_STACK_SIZE=327680
52909    fi
52910    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52911  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52912    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52913  fi
52914
52915  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52916
52917  # Customize LDFLAGS for libs
52918  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52919
52920  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52921  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52922    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52923        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52924    OPENJDK_BUILD_JDKLIB_LIBS=""
52925  else
52926    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52927        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52928
52929    if test "xBUILD" = "xTARGET"; then
52930      # On some platforms (mac) the linker warns about non existing -L dirs.
52931      # For any of the variants server, client or minimal, the dir matches the
52932      # variant name. The "main" variant should be used for linking. For the
52933      # rest, the dir is just server.
52934      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52935          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52936        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52937            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52938      else
52939        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52940            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52941      fi
52942    elif test "xBUILD" = "xBUILD"; then
52943      # When building a buildjdk, it's always only the server variant
52944      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52945          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52946    fi
52947
52948    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52949    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52950      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52951    fi
52952
52953  fi
52954
52955OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52956
52957  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52958  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52959    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52960  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52961    # FIXME: This hard-coded path is not really proper.
52962    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52963      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52964    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52965      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52966    fi
52967    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52968        -lthread -ldoor -lc -ldemangle -lnsl -lrt"
52969  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52970    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52971  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52972    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52973  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52974    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52975  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52976    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52977        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52978        wsock32.lib winmm.lib version.lib psapi.lib"
52979    fi
52980
52981  # Set OPENJDK_BUILD_JVM_ASFLAGS
52982  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52983    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52984      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52985    fi
52986  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52987    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52988  fi
52989
52990  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005
53006  # Tests are only ever compiled for TARGET
53007  # Flags for compiling test libraries
53008  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
53009  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
53010
53011  # Flags for compiling test executables
53012  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
53013  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
53014
53015
53016
53017
53018
53019
53020  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
53021  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
53022
53023
53024
53025
53026
53027
53028  # Check that the compiler supports -mX (or -qX on AIX) flags
53029  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
53030
53031
53032
53033
53034
53035
53036
53037
53038
53039
53040
53041
53042
53043
53044
53045
53046
53047
53048
53049
53050
53051
53052
53053
53054
53055
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067
53068
53069
53070
53071
53072
53073
53074
53075
53076
53077    # Execute function body
53078
53079
53080
53081
53082
53083
53084
53085
53086
53087
53088
53089
53090
53091
53092
53093
53094
53095
53096
53097
53098
53099
53100
53101
53102
53103
53104
53105
53106
53107
53108
53109
53110
53111
53112
53113
53114
53115
53116
53117
53118
53119
53120
53121
53122
53123
53124
53125
53126    # Execute function body
53127
53128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53129$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53130  supports=yes
53131
53132  saved_cflags="$CFLAGS"
53133  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53134  ac_ext=c
53135ac_cpp='$CPP $CPPFLAGS'
53136ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53137ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53138ac_compiler_gnu=$ac_cv_c_compiler_gnu
53139
53140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53141/* end confdefs.h.  */
53142int i;
53143_ACEOF
53144if ac_fn_c_try_compile "$LINENO"; then :
53145
53146else
53147  supports=no
53148fi
53149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53150  ac_ext=cpp
53151ac_cpp='$CXXCPP $CPPFLAGS'
53152ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53153ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53154ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53155
53156  CFLAGS="$saved_cflags"
53157
53158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53159$as_echo "$supports" >&6; }
53160  if test "x$supports" = "xyes" ; then
53161    :
53162    C_COMP_SUPPORTS="yes"
53163  else
53164    :
53165    C_COMP_SUPPORTS="no"
53166  fi
53167
53168
53169
53170
53171
53172
53173
53174
53175
53176
53177
53178
53179
53180
53181
53182
53183
53184
53185
53186
53187
53188
53189
53190
53191
53192
53193
53194
53195
53196
53197
53198
53199
53200
53201
53202
53203
53204
53205
53206
53207
53208
53209
53210
53211
53212
53213
53214
53215
53216
53217
53218
53219
53220
53221
53222
53223
53224
53225
53226    # Execute function body
53227
53228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53229$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53230  supports=yes
53231
53232  saved_cxxflags="$CXXFLAGS"
53233  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53234  ac_ext=cpp
53235ac_cpp='$CXXCPP $CPPFLAGS'
53236ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53237ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53238ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53239
53240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53241/* end confdefs.h.  */
53242int i;
53243_ACEOF
53244if ac_fn_cxx_try_compile "$LINENO"; then :
53245
53246else
53247  supports=no
53248fi
53249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53250  ac_ext=cpp
53251ac_cpp='$CXXCPP $CPPFLAGS'
53252ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53253ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53254ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53255
53256  CXXFLAGS="$saved_cxxflags"
53257
53258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53259$as_echo "$supports" >&6; }
53260  if test "x$supports" = "xyes" ; then
53261    :
53262    CXX_COMP_SUPPORTS="yes"
53263  else
53264    :
53265    CXX_COMP_SUPPORTS="no"
53266  fi
53267
53268
53269
53270
53271
53272
53273
53274
53275
53276
53277
53278
53279
53280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53281$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53282  supports=no
53283  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53284
53285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53286$as_echo "$supports" >&6; }
53287  if test "x$supports" = "xyes" ; then
53288    :
53289    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
53290  else
53291    :
53292    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
53293  fi
53294
53295
53296
53297
53298
53299
53300
53301
53302  # Check whether --enable-warnings-as-errors was given.
53303if test "${enable_warnings_as_errors+set}" = set; then :
53304  enableval=$enable_warnings_as_errors;
53305fi
53306
53307
53308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
53309$as_echo_n "checking if native warnings are errors... " >&6; }
53310  if test "x$enable_warnings_as_errors" = "xyes"; then
53311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53312$as_echo "yes (explicitly set)" >&6; }
53313    WARNINGS_AS_ERRORS=true
53314  elif test "x$enable_warnings_as_errors" = "xno"; then
53315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53316$as_echo "no" >&6; }
53317    WARNINGS_AS_ERRORS=false
53318  elif test "x$enable_warnings_as_errors" = "x"; then
53319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53320$as_echo "yes (default)" >&6; }
53321    WARNINGS_AS_ERRORS=true
53322  else
53323    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53324  fi
53325
53326
53327
53328  case "${TOOLCHAIN_TYPE}" in
53329    microsoft)
53330      DISABLE_WARNING_PREFIX="-wd"
53331      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53332      ;;
53333    solstudio)
53334      DISABLE_WARNING_PREFIX="-erroff="
53335      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53336      ;;
53337    gcc)
53338      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
53339
53340
53341
53342
53343
53344
53345
53346
53347
53348
53349
53350
53351
53352
53353
53354
53355
53356
53357
53358
53359
53360
53361
53362
53363
53364
53365
53366
53367
53368
53369
53370
53371
53372
53373
53374
53375
53376
53377
53378
53379
53380
53381
53382
53383
53384
53385
53386    # Execute function body
53387
53388
53389
53390
53391
53392
53393
53394
53395
53396
53397
53398
53399
53400
53401
53402
53403
53404
53405
53406
53407
53408
53409
53410
53411
53412
53413
53414
53415
53416
53417
53418
53419
53420
53421
53422
53423
53424
53425
53426
53427
53428
53429
53430
53431
53432
53433
53434
53435    # Execute function body
53436
53437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53438$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53439  supports=yes
53440
53441  saved_cflags="$CFLAGS"
53442  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53443  ac_ext=c
53444ac_cpp='$CPP $CPPFLAGS'
53445ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53446ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53447ac_compiler_gnu=$ac_cv_c_compiler_gnu
53448
53449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53450/* end confdefs.h.  */
53451int i;
53452_ACEOF
53453if ac_fn_c_try_compile "$LINENO"; then :
53454
53455else
53456  supports=no
53457fi
53458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53459  ac_ext=cpp
53460ac_cpp='$CXXCPP $CPPFLAGS'
53461ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53462ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53463ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53464
53465  CFLAGS="$saved_cflags"
53466
53467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53468$as_echo "$supports" >&6; }
53469  if test "x$supports" = "xyes" ; then
53470    :
53471    C_COMP_SUPPORTS="yes"
53472  else
53473    :
53474    C_COMP_SUPPORTS="no"
53475  fi
53476
53477
53478
53479
53480
53481
53482
53483
53484
53485
53486
53487
53488
53489
53490
53491
53492
53493
53494
53495
53496
53497
53498
53499
53500
53501
53502
53503
53504
53505
53506
53507
53508
53509
53510
53511
53512
53513
53514
53515
53516
53517
53518
53519
53520
53521
53522
53523
53524
53525
53526
53527
53528
53529
53530
53531
53532
53533
53534
53535    # Execute function body
53536
53537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53538$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53539  supports=yes
53540
53541  saved_cxxflags="$CXXFLAGS"
53542  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53543  ac_ext=cpp
53544ac_cpp='$CXXCPP $CPPFLAGS'
53545ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53546ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53547ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53548
53549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53550/* end confdefs.h.  */
53551int i;
53552_ACEOF
53553if ac_fn_cxx_try_compile "$LINENO"; then :
53554
53555else
53556  supports=no
53557fi
53558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53559  ac_ext=cpp
53560ac_cpp='$CXXCPP $CPPFLAGS'
53561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53564
53565  CXXFLAGS="$saved_cxxflags"
53566
53567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53568$as_echo "$supports" >&6; }
53569  if test "x$supports" = "xyes" ; then
53570    :
53571    CXX_COMP_SUPPORTS="yes"
53572  else
53573    :
53574    CXX_COMP_SUPPORTS="no"
53575  fi
53576
53577
53578
53579
53580
53581
53582
53583
53584
53585
53586
53587
53588
53589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53590$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53591  supports=no
53592  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53593
53594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53595$as_echo "$supports" >&6; }
53596  if test "x$supports" = "xyes" ; then
53597    :
53598    GCC_CAN_DISABLE_WARNINGS=true
53599  else
53600    :
53601    GCC_CAN_DISABLE_WARNINGS=false
53602
53603  fi
53604
53605
53606
53607
53608
53609
53610      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53611        DISABLE_WARNING_PREFIX="-Wno-"
53612      else
53613        DISABLE_WARNING_PREFIX=
53614      fi
53615      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53616      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53617      # CFLAGS since any target specific flags will likely not work with the
53618      # build compiler
53619      CC_OLD="$CC"
53620      CXX_OLD="$CXX"
53621      CC="$BUILD_CC"
53622      CXX="$BUILD_CXX"
53623      CFLAGS_OLD="$CFLAGS"
53624      CFLAGS=""
53625
53626
53627
53628
53629
53630
53631
53632
53633
53634
53635
53636
53637
53638
53639
53640
53641
53642
53643
53644
53645
53646
53647
53648
53649
53650
53651
53652
53653
53654
53655
53656
53657
53658
53659
53660
53661
53662
53663
53664
53665
53666
53667
53668
53669
53670
53671
53672    # Execute function body
53673
53674
53675
53676
53677
53678
53679
53680
53681
53682
53683
53684
53685
53686
53687
53688
53689
53690
53691
53692
53693
53694
53695
53696
53697
53698
53699
53700
53701
53702
53703
53704
53705
53706
53707
53708
53709
53710
53711
53712
53713
53714
53715
53716
53717
53718
53719
53720
53721    # Execute function body
53722
53723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53724$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53725  supports=yes
53726
53727  saved_cflags="$CFLAGS"
53728  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53729  ac_ext=c
53730ac_cpp='$CPP $CPPFLAGS'
53731ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53732ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53733ac_compiler_gnu=$ac_cv_c_compiler_gnu
53734
53735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53736/* end confdefs.h.  */
53737int i;
53738_ACEOF
53739if ac_fn_c_try_compile "$LINENO"; then :
53740
53741else
53742  supports=no
53743fi
53744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53745  ac_ext=cpp
53746ac_cpp='$CXXCPP $CPPFLAGS'
53747ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53748ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53749ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53750
53751  CFLAGS="$saved_cflags"
53752
53753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53754$as_echo "$supports" >&6; }
53755  if test "x$supports" = "xyes" ; then
53756    :
53757    C_COMP_SUPPORTS="yes"
53758  else
53759    :
53760    C_COMP_SUPPORTS="no"
53761  fi
53762
53763
53764
53765
53766
53767
53768
53769
53770
53771
53772
53773
53774
53775
53776
53777
53778
53779
53780
53781
53782
53783
53784
53785
53786
53787
53788
53789
53790
53791
53792
53793
53794
53795
53796
53797
53798
53799
53800
53801
53802
53803
53804
53805
53806
53807
53808
53809
53810
53811
53812
53813
53814
53815
53816
53817
53818
53819
53820
53821    # Execute function body
53822
53823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53824$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53825  supports=yes
53826
53827  saved_cxxflags="$CXXFLAGS"
53828  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53829  ac_ext=cpp
53830ac_cpp='$CXXCPP $CPPFLAGS'
53831ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53832ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53833ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53834
53835  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53836/* end confdefs.h.  */
53837int i;
53838_ACEOF
53839if ac_fn_cxx_try_compile "$LINENO"; then :
53840
53841else
53842  supports=no
53843fi
53844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53845  ac_ext=cpp
53846ac_cpp='$CXXCPP $CPPFLAGS'
53847ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53848ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53849ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53850
53851  CXXFLAGS="$saved_cxxflags"
53852
53853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53854$as_echo "$supports" >&6; }
53855  if test "x$supports" = "xyes" ; then
53856    :
53857    CXX_COMP_SUPPORTS="yes"
53858  else
53859    :
53860    CXX_COMP_SUPPORTS="no"
53861  fi
53862
53863
53864
53865
53866
53867
53868
53869
53870
53871
53872
53873
53874
53875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53876$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53877  supports=no
53878  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53879
53880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53881$as_echo "$supports" >&6; }
53882  if test "x$supports" = "xyes" ; then
53883    :
53884    BUILD_CC_CAN_DISABLE_WARNINGS=true
53885  else
53886    :
53887    BUILD_CC_CAN_DISABLE_WARNINGS=false
53888
53889  fi
53890
53891
53892
53893
53894
53895
53896      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53897        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53898      else
53899        BUILD_CC_DISABLE_WARNING_PREFIX=
53900      fi
53901      CC="$CC_OLD"
53902      CXX="$CXX_OLD"
53903      CFLAGS="$CFLAGS_OLD"
53904      ;;
53905    clang)
53906      DISABLE_WARNING_PREFIX="-Wno-"
53907      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53908      ;;
53909    xlc)
53910      DISABLE_WARNING_PREFIX="-qsuppress="
53911      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53912      ;;
53913  esac
53914
53915
53916
53917
53918
53919# Setup debug symbols (need objcopy from the toolchain for that)
53920
53921  #
53922  # NATIVE_DEBUG_SYMBOLS
53923  # This must be done after the toolchain is setup, since we're looking at objcopy.
53924  #
53925  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53926$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53927
53928# Check whether --with-native-debug-symbols was given.
53929if test "${with_native_debug_symbols+set}" = set; then :
53930  withval=$with_native_debug_symbols;
53931        if test "x$OPENJDK_TARGET_OS" = xaix; then
53932          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53933            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53934          fi
53935        fi
53936
53937else
53938
53939        if test "x$OPENJDK_TARGET_OS" = xaix; then
53940          # AIX doesn't support 'zipped' so use 'internal' as default
53941          with_native_debug_symbols="internal"
53942        else
53943          if test "x$STATIC_BUILD" = xtrue; then
53944            with_native_debug_symbols="none"
53945          else
53946            with_native_debug_symbols="zipped"
53947          fi
53948        fi
53949
53950fi
53951
53952  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53954$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53955
53956  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53957
53958    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53959      if test "x$OBJCOPY" = x; then
53960        # enabling of enable-debug-symbols and can't find objcopy
53961        # this is an error
53962        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53963      fi
53964    fi
53965
53966    COMPILE_WITH_DEBUG_SYMBOLS=true
53967    COPY_DEBUG_SYMBOLS=true
53968    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53969  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53970    COMPILE_WITH_DEBUG_SYMBOLS=false
53971    COPY_DEBUG_SYMBOLS=false
53972    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53973  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53974    COMPILE_WITH_DEBUG_SYMBOLS=true
53975    COPY_DEBUG_SYMBOLS=false
53976    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53977  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53978
53979    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53980      if test "x$OBJCOPY" = x; then
53981        # enabling of enable-debug-symbols and can't find objcopy
53982        # this is an error
53983        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53984      fi
53985    fi
53986
53987    COMPILE_WITH_DEBUG_SYMBOLS=true
53988    COPY_DEBUG_SYMBOLS=true
53989    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53990  else
53991    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53992  fi
53993
53994  # --enable-debug-symbols is deprecated.
53995  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53996
53997  # Check whether --enable-debug-symbols was given.
53998if test "${enable_debug_symbols+set}" = set; then :
53999  enableval=$enable_debug_symbols;
54000fi
54001
54002  if test "x$enable_debug_symbols" != x; then
54003    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
54004$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
54005
54006    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
54007      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
54008$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
54009    fi
54010
54011  fi
54012
54013
54014  # --enable-zip-debug-info is deprecated.
54015  # Please use --with-native-debug-symbols=zipped .
54016
54017  # Check whether --enable-zip-debug-info was given.
54018if test "${enable_zip_debug_info+set}" = set; then :
54019  enableval=$enable_zip_debug_info;
54020fi
54021
54022  if test "x$enable_zip_debug_info" != x; then
54023    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
54024$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
54025
54026    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
54027      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
54028$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
54029    fi
54030
54031  fi
54032
54033
54034
54035
54036
54037
54038
54039  # Check whether --enable-native-coverage was given.
54040if test "${enable_native_coverage+set}" = set; then :
54041  enableval=$enable_native_coverage;
54042fi
54043
54044  GCOV_ENABLED="false"
54045  if test "x$enable_native_coverage" = "xyes"; then
54046    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
54047      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54048$as_echo_n "checking if native coverage is enabled... " >&6; }
54049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54050$as_echo "yes" >&6; }
54051      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
54052      GCOV_LDFLAGS="-fprofile-arcs"
54053      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
54054      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
54055      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
54056      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
54057      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
54058      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
54059      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
54060      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
54061      GCOV_ENABLED="true"
54062    else
54063      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
54064    fi
54065  elif test "x$enable_native_coverage" = "xno"; then
54066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54067$as_echo_n "checking if native coverage is enabled... " >&6; }
54068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54069$as_echo "no" >&6; }
54070  elif test "x$enable_native_coverage" != "x"; then
54071    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
54072  fi
54073
54074
54075
54076
54077# Need toolchain to setup dtrace
54078
54079  # Test for dtrace dependencies
54080  # Check whether --enable-dtrace was given.
54081if test "${enable_dtrace+set}" = set; then :
54082  enableval=$enable_dtrace;
54083fi
54084
54085
54086  DTRACE_DEP_MISSING=false
54087
54088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
54089$as_echo_n "checking for dtrace tool... " >&6; }
54090  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
54091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
54092$as_echo "$DTRACE" >&6; }
54093  else
54094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
54095$as_echo "not found, cannot build dtrace" >&6; }
54096    DTRACE_DEP_MISSING=true
54097  fi
54098
54099  for ac_header in sys/sdt.h
54100do :
54101  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
54102if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
54103  cat >>confdefs.h <<_ACEOF
54104#define HAVE_SYS_SDT_H 1
54105_ACEOF
54106 DTRACE_HEADERS_OK=yes
54107else
54108  DTRACE_HEADERS_OK=no
54109fi
54110
54111done
54112
54113  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
54114    DTRACE_DEP_MISSING=true
54115  fi
54116
54117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
54118$as_echo_n "checking if dtrace should be built... " >&6; }
54119  if test "x$enable_dtrace" = "xyes"; then
54120    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54122$as_echo "no, missing dependencies" >&6; }
54123
54124  # Print a helpful message on how to acquire the necessary build dependency.
54125  # dtrace is the help tag: freetype, cups, alsa etc
54126  MISSING_DEPENDENCY=dtrace
54127
54128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54129    cygwin_help $MISSING_DEPENDENCY
54130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54131    msys_help $MISSING_DEPENDENCY
54132  else
54133    PKGHANDLER_COMMAND=
54134
54135    case $PKGHANDLER in
54136      apt-get)
54137        apt_help     $MISSING_DEPENDENCY ;;
54138      yum)
54139        yum_help     $MISSING_DEPENDENCY ;;
54140      brew)
54141        brew_help    $MISSING_DEPENDENCY ;;
54142      port)
54143        port_help    $MISSING_DEPENDENCY ;;
54144      pkgutil)
54145        pkgutil_help $MISSING_DEPENDENCY ;;
54146      pkgadd)
54147        pkgadd_help  $MISSING_DEPENDENCY ;;
54148    esac
54149
54150    if test "x$PKGHANDLER_COMMAND" != x; then
54151      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54152    fi
54153  fi
54154
54155      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
54156    else
54157      INCLUDE_DTRACE=true
54158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54159$as_echo "yes, forced" >&6; }
54160    fi
54161  elif test "x$enable_dtrace" = "xno"; then
54162    INCLUDE_DTRACE=false
54163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54164$as_echo "no, forced" >&6; }
54165  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
54166    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54167      INCLUDE_DTRACE=false
54168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54169$as_echo "no, missing dependencies" >&6; }
54170    else
54171      INCLUDE_DTRACE=true
54172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
54173$as_echo "yes, dependencies present" >&6; }
54174    fi
54175  else
54176    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
54177  fi
54178
54179
54180  # Check whether --enable-aot was given.
54181if test "${enable_aot+set}" = set; then :
54182  enableval=$enable_aot;
54183fi
54184
54185
54186  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
54187    ENABLE_AOT="true"
54188  elif test "x$enable_aot" = "xyes"; then
54189    ENABLE_AOT="true"
54190  elif test "x$enable_aot" = "xno"; then
54191    ENABLE_AOT="false"
54192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
54193$as_echo_n "checking if aot should be enabled... " >&6; }
54194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54195$as_echo "no, forced" >&6; }
54196  else
54197    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
54198  fi
54199
54200  if test "x$ENABLE_AOT" = "xtrue"; then
54201    # Only enable AOT on X64 platforms.
54202    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
54203      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
54204        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
54205          ENABLE_AOT="true"
54206        else
54207          ENABLE_AOT="false"
54208          if test "x$enable_aot" = "xyes"; then
54209            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
54210          fi
54211        fi
54212      else
54213        ENABLE_AOT="false"
54214        if test "x$enable_aot" = "xyes"; then
54215          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
54216        fi
54217      fi
54218    else
54219      ENABLE_AOT="false"
54220      if test "x$enable_aot" = "xyes"; then
54221        as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
54222      fi
54223    fi
54224  fi
54225
54226
54227
54228
54229  # Check whether --enable-cds was given.
54230if test "${enable_cds+set}" = set; then :
54231  enableval=$enable_cds;
54232fi
54233
54234
54235  if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then
54236    ENABLE_CDS="true"
54237  elif test "x$enable_cds" = "xno"; then
54238    ENABLE_CDS="false"
54239  else
54240    as_fn_error $? "Invalid value for --enable-cds: $enable_cds" "$LINENO" 5
54241  fi
54242
54243
54244
54245
54246  # Check whether --enable-hotspot-gtest was given.
54247if test "${enable_hotspot_gtest+set}" = set; then :
54248  enableval=$enable_hotspot_gtest;
54249fi
54250
54251
54252  if test -e "$HOTSPOT_TOPDIR/test/native"; then
54253    GTEST_DIR_EXISTS="true"
54254  else
54255    GTEST_DIR_EXISTS="false"
54256  fi
54257
54258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
54259$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
54260  if test "x$enable_hotspot_gtest" = "xyes"; then
54261    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54263$as_echo "yes, forced" >&6; }
54264      BUILD_GTEST="true"
54265    else
54266      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
54267    fi
54268  elif test "x$enable_hotspot_gtest" = "xno"; then
54269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54270$as_echo "no, forced" >&6; }
54271    BUILD_GTEST="false"
54272  elif test "x$enable_hotspot_gtest" = "x"; then
54273    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54275$as_echo "yes" >&6; }
54276      BUILD_GTEST="true"
54277    else
54278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54279$as_echo "no" >&6; }
54280      BUILD_GTEST="false"
54281    fi
54282  else
54283    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
54284  fi
54285
54286
54287
54288
54289###############################################################################
54290#
54291# Check dependencies for external and internal libraries.
54292#
54293###############################################################################
54294
54295# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
54296
54297  # When using cygwin or msys, we need a wrapper binary that renames
54298  # /cygdrive/c/ arguments into c:/ arguments and peeks into
54299  # @files and rewrites these too! This wrapper binary is
54300  # called fixpath.
54301  FIXPATH=
54302  if test "x$OPENJDK_BUILD_OS" = xwindows; then
54303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
54304$as_echo_n "checking if fixpath can be created... " >&6; }
54305    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
54306    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
54307    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
54308    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
54309      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
54310      FIXPATH="$FIXPATH_BIN -c"
54311    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
54312      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
54313      # @ was chosen as separator to minimize risk of other tools messing around with it
54314      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
54315          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
54316      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
54317      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
54318    fi
54319    FIXPATH_SRC_W="$FIXPATH_SRC"
54320    FIXPATH_BIN_W="$FIXPATH_BIN"
54321
54322  unix_path="$FIXPATH_SRC_W"
54323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54324    windows_path=`$CYGPATH -m "$unix_path"`
54325    FIXPATH_SRC_W="$windows_path"
54326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54327    windows_path=`cmd //c echo $unix_path`
54328    FIXPATH_SRC_W="$windows_path"
54329  fi
54330
54331
54332  unix_path="$FIXPATH_BIN_W"
54333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54334    windows_path=`$CYGPATH -m "$unix_path"`
54335    FIXPATH_BIN_W="$windows_path"
54336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54337    windows_path=`cmd //c echo $unix_path`
54338    FIXPATH_BIN_W="$windows_path"
54339  fi
54340
54341    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54342    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54343    cd $FIXPATH_DIR
54344    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54345    cd $CURDIR
54346
54347    if test ! -x $FIXPATH_BIN; then
54348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54349$as_echo "no" >&6; }
54350      cat $FIXPATH_DIR/fixpath1.log
54351      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54352    fi
54353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54354$as_echo "yes" >&6; }
54355    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54356$as_echo_n "checking if fixpath.exe works... " >&6; }
54357    cd $FIXPATH_DIR
54358    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54359        > $FIXPATH_DIR/fixpath2.log 2>&1
54360    cd $CURDIR
54361    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54362      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54363$as_echo "no" >&6; }
54364      cat $FIXPATH_DIR/fixpath2.log
54365      as_fn_error $? "fixpath did not work!" "$LINENO" 5
54366    fi
54367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54368$as_echo "yes" >&6; }
54369
54370    FIXPATH_DETACH_FLAG="--detach"
54371  fi
54372
54373
54374
54375
54376
54377
54378  # Check if X11 is needed
54379  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54380    # No X11 support on windows or macosx
54381    NEEDS_LIB_X11=false
54382  else
54383    # All other instances need X11, even if building headless only, libawt still
54384    # needs X11 headers.
54385    NEEDS_LIB_X11=true
54386  fi
54387
54388  # Check if cups is needed
54389  if test "x$OPENJDK_TARGET_OS" = xwindows; then
54390    # Windows have a separate print system
54391    NEEDS_LIB_CUPS=false
54392  else
54393    NEEDS_LIB_CUPS=true
54394  fi
54395
54396  # A custom hook may have set this already
54397  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54398    NEEDS_LIB_FREETYPE=true
54399  fi
54400
54401  # Check if alsa is needed
54402  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54403    NEEDS_LIB_ALSA=true
54404  else
54405    NEEDS_LIB_ALSA=false
54406  fi
54407
54408  # Check if ffi is needed
54409  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54410    NEEDS_LIB_FFI=true
54411  else
54412    NEEDS_LIB_FFI=false
54413  fi
54414
54415
54416  # statically link libstdc++ before C++ ABI is stablized on Linux unless
54417  # dynamic build is configured on command line.
54418
54419# Check whether --with-stdc++lib was given.
54420if test "${with_stdc__lib+set}" = set; then :
54421  withval=$with_stdc__lib;
54422        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54423                && test "x$with_stdc__lib" != xdefault; then
54424          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54425        fi
54426
54427else
54428  with_stdc__lib=default
54429
54430fi
54431
54432
54433  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54434    # Test if stdc++ can be linked statically.
54435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54436$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54437    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54438    ac_ext=cpp
54439ac_cpp='$CXXCPP $CPPFLAGS'
54440ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54441ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54442ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54443
54444    OLD_LIBS="$LIBS"
54445    LIBS="$STATIC_STDCXX_FLAGS"
54446    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54447/* end confdefs.h.  */
54448
54449int
54450main ()
54451{
54452return 0;
54453  ;
54454  return 0;
54455}
54456_ACEOF
54457if ac_fn_cxx_try_link "$LINENO"; then :
54458  has_static_libstdcxx=yes
54459else
54460  has_static_libstdcxx=no
54461fi
54462rm -f core conftest.err conftest.$ac_objext \
54463    conftest$ac_exeext conftest.$ac_ext
54464    LIBS="$OLD_LIBS"
54465    ac_ext=cpp
54466ac_cpp='$CXXCPP $CPPFLAGS'
54467ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54468ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54469ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54470
54471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54472$as_echo "$has_static_libstdcxx" >&6; }
54473
54474    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54475      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54476    fi
54477
54478    # If dynamic was requested, it's available since it would fail above otherwise.
54479    # If dynamic wasn't requested, go with static unless it isn't available.
54480    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54481$as_echo_n "checking how to link with libstdc++... " >&6; }
54482    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54483        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54485$as_echo "dynamic" >&6; }
54486    else
54487      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54488      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54489      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54490      # just use the same setting as for the TARGET toolchain.
54491      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54493$as_echo "static" >&6; }
54494    fi
54495  fi
54496
54497  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54498  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54499    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54500  fi
54501
54502
54503
54504  # Setup Windows runtime dlls
54505  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54506
54507
54508# Check whether --with-msvcr-dll was given.
54509if test "${with_msvcr_dll+set}" = set; then :
54510  withval=$with_msvcr_dll;
54511fi
54512
54513
54514  if test "x$with_msvcr_dll" != x; then
54515    # If given explicitly by user, do not probe. If not present, fail directly.
54516
54517  DLL_NAME="$MSVCR_NAME"
54518  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54519  METHOD="--with-msvcr-dll"
54520  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54521    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54522$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54523
54524    # Need to check if the found msvcr is correct architecture
54525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54526$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54527    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54529      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54530      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54531      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54532        CORRECT_MSVCR_ARCH="PE32 executable"
54533      else
54534        CORRECT_MSVCR_ARCH="PE32+ executable"
54535      fi
54536    else
54537      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54538        CORRECT_MSVCR_ARCH=386
54539      else
54540        CORRECT_MSVCR_ARCH=x86-64
54541      fi
54542    fi
54543    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54545$as_echo "ok" >&6; }
54546      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54547
54548  # Only process if variable expands to non-empty
54549
54550  if test "x$MSVC_DLL" != x; then
54551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54552
54553  # Input might be given as Windows format, start by converting to
54554  # unix format.
54555  path="$MSVC_DLL"
54556  new_path=`$CYGPATH -u "$path"`
54557
54558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54561  # "foo.exe" is OK but "foo" is an error.
54562  #
54563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54564  # It is also a way to make sure we got the proper file name for the real test later on.
54565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54566  if test "x$test_shortpath" = x; then
54567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54568$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54569    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54570  fi
54571
54572  # Call helper function which possibly converts this using DOS-style short mode.
54573  # If so, the updated path is stored in $new_path.
54574
54575  input_path="$new_path"
54576  # Check if we need to convert this using DOS-style short mode. If the path
54577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54578  # take no chances and rewrite it.
54579  # Note: m4 eats our [], so we need to use [ and ] instead.
54580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54581  if test "x$has_forbidden_chars" != x; then
54582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54586      # Going to short mode and back again did indeed matter. Since short mode is
54587      # case insensitive, let's make it lowercase to improve readability.
54588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54589      # Now convert it back to Unix-style (cygpath)
54590      input_path=`$CYGPATH -u "$shortmode_path"`
54591      new_path="$input_path"
54592    fi
54593  fi
54594
54595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54596  if test "x$test_cygdrive_prefix" = x; then
54597    # As a simple fix, exclude /usr/bin since it's not a real path.
54598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54600      # a path prefixed by /cygdrive for fixpath to work.
54601      new_path="$CYGWIN_ROOT_PATH$input_path"
54602    fi
54603  fi
54604
54605
54606  if test "x$path" != "x$new_path"; then
54607    MSVC_DLL="$new_path"
54608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54609$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54610  fi
54611
54612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54613
54614  path="$MSVC_DLL"
54615  has_colon=`$ECHO $path | $GREP ^.:`
54616  new_path="$path"
54617  if test "x$has_colon" = x; then
54618    # Not in mixed or Windows style, start by that.
54619    new_path=`cmd //c echo $path`
54620  fi
54621
54622
54623  input_path="$new_path"
54624  # Check if we need to convert this using DOS-style short mode. If the path
54625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54626  # take no chances and rewrite it.
54627  # Note: m4 eats our [], so we need to use [ and ] instead.
54628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54629  if test "x$has_forbidden_chars" != x; then
54630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54632  fi
54633
54634
54635  windows_path="$new_path"
54636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54637    unix_path=`$CYGPATH -u "$windows_path"`
54638    new_path="$unix_path"
54639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54641    new_path="$unix_path"
54642  fi
54643
54644  if test "x$path" != "x$new_path"; then
54645    MSVC_DLL="$new_path"
54646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54647$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54648  fi
54649
54650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54652
54653    else
54654      # We're on a unix platform. Hooray! :)
54655      path="$MSVC_DLL"
54656      has_space=`$ECHO "$path" | $GREP " "`
54657      if test "x$has_space" != x; then
54658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54659$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54661      fi
54662
54663      # Use eval to expand a potential ~
54664      eval path="$path"
54665      if test ! -f "$path" && test ! -d "$path"; then
54666        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54667      fi
54668
54669      if test -d "$path"; then
54670        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54671      else
54672        dir="`$DIRNAME "$path"`"
54673        base="`$BASENAME "$path"`"
54674        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54675      fi
54676    fi
54677  fi
54678
54679      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54680$as_echo_n "checking for $DLL_NAME... " >&6; }
54681      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54682$as_echo "$MSVC_DLL" >&6; }
54683    else
54684      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54685$as_echo "incorrect, ignoring" >&6; }
54686      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54687$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54688    fi
54689  fi
54690
54691    if test "x$MSVC_DLL" = x; then
54692      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54693    fi
54694    MSVCR_DLL="$MSVC_DLL"
54695  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54696
54697  DLL_NAME="$MSVCR_NAME"
54698  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54699  METHOD="devkit"
54700  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54701    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54702$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54703
54704    # Need to check if the found msvcr is correct architecture
54705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54706$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54707    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54709      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54710      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54711      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54712        CORRECT_MSVCR_ARCH="PE32 executable"
54713      else
54714        CORRECT_MSVCR_ARCH="PE32+ executable"
54715      fi
54716    else
54717      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54718        CORRECT_MSVCR_ARCH=386
54719      else
54720        CORRECT_MSVCR_ARCH=x86-64
54721      fi
54722    fi
54723    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54725$as_echo "ok" >&6; }
54726      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54727
54728  # Only process if variable expands to non-empty
54729
54730  if test "x$MSVC_DLL" != x; then
54731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54732
54733  # Input might be given as Windows format, start by converting to
54734  # unix format.
54735  path="$MSVC_DLL"
54736  new_path=`$CYGPATH -u "$path"`
54737
54738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54741  # "foo.exe" is OK but "foo" is an error.
54742  #
54743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54744  # It is also a way to make sure we got the proper file name for the real test later on.
54745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54746  if test "x$test_shortpath" = x; then
54747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54748$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54749    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54750  fi
54751
54752  # Call helper function which possibly converts this using DOS-style short mode.
54753  # If so, the updated path is stored in $new_path.
54754
54755  input_path="$new_path"
54756  # Check if we need to convert this using DOS-style short mode. If the path
54757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54758  # take no chances and rewrite it.
54759  # Note: m4 eats our [], so we need to use [ and ] instead.
54760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54761  if test "x$has_forbidden_chars" != x; then
54762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54766      # Going to short mode and back again did indeed matter. Since short mode is
54767      # case insensitive, let's make it lowercase to improve readability.
54768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54769      # Now convert it back to Unix-style (cygpath)
54770      input_path=`$CYGPATH -u "$shortmode_path"`
54771      new_path="$input_path"
54772    fi
54773  fi
54774
54775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54776  if test "x$test_cygdrive_prefix" = x; then
54777    # As a simple fix, exclude /usr/bin since it's not a real path.
54778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54780      # a path prefixed by /cygdrive for fixpath to work.
54781      new_path="$CYGWIN_ROOT_PATH$input_path"
54782    fi
54783  fi
54784
54785
54786  if test "x$path" != "x$new_path"; then
54787    MSVC_DLL="$new_path"
54788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54789$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54790  fi
54791
54792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54793
54794  path="$MSVC_DLL"
54795  has_colon=`$ECHO $path | $GREP ^.:`
54796  new_path="$path"
54797  if test "x$has_colon" = x; then
54798    # Not in mixed or Windows style, start by that.
54799    new_path=`cmd //c echo $path`
54800  fi
54801
54802
54803  input_path="$new_path"
54804  # Check if we need to convert this using DOS-style short mode. If the path
54805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54806  # take no chances and rewrite it.
54807  # Note: m4 eats our [], so we need to use [ and ] instead.
54808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54809  if test "x$has_forbidden_chars" != x; then
54810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54812  fi
54813
54814
54815  windows_path="$new_path"
54816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54817    unix_path=`$CYGPATH -u "$windows_path"`
54818    new_path="$unix_path"
54819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54821    new_path="$unix_path"
54822  fi
54823
54824  if test "x$path" != "x$new_path"; then
54825    MSVC_DLL="$new_path"
54826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54827$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54828  fi
54829
54830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54832
54833    else
54834      # We're on a unix platform. Hooray! :)
54835      path="$MSVC_DLL"
54836      has_space=`$ECHO "$path" | $GREP " "`
54837      if test "x$has_space" != x; then
54838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54839$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54840        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54841      fi
54842
54843      # Use eval to expand a potential ~
54844      eval path="$path"
54845      if test ! -f "$path" && test ! -d "$path"; then
54846        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54847      fi
54848
54849      if test -d "$path"; then
54850        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54851      else
54852        dir="`$DIRNAME "$path"`"
54853        base="`$BASENAME "$path"`"
54854        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54855      fi
54856    fi
54857  fi
54858
54859      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54860$as_echo_n "checking for $DLL_NAME... " >&6; }
54861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54862$as_echo "$MSVC_DLL" >&6; }
54863    else
54864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54865$as_echo "incorrect, ignoring" >&6; }
54866      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54867$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54868    fi
54869  fi
54870
54871    if test "x$MSVC_DLL" = x; then
54872      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54873    fi
54874    MSVCR_DLL="$MSVC_DLL"
54875  else
54876
54877  DLL_NAME="${MSVCR_NAME}"
54878  MSVC_DLL=
54879
54880  if test "x$MSVC_DLL" = x; then
54881    # Probe: Using well-known location from Visual Studio 10.0
54882    if test "x$VCINSTALLDIR" != x; then
54883      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54884
54885  windows_path="$CYGWIN_VC_INSTALL_DIR"
54886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54887    unix_path=`$CYGPATH -u "$windows_path"`
54888    CYGWIN_VC_INSTALL_DIR="$unix_path"
54889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54891    CYGWIN_VC_INSTALL_DIR="$unix_path"
54892  fi
54893
54894      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54895        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54896      else
54897        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54898      fi
54899      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54900
54901  DLL_NAME="$DLL_NAME"
54902  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54903  METHOD="well-known location in VCINSTALLDIR"
54904  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54905    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54906$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54907
54908    # Need to check if the found msvcr is correct architecture
54909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54910$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54911    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54913      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54914      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54915      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54916        CORRECT_MSVCR_ARCH="PE32 executable"
54917      else
54918        CORRECT_MSVCR_ARCH="PE32+ executable"
54919      fi
54920    else
54921      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54922        CORRECT_MSVCR_ARCH=386
54923      else
54924        CORRECT_MSVCR_ARCH=x86-64
54925      fi
54926    fi
54927    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54928      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54929$as_echo "ok" >&6; }
54930      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54931
54932  # Only process if variable expands to non-empty
54933
54934  if test "x$MSVC_DLL" != x; then
54935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54936
54937  # Input might be given as Windows format, start by converting to
54938  # unix format.
54939  path="$MSVC_DLL"
54940  new_path=`$CYGPATH -u "$path"`
54941
54942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54945  # "foo.exe" is OK but "foo" is an error.
54946  #
54947  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54948  # It is also a way to make sure we got the proper file name for the real test later on.
54949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54950  if test "x$test_shortpath" = x; then
54951    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54952$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54953    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54954  fi
54955
54956  # Call helper function which possibly converts this using DOS-style short mode.
54957  # If so, the updated path is stored in $new_path.
54958
54959  input_path="$new_path"
54960  # Check if we need to convert this using DOS-style short mode. If the path
54961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54962  # take no chances and rewrite it.
54963  # Note: m4 eats our [], so we need to use [ and ] instead.
54964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54965  if test "x$has_forbidden_chars" != x; then
54966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54970      # Going to short mode and back again did indeed matter. Since short mode is
54971      # case insensitive, let's make it lowercase to improve readability.
54972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54973      # Now convert it back to Unix-style (cygpath)
54974      input_path=`$CYGPATH -u "$shortmode_path"`
54975      new_path="$input_path"
54976    fi
54977  fi
54978
54979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54980  if test "x$test_cygdrive_prefix" = x; then
54981    # As a simple fix, exclude /usr/bin since it's not a real path.
54982    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54984      # a path prefixed by /cygdrive for fixpath to work.
54985      new_path="$CYGWIN_ROOT_PATH$input_path"
54986    fi
54987  fi
54988
54989
54990  if test "x$path" != "x$new_path"; then
54991    MSVC_DLL="$new_path"
54992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54993$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54994  fi
54995
54996    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54997
54998  path="$MSVC_DLL"
54999  has_colon=`$ECHO $path | $GREP ^.:`
55000  new_path="$path"
55001  if test "x$has_colon" = x; then
55002    # Not in mixed or Windows style, start by that.
55003    new_path=`cmd //c echo $path`
55004  fi
55005
55006
55007  input_path="$new_path"
55008  # Check if we need to convert this using DOS-style short mode. If the path
55009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55010  # take no chances and rewrite it.
55011  # Note: m4 eats our [], so we need to use [ and ] instead.
55012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55013  if test "x$has_forbidden_chars" != x; then
55014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55016  fi
55017
55018
55019  windows_path="$new_path"
55020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55021    unix_path=`$CYGPATH -u "$windows_path"`
55022    new_path="$unix_path"
55023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55025    new_path="$unix_path"
55026  fi
55027
55028  if test "x$path" != "x$new_path"; then
55029    MSVC_DLL="$new_path"
55030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55031$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55032  fi
55033
55034  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55035  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55036
55037    else
55038      # We're on a unix platform. Hooray! :)
55039      path="$MSVC_DLL"
55040      has_space=`$ECHO "$path" | $GREP " "`
55041      if test "x$has_space" != x; then
55042        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55043$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55044        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55045      fi
55046
55047      # Use eval to expand a potential ~
55048      eval path="$path"
55049      if test ! -f "$path" && test ! -d "$path"; then
55050        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55051      fi
55052
55053      if test -d "$path"; then
55054        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55055      else
55056        dir="`$DIRNAME "$path"`"
55057        base="`$BASENAME "$path"`"
55058        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55059      fi
55060    fi
55061  fi
55062
55063      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55064$as_echo_n "checking for $DLL_NAME... " >&6; }
55065      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55066$as_echo "$MSVC_DLL" >&6; }
55067    else
55068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55069$as_echo "incorrect, ignoring" >&6; }
55070      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55071$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55072    fi
55073  fi
55074
55075    fi
55076  fi
55077
55078  if test "x$MSVC_DLL" = x; then
55079    # Probe: Check in the Boot JDK directory.
55080    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55081
55082  DLL_NAME="$DLL_NAME"
55083  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55084  METHOD="well-known location in Boot JDK"
55085  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55086    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55087$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55088
55089    # Need to check if the found msvcr is correct architecture
55090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55091$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55092    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55094      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55095      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55096      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55097        CORRECT_MSVCR_ARCH="PE32 executable"
55098      else
55099        CORRECT_MSVCR_ARCH="PE32+ executable"
55100      fi
55101    else
55102      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55103        CORRECT_MSVCR_ARCH=386
55104      else
55105        CORRECT_MSVCR_ARCH=x86-64
55106      fi
55107    fi
55108    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55110$as_echo "ok" >&6; }
55111      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55112
55113  # Only process if variable expands to non-empty
55114
55115  if test "x$MSVC_DLL" != x; then
55116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55117
55118  # Input might be given as Windows format, start by converting to
55119  # unix format.
55120  path="$MSVC_DLL"
55121  new_path=`$CYGPATH -u "$path"`
55122
55123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55126  # "foo.exe" is OK but "foo" is an error.
55127  #
55128  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55129  # It is also a way to make sure we got the proper file name for the real test later on.
55130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55131  if test "x$test_shortpath" = x; then
55132    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55133$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55134    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55135  fi
55136
55137  # Call helper function which possibly converts this using DOS-style short mode.
55138  # If so, the updated path is stored in $new_path.
55139
55140  input_path="$new_path"
55141  # Check if we need to convert this using DOS-style short mode. If the path
55142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55143  # take no chances and rewrite it.
55144  # Note: m4 eats our [], so we need to use [ and ] instead.
55145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55146  if test "x$has_forbidden_chars" != x; then
55147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55151      # Going to short mode and back again did indeed matter. Since short mode is
55152      # case insensitive, let's make it lowercase to improve readability.
55153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55154      # Now convert it back to Unix-style (cygpath)
55155      input_path=`$CYGPATH -u "$shortmode_path"`
55156      new_path="$input_path"
55157    fi
55158  fi
55159
55160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55161  if test "x$test_cygdrive_prefix" = x; then
55162    # As a simple fix, exclude /usr/bin since it's not a real path.
55163    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55165      # a path prefixed by /cygdrive for fixpath to work.
55166      new_path="$CYGWIN_ROOT_PATH$input_path"
55167    fi
55168  fi
55169
55170
55171  if test "x$path" != "x$new_path"; then
55172    MSVC_DLL="$new_path"
55173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55174$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55175  fi
55176
55177    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55178
55179  path="$MSVC_DLL"
55180  has_colon=`$ECHO $path | $GREP ^.:`
55181  new_path="$path"
55182  if test "x$has_colon" = x; then
55183    # Not in mixed or Windows style, start by that.
55184    new_path=`cmd //c echo $path`
55185  fi
55186
55187
55188  input_path="$new_path"
55189  # Check if we need to convert this using DOS-style short mode. If the path
55190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55191  # take no chances and rewrite it.
55192  # Note: m4 eats our [], so we need to use [ and ] instead.
55193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55194  if test "x$has_forbidden_chars" != x; then
55195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55197  fi
55198
55199
55200  windows_path="$new_path"
55201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55202    unix_path=`$CYGPATH -u "$windows_path"`
55203    new_path="$unix_path"
55204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55206    new_path="$unix_path"
55207  fi
55208
55209  if test "x$path" != "x$new_path"; then
55210    MSVC_DLL="$new_path"
55211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55212$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55213  fi
55214
55215  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55216  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55217
55218    else
55219      # We're on a unix platform. Hooray! :)
55220      path="$MSVC_DLL"
55221      has_space=`$ECHO "$path" | $GREP " "`
55222      if test "x$has_space" != x; then
55223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55224$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55225        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55226      fi
55227
55228      # Use eval to expand a potential ~
55229      eval path="$path"
55230      if test ! -f "$path" && test ! -d "$path"; then
55231        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55232      fi
55233
55234      if test -d "$path"; then
55235        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55236      else
55237        dir="`$DIRNAME "$path"`"
55238        base="`$BASENAME "$path"`"
55239        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55240      fi
55241    fi
55242  fi
55243
55244      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55245$as_echo_n "checking for $DLL_NAME... " >&6; }
55246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55247$as_echo "$MSVC_DLL" >&6; }
55248    else
55249      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55250$as_echo "incorrect, ignoring" >&6; }
55251      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55252$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55253    fi
55254  fi
55255
55256  fi
55257
55258  if test "x$MSVC_DLL" = x; then
55259    # Probe: Look in the Windows system32 directory
55260    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55261
55262  windows_path="$CYGWIN_SYSTEMROOT"
55263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55264    unix_path=`$CYGPATH -u "$windows_path"`
55265    CYGWIN_SYSTEMROOT="$unix_path"
55266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55268    CYGWIN_SYSTEMROOT="$unix_path"
55269  fi
55270
55271    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55272
55273  DLL_NAME="$DLL_NAME"
55274  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55275  METHOD="well-known location in SYSTEMROOT"
55276  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55277    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55278$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55279
55280    # Need to check if the found msvcr is correct architecture
55281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55282$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55283    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55285      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55286      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55287      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55288        CORRECT_MSVCR_ARCH="PE32 executable"
55289      else
55290        CORRECT_MSVCR_ARCH="PE32+ executable"
55291      fi
55292    else
55293      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55294        CORRECT_MSVCR_ARCH=386
55295      else
55296        CORRECT_MSVCR_ARCH=x86-64
55297      fi
55298    fi
55299    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55300      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55301$as_echo "ok" >&6; }
55302      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55303
55304  # Only process if variable expands to non-empty
55305
55306  if test "x$MSVC_DLL" != x; then
55307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55308
55309  # Input might be given as Windows format, start by converting to
55310  # unix format.
55311  path="$MSVC_DLL"
55312  new_path=`$CYGPATH -u "$path"`
55313
55314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55317  # "foo.exe" is OK but "foo" is an error.
55318  #
55319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55320  # It is also a way to make sure we got the proper file name for the real test later on.
55321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55322  if test "x$test_shortpath" = x; then
55323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55324$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55325    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55326  fi
55327
55328  # Call helper function which possibly converts this using DOS-style short mode.
55329  # If so, the updated path is stored in $new_path.
55330
55331  input_path="$new_path"
55332  # Check if we need to convert this using DOS-style short mode. If the path
55333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55334  # take no chances and rewrite it.
55335  # Note: m4 eats our [], so we need to use [ and ] instead.
55336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55337  if test "x$has_forbidden_chars" != x; then
55338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55342      # Going to short mode and back again did indeed matter. Since short mode is
55343      # case insensitive, let's make it lowercase to improve readability.
55344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55345      # Now convert it back to Unix-style (cygpath)
55346      input_path=`$CYGPATH -u "$shortmode_path"`
55347      new_path="$input_path"
55348    fi
55349  fi
55350
55351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55352  if test "x$test_cygdrive_prefix" = x; then
55353    # As a simple fix, exclude /usr/bin since it's not a real path.
55354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55356      # a path prefixed by /cygdrive for fixpath to work.
55357      new_path="$CYGWIN_ROOT_PATH$input_path"
55358    fi
55359  fi
55360
55361
55362  if test "x$path" != "x$new_path"; then
55363    MSVC_DLL="$new_path"
55364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55365$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55366  fi
55367
55368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55369
55370  path="$MSVC_DLL"
55371  has_colon=`$ECHO $path | $GREP ^.:`
55372  new_path="$path"
55373  if test "x$has_colon" = x; then
55374    # Not in mixed or Windows style, start by that.
55375    new_path=`cmd //c echo $path`
55376  fi
55377
55378
55379  input_path="$new_path"
55380  # Check if we need to convert this using DOS-style short mode. If the path
55381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55382  # take no chances and rewrite it.
55383  # Note: m4 eats our [], so we need to use [ and ] instead.
55384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55385  if test "x$has_forbidden_chars" != x; then
55386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55388  fi
55389
55390
55391  windows_path="$new_path"
55392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55393    unix_path=`$CYGPATH -u "$windows_path"`
55394    new_path="$unix_path"
55395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55397    new_path="$unix_path"
55398  fi
55399
55400  if test "x$path" != "x$new_path"; then
55401    MSVC_DLL="$new_path"
55402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55403$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55404  fi
55405
55406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55408
55409    else
55410      # We're on a unix platform. Hooray! :)
55411      path="$MSVC_DLL"
55412      has_space=`$ECHO "$path" | $GREP " "`
55413      if test "x$has_space" != x; then
55414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55415$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55417      fi
55418
55419      # Use eval to expand a potential ~
55420      eval path="$path"
55421      if test ! -f "$path" && test ! -d "$path"; then
55422        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55423      fi
55424
55425      if test -d "$path"; then
55426        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55427      else
55428        dir="`$DIRNAME "$path"`"
55429        base="`$BASENAME "$path"`"
55430        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55431      fi
55432    fi
55433  fi
55434
55435      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55436$as_echo_n "checking for $DLL_NAME... " >&6; }
55437      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55438$as_echo "$MSVC_DLL" >&6; }
55439    else
55440      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55441$as_echo "incorrect, ignoring" >&6; }
55442      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55443$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55444    fi
55445  fi
55446
55447  fi
55448
55449  if test "x$MSVC_DLL" = x; then
55450    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55451    if test "x$VS100COMNTOOLS" != x; then
55452      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55453
55454  windows_path="$CYGWIN_VS_TOOLS_DIR"
55455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55456    unix_path=`$CYGPATH -u "$windows_path"`
55457    CYGWIN_VS_TOOLS_DIR="$unix_path"
55458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55460    CYGWIN_VS_TOOLS_DIR="$unix_path"
55461  fi
55462
55463      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55464        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55465	    | $GREP -i /x64/ | $HEAD --lines 1`
55466      else
55467        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55468	    | $GREP -i /x86/ | $HEAD --lines 1`
55469      fi
55470
55471  DLL_NAME="$DLL_NAME"
55472  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55473  METHOD="search of VS100COMNTOOLS"
55474  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55475    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55476$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55477
55478    # Need to check if the found msvcr is correct architecture
55479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55480$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55481    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55483      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55484      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55485      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55486        CORRECT_MSVCR_ARCH="PE32 executable"
55487      else
55488        CORRECT_MSVCR_ARCH="PE32+ executable"
55489      fi
55490    else
55491      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55492        CORRECT_MSVCR_ARCH=386
55493      else
55494        CORRECT_MSVCR_ARCH=x86-64
55495      fi
55496    fi
55497    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55499$as_echo "ok" >&6; }
55500      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55501
55502  # Only process if variable expands to non-empty
55503
55504  if test "x$MSVC_DLL" != x; then
55505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55506
55507  # Input might be given as Windows format, start by converting to
55508  # unix format.
55509  path="$MSVC_DLL"
55510  new_path=`$CYGPATH -u "$path"`
55511
55512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55515  # "foo.exe" is OK but "foo" is an error.
55516  #
55517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55518  # It is also a way to make sure we got the proper file name for the real test later on.
55519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55520  if test "x$test_shortpath" = x; then
55521    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55522$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55523    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55524  fi
55525
55526  # Call helper function which possibly converts this using DOS-style short mode.
55527  # If so, the updated path is stored in $new_path.
55528
55529  input_path="$new_path"
55530  # Check if we need to convert this using DOS-style short mode. If the path
55531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55532  # take no chances and rewrite it.
55533  # Note: m4 eats our [], so we need to use [ and ] instead.
55534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55535  if test "x$has_forbidden_chars" != x; then
55536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55540      # Going to short mode and back again did indeed matter. Since short mode is
55541      # case insensitive, let's make it lowercase to improve readability.
55542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55543      # Now convert it back to Unix-style (cygpath)
55544      input_path=`$CYGPATH -u "$shortmode_path"`
55545      new_path="$input_path"
55546    fi
55547  fi
55548
55549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55550  if test "x$test_cygdrive_prefix" = x; then
55551    # As a simple fix, exclude /usr/bin since it's not a real path.
55552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55554      # a path prefixed by /cygdrive for fixpath to work.
55555      new_path="$CYGWIN_ROOT_PATH$input_path"
55556    fi
55557  fi
55558
55559
55560  if test "x$path" != "x$new_path"; then
55561    MSVC_DLL="$new_path"
55562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55563$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55564  fi
55565
55566    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55567
55568  path="$MSVC_DLL"
55569  has_colon=`$ECHO $path | $GREP ^.:`
55570  new_path="$path"
55571  if test "x$has_colon" = x; then
55572    # Not in mixed or Windows style, start by that.
55573    new_path=`cmd //c echo $path`
55574  fi
55575
55576
55577  input_path="$new_path"
55578  # Check if we need to convert this using DOS-style short mode. If the path
55579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55580  # take no chances and rewrite it.
55581  # Note: m4 eats our [], so we need to use [ and ] instead.
55582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55583  if test "x$has_forbidden_chars" != x; then
55584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55586  fi
55587
55588
55589  windows_path="$new_path"
55590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55591    unix_path=`$CYGPATH -u "$windows_path"`
55592    new_path="$unix_path"
55593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55595    new_path="$unix_path"
55596  fi
55597
55598  if test "x$path" != "x$new_path"; then
55599    MSVC_DLL="$new_path"
55600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55601$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55602  fi
55603
55604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55606
55607    else
55608      # We're on a unix platform. Hooray! :)
55609      path="$MSVC_DLL"
55610      has_space=`$ECHO "$path" | $GREP " "`
55611      if test "x$has_space" != x; then
55612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55613$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55614        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55615      fi
55616
55617      # Use eval to expand a potential ~
55618      eval path="$path"
55619      if test ! -f "$path" && test ! -d "$path"; then
55620        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55621      fi
55622
55623      if test -d "$path"; then
55624        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55625      else
55626        dir="`$DIRNAME "$path"`"
55627        base="`$BASENAME "$path"`"
55628        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55629      fi
55630    fi
55631  fi
55632
55633      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55634$as_echo_n "checking for $DLL_NAME... " >&6; }
55635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55636$as_echo "$MSVC_DLL" >&6; }
55637    else
55638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55639$as_echo "incorrect, ignoring" >&6; }
55640      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55641$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55642    fi
55643  fi
55644
55645    fi
55646  fi
55647
55648  if test "x$MSVC_DLL" = x; then
55649    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55650    # (This was the original behaviour; kept since it might turn something up)
55651    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55652      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55653        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55654	    | $GREP x64 | $HEAD --lines 1`
55655      else
55656        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55657	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55658        if test "x$POSSIBLE_MSVC_DLL" = x; then
55659          # We're grasping at straws now...
55660          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55661	      | $HEAD --lines 1`
55662        fi
55663      fi
55664
55665
55666  DLL_NAME="$DLL_NAME"
55667  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55668  METHOD="search of VCINSTALLDIR"
55669  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55670    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55671$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55672
55673    # Need to check if the found msvcr is correct architecture
55674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55675$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55676    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55678      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55679      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55680      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55681        CORRECT_MSVCR_ARCH="PE32 executable"
55682      else
55683        CORRECT_MSVCR_ARCH="PE32+ executable"
55684      fi
55685    else
55686      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55687        CORRECT_MSVCR_ARCH=386
55688      else
55689        CORRECT_MSVCR_ARCH=x86-64
55690      fi
55691    fi
55692    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55694$as_echo "ok" >&6; }
55695      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55696
55697  # Only process if variable expands to non-empty
55698
55699  if test "x$MSVC_DLL" != x; then
55700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55701
55702  # Input might be given as Windows format, start by converting to
55703  # unix format.
55704  path="$MSVC_DLL"
55705  new_path=`$CYGPATH -u "$path"`
55706
55707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55710  # "foo.exe" is OK but "foo" is an error.
55711  #
55712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55713  # It is also a way to make sure we got the proper file name for the real test later on.
55714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55715  if test "x$test_shortpath" = x; then
55716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55717$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55718    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55719  fi
55720
55721  # Call helper function which possibly converts this using DOS-style short mode.
55722  # If so, the updated path is stored in $new_path.
55723
55724  input_path="$new_path"
55725  # Check if we need to convert this using DOS-style short mode. If the path
55726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55727  # take no chances and rewrite it.
55728  # Note: m4 eats our [], so we need to use [ and ] instead.
55729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55730  if test "x$has_forbidden_chars" != x; then
55731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55735      # Going to short mode and back again did indeed matter. Since short mode is
55736      # case insensitive, let's make it lowercase to improve readability.
55737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55738      # Now convert it back to Unix-style (cygpath)
55739      input_path=`$CYGPATH -u "$shortmode_path"`
55740      new_path="$input_path"
55741    fi
55742  fi
55743
55744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55745  if test "x$test_cygdrive_prefix" = x; then
55746    # As a simple fix, exclude /usr/bin since it's not a real path.
55747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55749      # a path prefixed by /cygdrive for fixpath to work.
55750      new_path="$CYGWIN_ROOT_PATH$input_path"
55751    fi
55752  fi
55753
55754
55755  if test "x$path" != "x$new_path"; then
55756    MSVC_DLL="$new_path"
55757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55758$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55759  fi
55760
55761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55762
55763  path="$MSVC_DLL"
55764  has_colon=`$ECHO $path | $GREP ^.:`
55765  new_path="$path"
55766  if test "x$has_colon" = x; then
55767    # Not in mixed or Windows style, start by that.
55768    new_path=`cmd //c echo $path`
55769  fi
55770
55771
55772  input_path="$new_path"
55773  # Check if we need to convert this using DOS-style short mode. If the path
55774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55775  # take no chances and rewrite it.
55776  # Note: m4 eats our [], so we need to use [ and ] instead.
55777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55778  if test "x$has_forbidden_chars" != x; then
55779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55781  fi
55782
55783
55784  windows_path="$new_path"
55785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55786    unix_path=`$CYGPATH -u "$windows_path"`
55787    new_path="$unix_path"
55788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55790    new_path="$unix_path"
55791  fi
55792
55793  if test "x$path" != "x$new_path"; then
55794    MSVC_DLL="$new_path"
55795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55796$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55797  fi
55798
55799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55801
55802    else
55803      # We're on a unix platform. Hooray! :)
55804      path="$MSVC_DLL"
55805      has_space=`$ECHO "$path" | $GREP " "`
55806      if test "x$has_space" != x; then
55807        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55808$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55809        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55810      fi
55811
55812      # Use eval to expand a potential ~
55813      eval path="$path"
55814      if test ! -f "$path" && test ! -d "$path"; then
55815        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55816      fi
55817
55818      if test -d "$path"; then
55819        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55820      else
55821        dir="`$DIRNAME "$path"`"
55822        base="`$BASENAME "$path"`"
55823        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55824      fi
55825    fi
55826  fi
55827
55828      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55829$as_echo_n "checking for $DLL_NAME... " >&6; }
55830      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55831$as_echo "$MSVC_DLL" >&6; }
55832    else
55833      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55834$as_echo "incorrect, ignoring" >&6; }
55835      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55836$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55837    fi
55838  fi
55839
55840    fi
55841  fi
55842
55843  if test "x$MSVC_DLL" = x; then
55844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55845$as_echo_n "checking for $DLL_NAME... " >&6; }
55846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55847$as_echo "no" >&6; }
55848    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55849  fi
55850
55851    MSVCR_DLL="$MSVC_DLL"
55852  fi
55853
55854
55855
55856# Check whether --with-msvcp-dll was given.
55857if test "${with_msvcp_dll+set}" = set; then :
55858  withval=$with_msvcp_dll;
55859fi
55860
55861
55862  if test "x$MSVCP_NAME" != "x"; then
55863    if test "x$with_msvcp_dll" != x; then
55864      # If given explicitly by user, do not probe. If not present, fail directly.
55865
55866  DLL_NAME="$MSVCP_NAME"
55867  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55868  METHOD="--with-msvcp-dll"
55869  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55870    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55871$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55872
55873    # Need to check if the found msvcr is correct architecture
55874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55875$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55876    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55878      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55879      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55880      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55881        CORRECT_MSVCR_ARCH="PE32 executable"
55882      else
55883        CORRECT_MSVCR_ARCH="PE32+ executable"
55884      fi
55885    else
55886      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55887        CORRECT_MSVCR_ARCH=386
55888      else
55889        CORRECT_MSVCR_ARCH=x86-64
55890      fi
55891    fi
55892    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55894$as_echo "ok" >&6; }
55895      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55896
55897  # Only process if variable expands to non-empty
55898
55899  if test "x$MSVC_DLL" != x; then
55900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55901
55902  # Input might be given as Windows format, start by converting to
55903  # unix format.
55904  path="$MSVC_DLL"
55905  new_path=`$CYGPATH -u "$path"`
55906
55907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55910  # "foo.exe" is OK but "foo" is an error.
55911  #
55912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55913  # It is also a way to make sure we got the proper file name for the real test later on.
55914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55915  if test "x$test_shortpath" = x; then
55916    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55917$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55918    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55919  fi
55920
55921  # Call helper function which possibly converts this using DOS-style short mode.
55922  # If so, the updated path is stored in $new_path.
55923
55924  input_path="$new_path"
55925  # Check if we need to convert this using DOS-style short mode. If the path
55926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55927  # take no chances and rewrite it.
55928  # Note: m4 eats our [], so we need to use [ and ] instead.
55929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55930  if test "x$has_forbidden_chars" != x; then
55931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55935      # Going to short mode and back again did indeed matter. Since short mode is
55936      # case insensitive, let's make it lowercase to improve readability.
55937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55938      # Now convert it back to Unix-style (cygpath)
55939      input_path=`$CYGPATH -u "$shortmode_path"`
55940      new_path="$input_path"
55941    fi
55942  fi
55943
55944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55945  if test "x$test_cygdrive_prefix" = x; then
55946    # As a simple fix, exclude /usr/bin since it's not a real path.
55947    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55949      # a path prefixed by /cygdrive for fixpath to work.
55950      new_path="$CYGWIN_ROOT_PATH$input_path"
55951    fi
55952  fi
55953
55954
55955  if test "x$path" != "x$new_path"; then
55956    MSVC_DLL="$new_path"
55957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55958$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55959  fi
55960
55961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55962
55963  path="$MSVC_DLL"
55964  has_colon=`$ECHO $path | $GREP ^.:`
55965  new_path="$path"
55966  if test "x$has_colon" = x; then
55967    # Not in mixed or Windows style, start by that.
55968    new_path=`cmd //c echo $path`
55969  fi
55970
55971
55972  input_path="$new_path"
55973  # Check if we need to convert this using DOS-style short mode. If the path
55974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55975  # take no chances and rewrite it.
55976  # Note: m4 eats our [], so we need to use [ and ] instead.
55977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55978  if test "x$has_forbidden_chars" != x; then
55979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55981  fi
55982
55983
55984  windows_path="$new_path"
55985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55986    unix_path=`$CYGPATH -u "$windows_path"`
55987    new_path="$unix_path"
55988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55990    new_path="$unix_path"
55991  fi
55992
55993  if test "x$path" != "x$new_path"; then
55994    MSVC_DLL="$new_path"
55995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55996$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55997  fi
55998
55999  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56000  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56001
56002    else
56003      # We're on a unix platform. Hooray! :)
56004      path="$MSVC_DLL"
56005      has_space=`$ECHO "$path" | $GREP " "`
56006      if test "x$has_space" != x; then
56007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56008$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56009        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56010      fi
56011
56012      # Use eval to expand a potential ~
56013      eval path="$path"
56014      if test ! -f "$path" && test ! -d "$path"; then
56015        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56016      fi
56017
56018      if test -d "$path"; then
56019        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56020      else
56021        dir="`$DIRNAME "$path"`"
56022        base="`$BASENAME "$path"`"
56023        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56024      fi
56025    fi
56026  fi
56027
56028      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56029$as_echo_n "checking for $DLL_NAME... " >&6; }
56030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56031$as_echo "$MSVC_DLL" >&6; }
56032    else
56033      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56034$as_echo "incorrect, ignoring" >&6; }
56035      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56036$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56037    fi
56038  fi
56039
56040      if test "x$MSVC_DLL" = x; then
56041        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
56042      fi
56043      MSVCP_DLL="$MSVC_DLL"
56044    elif test "x$DEVKIT_MSVCP_DLL" != x; then
56045
56046  DLL_NAME="$MSVCP_NAME"
56047  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
56048  METHOD="devkit"
56049  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56050    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56051$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56052
56053    # Need to check if the found msvcr is correct architecture
56054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56055$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56056    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56057    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56058      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56059      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56060      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56061        CORRECT_MSVCR_ARCH="PE32 executable"
56062      else
56063        CORRECT_MSVCR_ARCH="PE32+ executable"
56064      fi
56065    else
56066      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56067        CORRECT_MSVCR_ARCH=386
56068      else
56069        CORRECT_MSVCR_ARCH=x86-64
56070      fi
56071    fi
56072    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56074$as_echo "ok" >&6; }
56075      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56076
56077  # Only process if variable expands to non-empty
56078
56079  if test "x$MSVC_DLL" != x; then
56080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56081
56082  # Input might be given as Windows format, start by converting to
56083  # unix format.
56084  path="$MSVC_DLL"
56085  new_path=`$CYGPATH -u "$path"`
56086
56087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56090  # "foo.exe" is OK but "foo" is an error.
56091  #
56092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56093  # It is also a way to make sure we got the proper file name for the real test later on.
56094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56095  if test "x$test_shortpath" = x; then
56096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56097$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56098    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56099  fi
56100
56101  # Call helper function which possibly converts this using DOS-style short mode.
56102  # If so, the updated path is stored in $new_path.
56103
56104  input_path="$new_path"
56105  # Check if we need to convert this using DOS-style short mode. If the path
56106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56107  # take no chances and rewrite it.
56108  # Note: m4 eats our [], so we need to use [ and ] instead.
56109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56110  if test "x$has_forbidden_chars" != x; then
56111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56115      # Going to short mode and back again did indeed matter. Since short mode is
56116      # case insensitive, let's make it lowercase to improve readability.
56117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56118      # Now convert it back to Unix-style (cygpath)
56119      input_path=`$CYGPATH -u "$shortmode_path"`
56120      new_path="$input_path"
56121    fi
56122  fi
56123
56124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56125  if test "x$test_cygdrive_prefix" = x; then
56126    # As a simple fix, exclude /usr/bin since it's not a real path.
56127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56129      # a path prefixed by /cygdrive for fixpath to work.
56130      new_path="$CYGWIN_ROOT_PATH$input_path"
56131    fi
56132  fi
56133
56134
56135  if test "x$path" != "x$new_path"; then
56136    MSVC_DLL="$new_path"
56137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56138$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56139  fi
56140
56141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56142
56143  path="$MSVC_DLL"
56144  has_colon=`$ECHO $path | $GREP ^.:`
56145  new_path="$path"
56146  if test "x$has_colon" = x; then
56147    # Not in mixed or Windows style, start by that.
56148    new_path=`cmd //c echo $path`
56149  fi
56150
56151
56152  input_path="$new_path"
56153  # Check if we need to convert this using DOS-style short mode. If the path
56154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56155  # take no chances and rewrite it.
56156  # Note: m4 eats our [], so we need to use [ and ] instead.
56157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56158  if test "x$has_forbidden_chars" != x; then
56159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56161  fi
56162
56163
56164  windows_path="$new_path"
56165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56166    unix_path=`$CYGPATH -u "$windows_path"`
56167    new_path="$unix_path"
56168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56170    new_path="$unix_path"
56171  fi
56172
56173  if test "x$path" != "x$new_path"; then
56174    MSVC_DLL="$new_path"
56175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56176$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56177  fi
56178
56179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56181
56182    else
56183      # We're on a unix platform. Hooray! :)
56184      path="$MSVC_DLL"
56185      has_space=`$ECHO "$path" | $GREP " "`
56186      if test "x$has_space" != x; then
56187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56188$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56189        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56190      fi
56191
56192      # Use eval to expand a potential ~
56193      eval path="$path"
56194      if test ! -f "$path" && test ! -d "$path"; then
56195        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56196      fi
56197
56198      if test -d "$path"; then
56199        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56200      else
56201        dir="`$DIRNAME "$path"`"
56202        base="`$BASENAME "$path"`"
56203        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56204      fi
56205    fi
56206  fi
56207
56208      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56209$as_echo_n "checking for $DLL_NAME... " >&6; }
56210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56211$as_echo "$MSVC_DLL" >&6; }
56212    else
56213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56214$as_echo "incorrect, ignoring" >&6; }
56215      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56216$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56217    fi
56218  fi
56219
56220      if test "x$MSVC_DLL" = x; then
56221        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
56222      fi
56223      MSVCP_DLL="$MSVC_DLL"
56224    else
56225
56226  DLL_NAME="${MSVCP_NAME}"
56227  MSVC_DLL=
56228
56229  if test "x$MSVC_DLL" = x; then
56230    # Probe: Using well-known location from Visual Studio 10.0
56231    if test "x$VCINSTALLDIR" != x; then
56232      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
56233
56234  windows_path="$CYGWIN_VC_INSTALL_DIR"
56235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56236    unix_path=`$CYGPATH -u "$windows_path"`
56237    CYGWIN_VC_INSTALL_DIR="$unix_path"
56238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56240    CYGWIN_VC_INSTALL_DIR="$unix_path"
56241  fi
56242
56243      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56244        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56245      else
56246        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56247      fi
56248      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
56249
56250  DLL_NAME="$DLL_NAME"
56251  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56252  METHOD="well-known location in VCINSTALLDIR"
56253  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56254    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56255$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56256
56257    # Need to check if the found msvcr is correct architecture
56258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56259$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56260    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56262      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56263      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56264      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56265        CORRECT_MSVCR_ARCH="PE32 executable"
56266      else
56267        CORRECT_MSVCR_ARCH="PE32+ executable"
56268      fi
56269    else
56270      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56271        CORRECT_MSVCR_ARCH=386
56272      else
56273        CORRECT_MSVCR_ARCH=x86-64
56274      fi
56275    fi
56276    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56277      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56278$as_echo "ok" >&6; }
56279      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56280
56281  # Only process if variable expands to non-empty
56282
56283  if test "x$MSVC_DLL" != x; then
56284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56285
56286  # Input might be given as Windows format, start by converting to
56287  # unix format.
56288  path="$MSVC_DLL"
56289  new_path=`$CYGPATH -u "$path"`
56290
56291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56294  # "foo.exe" is OK but "foo" is an error.
56295  #
56296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56297  # It is also a way to make sure we got the proper file name for the real test later on.
56298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56299  if test "x$test_shortpath" = x; then
56300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56301$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56302    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56303  fi
56304
56305  # Call helper function which possibly converts this using DOS-style short mode.
56306  # If so, the updated path is stored in $new_path.
56307
56308  input_path="$new_path"
56309  # Check if we need to convert this using DOS-style short mode. If the path
56310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56311  # take no chances and rewrite it.
56312  # Note: m4 eats our [], so we need to use [ and ] instead.
56313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56314  if test "x$has_forbidden_chars" != x; then
56315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56319      # Going to short mode and back again did indeed matter. Since short mode is
56320      # case insensitive, let's make it lowercase to improve readability.
56321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56322      # Now convert it back to Unix-style (cygpath)
56323      input_path=`$CYGPATH -u "$shortmode_path"`
56324      new_path="$input_path"
56325    fi
56326  fi
56327
56328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56329  if test "x$test_cygdrive_prefix" = x; then
56330    # As a simple fix, exclude /usr/bin since it's not a real path.
56331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56333      # a path prefixed by /cygdrive for fixpath to work.
56334      new_path="$CYGWIN_ROOT_PATH$input_path"
56335    fi
56336  fi
56337
56338
56339  if test "x$path" != "x$new_path"; then
56340    MSVC_DLL="$new_path"
56341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56342$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56343  fi
56344
56345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56346
56347  path="$MSVC_DLL"
56348  has_colon=`$ECHO $path | $GREP ^.:`
56349  new_path="$path"
56350  if test "x$has_colon" = x; then
56351    # Not in mixed or Windows style, start by that.
56352    new_path=`cmd //c echo $path`
56353  fi
56354
56355
56356  input_path="$new_path"
56357  # Check if we need to convert this using DOS-style short mode. If the path
56358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56359  # take no chances and rewrite it.
56360  # Note: m4 eats our [], so we need to use [ and ] instead.
56361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56362  if test "x$has_forbidden_chars" != x; then
56363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56365  fi
56366
56367
56368  windows_path="$new_path"
56369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56370    unix_path=`$CYGPATH -u "$windows_path"`
56371    new_path="$unix_path"
56372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56374    new_path="$unix_path"
56375  fi
56376
56377  if test "x$path" != "x$new_path"; then
56378    MSVC_DLL="$new_path"
56379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56380$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56381  fi
56382
56383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56385
56386    else
56387      # We're on a unix platform. Hooray! :)
56388      path="$MSVC_DLL"
56389      has_space=`$ECHO "$path" | $GREP " "`
56390      if test "x$has_space" != x; then
56391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56392$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56393        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56394      fi
56395
56396      # Use eval to expand a potential ~
56397      eval path="$path"
56398      if test ! -f "$path" && test ! -d "$path"; then
56399        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56400      fi
56401
56402      if test -d "$path"; then
56403        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56404      else
56405        dir="`$DIRNAME "$path"`"
56406        base="`$BASENAME "$path"`"
56407        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56408      fi
56409    fi
56410  fi
56411
56412      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56413$as_echo_n "checking for $DLL_NAME... " >&6; }
56414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56415$as_echo "$MSVC_DLL" >&6; }
56416    else
56417      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56418$as_echo "incorrect, ignoring" >&6; }
56419      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56420$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56421    fi
56422  fi
56423
56424    fi
56425  fi
56426
56427  if test "x$MSVC_DLL" = x; then
56428    # Probe: Check in the Boot JDK directory.
56429    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56430
56431  DLL_NAME="$DLL_NAME"
56432  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56433  METHOD="well-known location in Boot JDK"
56434  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56435    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56436$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56437
56438    # Need to check if the found msvcr is correct architecture
56439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56440$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56441    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56442    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56443      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56444      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56445      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56446        CORRECT_MSVCR_ARCH="PE32 executable"
56447      else
56448        CORRECT_MSVCR_ARCH="PE32+ executable"
56449      fi
56450    else
56451      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56452        CORRECT_MSVCR_ARCH=386
56453      else
56454        CORRECT_MSVCR_ARCH=x86-64
56455      fi
56456    fi
56457    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56459$as_echo "ok" >&6; }
56460      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56461
56462  # Only process if variable expands to non-empty
56463
56464  if test "x$MSVC_DLL" != x; then
56465    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56466
56467  # Input might be given as Windows format, start by converting to
56468  # unix format.
56469  path="$MSVC_DLL"
56470  new_path=`$CYGPATH -u "$path"`
56471
56472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56475  # "foo.exe" is OK but "foo" is an error.
56476  #
56477  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56478  # It is also a way to make sure we got the proper file name for the real test later on.
56479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56480  if test "x$test_shortpath" = x; then
56481    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56482$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56483    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56484  fi
56485
56486  # Call helper function which possibly converts this using DOS-style short mode.
56487  # If so, the updated path is stored in $new_path.
56488
56489  input_path="$new_path"
56490  # Check if we need to convert this using DOS-style short mode. If the path
56491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56492  # take no chances and rewrite it.
56493  # Note: m4 eats our [], so we need to use [ and ] instead.
56494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56495  if test "x$has_forbidden_chars" != x; then
56496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56500      # Going to short mode and back again did indeed matter. Since short mode is
56501      # case insensitive, let's make it lowercase to improve readability.
56502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56503      # Now convert it back to Unix-style (cygpath)
56504      input_path=`$CYGPATH -u "$shortmode_path"`
56505      new_path="$input_path"
56506    fi
56507  fi
56508
56509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56510  if test "x$test_cygdrive_prefix" = x; then
56511    # As a simple fix, exclude /usr/bin since it's not a real path.
56512    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56514      # a path prefixed by /cygdrive for fixpath to work.
56515      new_path="$CYGWIN_ROOT_PATH$input_path"
56516    fi
56517  fi
56518
56519
56520  if test "x$path" != "x$new_path"; then
56521    MSVC_DLL="$new_path"
56522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56523$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56524  fi
56525
56526    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56527
56528  path="$MSVC_DLL"
56529  has_colon=`$ECHO $path | $GREP ^.:`
56530  new_path="$path"
56531  if test "x$has_colon" = x; then
56532    # Not in mixed or Windows style, start by that.
56533    new_path=`cmd //c echo $path`
56534  fi
56535
56536
56537  input_path="$new_path"
56538  # Check if we need to convert this using DOS-style short mode. If the path
56539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56540  # take no chances and rewrite it.
56541  # Note: m4 eats our [], so we need to use [ and ] instead.
56542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56543  if test "x$has_forbidden_chars" != x; then
56544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56546  fi
56547
56548
56549  windows_path="$new_path"
56550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56551    unix_path=`$CYGPATH -u "$windows_path"`
56552    new_path="$unix_path"
56553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56555    new_path="$unix_path"
56556  fi
56557
56558  if test "x$path" != "x$new_path"; then
56559    MSVC_DLL="$new_path"
56560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56561$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56562  fi
56563
56564  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56565  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56566
56567    else
56568      # We're on a unix platform. Hooray! :)
56569      path="$MSVC_DLL"
56570      has_space=`$ECHO "$path" | $GREP " "`
56571      if test "x$has_space" != x; then
56572        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56573$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56574        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56575      fi
56576
56577      # Use eval to expand a potential ~
56578      eval path="$path"
56579      if test ! -f "$path" && test ! -d "$path"; then
56580        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56581      fi
56582
56583      if test -d "$path"; then
56584        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56585      else
56586        dir="`$DIRNAME "$path"`"
56587        base="`$BASENAME "$path"`"
56588        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56589      fi
56590    fi
56591  fi
56592
56593      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56594$as_echo_n "checking for $DLL_NAME... " >&6; }
56595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56596$as_echo "$MSVC_DLL" >&6; }
56597    else
56598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56599$as_echo "incorrect, ignoring" >&6; }
56600      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56601$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56602    fi
56603  fi
56604
56605  fi
56606
56607  if test "x$MSVC_DLL" = x; then
56608    # Probe: Look in the Windows system32 directory
56609    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56610
56611  windows_path="$CYGWIN_SYSTEMROOT"
56612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56613    unix_path=`$CYGPATH -u "$windows_path"`
56614    CYGWIN_SYSTEMROOT="$unix_path"
56615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56617    CYGWIN_SYSTEMROOT="$unix_path"
56618  fi
56619
56620    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56621
56622  DLL_NAME="$DLL_NAME"
56623  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56624  METHOD="well-known location in SYSTEMROOT"
56625  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56626    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56627$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56628
56629    # Need to check if the found msvcr is correct architecture
56630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56631$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56632    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56634      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56635      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56636      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56637        CORRECT_MSVCR_ARCH="PE32 executable"
56638      else
56639        CORRECT_MSVCR_ARCH="PE32+ executable"
56640      fi
56641    else
56642      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56643        CORRECT_MSVCR_ARCH=386
56644      else
56645        CORRECT_MSVCR_ARCH=x86-64
56646      fi
56647    fi
56648    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56650$as_echo "ok" >&6; }
56651      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56652
56653  # Only process if variable expands to non-empty
56654
56655  if test "x$MSVC_DLL" != x; then
56656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56657
56658  # Input might be given as Windows format, start by converting to
56659  # unix format.
56660  path="$MSVC_DLL"
56661  new_path=`$CYGPATH -u "$path"`
56662
56663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56666  # "foo.exe" is OK but "foo" is an error.
56667  #
56668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56669  # It is also a way to make sure we got the proper file name for the real test later on.
56670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56671  if test "x$test_shortpath" = x; then
56672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56673$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56674    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56675  fi
56676
56677  # Call helper function which possibly converts this using DOS-style short mode.
56678  # If so, the updated path is stored in $new_path.
56679
56680  input_path="$new_path"
56681  # Check if we need to convert this using DOS-style short mode. If the path
56682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56683  # take no chances and rewrite it.
56684  # Note: m4 eats our [], so we need to use [ and ] instead.
56685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56686  if test "x$has_forbidden_chars" != x; then
56687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56691      # Going to short mode and back again did indeed matter. Since short mode is
56692      # case insensitive, let's make it lowercase to improve readability.
56693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56694      # Now convert it back to Unix-style (cygpath)
56695      input_path=`$CYGPATH -u "$shortmode_path"`
56696      new_path="$input_path"
56697    fi
56698  fi
56699
56700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56701  if test "x$test_cygdrive_prefix" = x; then
56702    # As a simple fix, exclude /usr/bin since it's not a real path.
56703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56705      # a path prefixed by /cygdrive for fixpath to work.
56706      new_path="$CYGWIN_ROOT_PATH$input_path"
56707    fi
56708  fi
56709
56710
56711  if test "x$path" != "x$new_path"; then
56712    MSVC_DLL="$new_path"
56713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56714$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56715  fi
56716
56717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56718
56719  path="$MSVC_DLL"
56720  has_colon=`$ECHO $path | $GREP ^.:`
56721  new_path="$path"
56722  if test "x$has_colon" = x; then
56723    # Not in mixed or Windows style, start by that.
56724    new_path=`cmd //c echo $path`
56725  fi
56726
56727
56728  input_path="$new_path"
56729  # Check if we need to convert this using DOS-style short mode. If the path
56730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56731  # take no chances and rewrite it.
56732  # Note: m4 eats our [], so we need to use [ and ] instead.
56733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56734  if test "x$has_forbidden_chars" != x; then
56735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56737  fi
56738
56739
56740  windows_path="$new_path"
56741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56742    unix_path=`$CYGPATH -u "$windows_path"`
56743    new_path="$unix_path"
56744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56746    new_path="$unix_path"
56747  fi
56748
56749  if test "x$path" != "x$new_path"; then
56750    MSVC_DLL="$new_path"
56751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56752$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56753  fi
56754
56755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56757
56758    else
56759      # We're on a unix platform. Hooray! :)
56760      path="$MSVC_DLL"
56761      has_space=`$ECHO "$path" | $GREP " "`
56762      if test "x$has_space" != x; then
56763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56764$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56766      fi
56767
56768      # Use eval to expand a potential ~
56769      eval path="$path"
56770      if test ! -f "$path" && test ! -d "$path"; then
56771        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56772      fi
56773
56774      if test -d "$path"; then
56775        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56776      else
56777        dir="`$DIRNAME "$path"`"
56778        base="`$BASENAME "$path"`"
56779        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56780      fi
56781    fi
56782  fi
56783
56784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56785$as_echo_n "checking for $DLL_NAME... " >&6; }
56786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56787$as_echo "$MSVC_DLL" >&6; }
56788    else
56789      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56790$as_echo "incorrect, ignoring" >&6; }
56791      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56792$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56793    fi
56794  fi
56795
56796  fi
56797
56798  if test "x$MSVC_DLL" = x; then
56799    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56800    if test "x$VS100COMNTOOLS" != x; then
56801      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56802
56803  windows_path="$CYGWIN_VS_TOOLS_DIR"
56804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56805    unix_path=`$CYGPATH -u "$windows_path"`
56806    CYGWIN_VS_TOOLS_DIR="$unix_path"
56807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56809    CYGWIN_VS_TOOLS_DIR="$unix_path"
56810  fi
56811
56812      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56813        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56814	    | $GREP -i /x64/ | $HEAD --lines 1`
56815      else
56816        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56817	    | $GREP -i /x86/ | $HEAD --lines 1`
56818      fi
56819
56820  DLL_NAME="$DLL_NAME"
56821  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56822  METHOD="search of VS100COMNTOOLS"
56823  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56824    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56825$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56826
56827    # Need to check if the found msvcr is correct architecture
56828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56829$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56830    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56832      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56833      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56834      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56835        CORRECT_MSVCR_ARCH="PE32 executable"
56836      else
56837        CORRECT_MSVCR_ARCH="PE32+ executable"
56838      fi
56839    else
56840      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56841        CORRECT_MSVCR_ARCH=386
56842      else
56843        CORRECT_MSVCR_ARCH=x86-64
56844      fi
56845    fi
56846    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56848$as_echo "ok" >&6; }
56849      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56850
56851  # Only process if variable expands to non-empty
56852
56853  if test "x$MSVC_DLL" != x; then
56854    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56855
56856  # Input might be given as Windows format, start by converting to
56857  # unix format.
56858  path="$MSVC_DLL"
56859  new_path=`$CYGPATH -u "$path"`
56860
56861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56864  # "foo.exe" is OK but "foo" is an error.
56865  #
56866  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56867  # It is also a way to make sure we got the proper file name for the real test later on.
56868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56869  if test "x$test_shortpath" = x; then
56870    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56871$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56872    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56873  fi
56874
56875  # Call helper function which possibly converts this using DOS-style short mode.
56876  # If so, the updated path is stored in $new_path.
56877
56878  input_path="$new_path"
56879  # Check if we need to convert this using DOS-style short mode. If the path
56880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56881  # take no chances and rewrite it.
56882  # Note: m4 eats our [], so we need to use [ and ] instead.
56883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56884  if test "x$has_forbidden_chars" != x; then
56885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56889      # Going to short mode and back again did indeed matter. Since short mode is
56890      # case insensitive, let's make it lowercase to improve readability.
56891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56892      # Now convert it back to Unix-style (cygpath)
56893      input_path=`$CYGPATH -u "$shortmode_path"`
56894      new_path="$input_path"
56895    fi
56896  fi
56897
56898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56899  if test "x$test_cygdrive_prefix" = x; then
56900    # As a simple fix, exclude /usr/bin since it's not a real path.
56901    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56903      # a path prefixed by /cygdrive for fixpath to work.
56904      new_path="$CYGWIN_ROOT_PATH$input_path"
56905    fi
56906  fi
56907
56908
56909  if test "x$path" != "x$new_path"; then
56910    MSVC_DLL="$new_path"
56911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56912$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56913  fi
56914
56915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56916
56917  path="$MSVC_DLL"
56918  has_colon=`$ECHO $path | $GREP ^.:`
56919  new_path="$path"
56920  if test "x$has_colon" = x; then
56921    # Not in mixed or Windows style, start by that.
56922    new_path=`cmd //c echo $path`
56923  fi
56924
56925
56926  input_path="$new_path"
56927  # Check if we need to convert this using DOS-style short mode. If the path
56928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56929  # take no chances and rewrite it.
56930  # Note: m4 eats our [], so we need to use [ and ] instead.
56931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56932  if test "x$has_forbidden_chars" != x; then
56933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56935  fi
56936
56937
56938  windows_path="$new_path"
56939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56940    unix_path=`$CYGPATH -u "$windows_path"`
56941    new_path="$unix_path"
56942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56944    new_path="$unix_path"
56945  fi
56946
56947  if test "x$path" != "x$new_path"; then
56948    MSVC_DLL="$new_path"
56949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56950$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56951  fi
56952
56953  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56954  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56955
56956    else
56957      # We're on a unix platform. Hooray! :)
56958      path="$MSVC_DLL"
56959      has_space=`$ECHO "$path" | $GREP " "`
56960      if test "x$has_space" != x; then
56961        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56962$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56963        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56964      fi
56965
56966      # Use eval to expand a potential ~
56967      eval path="$path"
56968      if test ! -f "$path" && test ! -d "$path"; then
56969        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56970      fi
56971
56972      if test -d "$path"; then
56973        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56974      else
56975        dir="`$DIRNAME "$path"`"
56976        base="`$BASENAME "$path"`"
56977        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56978      fi
56979    fi
56980  fi
56981
56982      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56983$as_echo_n "checking for $DLL_NAME... " >&6; }
56984      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56985$as_echo "$MSVC_DLL" >&6; }
56986    else
56987      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56988$as_echo "incorrect, ignoring" >&6; }
56989      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56990$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56991    fi
56992  fi
56993
56994    fi
56995  fi
56996
56997  if test "x$MSVC_DLL" = x; then
56998    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56999    # (This was the original behaviour; kept since it might turn something up)
57000    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
57001      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57002        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
57003	    | $GREP x64 | $HEAD --lines 1`
57004      else
57005        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
57006	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
57007        if test "x$POSSIBLE_MSVC_DLL" = x; then
57008          # We're grasping at straws now...
57009          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
57010	      | $HEAD --lines 1`
57011        fi
57012      fi
57013
57014
57015  DLL_NAME="$DLL_NAME"
57016  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
57017  METHOD="search of VCINSTALLDIR"
57018  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57019    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57020$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57021
57022    # Need to check if the found msvcr is correct architecture
57023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57024$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57025    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57026    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57027      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57028      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57029      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57030        CORRECT_MSVCR_ARCH="PE32 executable"
57031      else
57032        CORRECT_MSVCR_ARCH="PE32+ executable"
57033      fi
57034    else
57035      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57036        CORRECT_MSVCR_ARCH=386
57037      else
57038        CORRECT_MSVCR_ARCH=x86-64
57039      fi
57040    fi
57041    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57043$as_echo "ok" >&6; }
57044      MSVC_DLL="$POSSIBLE_MSVC_DLL"
57045
57046  # Only process if variable expands to non-empty
57047
57048  if test "x$MSVC_DLL" != x; then
57049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57050
57051  # Input might be given as Windows format, start by converting to
57052  # unix format.
57053  path="$MSVC_DLL"
57054  new_path=`$CYGPATH -u "$path"`
57055
57056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57059  # "foo.exe" is OK but "foo" is an error.
57060  #
57061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57062  # It is also a way to make sure we got the proper file name for the real test later on.
57063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57064  if test "x$test_shortpath" = x; then
57065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57066$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57067    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57068  fi
57069
57070  # Call helper function which possibly converts this using DOS-style short mode.
57071  # If so, the updated path is stored in $new_path.
57072
57073  input_path="$new_path"
57074  # Check if we need to convert this using DOS-style short mode. If the path
57075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57076  # take no chances and rewrite it.
57077  # Note: m4 eats our [], so we need to use [ and ] instead.
57078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57079  if test "x$has_forbidden_chars" != x; then
57080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57084      # Going to short mode and back again did indeed matter. Since short mode is
57085      # case insensitive, let's make it lowercase to improve readability.
57086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57087      # Now convert it back to Unix-style (cygpath)
57088      input_path=`$CYGPATH -u "$shortmode_path"`
57089      new_path="$input_path"
57090    fi
57091  fi
57092
57093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57094  if test "x$test_cygdrive_prefix" = x; then
57095    # As a simple fix, exclude /usr/bin since it's not a real path.
57096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57098      # a path prefixed by /cygdrive for fixpath to work.
57099      new_path="$CYGWIN_ROOT_PATH$input_path"
57100    fi
57101  fi
57102
57103
57104  if test "x$path" != "x$new_path"; then
57105    MSVC_DLL="$new_path"
57106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57107$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57108  fi
57109
57110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57111
57112  path="$MSVC_DLL"
57113  has_colon=`$ECHO $path | $GREP ^.:`
57114  new_path="$path"
57115  if test "x$has_colon" = x; then
57116    # Not in mixed or Windows style, start by that.
57117    new_path=`cmd //c echo $path`
57118  fi
57119
57120
57121  input_path="$new_path"
57122  # Check if we need to convert this using DOS-style short mode. If the path
57123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57124  # take no chances and rewrite it.
57125  # Note: m4 eats our [], so we need to use [ and ] instead.
57126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57127  if test "x$has_forbidden_chars" != x; then
57128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57130  fi
57131
57132
57133  windows_path="$new_path"
57134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57135    unix_path=`$CYGPATH -u "$windows_path"`
57136    new_path="$unix_path"
57137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57139    new_path="$unix_path"
57140  fi
57141
57142  if test "x$path" != "x$new_path"; then
57143    MSVC_DLL="$new_path"
57144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57145$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57146  fi
57147
57148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57150
57151    else
57152      # We're on a unix platform. Hooray! :)
57153      path="$MSVC_DLL"
57154      has_space=`$ECHO "$path" | $GREP " "`
57155      if test "x$has_space" != x; then
57156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57157$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57158        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57159      fi
57160
57161      # Use eval to expand a potential ~
57162      eval path="$path"
57163      if test ! -f "$path" && test ! -d "$path"; then
57164        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57165      fi
57166
57167      if test -d "$path"; then
57168        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57169      else
57170        dir="`$DIRNAME "$path"`"
57171        base="`$BASENAME "$path"`"
57172        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57173      fi
57174    fi
57175  fi
57176
57177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57178$as_echo_n "checking for $DLL_NAME... " >&6; }
57179      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57180$as_echo "$MSVC_DLL" >&6; }
57181    else
57182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57183$as_echo "incorrect, ignoring" >&6; }
57184      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57185$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57186    fi
57187  fi
57188
57189    fi
57190  fi
57191
57192  if test "x$MSVC_DLL" = x; then
57193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57194$as_echo_n "checking for $DLL_NAME... " >&6; }
57195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57196$as_echo "no" >&6; }
57197    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
57198  fi
57199
57200      MSVCP_DLL="$MSVC_DLL"
57201    fi
57202
57203  fi
57204
57205  fi
57206
57207
57208  if test "x$NEEDS_LIB_X11" = xfalse; then
57209    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
57210      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
57211$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
57212    fi
57213    X_CFLAGS=
57214    X_LIBS=
57215  else
57216
57217    if test "x${with_x}" = xno; then
57218      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
57219    fi
57220
57221    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
57222      # The user has specified a X11 base directory. Use it for includes and
57223      # libraries, unless explicitly overridden.
57224      if test "x$x_includes" = xNONE; then
57225        x_includes="${with_x}/include"
57226      fi
57227      if test "x$x_libraries" = xNONE; then
57228        x_libraries="${with_x}/lib"
57229      fi
57230    else
57231      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
57232      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
57233      # --x-libraries for the sysroot, if that seems to be correct.
57234      if test "x$SYSROOT" != "x"; then
57235        if test "x$x_includes" = xNONE; then
57236          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
57237            x_includes="$SYSROOT/usr/X11R6/include"
57238          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
57239            x_includes="$SYSROOT/usr/include"
57240          fi
57241        fi
57242        if test "x$x_libraries" = xNONE; then
57243          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
57244            x_libraries="$SYSROOT/usr/X11R6/lib"
57245          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57246            x_libraries="$SYSROOT/usr/lib64"
57247          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
57248            x_libraries="$SYSROOT/usr/lib"
57249          fi
57250        fi
57251      fi
57252    fi
57253
57254    # Now let autoconf do it's magic
57255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
57256$as_echo_n "checking for X... " >&6; }
57257
57258
57259# Check whether --with-x was given.
57260if test "${with_x+set}" = set; then :
57261  withval=$with_x;
57262fi
57263
57264# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
57265if test "x$with_x" = xno; then
57266  # The user explicitly disabled X.
57267  have_x=disabled
57268else
57269  case $x_includes,$x_libraries in #(
57270    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
57271    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
57272  $as_echo_n "(cached) " >&6
57273else
57274  # One or both of the vars are not set, and there is no cached value.
57275ac_x_includes=no ac_x_libraries=no
57276rm -f -r conftest.dir
57277if mkdir conftest.dir; then
57278  cd conftest.dir
57279  cat >Imakefile <<'_ACEOF'
57280incroot:
57281	@echo incroot='${INCROOT}'
57282usrlibdir:
57283	@echo usrlibdir='${USRLIBDIR}'
57284libdir:
57285	@echo libdir='${LIBDIR}'
57286_ACEOF
57287  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
57288    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
57289    for ac_var in incroot usrlibdir libdir; do
57290      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
57291    done
57292    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
57293    for ac_extension in a so sl dylib la dll; do
57294      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
57295	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
57296	ac_im_usrlibdir=$ac_im_libdir; break
57297      fi
57298    done
57299    # Screen out bogus values from the imake configuration.  They are
57300    # bogus both because they are the default anyway, and because
57301    # using them would break gcc on systems where it needs fixed includes.
57302    case $ac_im_incroot in
57303	/usr/include) ac_x_includes= ;;
57304	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
57305    esac
57306    case $ac_im_usrlibdir in
57307	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
57308	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
57309    esac
57310  fi
57311  cd ..
57312  rm -f -r conftest.dir
57313fi
57314
57315# Standard set of common directories for X headers.
57316# Check X11 before X11Rn because it is often a symlink to the current release.
57317ac_x_header_dirs='
57318/usr/X11/include
57319/usr/X11R7/include
57320/usr/X11R6/include
57321/usr/X11R5/include
57322/usr/X11R4/include
57323
57324/usr/include/X11
57325/usr/include/X11R7
57326/usr/include/X11R6
57327/usr/include/X11R5
57328/usr/include/X11R4
57329
57330/usr/local/X11/include
57331/usr/local/X11R7/include
57332/usr/local/X11R6/include
57333/usr/local/X11R5/include
57334/usr/local/X11R4/include
57335
57336/usr/local/include/X11
57337/usr/local/include/X11R7
57338/usr/local/include/X11R6
57339/usr/local/include/X11R5
57340/usr/local/include/X11R4
57341
57342/usr/X386/include
57343/usr/x386/include
57344/usr/XFree86/include/X11
57345
57346/usr/include
57347/usr/local/include
57348/usr/unsupported/include
57349/usr/athena/include
57350/usr/local/x11r5/include
57351/usr/lpp/Xamples/include
57352
57353/usr/openwin/include
57354/usr/openwin/share/include'
57355
57356if test "$ac_x_includes" = no; then
57357  # Guess where to find include files, by looking for Xlib.h.
57358  # First, try using that file with no special directory specified.
57359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57360/* end confdefs.h.  */
57361#include <X11/Xlib.h>
57362_ACEOF
57363if ac_fn_cxx_try_cpp "$LINENO"; then :
57364  # We can compile using X headers with no special include directory.
57365ac_x_includes=
57366else
57367  for ac_dir in $ac_x_header_dirs; do
57368  if test -r "$ac_dir/X11/Xlib.h"; then
57369    ac_x_includes=$ac_dir
57370    break
57371  fi
57372done
57373fi
57374rm -f conftest.err conftest.i conftest.$ac_ext
57375fi # $ac_x_includes = no
57376
57377if test "$ac_x_libraries" = no; then
57378  # Check for the libraries.
57379  # See if we find them without any special options.
57380  # Don't add to $LIBS permanently.
57381  ac_save_LIBS=$LIBS
57382  LIBS="-lX11 $LIBS"
57383  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57384/* end confdefs.h.  */
57385#include <X11/Xlib.h>
57386int
57387main ()
57388{
57389XrmInitialize ()
57390  ;
57391  return 0;
57392}
57393_ACEOF
57394if ac_fn_cxx_try_link "$LINENO"; then :
57395  LIBS=$ac_save_LIBS
57396# We can link X programs with no special library path.
57397ac_x_libraries=
57398else
57399  LIBS=$ac_save_LIBS
57400for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57401do
57402  # Don't even attempt the hair of trying to link an X program!
57403  for ac_extension in a so sl dylib la dll; do
57404    if test -r "$ac_dir/libX11.$ac_extension"; then
57405      ac_x_libraries=$ac_dir
57406      break 2
57407    fi
57408  done
57409done
57410fi
57411rm -f core conftest.err conftest.$ac_objext \
57412    conftest$ac_exeext conftest.$ac_ext
57413fi # $ac_x_libraries = no
57414
57415case $ac_x_includes,$ac_x_libraries in #(
57416  no,* | *,no | *\'*)
57417    # Didn't find X, or a directory has "'" in its name.
57418    ac_cv_have_x="have_x=no";; #(
57419  *)
57420    # Record where we found X for the cache.
57421    ac_cv_have_x="have_x=yes\
57422	ac_x_includes='$ac_x_includes'\
57423	ac_x_libraries='$ac_x_libraries'"
57424esac
57425fi
57426;; #(
57427    *) have_x=yes;;
57428  esac
57429  eval "$ac_cv_have_x"
57430fi # $with_x != no
57431
57432if test "$have_x" != yes; then
57433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57434$as_echo "$have_x" >&6; }
57435  no_x=yes
57436else
57437  # If each of the values was on the command line, it overrides each guess.
57438  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57439  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57440  # Update the cache value to reflect the command line values.
57441  ac_cv_have_x="have_x=yes\
57442	ac_x_includes='$x_includes'\
57443	ac_x_libraries='$x_libraries'"
57444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57445$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57446fi
57447
57448    if test "$no_x" = yes; then
57449  # Not all programs may use this symbol, but it does not hurt to define it.
57450
57451$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57452
57453  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57454else
57455  if test -n "$x_includes"; then
57456    X_CFLAGS="$X_CFLAGS -I$x_includes"
57457  fi
57458
57459  # It would also be nice to do this for all -L options, not just this one.
57460  if test -n "$x_libraries"; then
57461    X_LIBS="$X_LIBS -L$x_libraries"
57462    # For Solaris; some versions of Sun CC require a space after -R and
57463    # others require no space.  Words are not sufficient . . . .
57464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57465$as_echo_n "checking whether -R must be followed by a space... " >&6; }
57466    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57467    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57468    ac_cxx_werror_flag=yes
57469    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57470/* end confdefs.h.  */
57471
57472int
57473main ()
57474{
57475
57476  ;
57477  return 0;
57478}
57479_ACEOF
57480if ac_fn_cxx_try_link "$LINENO"; then :
57481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57482$as_echo "no" >&6; }
57483       X_LIBS="$X_LIBS -R$x_libraries"
57484else
57485  LIBS="$ac_xsave_LIBS -R $x_libraries"
57486       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57487/* end confdefs.h.  */
57488
57489int
57490main ()
57491{
57492
57493  ;
57494  return 0;
57495}
57496_ACEOF
57497if ac_fn_cxx_try_link "$LINENO"; then :
57498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57499$as_echo "yes" >&6; }
57500	  X_LIBS="$X_LIBS -R $x_libraries"
57501else
57502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57503$as_echo "neither works" >&6; }
57504fi
57505rm -f core conftest.err conftest.$ac_objext \
57506    conftest$ac_exeext conftest.$ac_ext
57507fi
57508rm -f core conftest.err conftest.$ac_objext \
57509    conftest$ac_exeext conftest.$ac_ext
57510    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57511    LIBS=$ac_xsave_LIBS
57512  fi
57513
57514  # Check for system-dependent libraries X programs must link with.
57515  # Do this before checking for the system-independent R6 libraries
57516  # (-lICE), since we may need -lsocket or whatever for X linking.
57517
57518  if test "$ISC" = yes; then
57519    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57520  else
57521    # Martyn Johnson says this is needed for Ultrix, if the X
57522    # libraries were built with DECnet support.  And Karl Berry says
57523    # the Alpha needs dnet_stub (dnet does not exist).
57524    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57525    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57526/* end confdefs.h.  */
57527
57528/* Override any GCC internal prototype to avoid an error.
57529   Use char because int might match the return type of a GCC
57530   builtin and then its argument prototype would still apply.  */
57531#ifdef __cplusplus
57532extern "C"
57533#endif
57534char XOpenDisplay ();
57535int
57536main ()
57537{
57538return XOpenDisplay ();
57539  ;
57540  return 0;
57541}
57542_ACEOF
57543if ac_fn_cxx_try_link "$LINENO"; then :
57544
57545else
57546  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57547$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57548if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57549  $as_echo_n "(cached) " >&6
57550else
57551  ac_check_lib_save_LIBS=$LIBS
57552LIBS="-ldnet  $LIBS"
57553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57554/* end confdefs.h.  */
57555
57556/* Override any GCC internal prototype to avoid an error.
57557   Use char because int might match the return type of a GCC
57558   builtin and then its argument prototype would still apply.  */
57559#ifdef __cplusplus
57560extern "C"
57561#endif
57562char dnet_ntoa ();
57563int
57564main ()
57565{
57566return dnet_ntoa ();
57567  ;
57568  return 0;
57569}
57570_ACEOF
57571if ac_fn_cxx_try_link "$LINENO"; then :
57572  ac_cv_lib_dnet_dnet_ntoa=yes
57573else
57574  ac_cv_lib_dnet_dnet_ntoa=no
57575fi
57576rm -f core conftest.err conftest.$ac_objext \
57577    conftest$ac_exeext conftest.$ac_ext
57578LIBS=$ac_check_lib_save_LIBS
57579fi
57580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57581$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57582if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57583  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57584fi
57585
57586    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57587      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57588$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57589if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57590  $as_echo_n "(cached) " >&6
57591else
57592  ac_check_lib_save_LIBS=$LIBS
57593LIBS="-ldnet_stub  $LIBS"
57594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57595/* end confdefs.h.  */
57596
57597/* Override any GCC internal prototype to avoid an error.
57598   Use char because int might match the return type of a GCC
57599   builtin and then its argument prototype would still apply.  */
57600#ifdef __cplusplus
57601extern "C"
57602#endif
57603char dnet_ntoa ();
57604int
57605main ()
57606{
57607return dnet_ntoa ();
57608  ;
57609  return 0;
57610}
57611_ACEOF
57612if ac_fn_cxx_try_link "$LINENO"; then :
57613  ac_cv_lib_dnet_stub_dnet_ntoa=yes
57614else
57615  ac_cv_lib_dnet_stub_dnet_ntoa=no
57616fi
57617rm -f core conftest.err conftest.$ac_objext \
57618    conftest$ac_exeext conftest.$ac_ext
57619LIBS=$ac_check_lib_save_LIBS
57620fi
57621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57622$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57623if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57624  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57625fi
57626
57627    fi
57628fi
57629rm -f core conftest.err conftest.$ac_objext \
57630    conftest$ac_exeext conftest.$ac_ext
57631    LIBS="$ac_xsave_LIBS"
57632
57633    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57634    # to get the SysV transport functions.
57635    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57636    # needs -lnsl.
57637    # The nsl library prevents programs from opening the X display
57638    # on Irix 5.2, according to T.E. Dickey.
57639    # The functions gethostbyname, getservbyname, and inet_addr are
57640    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57641    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57642if test "x$ac_cv_func_gethostbyname" = xyes; then :
57643
57644fi
57645
57646    if test $ac_cv_func_gethostbyname = no; then
57647      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57648$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57649if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57650  $as_echo_n "(cached) " >&6
57651else
57652  ac_check_lib_save_LIBS=$LIBS
57653LIBS="-lnsl  $LIBS"
57654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57655/* end confdefs.h.  */
57656
57657/* Override any GCC internal prototype to avoid an error.
57658   Use char because int might match the return type of a GCC
57659   builtin and then its argument prototype would still apply.  */
57660#ifdef __cplusplus
57661extern "C"
57662#endif
57663char gethostbyname ();
57664int
57665main ()
57666{
57667return gethostbyname ();
57668  ;
57669  return 0;
57670}
57671_ACEOF
57672if ac_fn_cxx_try_link "$LINENO"; then :
57673  ac_cv_lib_nsl_gethostbyname=yes
57674else
57675  ac_cv_lib_nsl_gethostbyname=no
57676fi
57677rm -f core conftest.err conftest.$ac_objext \
57678    conftest$ac_exeext conftest.$ac_ext
57679LIBS=$ac_check_lib_save_LIBS
57680fi
57681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57682$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57683if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57684  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57685fi
57686
57687      if test $ac_cv_lib_nsl_gethostbyname = no; then
57688	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57689$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57690if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57691  $as_echo_n "(cached) " >&6
57692else
57693  ac_check_lib_save_LIBS=$LIBS
57694LIBS="-lbsd  $LIBS"
57695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57696/* end confdefs.h.  */
57697
57698/* Override any GCC internal prototype to avoid an error.
57699   Use char because int might match the return type of a GCC
57700   builtin and then its argument prototype would still apply.  */
57701#ifdef __cplusplus
57702extern "C"
57703#endif
57704char gethostbyname ();
57705int
57706main ()
57707{
57708return gethostbyname ();
57709  ;
57710  return 0;
57711}
57712_ACEOF
57713if ac_fn_cxx_try_link "$LINENO"; then :
57714  ac_cv_lib_bsd_gethostbyname=yes
57715else
57716  ac_cv_lib_bsd_gethostbyname=no
57717fi
57718rm -f core conftest.err conftest.$ac_objext \
57719    conftest$ac_exeext conftest.$ac_ext
57720LIBS=$ac_check_lib_save_LIBS
57721fi
57722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57723$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57724if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57725  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57726fi
57727
57728      fi
57729    fi
57730
57731    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57732    # socket/setsockopt and other routines are undefined under SCO ODT
57733    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57734    # on later versions), says Simon Leinen: it contains gethostby*
57735    # variants that don't use the name server (or something).  -lsocket
57736    # must be given before -lnsl if both are needed.  We assume that
57737    # if connect needs -lnsl, so does gethostbyname.
57738    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57739if test "x$ac_cv_func_connect" = xyes; then :
57740
57741fi
57742
57743    if test $ac_cv_func_connect = no; then
57744      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57745$as_echo_n "checking for connect in -lsocket... " >&6; }
57746if ${ac_cv_lib_socket_connect+:} false; then :
57747  $as_echo_n "(cached) " >&6
57748else
57749  ac_check_lib_save_LIBS=$LIBS
57750LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57752/* end confdefs.h.  */
57753
57754/* Override any GCC internal prototype to avoid an error.
57755   Use char because int might match the return type of a GCC
57756   builtin and then its argument prototype would still apply.  */
57757#ifdef __cplusplus
57758extern "C"
57759#endif
57760char connect ();
57761int
57762main ()
57763{
57764return connect ();
57765  ;
57766  return 0;
57767}
57768_ACEOF
57769if ac_fn_cxx_try_link "$LINENO"; then :
57770  ac_cv_lib_socket_connect=yes
57771else
57772  ac_cv_lib_socket_connect=no
57773fi
57774rm -f core conftest.err conftest.$ac_objext \
57775    conftest$ac_exeext conftest.$ac_ext
57776LIBS=$ac_check_lib_save_LIBS
57777fi
57778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57779$as_echo "$ac_cv_lib_socket_connect" >&6; }
57780if test "x$ac_cv_lib_socket_connect" = xyes; then :
57781  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57782fi
57783
57784    fi
57785
57786    # Guillermo Gomez says -lposix is necessary on A/UX.
57787    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57788if test "x$ac_cv_func_remove" = xyes; then :
57789
57790fi
57791
57792    if test $ac_cv_func_remove = no; then
57793      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57794$as_echo_n "checking for remove in -lposix... " >&6; }
57795if ${ac_cv_lib_posix_remove+:} false; then :
57796  $as_echo_n "(cached) " >&6
57797else
57798  ac_check_lib_save_LIBS=$LIBS
57799LIBS="-lposix  $LIBS"
57800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57801/* end confdefs.h.  */
57802
57803/* Override any GCC internal prototype to avoid an error.
57804   Use char because int might match the return type of a GCC
57805   builtin and then its argument prototype would still apply.  */
57806#ifdef __cplusplus
57807extern "C"
57808#endif
57809char remove ();
57810int
57811main ()
57812{
57813return remove ();
57814  ;
57815  return 0;
57816}
57817_ACEOF
57818if ac_fn_cxx_try_link "$LINENO"; then :
57819  ac_cv_lib_posix_remove=yes
57820else
57821  ac_cv_lib_posix_remove=no
57822fi
57823rm -f core conftest.err conftest.$ac_objext \
57824    conftest$ac_exeext conftest.$ac_ext
57825LIBS=$ac_check_lib_save_LIBS
57826fi
57827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57828$as_echo "$ac_cv_lib_posix_remove" >&6; }
57829if test "x$ac_cv_lib_posix_remove" = xyes; then :
57830  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57831fi
57832
57833    fi
57834
57835    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57836    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57837if test "x$ac_cv_func_shmat" = xyes; then :
57838
57839fi
57840
57841    if test $ac_cv_func_shmat = no; then
57842      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57843$as_echo_n "checking for shmat in -lipc... " >&6; }
57844if ${ac_cv_lib_ipc_shmat+:} false; then :
57845  $as_echo_n "(cached) " >&6
57846else
57847  ac_check_lib_save_LIBS=$LIBS
57848LIBS="-lipc  $LIBS"
57849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57850/* end confdefs.h.  */
57851
57852/* Override any GCC internal prototype to avoid an error.
57853   Use char because int might match the return type of a GCC
57854   builtin and then its argument prototype would still apply.  */
57855#ifdef __cplusplus
57856extern "C"
57857#endif
57858char shmat ();
57859int
57860main ()
57861{
57862return shmat ();
57863  ;
57864  return 0;
57865}
57866_ACEOF
57867if ac_fn_cxx_try_link "$LINENO"; then :
57868  ac_cv_lib_ipc_shmat=yes
57869else
57870  ac_cv_lib_ipc_shmat=no
57871fi
57872rm -f core conftest.err conftest.$ac_objext \
57873    conftest$ac_exeext conftest.$ac_ext
57874LIBS=$ac_check_lib_save_LIBS
57875fi
57876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57877$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57878if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57879  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57880fi
57881
57882    fi
57883  fi
57884
57885  # Check for libraries that X11R6 Xt/Xaw programs need.
57886  ac_save_LDFLAGS=$LDFLAGS
57887  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57888  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57889  # check for ICE first), but we must link in the order -lSM -lICE or
57890  # we get undefined symbols.  So assume we have SM if we have ICE.
57891  # These have to be linked with before -lX11, unlike the other
57892  # libraries we check for below, so use a different variable.
57893  # John Interrante, Karl Berry
57894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57895$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57896if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57897  $as_echo_n "(cached) " >&6
57898else
57899  ac_check_lib_save_LIBS=$LIBS
57900LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57902/* end confdefs.h.  */
57903
57904/* Override any GCC internal prototype to avoid an error.
57905   Use char because int might match the return type of a GCC
57906   builtin and then its argument prototype would still apply.  */
57907#ifdef __cplusplus
57908extern "C"
57909#endif
57910char IceConnectionNumber ();
57911int
57912main ()
57913{
57914return IceConnectionNumber ();
57915  ;
57916  return 0;
57917}
57918_ACEOF
57919if ac_fn_cxx_try_link "$LINENO"; then :
57920  ac_cv_lib_ICE_IceConnectionNumber=yes
57921else
57922  ac_cv_lib_ICE_IceConnectionNumber=no
57923fi
57924rm -f core conftest.err conftest.$ac_objext \
57925    conftest$ac_exeext conftest.$ac_ext
57926LIBS=$ac_check_lib_save_LIBS
57927fi
57928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57929$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57930if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57931  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57932fi
57933
57934  LDFLAGS=$ac_save_LDFLAGS
57935
57936fi
57937
57938
57939    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57940    # this doesn't make sense so we remove it.
57941    if test "x$COMPILE_TYPE" = xcross; then
57942      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57943    fi
57944
57945    if test "x$no_x" = xyes; then
57946
57947  # Print a helpful message on how to acquire the necessary build dependency.
57948  # x11 is the help tag: freetype, cups, alsa etc
57949  MISSING_DEPENDENCY=x11
57950
57951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57952    cygwin_help $MISSING_DEPENDENCY
57953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57954    msys_help $MISSING_DEPENDENCY
57955  else
57956    PKGHANDLER_COMMAND=
57957
57958    case $PKGHANDLER in
57959      apt-get)
57960        apt_help     $MISSING_DEPENDENCY ;;
57961      yum)
57962        yum_help     $MISSING_DEPENDENCY ;;
57963      brew)
57964        brew_help    $MISSING_DEPENDENCY ;;
57965      port)
57966        port_help    $MISSING_DEPENDENCY ;;
57967      pkgutil)
57968        pkgutil_help $MISSING_DEPENDENCY ;;
57969      pkgadd)
57970        pkgadd_help  $MISSING_DEPENDENCY ;;
57971    esac
57972
57973    if test "x$PKGHANDLER_COMMAND" != x; then
57974      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57975    fi
57976  fi
57977
57978      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57979    fi
57980
57981    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57982      OPENWIN_HOME="/usr/openwin"
57983      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57984      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57985          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57986    fi
57987
57988    ac_ext=c
57989ac_cpp='$CPP $CPPFLAGS'
57990ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57991ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57992ac_compiler_gnu=$ac_cv_c_compiler_gnu
57993
57994    OLD_CFLAGS="$CFLAGS"
57995    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57996
57997    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57998    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57999do :
58000  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
58001ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
58002          # include <X11/Xlib.h>
58003          # include <X11/Xutil.h>
58004
58005
58006"
58007if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
58008  cat >>confdefs.h <<_ACEOF
58009#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58010_ACEOF
58011 X11_HEADERS_OK=yes
58012else
58013  X11_HEADERS_OK=no; break
58014fi
58015
58016done
58017
58018
58019    if test "x$X11_HEADERS_OK" = xno; then
58020
58021  # Print a helpful message on how to acquire the necessary build dependency.
58022  # x11 is the help tag: freetype, cups, alsa etc
58023  MISSING_DEPENDENCY=x11
58024
58025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58026    cygwin_help $MISSING_DEPENDENCY
58027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58028    msys_help $MISSING_DEPENDENCY
58029  else
58030    PKGHANDLER_COMMAND=
58031
58032    case $PKGHANDLER in
58033      apt-get)
58034        apt_help     $MISSING_DEPENDENCY ;;
58035      yum)
58036        yum_help     $MISSING_DEPENDENCY ;;
58037      brew)
58038        brew_help    $MISSING_DEPENDENCY ;;
58039      port)
58040        port_help    $MISSING_DEPENDENCY ;;
58041      pkgutil)
58042        pkgutil_help $MISSING_DEPENDENCY ;;
58043      pkgadd)
58044        pkgadd_help  $MISSING_DEPENDENCY ;;
58045    esac
58046
58047    if test "x$PKGHANDLER_COMMAND" != x; then
58048      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58049    fi
58050  fi
58051
58052      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
58053    fi
58054
58055    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
58056    # defined in libawt_xawt.
58057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
58058$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
58059    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58060/* end confdefs.h.  */
58061#include <X11/extensions/Xrender.h>
58062int
58063main ()
58064{
58065XLinearGradient x;
58066  ;
58067  return 0;
58068}
58069_ACEOF
58070if ac_fn_c_try_compile "$LINENO"; then :
58071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58072$as_echo "yes" >&6; }
58073else
58074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58075$as_echo "no" >&6; }
58076         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
58077fi
58078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58079
58080    CFLAGS="$OLD_CFLAGS"
58081    ac_ext=cpp
58082ac_cpp='$CXXCPP $CPPFLAGS'
58083ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58084ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58085ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58086
58087  fi # NEEDS_LIB_X11
58088
58089
58090
58091
58092
58093
58094# Check whether --with-cups was given.
58095if test "${with_cups+set}" = set; then :
58096  withval=$with_cups;
58097fi
58098
58099
58100# Check whether --with-cups-include was given.
58101if test "${with_cups_include+set}" = set; then :
58102  withval=$with_cups_include;
58103fi
58104
58105
58106  if test "x$NEEDS_LIB_CUPS" = xfalse; then
58107    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
58108        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
58109      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
58110$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
58111    fi
58112    CUPS_CFLAGS=
58113  else
58114    CUPS_FOUND=no
58115
58116    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
58117      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
58118    fi
58119
58120    if test "x${with_cups}" != x; then
58121      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58122$as_echo_n "checking for cups headers... " >&6; }
58123      if test -s "${with_cups}/include/cups/cups.h"; then
58124        CUPS_CFLAGS="-I${with_cups}/include"
58125        CUPS_FOUND=yes
58126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58127$as_echo "$CUPS_FOUND" >&6; }
58128      else
58129        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
58130      fi
58131    fi
58132    if test "x${with_cups_include}" != x; then
58133      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58134$as_echo_n "checking for cups headers... " >&6; }
58135      if test -s "${with_cups_include}/cups/cups.h"; then
58136        CUPS_CFLAGS="-I${with_cups_include}"
58137        CUPS_FOUND=yes
58138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58139$as_echo "$CUPS_FOUND" >&6; }
58140      else
58141        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
58142      fi
58143    fi
58144    if test "x$CUPS_FOUND" = xno; then
58145      # Are the cups headers installed in the default /usr/include location?
58146      for ac_header in cups/cups.h cups/ppd.h
58147do :
58148  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
58149ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
58150if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
58151  cat >>confdefs.h <<_ACEOF
58152#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58153_ACEOF
58154
58155          CUPS_FOUND=yes
58156          CUPS_CFLAGS=
58157          DEFAULT_CUPS=yes
58158
58159fi
58160
58161done
58162
58163    fi
58164    if test "x$CUPS_FOUND" = xno; then
58165
58166  # Print a helpful message on how to acquire the necessary build dependency.
58167  # cups is the help tag: freetype, cups, alsa etc
58168  MISSING_DEPENDENCY=cups
58169
58170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58171    cygwin_help $MISSING_DEPENDENCY
58172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58173    msys_help $MISSING_DEPENDENCY
58174  else
58175    PKGHANDLER_COMMAND=
58176
58177    case $PKGHANDLER in
58178      apt-get)
58179        apt_help     $MISSING_DEPENDENCY ;;
58180      yum)
58181        yum_help     $MISSING_DEPENDENCY ;;
58182      brew)
58183        brew_help    $MISSING_DEPENDENCY ;;
58184      port)
58185        port_help    $MISSING_DEPENDENCY ;;
58186      pkgutil)
58187        pkgutil_help $MISSING_DEPENDENCY ;;
58188      pkgadd)
58189        pkgadd_help  $MISSING_DEPENDENCY ;;
58190    esac
58191
58192    if test "x$PKGHANDLER_COMMAND" != x; then
58193      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58194    fi
58195  fi
58196
58197      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
58198    fi
58199  fi
58200
58201
58202
58203
58204
58205# Check whether --with-freetype was given.
58206if test "${with_freetype+set}" = set; then :
58207  withval=$with_freetype;
58208fi
58209
58210
58211# Check whether --with-freetype-include was given.
58212if test "${with_freetype_include+set}" = set; then :
58213  withval=$with_freetype_include;
58214fi
58215
58216
58217# Check whether --with-freetype-lib was given.
58218if test "${with_freetype_lib+set}" = set; then :
58219  withval=$with_freetype_lib;
58220fi
58221
58222
58223# Check whether --with-freetype-src was given.
58224if test "${with_freetype_src+set}" = set; then :
58225  withval=$with_freetype_src;
58226fi
58227
58228  # Check whether --enable-freetype-bundling was given.
58229if test "${enable_freetype_bundling+set}" = set; then :
58230  enableval=$enable_freetype_bundling;
58231fi
58232
58233
58234# Check whether --with-freetype-license was given.
58235if test "${with_freetype_license+set}" = set; then :
58236  withval=$with_freetype_license;
58237fi
58238
58239
58240  # Need to specify explicitly since it needs to be overridden on some versions of macosx
58241  FREETYPE_BASE_NAME=freetype
58242  FREETYPE_CFLAGS=
58243  FREETYPE_LIBS=
58244  FREETYPE_BUNDLE_LIB_PATH=
58245
58246  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
58247    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
58248        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
58249        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
58250        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
58251      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
58252$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
58253    fi
58254    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
58255      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
58256$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
58257    fi
58258  else
58259    # freetype is needed to build; go get it!
58260
58261    BUNDLE_FREETYPE="$enable_freetype_bundling"
58262
58263    if  test "x$with_freetype_src" != x; then
58264      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58265        # Try to build freetype if --with-freetype-src was given on Windows
58266
58267  FREETYPE_SRC_PATH="$with_freetype_src"
58268  BUILD_FREETYPE=yes
58269
58270  # Check if the freetype sources are acessible..
58271  if ! test -d $FREETYPE_SRC_PATH; then
58272    { $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
58273$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58274    BUILD_FREETYPE=no
58275  fi
58276  # ..and contain a vc2010 project file
58277  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58278  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58279    { $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
58280$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58281    BUILD_FREETYPE=no
58282  fi
58283  # Now check if configure found a version of 'msbuild.exe'
58284  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58285    { $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
58286$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;}
58287    BUILD_FREETYPE=no
58288  fi
58289
58290  # Ready to go..
58291  if test "x$BUILD_FREETYPE" = xyes; then
58292    # msbuild requires trailing slashes for output directories
58293    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58294    freetype_lib_path_unix="$freetype_lib_path"
58295    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58296
58297  unix_path="$vcxproj_path"
58298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58299    windows_path=`$CYGPATH -m "$unix_path"`
58300    vcxproj_path="$windows_path"
58301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58302    windows_path=`cmd //c echo $unix_path`
58303    vcxproj_path="$windows_path"
58304  fi
58305
58306
58307  unix_path="$freetype_lib_path"
58308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58309    windows_path=`$CYGPATH -m "$unix_path"`
58310    freetype_lib_path="$windows_path"
58311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58312    windows_path=`cmd //c echo $unix_path`
58313    freetype_lib_path="$windows_path"
58314  fi
58315
58316
58317  unix_path="$freetype_obj_path"
58318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58319    windows_path=`$CYGPATH -m "$unix_path"`
58320    freetype_obj_path="$windows_path"
58321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58322    windows_path=`cmd //c echo $unix_path`
58323    freetype_obj_path="$windows_path"
58324  fi
58325
58326    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58327      freetype_platform=x64
58328    else
58329      freetype_platform=win32
58330    fi
58331
58332    # The original freetype project file is for VS 2010 (i.e. 'v100'),
58333    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58334    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58335    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58336    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58337$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58338
58339    # First we try to build the freetype.dll
58340    $ECHO -e "@echo off\n"\
58341        "$MSBUILD $vcxproj_path "\
58342        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58343        "/p:Configuration=\"Release Multithreaded\" "\
58344        "/p:Platform=$freetype_platform "\
58345        "/p:ConfigurationType=DynamicLibrary "\
58346        "/p:TargetName=freetype "\
58347        "/p:OutDir=\"$freetype_lib_path\" "\
58348        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58349    cmd /c freetype.bat
58350
58351    if test -s "$freetype_lib_path_unix/freetype.dll"; then
58352      # If that succeeds we also build freetype.lib
58353      $ECHO -e "@echo off\n"\
58354          "$MSBUILD $vcxproj_path "\
58355          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58356          "/p:Configuration=\"Release Multithreaded\" "\
58357          "/p:Platform=$freetype_platform "\
58358          "/p:ConfigurationType=StaticLibrary "\
58359          "/p:TargetName=freetype "\
58360          "/p:OutDir=\"$freetype_lib_path\" "\
58361          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58362      cmd /c freetype.bat
58363
58364      if test -s "$freetype_lib_path_unix/freetype.lib"; then
58365        # Once we build both, lib and dll, set freetype lib and include path appropriately
58366        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58367        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58368        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58369$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58370      else
58371        BUILD_FREETYPE=no
58372      fi
58373    else
58374      BUILD_FREETYPE=no
58375    fi
58376  fi
58377
58378        if test "x$BUILD_FREETYPE" = xyes; then
58379          # Okay, we built it. Check that it works.
58380
58381  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58382  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58383  METHOD="--with-freetype-src"
58384
58385  # Let's start with an optimistic view of the world :-)
58386  FOUND_FREETYPE=yes
58387
58388  # First look for the canonical freetype main include file ft2build.h.
58389  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58390    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58391    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58392    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58393      # Fail.
58394      FOUND_FREETYPE=no
58395    fi
58396  fi
58397
58398  if test "x$FOUND_FREETYPE" = xyes; then
58399    # Include file found, let's continue the sanity check.
58400    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58401$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58402
58403    # Reset to default value
58404    FREETYPE_BASE_NAME=freetype
58405    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58406    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58407      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58408          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58409        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58410        # for the .6 version explicitly.
58411        FREETYPE_BASE_NAME=freetype.6
58412        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58413        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58414$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58415      else
58416        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58417$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58418        FOUND_FREETYPE=no
58419      fi
58420    else
58421      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58422        # On Windows, we will need both .lib and .dll file.
58423        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58424          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58425$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58426          FOUND_FREETYPE=no
58427        fi
58428      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58429          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58430        # Found lib in isa dir, use that instead.
58431        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58432        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58433$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58434      fi
58435    fi
58436  fi
58437
58438  if test "x$FOUND_FREETYPE" = xyes; then
58439
58440  # Only process if variable expands to non-empty
58441
58442  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58444
58445  # Input might be given as Windows format, start by converting to
58446  # unix format.
58447  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58448  new_path=`$CYGPATH -u "$path"`
58449
58450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58453  # "foo.exe" is OK but "foo" is an error.
58454  #
58455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58456  # It is also a way to make sure we got the proper file name for the real test later on.
58457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58458  if test "x$test_shortpath" = x; then
58459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58460$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58461    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58462  fi
58463
58464  # Call helper function which possibly converts this using DOS-style short mode.
58465  # If so, the updated path is stored in $new_path.
58466
58467  input_path="$new_path"
58468  # Check if we need to convert this using DOS-style short mode. If the path
58469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58470  # take no chances and rewrite it.
58471  # Note: m4 eats our [], so we need to use [ and ] instead.
58472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58473  if test "x$has_forbidden_chars" != x; then
58474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58478      # Going to short mode and back again did indeed matter. Since short mode is
58479      # case insensitive, let's make it lowercase to improve readability.
58480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58481      # Now convert it back to Unix-style (cygpath)
58482      input_path=`$CYGPATH -u "$shortmode_path"`
58483      new_path="$input_path"
58484    fi
58485  fi
58486
58487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58488  if test "x$test_cygdrive_prefix" = x; then
58489    # As a simple fix, exclude /usr/bin since it's not a real path.
58490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58492      # a path prefixed by /cygdrive for fixpath to work.
58493      new_path="$CYGWIN_ROOT_PATH$input_path"
58494    fi
58495  fi
58496
58497
58498  if test "x$path" != "x$new_path"; then
58499    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58501$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58502  fi
58503
58504    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58505
58506  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58507  has_colon=`$ECHO $path | $GREP ^.:`
58508  new_path="$path"
58509  if test "x$has_colon" = x; then
58510    # Not in mixed or Windows style, start by that.
58511    new_path=`cmd //c echo $path`
58512  fi
58513
58514
58515  input_path="$new_path"
58516  # Check if we need to convert this using DOS-style short mode. If the path
58517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58518  # take no chances and rewrite it.
58519  # Note: m4 eats our [], so we need to use [ and ] instead.
58520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58521  if test "x$has_forbidden_chars" != x; then
58522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58524  fi
58525
58526
58527  windows_path="$new_path"
58528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58529    unix_path=`$CYGPATH -u "$windows_path"`
58530    new_path="$unix_path"
58531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58533    new_path="$unix_path"
58534  fi
58535
58536  if test "x$path" != "x$new_path"; then
58537    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58540  fi
58541
58542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58544
58545    else
58546      # We're on a unix platform. Hooray! :)
58547      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58548      has_space=`$ECHO "$path" | $GREP " "`
58549      if test "x$has_space" != x; then
58550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58551$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58552        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58553      fi
58554
58555      # Use eval to expand a potential ~
58556      eval path="$path"
58557      if test ! -f "$path" && test ! -d "$path"; then
58558        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58559      fi
58560
58561      if test -d "$path"; then
58562        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58563      else
58564        dir="`$DIRNAME "$path"`"
58565        base="`$BASENAME "$path"`"
58566        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58567      fi
58568    fi
58569  fi
58570
58571
58572  # Only process if variable expands to non-empty
58573
58574  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58576
58577  # Input might be given as Windows format, start by converting to
58578  # unix format.
58579  path="$POTENTIAL_FREETYPE_LIB_PATH"
58580  new_path=`$CYGPATH -u "$path"`
58581
58582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58585  # "foo.exe" is OK but "foo" is an error.
58586  #
58587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58588  # It is also a way to make sure we got the proper file name for the real test later on.
58589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58590  if test "x$test_shortpath" = x; then
58591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58592$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58593    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58594  fi
58595
58596  # Call helper function which possibly converts this using DOS-style short mode.
58597  # If so, the updated path is stored in $new_path.
58598
58599  input_path="$new_path"
58600  # Check if we need to convert this using DOS-style short mode. If the path
58601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58602  # take no chances and rewrite it.
58603  # Note: m4 eats our [], so we need to use [ and ] instead.
58604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58605  if test "x$has_forbidden_chars" != x; then
58606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58610      # Going to short mode and back again did indeed matter. Since short mode is
58611      # case insensitive, let's make it lowercase to improve readability.
58612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58613      # Now convert it back to Unix-style (cygpath)
58614      input_path=`$CYGPATH -u "$shortmode_path"`
58615      new_path="$input_path"
58616    fi
58617  fi
58618
58619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58620  if test "x$test_cygdrive_prefix" = x; then
58621    # As a simple fix, exclude /usr/bin since it's not a real path.
58622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58624      # a path prefixed by /cygdrive for fixpath to work.
58625      new_path="$CYGWIN_ROOT_PATH$input_path"
58626    fi
58627  fi
58628
58629
58630  if test "x$path" != "x$new_path"; then
58631    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58633$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58634  fi
58635
58636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58637
58638  path="$POTENTIAL_FREETYPE_LIB_PATH"
58639  has_colon=`$ECHO $path | $GREP ^.:`
58640  new_path="$path"
58641  if test "x$has_colon" = x; then
58642    # Not in mixed or Windows style, start by that.
58643    new_path=`cmd //c echo $path`
58644  fi
58645
58646
58647  input_path="$new_path"
58648  # Check if we need to convert this using DOS-style short mode. If the path
58649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58650  # take no chances and rewrite it.
58651  # Note: m4 eats our [], so we need to use [ and ] instead.
58652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58653  if test "x$has_forbidden_chars" != x; then
58654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58656  fi
58657
58658
58659  windows_path="$new_path"
58660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58661    unix_path=`$CYGPATH -u "$windows_path"`
58662    new_path="$unix_path"
58663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58665    new_path="$unix_path"
58666  fi
58667
58668  if test "x$path" != "x$new_path"; then
58669    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58671$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58672  fi
58673
58674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58676
58677    else
58678      # We're on a unix platform. Hooray! :)
58679      path="$POTENTIAL_FREETYPE_LIB_PATH"
58680      has_space=`$ECHO "$path" | $GREP " "`
58681      if test "x$has_space" != x; then
58682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58683$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58684        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58685      fi
58686
58687      # Use eval to expand a potential ~
58688      eval path="$path"
58689      if test ! -f "$path" && test ! -d "$path"; then
58690        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58691      fi
58692
58693      if test -d "$path"; then
58694        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58695      else
58696        dir="`$DIRNAME "$path"`"
58697        base="`$BASENAME "$path"`"
58698        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58699      fi
58700    fi
58701  fi
58702
58703
58704    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58706$as_echo_n "checking for freetype includes... " >&6; }
58707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58708$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58709    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58711$as_echo_n "checking for freetype libraries... " >&6; }
58712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58713$as_echo "$FREETYPE_LIB_PATH" >&6; }
58714  fi
58715
58716          if test "x$FOUND_FREETYPE" != xyes; then
58717            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58718          fi
58719        else
58720          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58721$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58722          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58723        fi
58724      else
58725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58726$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58727      fi
58728    fi
58729
58730    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58731      # User has specified settings
58732
58733      if test "x$BUNDLE_FREETYPE" = x; then
58734        # If not specified, default is to bundle freetype
58735        BUNDLE_FREETYPE=yes
58736      fi
58737
58738      if test "x$with_freetype" != x; then
58739        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58740        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58741      fi
58742
58743      # Allow --with-freetype-lib and --with-freetype-include to override
58744      if test "x$with_freetype_include" != x; then
58745        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58746      fi
58747      if test "x$with_freetype_lib" != x; then
58748        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58749      fi
58750
58751      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58752        # Okay, we got it. Check that it works.
58753
58754  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58755  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58756  METHOD="--with-freetype"
58757
58758  # Let's start with an optimistic view of the world :-)
58759  FOUND_FREETYPE=yes
58760
58761  # First look for the canonical freetype main include file ft2build.h.
58762  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58763    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58764    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58765    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58766      # Fail.
58767      FOUND_FREETYPE=no
58768    fi
58769  fi
58770
58771  if test "x$FOUND_FREETYPE" = xyes; then
58772    # Include file found, let's continue the sanity check.
58773    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58774$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58775
58776    # Reset to default value
58777    FREETYPE_BASE_NAME=freetype
58778    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58779    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58780      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58781          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58782        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58783        # for the .6 version explicitly.
58784        FREETYPE_BASE_NAME=freetype.6
58785        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58786        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58787$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58788      else
58789        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58790$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58791        FOUND_FREETYPE=no
58792      fi
58793    else
58794      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58795        # On Windows, we will need both .lib and .dll file.
58796        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58797          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58798$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58799          FOUND_FREETYPE=no
58800        fi
58801      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58802          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58803        # Found lib in isa dir, use that instead.
58804        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58805        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58806$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58807      fi
58808    fi
58809  fi
58810
58811  if test "x$FOUND_FREETYPE" = xyes; then
58812
58813  # Only process if variable expands to non-empty
58814
58815  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58817
58818  # Input might be given as Windows format, start by converting to
58819  # unix format.
58820  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58821  new_path=`$CYGPATH -u "$path"`
58822
58823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58826  # "foo.exe" is OK but "foo" is an error.
58827  #
58828  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58829  # It is also a way to make sure we got the proper file name for the real test later on.
58830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58831  if test "x$test_shortpath" = x; then
58832    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58833$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58834    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58835  fi
58836
58837  # Call helper function which possibly converts this using DOS-style short mode.
58838  # If so, the updated path is stored in $new_path.
58839
58840  input_path="$new_path"
58841  # Check if we need to convert this using DOS-style short mode. If the path
58842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58843  # take no chances and rewrite it.
58844  # Note: m4 eats our [], so we need to use [ and ] instead.
58845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58846  if test "x$has_forbidden_chars" != x; then
58847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58851      # Going to short mode and back again did indeed matter. Since short mode is
58852      # case insensitive, let's make it lowercase to improve readability.
58853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58854      # Now convert it back to Unix-style (cygpath)
58855      input_path=`$CYGPATH -u "$shortmode_path"`
58856      new_path="$input_path"
58857    fi
58858  fi
58859
58860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58861  if test "x$test_cygdrive_prefix" = x; then
58862    # As a simple fix, exclude /usr/bin since it's not a real path.
58863    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58865      # a path prefixed by /cygdrive for fixpath to work.
58866      new_path="$CYGWIN_ROOT_PATH$input_path"
58867    fi
58868  fi
58869
58870
58871  if test "x$path" != "x$new_path"; then
58872    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58874$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58875  fi
58876
58877    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58878
58879  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58880  has_colon=`$ECHO $path | $GREP ^.:`
58881  new_path="$path"
58882  if test "x$has_colon" = x; then
58883    # Not in mixed or Windows style, start by that.
58884    new_path=`cmd //c echo $path`
58885  fi
58886
58887
58888  input_path="$new_path"
58889  # Check if we need to convert this using DOS-style short mode. If the path
58890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58891  # take no chances and rewrite it.
58892  # Note: m4 eats our [], so we need to use [ and ] instead.
58893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58894  if test "x$has_forbidden_chars" != x; then
58895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58897  fi
58898
58899
58900  windows_path="$new_path"
58901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58902    unix_path=`$CYGPATH -u "$windows_path"`
58903    new_path="$unix_path"
58904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58906    new_path="$unix_path"
58907  fi
58908
58909  if test "x$path" != "x$new_path"; then
58910    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58912$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58913  fi
58914
58915  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58916  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58917
58918    else
58919      # We're on a unix platform. Hooray! :)
58920      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58921      has_space=`$ECHO "$path" | $GREP " "`
58922      if test "x$has_space" != x; then
58923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58924$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58925        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58926      fi
58927
58928      # Use eval to expand a potential ~
58929      eval path="$path"
58930      if test ! -f "$path" && test ! -d "$path"; then
58931        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58932      fi
58933
58934      if test -d "$path"; then
58935        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58936      else
58937        dir="`$DIRNAME "$path"`"
58938        base="`$BASENAME "$path"`"
58939        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58940      fi
58941    fi
58942  fi
58943
58944
58945  # Only process if variable expands to non-empty
58946
58947  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58948    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58949
58950  # Input might be given as Windows format, start by converting to
58951  # unix format.
58952  path="$POTENTIAL_FREETYPE_LIB_PATH"
58953  new_path=`$CYGPATH -u "$path"`
58954
58955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58958  # "foo.exe" is OK but "foo" is an error.
58959  #
58960  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58961  # It is also a way to make sure we got the proper file name for the real test later on.
58962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58963  if test "x$test_shortpath" = x; then
58964    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58965$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58966    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58967  fi
58968
58969  # Call helper function which possibly converts this using DOS-style short mode.
58970  # If so, the updated path is stored in $new_path.
58971
58972  input_path="$new_path"
58973  # Check if we need to convert this using DOS-style short mode. If the path
58974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58975  # take no chances and rewrite it.
58976  # Note: m4 eats our [], so we need to use [ and ] instead.
58977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58978  if test "x$has_forbidden_chars" != x; then
58979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58983      # Going to short mode and back again did indeed matter. Since short mode is
58984      # case insensitive, let's make it lowercase to improve readability.
58985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58986      # Now convert it back to Unix-style (cygpath)
58987      input_path=`$CYGPATH -u "$shortmode_path"`
58988      new_path="$input_path"
58989    fi
58990  fi
58991
58992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58993  if test "x$test_cygdrive_prefix" = x; then
58994    # As a simple fix, exclude /usr/bin since it's not a real path.
58995    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58997      # a path prefixed by /cygdrive for fixpath to work.
58998      new_path="$CYGWIN_ROOT_PATH$input_path"
58999    fi
59000  fi
59001
59002
59003  if test "x$path" != "x$new_path"; then
59004    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59006$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59007  fi
59008
59009    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59010
59011  path="$POTENTIAL_FREETYPE_LIB_PATH"
59012  has_colon=`$ECHO $path | $GREP ^.:`
59013  new_path="$path"
59014  if test "x$has_colon" = x; then
59015    # Not in mixed or Windows style, start by that.
59016    new_path=`cmd //c echo $path`
59017  fi
59018
59019
59020  input_path="$new_path"
59021  # Check if we need to convert this using DOS-style short mode. If the path
59022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59023  # take no chances and rewrite it.
59024  # Note: m4 eats our [], so we need to use [ and ] instead.
59025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59026  if test "x$has_forbidden_chars" != x; then
59027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59029  fi
59030
59031
59032  windows_path="$new_path"
59033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59034    unix_path=`$CYGPATH -u "$windows_path"`
59035    new_path="$unix_path"
59036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59038    new_path="$unix_path"
59039  fi
59040
59041  if test "x$path" != "x$new_path"; then
59042    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59044$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59045  fi
59046
59047  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59048  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59049
59050    else
59051      # We're on a unix platform. Hooray! :)
59052      path="$POTENTIAL_FREETYPE_LIB_PATH"
59053      has_space=`$ECHO "$path" | $GREP " "`
59054      if test "x$has_space" != x; then
59055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59056$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59057        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59058      fi
59059
59060      # Use eval to expand a potential ~
59061      eval path="$path"
59062      if test ! -f "$path" && test ! -d "$path"; then
59063        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59064      fi
59065
59066      if test -d "$path"; then
59067        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59068      else
59069        dir="`$DIRNAME "$path"`"
59070        base="`$BASENAME "$path"`"
59071        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59072      fi
59073    fi
59074  fi
59075
59076
59077    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59079$as_echo_n "checking for freetype includes... " >&6; }
59080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59081$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59082    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59084$as_echo_n "checking for freetype libraries... " >&6; }
59085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59086$as_echo "$FREETYPE_LIB_PATH" >&6; }
59087  fi
59088
59089        if test "x$FOUND_FREETYPE" != xyes; then
59090          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
59091        fi
59092      else
59093        # User specified only one of lib or include. This is an error.
59094        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
59095          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
59096$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
59097          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59098        else
59099          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
59100$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
59101          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59102        fi
59103      fi
59104    else
59105      # User did not specify settings, but we need freetype. Try to locate it.
59106
59107      if test "x$BUNDLE_FREETYPE" = x; then
59108        # If not specified, default is to bundle freetype only on windows
59109        if test "x$OPENJDK_TARGET_OS" = xwindows; then
59110          BUNDLE_FREETYPE=yes
59111        else
59112          BUNDLE_FREETYPE=no
59113        fi
59114      fi
59115
59116      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
59117      if test "x$SYSROOT" = x; then
59118        if test "x$FOUND_FREETYPE" != xyes; then
59119          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
59120          if test "x$PKG_CONFIG" != x; then
59121
59122pkg_failed=no
59123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
59124$as_echo_n "checking for FREETYPE... " >&6; }
59125
59126if test -n "$FREETYPE_CFLAGS"; then
59127    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
59128 elif test -n "$PKG_CONFIG"; then
59129    if test -n "$PKG_CONFIG" && \
59130    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59131  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59132  ac_status=$?
59133  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59134  test $ac_status = 0; }; then
59135  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
59136else
59137  pkg_failed=yes
59138fi
59139 else
59140    pkg_failed=untried
59141fi
59142if test -n "$FREETYPE_LIBS"; then
59143    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
59144 elif test -n "$PKG_CONFIG"; then
59145    if test -n "$PKG_CONFIG" && \
59146    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59147  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59148  ac_status=$?
59149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59150  test $ac_status = 0; }; then
59151  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
59152else
59153  pkg_failed=yes
59154fi
59155 else
59156    pkg_failed=untried
59157fi
59158
59159
59160
59161if test $pkg_failed = yes; then
59162
59163if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59164        _pkg_short_errors_supported=yes
59165else
59166        _pkg_short_errors_supported=no
59167fi
59168        if test $_pkg_short_errors_supported = yes; then
59169	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
59170        else
59171	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
59172        fi
59173	# Put the nasty error message in config.log where it belongs
59174	echo "$FREETYPE_PKG_ERRORS" >&5
59175
59176	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59177$as_echo "no" >&6; }
59178                FOUND_FREETYPE=no
59179elif test $pkg_failed = untried; then
59180	FOUND_FREETYPE=no
59181else
59182	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
59183	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
59184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59185$as_echo "yes" >&6; }
59186	FOUND_FREETYPE=yes
59187fi
59188            if test "x$FOUND_FREETYPE" = xyes; then
59189              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
59190              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
59191              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
59192              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
59193                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
59194              fi
59195              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
59196              if test "x$BUNDLE_FREETYPE" = xyes; then
59197                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
59198$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
59199                FOUND_FREETYPE=no
59200              else
59201                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
59202$as_echo_n "checking for freetype... " >&6; }
59203                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
59204$as_echo "yes (using pkg-config)" >&6; }
59205              fi
59206            fi
59207          fi
59208        fi
59209      fi
59210
59211      if test "x$FOUND_FREETYPE" != xyes; then
59212        # Check in well-known locations
59213        if test "x$OPENJDK_TARGET_OS" = xwindows; then
59214          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
59215
59216  windows_path="$FREETYPE_BASE_DIR"
59217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59218    unix_path=`$CYGPATH -u "$windows_path"`
59219    FREETYPE_BASE_DIR="$unix_path"
59220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59222    FREETYPE_BASE_DIR="$unix_path"
59223  fi
59224
59225
59226  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59227  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59228  METHOD="well-known location"
59229
59230  # Let's start with an optimistic view of the world :-)
59231  FOUND_FREETYPE=yes
59232
59233  # First look for the canonical freetype main include file ft2build.h.
59234  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59235    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59236    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59237    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59238      # Fail.
59239      FOUND_FREETYPE=no
59240    fi
59241  fi
59242
59243  if test "x$FOUND_FREETYPE" = xyes; then
59244    # Include file found, let's continue the sanity check.
59245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59246$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59247
59248    # Reset to default value
59249    FREETYPE_BASE_NAME=freetype
59250    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59251    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59252      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59253          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59254        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59255        # for the .6 version explicitly.
59256        FREETYPE_BASE_NAME=freetype.6
59257        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59258        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59259$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59260      else
59261        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59262$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59263        FOUND_FREETYPE=no
59264      fi
59265    else
59266      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59267        # On Windows, we will need both .lib and .dll file.
59268        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59269          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59270$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59271          FOUND_FREETYPE=no
59272        fi
59273      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59274          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59275        # Found lib in isa dir, use that instead.
59276        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59277        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59278$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59279      fi
59280    fi
59281  fi
59282
59283  if test "x$FOUND_FREETYPE" = xyes; then
59284
59285  # Only process if variable expands to non-empty
59286
59287  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59289
59290  # Input might be given as Windows format, start by converting to
59291  # unix format.
59292  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59293  new_path=`$CYGPATH -u "$path"`
59294
59295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59298  # "foo.exe" is OK but "foo" is an error.
59299  #
59300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59301  # It is also a way to make sure we got the proper file name for the real test later on.
59302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59303  if test "x$test_shortpath" = x; then
59304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59305$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59306    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59307  fi
59308
59309  # Call helper function which possibly converts this using DOS-style short mode.
59310  # If so, the updated path is stored in $new_path.
59311
59312  input_path="$new_path"
59313  # Check if we need to convert this using DOS-style short mode. If the path
59314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59315  # take no chances and rewrite it.
59316  # Note: m4 eats our [], so we need to use [ and ] instead.
59317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59318  if test "x$has_forbidden_chars" != x; then
59319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59323      # Going to short mode and back again did indeed matter. Since short mode is
59324      # case insensitive, let's make it lowercase to improve readability.
59325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59326      # Now convert it back to Unix-style (cygpath)
59327      input_path=`$CYGPATH -u "$shortmode_path"`
59328      new_path="$input_path"
59329    fi
59330  fi
59331
59332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59333  if test "x$test_cygdrive_prefix" = x; then
59334    # As a simple fix, exclude /usr/bin since it's not a real path.
59335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59337      # a path prefixed by /cygdrive for fixpath to work.
59338      new_path="$CYGWIN_ROOT_PATH$input_path"
59339    fi
59340  fi
59341
59342
59343  if test "x$path" != "x$new_path"; then
59344    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59346$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59347  fi
59348
59349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59350
59351  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59352  has_colon=`$ECHO $path | $GREP ^.:`
59353  new_path="$path"
59354  if test "x$has_colon" = x; then
59355    # Not in mixed or Windows style, start by that.
59356    new_path=`cmd //c echo $path`
59357  fi
59358
59359
59360  input_path="$new_path"
59361  # Check if we need to convert this using DOS-style short mode. If the path
59362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59363  # take no chances and rewrite it.
59364  # Note: m4 eats our [], so we need to use [ and ] instead.
59365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59366  if test "x$has_forbidden_chars" != x; then
59367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59369  fi
59370
59371
59372  windows_path="$new_path"
59373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59374    unix_path=`$CYGPATH -u "$windows_path"`
59375    new_path="$unix_path"
59376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59378    new_path="$unix_path"
59379  fi
59380
59381  if test "x$path" != "x$new_path"; then
59382    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59384$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59385  fi
59386
59387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59389
59390    else
59391      # We're on a unix platform. Hooray! :)
59392      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59393      has_space=`$ECHO "$path" | $GREP " "`
59394      if test "x$has_space" != x; then
59395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59396$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59398      fi
59399
59400      # Use eval to expand a potential ~
59401      eval path="$path"
59402      if test ! -f "$path" && test ! -d "$path"; then
59403        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59404      fi
59405
59406      if test -d "$path"; then
59407        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59408      else
59409        dir="`$DIRNAME "$path"`"
59410        base="`$BASENAME "$path"`"
59411        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59412      fi
59413    fi
59414  fi
59415
59416
59417  # Only process if variable expands to non-empty
59418
59419  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59421
59422  # Input might be given as Windows format, start by converting to
59423  # unix format.
59424  path="$POTENTIAL_FREETYPE_LIB_PATH"
59425  new_path=`$CYGPATH -u "$path"`
59426
59427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59430  # "foo.exe" is OK but "foo" is an error.
59431  #
59432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59433  # It is also a way to make sure we got the proper file name for the real test later on.
59434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59435  if test "x$test_shortpath" = x; then
59436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59437$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59438    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59439  fi
59440
59441  # Call helper function which possibly converts this using DOS-style short mode.
59442  # If so, the updated path is stored in $new_path.
59443
59444  input_path="$new_path"
59445  # Check if we need to convert this using DOS-style short mode. If the path
59446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59447  # take no chances and rewrite it.
59448  # Note: m4 eats our [], so we need to use [ and ] instead.
59449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59450  if test "x$has_forbidden_chars" != x; then
59451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59455      # Going to short mode and back again did indeed matter. Since short mode is
59456      # case insensitive, let's make it lowercase to improve readability.
59457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59458      # Now convert it back to Unix-style (cygpath)
59459      input_path=`$CYGPATH -u "$shortmode_path"`
59460      new_path="$input_path"
59461    fi
59462  fi
59463
59464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59465  if test "x$test_cygdrive_prefix" = x; then
59466    # As a simple fix, exclude /usr/bin since it's not a real path.
59467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59469      # a path prefixed by /cygdrive for fixpath to work.
59470      new_path="$CYGWIN_ROOT_PATH$input_path"
59471    fi
59472  fi
59473
59474
59475  if test "x$path" != "x$new_path"; then
59476    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59478$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59479  fi
59480
59481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59482
59483  path="$POTENTIAL_FREETYPE_LIB_PATH"
59484  has_colon=`$ECHO $path | $GREP ^.:`
59485  new_path="$path"
59486  if test "x$has_colon" = x; then
59487    # Not in mixed or Windows style, start by that.
59488    new_path=`cmd //c echo $path`
59489  fi
59490
59491
59492  input_path="$new_path"
59493  # Check if we need to convert this using DOS-style short mode. If the path
59494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59495  # take no chances and rewrite it.
59496  # Note: m4 eats our [], so we need to use [ and ] instead.
59497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59498  if test "x$has_forbidden_chars" != x; then
59499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59501  fi
59502
59503
59504  windows_path="$new_path"
59505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59506    unix_path=`$CYGPATH -u "$windows_path"`
59507    new_path="$unix_path"
59508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59510    new_path="$unix_path"
59511  fi
59512
59513  if test "x$path" != "x$new_path"; then
59514    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59516$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59517  fi
59518
59519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59521
59522    else
59523      # We're on a unix platform. Hooray! :)
59524      path="$POTENTIAL_FREETYPE_LIB_PATH"
59525      has_space=`$ECHO "$path" | $GREP " "`
59526      if test "x$has_space" != x; then
59527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59528$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59530      fi
59531
59532      # Use eval to expand a potential ~
59533      eval path="$path"
59534      if test ! -f "$path" && test ! -d "$path"; then
59535        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59536      fi
59537
59538      if test -d "$path"; then
59539        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59540      else
59541        dir="`$DIRNAME "$path"`"
59542        base="`$BASENAME "$path"`"
59543        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59544      fi
59545    fi
59546  fi
59547
59548
59549    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59550    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59551$as_echo_n "checking for freetype includes... " >&6; }
59552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59553$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59554    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59556$as_echo_n "checking for freetype libraries... " >&6; }
59557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59558$as_echo "$FREETYPE_LIB_PATH" >&6; }
59559  fi
59560
59561          if test "x$FOUND_FREETYPE" != xyes; then
59562            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59563
59564  windows_path="$FREETYPE_BASE_DIR"
59565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59566    unix_path=`$CYGPATH -u "$windows_path"`
59567    FREETYPE_BASE_DIR="$unix_path"
59568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59570    FREETYPE_BASE_DIR="$unix_path"
59571  fi
59572
59573
59574  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59575  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59576  METHOD="well-known location"
59577
59578  # Let's start with an optimistic view of the world :-)
59579  FOUND_FREETYPE=yes
59580
59581  # First look for the canonical freetype main include file ft2build.h.
59582  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59583    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59584    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59585    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59586      # Fail.
59587      FOUND_FREETYPE=no
59588    fi
59589  fi
59590
59591  if test "x$FOUND_FREETYPE" = xyes; then
59592    # Include file found, let's continue the sanity check.
59593    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59594$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59595
59596    # Reset to default value
59597    FREETYPE_BASE_NAME=freetype
59598    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59599    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59600      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59601          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59602        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59603        # for the .6 version explicitly.
59604        FREETYPE_BASE_NAME=freetype.6
59605        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59606        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59607$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59608      else
59609        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59610$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59611        FOUND_FREETYPE=no
59612      fi
59613    else
59614      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59615        # On Windows, we will need both .lib and .dll file.
59616        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59617          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59618$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59619          FOUND_FREETYPE=no
59620        fi
59621      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59622          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59623        # Found lib in isa dir, use that instead.
59624        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59625        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59626$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59627      fi
59628    fi
59629  fi
59630
59631  if test "x$FOUND_FREETYPE" = xyes; then
59632
59633  # Only process if variable expands to non-empty
59634
59635  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59636    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59637
59638  # Input might be given as Windows format, start by converting to
59639  # unix format.
59640  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59641  new_path=`$CYGPATH -u "$path"`
59642
59643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59646  # "foo.exe" is OK but "foo" is an error.
59647  #
59648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59649  # It is also a way to make sure we got the proper file name for the real test later on.
59650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59651  if test "x$test_shortpath" = x; then
59652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59653$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59654    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59655  fi
59656
59657  # Call helper function which possibly converts this using DOS-style short mode.
59658  # If so, the updated path is stored in $new_path.
59659
59660  input_path="$new_path"
59661  # Check if we need to convert this using DOS-style short mode. If the path
59662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59663  # take no chances and rewrite it.
59664  # Note: m4 eats our [], so we need to use [ and ] instead.
59665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59666  if test "x$has_forbidden_chars" != x; then
59667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59671      # Going to short mode and back again did indeed matter. Since short mode is
59672      # case insensitive, let's make it lowercase to improve readability.
59673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59674      # Now convert it back to Unix-style (cygpath)
59675      input_path=`$CYGPATH -u "$shortmode_path"`
59676      new_path="$input_path"
59677    fi
59678  fi
59679
59680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59681  if test "x$test_cygdrive_prefix" = x; then
59682    # As a simple fix, exclude /usr/bin since it's not a real path.
59683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59685      # a path prefixed by /cygdrive for fixpath to work.
59686      new_path="$CYGWIN_ROOT_PATH$input_path"
59687    fi
59688  fi
59689
59690
59691  if test "x$path" != "x$new_path"; then
59692    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59694$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59695  fi
59696
59697    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59698
59699  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59700  has_colon=`$ECHO $path | $GREP ^.:`
59701  new_path="$path"
59702  if test "x$has_colon" = x; then
59703    # Not in mixed or Windows style, start by that.
59704    new_path=`cmd //c echo $path`
59705  fi
59706
59707
59708  input_path="$new_path"
59709  # Check if we need to convert this using DOS-style short mode. If the path
59710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59711  # take no chances and rewrite it.
59712  # Note: m4 eats our [], so we need to use [ and ] instead.
59713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59714  if test "x$has_forbidden_chars" != x; then
59715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59717  fi
59718
59719
59720  windows_path="$new_path"
59721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59722    unix_path=`$CYGPATH -u "$windows_path"`
59723    new_path="$unix_path"
59724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59726    new_path="$unix_path"
59727  fi
59728
59729  if test "x$path" != "x$new_path"; then
59730    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59732$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59733  fi
59734
59735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59737
59738    else
59739      # We're on a unix platform. Hooray! :)
59740      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59741      has_space=`$ECHO "$path" | $GREP " "`
59742      if test "x$has_space" != x; then
59743        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59744$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59745        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59746      fi
59747
59748      # Use eval to expand a potential ~
59749      eval path="$path"
59750      if test ! -f "$path" && test ! -d "$path"; then
59751        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59752      fi
59753
59754      if test -d "$path"; then
59755        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59756      else
59757        dir="`$DIRNAME "$path"`"
59758        base="`$BASENAME "$path"`"
59759        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59760      fi
59761    fi
59762  fi
59763
59764
59765  # Only process if variable expands to non-empty
59766
59767  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59768    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59769
59770  # Input might be given as Windows format, start by converting to
59771  # unix format.
59772  path="$POTENTIAL_FREETYPE_LIB_PATH"
59773  new_path=`$CYGPATH -u "$path"`
59774
59775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59778  # "foo.exe" is OK but "foo" is an error.
59779  #
59780  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59781  # It is also a way to make sure we got the proper file name for the real test later on.
59782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59783  if test "x$test_shortpath" = x; then
59784    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59785$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59786    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59787  fi
59788
59789  # Call helper function which possibly converts this using DOS-style short mode.
59790  # If so, the updated path is stored in $new_path.
59791
59792  input_path="$new_path"
59793  # Check if we need to convert this using DOS-style short mode. If the path
59794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59795  # take no chances and rewrite it.
59796  # Note: m4 eats our [], so we need to use [ and ] instead.
59797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59798  if test "x$has_forbidden_chars" != x; then
59799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59800    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59801    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59802    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59803      # Going to short mode and back again did indeed matter. Since short mode is
59804      # case insensitive, let's make it lowercase to improve readability.
59805      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59806      # Now convert it back to Unix-style (cygpath)
59807      input_path=`$CYGPATH -u "$shortmode_path"`
59808      new_path="$input_path"
59809    fi
59810  fi
59811
59812  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59813  if test "x$test_cygdrive_prefix" = x; then
59814    # As a simple fix, exclude /usr/bin since it's not a real path.
59815    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59816      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59817      # a path prefixed by /cygdrive for fixpath to work.
59818      new_path="$CYGWIN_ROOT_PATH$input_path"
59819    fi
59820  fi
59821
59822
59823  if test "x$path" != "x$new_path"; then
59824    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59826$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59827  fi
59828
59829    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59830
59831  path="$POTENTIAL_FREETYPE_LIB_PATH"
59832  has_colon=`$ECHO $path | $GREP ^.:`
59833  new_path="$path"
59834  if test "x$has_colon" = x; then
59835    # Not in mixed or Windows style, start by that.
59836    new_path=`cmd //c echo $path`
59837  fi
59838
59839
59840  input_path="$new_path"
59841  # Check if we need to convert this using DOS-style short mode. If the path
59842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59843  # take no chances and rewrite it.
59844  # Note: m4 eats our [], so we need to use [ and ] instead.
59845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59846  if test "x$has_forbidden_chars" != x; then
59847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59849  fi
59850
59851
59852  windows_path="$new_path"
59853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59854    unix_path=`$CYGPATH -u "$windows_path"`
59855    new_path="$unix_path"
59856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59858    new_path="$unix_path"
59859  fi
59860
59861  if test "x$path" != "x$new_path"; then
59862    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59864$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59865  fi
59866
59867  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59868  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59869
59870    else
59871      # We're on a unix platform. Hooray! :)
59872      path="$POTENTIAL_FREETYPE_LIB_PATH"
59873      has_space=`$ECHO "$path" | $GREP " "`
59874      if test "x$has_space" != x; then
59875        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59876$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59877        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59878      fi
59879
59880      # Use eval to expand a potential ~
59881      eval path="$path"
59882      if test ! -f "$path" && test ! -d "$path"; then
59883        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59884      fi
59885
59886      if test -d "$path"; then
59887        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59888      else
59889        dir="`$DIRNAME "$path"`"
59890        base="`$BASENAME "$path"`"
59891        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59892      fi
59893    fi
59894  fi
59895
59896
59897    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59899$as_echo_n "checking for freetype includes... " >&6; }
59900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59901$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59902    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59904$as_echo_n "checking for freetype libraries... " >&6; }
59905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59906$as_echo "$FREETYPE_LIB_PATH" >&6; }
59907  fi
59908
59909          fi
59910          if test "x$FOUND_FREETYPE" != xyes; then
59911            FREETYPE_BASE_DIR="$HOME/freetype"
59912
59913  windows_path="$FREETYPE_BASE_DIR"
59914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59915    unix_path=`$CYGPATH -u "$windows_path"`
59916    FREETYPE_BASE_DIR="$unix_path"
59917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59919    FREETYPE_BASE_DIR="$unix_path"
59920  fi
59921
59922            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59923
59924  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59925  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59926  METHOD="well-known location"
59927
59928  # Let's start with an optimistic view of the world :-)
59929  FOUND_FREETYPE=yes
59930
59931  # First look for the canonical freetype main include file ft2build.h.
59932  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59933    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59934    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59935    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59936      # Fail.
59937      FOUND_FREETYPE=no
59938    fi
59939  fi
59940
59941  if test "x$FOUND_FREETYPE" = xyes; then
59942    # Include file found, let's continue the sanity check.
59943    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59944$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59945
59946    # Reset to default value
59947    FREETYPE_BASE_NAME=freetype
59948    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59949    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59950      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59951          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59952        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59953        # for the .6 version explicitly.
59954        FREETYPE_BASE_NAME=freetype.6
59955        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59956        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59957$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59958      else
59959        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59960$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59961        FOUND_FREETYPE=no
59962      fi
59963    else
59964      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59965        # On Windows, we will need both .lib and .dll file.
59966        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59967          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59968$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59969          FOUND_FREETYPE=no
59970        fi
59971      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59972          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59973        # Found lib in isa dir, use that instead.
59974        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59975        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59976$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59977      fi
59978    fi
59979  fi
59980
59981  if test "x$FOUND_FREETYPE" = xyes; then
59982
59983  # Only process if variable expands to non-empty
59984
59985  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59987
59988  # Input might be given as Windows format, start by converting to
59989  # unix format.
59990  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59991  new_path=`$CYGPATH -u "$path"`
59992
59993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59996  # "foo.exe" is OK but "foo" is an error.
59997  #
59998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59999  # It is also a way to make sure we got the proper file name for the real test later on.
60000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60001  if test "x$test_shortpath" = x; then
60002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60003$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60004    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60005  fi
60006
60007  # Call helper function which possibly converts this using DOS-style short mode.
60008  # If so, the updated path is stored in $new_path.
60009
60010  input_path="$new_path"
60011  # Check if we need to convert this using DOS-style short mode. If the path
60012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60013  # take no chances and rewrite it.
60014  # Note: m4 eats our [], so we need to use [ and ] instead.
60015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60016  if test "x$has_forbidden_chars" != x; then
60017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60021      # Going to short mode and back again did indeed matter. Since short mode is
60022      # case insensitive, let's make it lowercase to improve readability.
60023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60024      # Now convert it back to Unix-style (cygpath)
60025      input_path=`$CYGPATH -u "$shortmode_path"`
60026      new_path="$input_path"
60027    fi
60028  fi
60029
60030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60031  if test "x$test_cygdrive_prefix" = x; then
60032    # As a simple fix, exclude /usr/bin since it's not a real path.
60033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60035      # a path prefixed by /cygdrive for fixpath to work.
60036      new_path="$CYGWIN_ROOT_PATH$input_path"
60037    fi
60038  fi
60039
60040
60041  if test "x$path" != "x$new_path"; then
60042    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60044$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60045  fi
60046
60047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60048
60049  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60050  has_colon=`$ECHO $path | $GREP ^.:`
60051  new_path="$path"
60052  if test "x$has_colon" = x; then
60053    # Not in mixed or Windows style, start by that.
60054    new_path=`cmd //c echo $path`
60055  fi
60056
60057
60058  input_path="$new_path"
60059  # Check if we need to convert this using DOS-style short mode. If the path
60060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60061  # take no chances and rewrite it.
60062  # Note: m4 eats our [], so we need to use [ and ] instead.
60063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60064  if test "x$has_forbidden_chars" != x; then
60065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60067  fi
60068
60069
60070  windows_path="$new_path"
60071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60072    unix_path=`$CYGPATH -u "$windows_path"`
60073    new_path="$unix_path"
60074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60076    new_path="$unix_path"
60077  fi
60078
60079  if test "x$path" != "x$new_path"; then
60080    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60082$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60083  fi
60084
60085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60087
60088    else
60089      # We're on a unix platform. Hooray! :)
60090      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60091      has_space=`$ECHO "$path" | $GREP " "`
60092      if test "x$has_space" != x; then
60093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60094$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60095        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60096      fi
60097
60098      # Use eval to expand a potential ~
60099      eval path="$path"
60100      if test ! -f "$path" && test ! -d "$path"; then
60101        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60102      fi
60103
60104      if test -d "$path"; then
60105        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60106      else
60107        dir="`$DIRNAME "$path"`"
60108        base="`$BASENAME "$path"`"
60109        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60110      fi
60111    fi
60112  fi
60113
60114
60115  # Only process if variable expands to non-empty
60116
60117  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60119
60120  # Input might be given as Windows format, start by converting to
60121  # unix format.
60122  path="$POTENTIAL_FREETYPE_LIB_PATH"
60123  new_path=`$CYGPATH -u "$path"`
60124
60125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60128  # "foo.exe" is OK but "foo" is an error.
60129  #
60130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60131  # It is also a way to make sure we got the proper file name for the real test later on.
60132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60133  if test "x$test_shortpath" = x; then
60134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60135$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60136    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60137  fi
60138
60139  # Call helper function which possibly converts this using DOS-style short mode.
60140  # If so, the updated path is stored in $new_path.
60141
60142  input_path="$new_path"
60143  # Check if we need to convert this using DOS-style short mode. If the path
60144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60145  # take no chances and rewrite it.
60146  # Note: m4 eats our [], so we need to use [ and ] instead.
60147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60148  if test "x$has_forbidden_chars" != x; then
60149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60153      # Going to short mode and back again did indeed matter. Since short mode is
60154      # case insensitive, let's make it lowercase to improve readability.
60155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60156      # Now convert it back to Unix-style (cygpath)
60157      input_path=`$CYGPATH -u "$shortmode_path"`
60158      new_path="$input_path"
60159    fi
60160  fi
60161
60162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60163  if test "x$test_cygdrive_prefix" = x; then
60164    # As a simple fix, exclude /usr/bin since it's not a real path.
60165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60167      # a path prefixed by /cygdrive for fixpath to work.
60168      new_path="$CYGWIN_ROOT_PATH$input_path"
60169    fi
60170  fi
60171
60172
60173  if test "x$path" != "x$new_path"; then
60174    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60176$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60177  fi
60178
60179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60180
60181  path="$POTENTIAL_FREETYPE_LIB_PATH"
60182  has_colon=`$ECHO $path | $GREP ^.:`
60183  new_path="$path"
60184  if test "x$has_colon" = x; then
60185    # Not in mixed or Windows style, start by that.
60186    new_path=`cmd //c echo $path`
60187  fi
60188
60189
60190  input_path="$new_path"
60191  # Check if we need to convert this using DOS-style short mode. If the path
60192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60193  # take no chances and rewrite it.
60194  # Note: m4 eats our [], so we need to use [ and ] instead.
60195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60196  if test "x$has_forbidden_chars" != x; then
60197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60199  fi
60200
60201
60202  windows_path="$new_path"
60203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60204    unix_path=`$CYGPATH -u "$windows_path"`
60205    new_path="$unix_path"
60206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60208    new_path="$unix_path"
60209  fi
60210
60211  if test "x$path" != "x$new_path"; then
60212    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60214$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60215  fi
60216
60217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60219
60220    else
60221      # We're on a unix platform. Hooray! :)
60222      path="$POTENTIAL_FREETYPE_LIB_PATH"
60223      has_space=`$ECHO "$path" | $GREP " "`
60224      if test "x$has_space" != x; then
60225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60226$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60227        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60228      fi
60229
60230      # Use eval to expand a potential ~
60231      eval path="$path"
60232      if test ! -f "$path" && test ! -d "$path"; then
60233        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60234      fi
60235
60236      if test -d "$path"; then
60237        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60238      else
60239        dir="`$DIRNAME "$path"`"
60240        base="`$BASENAME "$path"`"
60241        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60242      fi
60243    fi
60244  fi
60245
60246
60247    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60249$as_echo_n "checking for freetype includes... " >&6; }
60250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60251$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60252    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60254$as_echo_n "checking for freetype libraries... " >&6; }
60255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60256$as_echo "$FREETYPE_LIB_PATH" >&6; }
60257  fi
60258
60259            else
60260
60261  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60262  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60263  METHOD="well-known location"
60264
60265  # Let's start with an optimistic view of the world :-)
60266  FOUND_FREETYPE=yes
60267
60268  # First look for the canonical freetype main include file ft2build.h.
60269  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60270    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60271    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60272    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60273      # Fail.
60274      FOUND_FREETYPE=no
60275    fi
60276  fi
60277
60278  if test "x$FOUND_FREETYPE" = xyes; then
60279    # Include file found, let's continue the sanity check.
60280    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60281$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60282
60283    # Reset to default value
60284    FREETYPE_BASE_NAME=freetype
60285    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60286    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60287      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60288          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60289        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60290        # for the .6 version explicitly.
60291        FREETYPE_BASE_NAME=freetype.6
60292        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60293        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60294$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60295      else
60296        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60297$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60298        FOUND_FREETYPE=no
60299      fi
60300    else
60301      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60302        # On Windows, we will need both .lib and .dll file.
60303        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60304          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60305$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60306          FOUND_FREETYPE=no
60307        fi
60308      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60309          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60310        # Found lib in isa dir, use that instead.
60311        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60312        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60313$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60314      fi
60315    fi
60316  fi
60317
60318  if test "x$FOUND_FREETYPE" = xyes; then
60319
60320  # Only process if variable expands to non-empty
60321
60322  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60324
60325  # Input might be given as Windows format, start by converting to
60326  # unix format.
60327  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60328  new_path=`$CYGPATH -u "$path"`
60329
60330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60333  # "foo.exe" is OK but "foo" is an error.
60334  #
60335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60336  # It is also a way to make sure we got the proper file name for the real test later on.
60337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60338  if test "x$test_shortpath" = x; then
60339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60340$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60341    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60342  fi
60343
60344  # Call helper function which possibly converts this using DOS-style short mode.
60345  # If so, the updated path is stored in $new_path.
60346
60347  input_path="$new_path"
60348  # Check if we need to convert this using DOS-style short mode. If the path
60349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60350  # take no chances and rewrite it.
60351  # Note: m4 eats our [], so we need to use [ and ] instead.
60352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60353  if test "x$has_forbidden_chars" != x; then
60354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60358      # Going to short mode and back again did indeed matter. Since short mode is
60359      # case insensitive, let's make it lowercase to improve readability.
60360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60361      # Now convert it back to Unix-style (cygpath)
60362      input_path=`$CYGPATH -u "$shortmode_path"`
60363      new_path="$input_path"
60364    fi
60365  fi
60366
60367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60368  if test "x$test_cygdrive_prefix" = x; then
60369    # As a simple fix, exclude /usr/bin since it's not a real path.
60370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60372      # a path prefixed by /cygdrive for fixpath to work.
60373      new_path="$CYGWIN_ROOT_PATH$input_path"
60374    fi
60375  fi
60376
60377
60378  if test "x$path" != "x$new_path"; then
60379    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60382  fi
60383
60384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60385
60386  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60387  has_colon=`$ECHO $path | $GREP ^.:`
60388  new_path="$path"
60389  if test "x$has_colon" = x; then
60390    # Not in mixed or Windows style, start by that.
60391    new_path=`cmd //c echo $path`
60392  fi
60393
60394
60395  input_path="$new_path"
60396  # Check if we need to convert this using DOS-style short mode. If the path
60397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60398  # take no chances and rewrite it.
60399  # Note: m4 eats our [], so we need to use [ and ] instead.
60400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60401  if test "x$has_forbidden_chars" != x; then
60402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60404  fi
60405
60406
60407  windows_path="$new_path"
60408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60409    unix_path=`$CYGPATH -u "$windows_path"`
60410    new_path="$unix_path"
60411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60413    new_path="$unix_path"
60414  fi
60415
60416  if test "x$path" != "x$new_path"; then
60417    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60419$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60420  fi
60421
60422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60424
60425    else
60426      # We're on a unix platform. Hooray! :)
60427      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60428      has_space=`$ECHO "$path" | $GREP " "`
60429      if test "x$has_space" != x; then
60430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60433      fi
60434
60435      # Use eval to expand a potential ~
60436      eval path="$path"
60437      if test ! -f "$path" && test ! -d "$path"; then
60438        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60439      fi
60440
60441      if test -d "$path"; then
60442        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60443      else
60444        dir="`$DIRNAME "$path"`"
60445        base="`$BASENAME "$path"`"
60446        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60447      fi
60448    fi
60449  fi
60450
60451
60452  # Only process if variable expands to non-empty
60453
60454  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60456
60457  # Input might be given as Windows format, start by converting to
60458  # unix format.
60459  path="$POTENTIAL_FREETYPE_LIB_PATH"
60460  new_path=`$CYGPATH -u "$path"`
60461
60462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60465  # "foo.exe" is OK but "foo" is an error.
60466  #
60467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60468  # It is also a way to make sure we got the proper file name for the real test later on.
60469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60470  if test "x$test_shortpath" = x; then
60471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60472$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60473    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60474  fi
60475
60476  # Call helper function which possibly converts this using DOS-style short mode.
60477  # If so, the updated path is stored in $new_path.
60478
60479  input_path="$new_path"
60480  # Check if we need to convert this using DOS-style short mode. If the path
60481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60482  # take no chances and rewrite it.
60483  # Note: m4 eats our [], so we need to use [ and ] instead.
60484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60485  if test "x$has_forbidden_chars" != x; then
60486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60490      # Going to short mode and back again did indeed matter. Since short mode is
60491      # case insensitive, let's make it lowercase to improve readability.
60492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60493      # Now convert it back to Unix-style (cygpath)
60494      input_path=`$CYGPATH -u "$shortmode_path"`
60495      new_path="$input_path"
60496    fi
60497  fi
60498
60499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60500  if test "x$test_cygdrive_prefix" = x; then
60501    # As a simple fix, exclude /usr/bin since it's not a real path.
60502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60504      # a path prefixed by /cygdrive for fixpath to work.
60505      new_path="$CYGWIN_ROOT_PATH$input_path"
60506    fi
60507  fi
60508
60509
60510  if test "x$path" != "x$new_path"; then
60511    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60514  fi
60515
60516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60517
60518  path="$POTENTIAL_FREETYPE_LIB_PATH"
60519  has_colon=`$ECHO $path | $GREP ^.:`
60520  new_path="$path"
60521  if test "x$has_colon" = x; then
60522    # Not in mixed or Windows style, start by that.
60523    new_path=`cmd //c echo $path`
60524  fi
60525
60526
60527  input_path="$new_path"
60528  # Check if we need to convert this using DOS-style short mode. If the path
60529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60530  # take no chances and rewrite it.
60531  # Note: m4 eats our [], so we need to use [ and ] instead.
60532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60533  if test "x$has_forbidden_chars" != x; then
60534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60536  fi
60537
60538
60539  windows_path="$new_path"
60540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60541    unix_path=`$CYGPATH -u "$windows_path"`
60542    new_path="$unix_path"
60543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60545    new_path="$unix_path"
60546  fi
60547
60548  if test "x$path" != "x$new_path"; then
60549    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60552  fi
60553
60554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60556
60557    else
60558      # We're on a unix platform. Hooray! :)
60559      path="$POTENTIAL_FREETYPE_LIB_PATH"
60560      has_space=`$ECHO "$path" | $GREP " "`
60561      if test "x$has_space" != x; then
60562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60563$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60565      fi
60566
60567      # Use eval to expand a potential ~
60568      eval path="$path"
60569      if test ! -f "$path" && test ! -d "$path"; then
60570        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60571      fi
60572
60573      if test -d "$path"; then
60574        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60575      else
60576        dir="`$DIRNAME "$path"`"
60577        base="`$BASENAME "$path"`"
60578        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60579      fi
60580    fi
60581  fi
60582
60583
60584    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60586$as_echo_n "checking for freetype includes... " >&6; }
60587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60588$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60589    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60591$as_echo_n "checking for freetype libraries... " >&6; }
60592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60593$as_echo "$FREETYPE_LIB_PATH" >&6; }
60594  fi
60595
60596            fi
60597            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60598                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60599              # Source is available, as a last resort try to build freetype in default location
60600
60601  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60602  BUILD_FREETYPE=yes
60603
60604  # Check if the freetype sources are acessible..
60605  if ! test -d $FREETYPE_SRC_PATH; then
60606    { $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
60607$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60608    BUILD_FREETYPE=no
60609  fi
60610  # ..and contain a vc2010 project file
60611  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60612  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60613    { $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
60614$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60615    BUILD_FREETYPE=no
60616  fi
60617  # Now check if configure found a version of 'msbuild.exe'
60618  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60619    { $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
60620$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;}
60621    BUILD_FREETYPE=no
60622  fi
60623
60624  # Ready to go..
60625  if test "x$BUILD_FREETYPE" = xyes; then
60626    # msbuild requires trailing slashes for output directories
60627    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60628    freetype_lib_path_unix="$freetype_lib_path"
60629    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60630
60631  unix_path="$vcxproj_path"
60632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60633    windows_path=`$CYGPATH -m "$unix_path"`
60634    vcxproj_path="$windows_path"
60635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60636    windows_path=`cmd //c echo $unix_path`
60637    vcxproj_path="$windows_path"
60638  fi
60639
60640
60641  unix_path="$freetype_lib_path"
60642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60643    windows_path=`$CYGPATH -m "$unix_path"`
60644    freetype_lib_path="$windows_path"
60645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60646    windows_path=`cmd //c echo $unix_path`
60647    freetype_lib_path="$windows_path"
60648  fi
60649
60650
60651  unix_path="$freetype_obj_path"
60652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60653    windows_path=`$CYGPATH -m "$unix_path"`
60654    freetype_obj_path="$windows_path"
60655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60656    windows_path=`cmd //c echo $unix_path`
60657    freetype_obj_path="$windows_path"
60658  fi
60659
60660    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60661      freetype_platform=x64
60662    else
60663      freetype_platform=win32
60664    fi
60665
60666    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60667    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60668    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60669    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60670    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60671$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60672
60673    # First we try to build the freetype.dll
60674    $ECHO -e "@echo off\n"\
60675        "$MSBUILD $vcxproj_path "\
60676        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60677        "/p:Configuration=\"Release Multithreaded\" "\
60678        "/p:Platform=$freetype_platform "\
60679        "/p:ConfigurationType=DynamicLibrary "\
60680        "/p:TargetName=freetype "\
60681        "/p:OutDir=\"$freetype_lib_path\" "\
60682        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60683    cmd /c freetype.bat
60684
60685    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60686      # If that succeeds we also build freetype.lib
60687      $ECHO -e "@echo off\n"\
60688          "$MSBUILD $vcxproj_path "\
60689          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60690          "/p:Configuration=\"Release Multithreaded\" "\
60691          "/p:Platform=$freetype_platform "\
60692          "/p:ConfigurationType=StaticLibrary "\
60693          "/p:TargetName=freetype "\
60694          "/p:OutDir=\"$freetype_lib_path\" "\
60695          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60696      cmd /c freetype.bat
60697
60698      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60699        # Once we build both, lib and dll, set freetype lib and include path appropriately
60700        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60701        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60702        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60703$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60704      else
60705        BUILD_FREETYPE=no
60706      fi
60707    else
60708      BUILD_FREETYPE=no
60709    fi
60710  fi
60711
60712              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60713
60714  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60715  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60716  METHOD="well-known location"
60717
60718  # Let's start with an optimistic view of the world :-)
60719  FOUND_FREETYPE=yes
60720
60721  # First look for the canonical freetype main include file ft2build.h.
60722  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60723    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60724    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60725    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60726      # Fail.
60727      FOUND_FREETYPE=no
60728    fi
60729  fi
60730
60731  if test "x$FOUND_FREETYPE" = xyes; then
60732    # Include file found, let's continue the sanity check.
60733    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60734$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60735
60736    # Reset to default value
60737    FREETYPE_BASE_NAME=freetype
60738    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60739    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60740      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60741          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60742        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60743        # for the .6 version explicitly.
60744        FREETYPE_BASE_NAME=freetype.6
60745        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60746        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60747$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60748      else
60749        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60750$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60751        FOUND_FREETYPE=no
60752      fi
60753    else
60754      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60755        # On Windows, we will need both .lib and .dll file.
60756        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60757          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60758$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60759          FOUND_FREETYPE=no
60760        fi
60761      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60762          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60763        # Found lib in isa dir, use that instead.
60764        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60765        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60766$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60767      fi
60768    fi
60769  fi
60770
60771  if test "x$FOUND_FREETYPE" = xyes; then
60772
60773  # Only process if variable expands to non-empty
60774
60775  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60777
60778  # Input might be given as Windows format, start by converting to
60779  # unix format.
60780  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60781  new_path=`$CYGPATH -u "$path"`
60782
60783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60786  # "foo.exe" is OK but "foo" is an error.
60787  #
60788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60789  # It is also a way to make sure we got the proper file name for the real test later on.
60790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60791  if test "x$test_shortpath" = x; then
60792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60793$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60794    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60795  fi
60796
60797  # Call helper function which possibly converts this using DOS-style short mode.
60798  # If so, the updated path is stored in $new_path.
60799
60800  input_path="$new_path"
60801  # Check if we need to convert this using DOS-style short mode. If the path
60802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60803  # take no chances and rewrite it.
60804  # Note: m4 eats our [], so we need to use [ and ] instead.
60805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60806  if test "x$has_forbidden_chars" != x; then
60807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60811      # Going to short mode and back again did indeed matter. Since short mode is
60812      # case insensitive, let's make it lowercase to improve readability.
60813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60814      # Now convert it back to Unix-style (cygpath)
60815      input_path=`$CYGPATH -u "$shortmode_path"`
60816      new_path="$input_path"
60817    fi
60818  fi
60819
60820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60821  if test "x$test_cygdrive_prefix" = x; then
60822    # As a simple fix, exclude /usr/bin since it's not a real path.
60823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60825      # a path prefixed by /cygdrive for fixpath to work.
60826      new_path="$CYGWIN_ROOT_PATH$input_path"
60827    fi
60828  fi
60829
60830
60831  if test "x$path" != "x$new_path"; then
60832    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60834$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60835  fi
60836
60837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60838
60839  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60840  has_colon=`$ECHO $path | $GREP ^.:`
60841  new_path="$path"
60842  if test "x$has_colon" = x; then
60843    # Not in mixed or Windows style, start by that.
60844    new_path=`cmd //c echo $path`
60845  fi
60846
60847
60848  input_path="$new_path"
60849  # Check if we need to convert this using DOS-style short mode. If the path
60850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60851  # take no chances and rewrite it.
60852  # Note: m4 eats our [], so we need to use [ and ] instead.
60853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60854  if test "x$has_forbidden_chars" != x; then
60855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60857  fi
60858
60859
60860  windows_path="$new_path"
60861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60862    unix_path=`$CYGPATH -u "$windows_path"`
60863    new_path="$unix_path"
60864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60866    new_path="$unix_path"
60867  fi
60868
60869  if test "x$path" != "x$new_path"; then
60870    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60873  fi
60874
60875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60877
60878    else
60879      # We're on a unix platform. Hooray! :)
60880      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60881      has_space=`$ECHO "$path" | $GREP " "`
60882      if test "x$has_space" != x; then
60883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60886      fi
60887
60888      # Use eval to expand a potential ~
60889      eval path="$path"
60890      if test ! -f "$path" && test ! -d "$path"; then
60891        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60892      fi
60893
60894      if test -d "$path"; then
60895        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60896      else
60897        dir="`$DIRNAME "$path"`"
60898        base="`$BASENAME "$path"`"
60899        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60900      fi
60901    fi
60902  fi
60903
60904
60905  # Only process if variable expands to non-empty
60906
60907  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60908    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60909
60910  # Input might be given as Windows format, start by converting to
60911  # unix format.
60912  path="$POTENTIAL_FREETYPE_LIB_PATH"
60913  new_path=`$CYGPATH -u "$path"`
60914
60915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60918  # "foo.exe" is OK but "foo" is an error.
60919  #
60920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60921  # It is also a way to make sure we got the proper file name for the real test later on.
60922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60923  if test "x$test_shortpath" = x; then
60924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60925$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60926    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60927  fi
60928
60929  # Call helper function which possibly converts this using DOS-style short mode.
60930  # If so, the updated path is stored in $new_path.
60931
60932  input_path="$new_path"
60933  # Check if we need to convert this using DOS-style short mode. If the path
60934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60935  # take no chances and rewrite it.
60936  # Note: m4 eats our [], so we need to use [ and ] instead.
60937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60938  if test "x$has_forbidden_chars" != x; then
60939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60943      # Going to short mode and back again did indeed matter. Since short mode is
60944      # case insensitive, let's make it lowercase to improve readability.
60945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60946      # Now convert it back to Unix-style (cygpath)
60947      input_path=`$CYGPATH -u "$shortmode_path"`
60948      new_path="$input_path"
60949    fi
60950  fi
60951
60952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60953  if test "x$test_cygdrive_prefix" = x; then
60954    # As a simple fix, exclude /usr/bin since it's not a real path.
60955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60957      # a path prefixed by /cygdrive for fixpath to work.
60958      new_path="$CYGWIN_ROOT_PATH$input_path"
60959    fi
60960  fi
60961
60962
60963  if test "x$path" != "x$new_path"; then
60964    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60966$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60967  fi
60968
60969    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60970
60971  path="$POTENTIAL_FREETYPE_LIB_PATH"
60972  has_colon=`$ECHO $path | $GREP ^.:`
60973  new_path="$path"
60974  if test "x$has_colon" = x; then
60975    # Not in mixed or Windows style, start by that.
60976    new_path=`cmd //c echo $path`
60977  fi
60978
60979
60980  input_path="$new_path"
60981  # Check if we need to convert this using DOS-style short mode. If the path
60982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60983  # take no chances and rewrite it.
60984  # Note: m4 eats our [], so we need to use [ and ] instead.
60985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60986  if test "x$has_forbidden_chars" != x; then
60987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60989  fi
60990
60991
60992  windows_path="$new_path"
60993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60994    unix_path=`$CYGPATH -u "$windows_path"`
60995    new_path="$unix_path"
60996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60998    new_path="$unix_path"
60999  fi
61000
61001  if test "x$path" != "x$new_path"; then
61002    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61004$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61005  fi
61006
61007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61009
61010    else
61011      # We're on a unix platform. Hooray! :)
61012      path="$POTENTIAL_FREETYPE_LIB_PATH"
61013      has_space=`$ECHO "$path" | $GREP " "`
61014      if test "x$has_space" != x; then
61015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61016$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61017        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61018      fi
61019
61020      # Use eval to expand a potential ~
61021      eval path="$path"
61022      if test ! -f "$path" && test ! -d "$path"; then
61023        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61024      fi
61025
61026      if test -d "$path"; then
61027        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61028      else
61029        dir="`$DIRNAME "$path"`"
61030        base="`$BASENAME "$path"`"
61031        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61032      fi
61033    fi
61034  fi
61035
61036
61037    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61039$as_echo_n "checking for freetype includes... " >&6; }
61040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61041$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61042    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61044$as_echo_n "checking for freetype libraries... " >&6; }
61045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61046$as_echo "$FREETYPE_LIB_PATH" >&6; }
61047  fi
61048
61049              else
61050
61051  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61052  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61053  METHOD="well-known location"
61054
61055  # Let's start with an optimistic view of the world :-)
61056  FOUND_FREETYPE=yes
61057
61058  # First look for the canonical freetype main include file ft2build.h.
61059  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61060    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61061    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61062    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61063      # Fail.
61064      FOUND_FREETYPE=no
61065    fi
61066  fi
61067
61068  if test "x$FOUND_FREETYPE" = xyes; then
61069    # Include file found, let's continue the sanity check.
61070    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61071$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61072
61073    # Reset to default value
61074    FREETYPE_BASE_NAME=freetype
61075    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61076    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61077      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61078          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61079        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61080        # for the .6 version explicitly.
61081        FREETYPE_BASE_NAME=freetype.6
61082        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61083        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61084$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61085      else
61086        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61087$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61088        FOUND_FREETYPE=no
61089      fi
61090    else
61091      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61092        # On Windows, we will need both .lib and .dll file.
61093        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61094          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61095$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61096          FOUND_FREETYPE=no
61097        fi
61098      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61099          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61100        # Found lib in isa dir, use that instead.
61101        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61102        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61103$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61104      fi
61105    fi
61106  fi
61107
61108  if test "x$FOUND_FREETYPE" = xyes; then
61109
61110  # Only process if variable expands to non-empty
61111
61112  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61113    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61114
61115  # Input might be given as Windows format, start by converting to
61116  # unix format.
61117  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61118  new_path=`$CYGPATH -u "$path"`
61119
61120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61123  # "foo.exe" is OK but "foo" is an error.
61124  #
61125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61126  # It is also a way to make sure we got the proper file name for the real test later on.
61127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61128  if test "x$test_shortpath" = x; then
61129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61130$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61131    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61132  fi
61133
61134  # Call helper function which possibly converts this using DOS-style short mode.
61135  # If so, the updated path is stored in $new_path.
61136
61137  input_path="$new_path"
61138  # Check if we need to convert this using DOS-style short mode. If the path
61139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61140  # take no chances and rewrite it.
61141  # Note: m4 eats our [], so we need to use [ and ] instead.
61142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61143  if test "x$has_forbidden_chars" != x; then
61144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61148      # Going to short mode and back again did indeed matter. Since short mode is
61149      # case insensitive, let's make it lowercase to improve readability.
61150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61151      # Now convert it back to Unix-style (cygpath)
61152      input_path=`$CYGPATH -u "$shortmode_path"`
61153      new_path="$input_path"
61154    fi
61155  fi
61156
61157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61158  if test "x$test_cygdrive_prefix" = x; then
61159    # As a simple fix, exclude /usr/bin since it's not a real path.
61160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61162      # a path prefixed by /cygdrive for fixpath to work.
61163      new_path="$CYGWIN_ROOT_PATH$input_path"
61164    fi
61165  fi
61166
61167
61168  if test "x$path" != "x$new_path"; then
61169    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61171$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61172  fi
61173
61174    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61175
61176  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61177  has_colon=`$ECHO $path | $GREP ^.:`
61178  new_path="$path"
61179  if test "x$has_colon" = x; then
61180    # Not in mixed or Windows style, start by that.
61181    new_path=`cmd //c echo $path`
61182  fi
61183
61184
61185  input_path="$new_path"
61186  # Check if we need to convert this using DOS-style short mode. If the path
61187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61188  # take no chances and rewrite it.
61189  # Note: m4 eats our [], so we need to use [ and ] instead.
61190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61191  if test "x$has_forbidden_chars" != x; then
61192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61194  fi
61195
61196
61197  windows_path="$new_path"
61198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61199    unix_path=`$CYGPATH -u "$windows_path"`
61200    new_path="$unix_path"
61201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61203    new_path="$unix_path"
61204  fi
61205
61206  if test "x$path" != "x$new_path"; then
61207    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61209$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61210  fi
61211
61212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61214
61215    else
61216      # We're on a unix platform. Hooray! :)
61217      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61218      has_space=`$ECHO "$path" | $GREP " "`
61219      if test "x$has_space" != x; then
61220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61221$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61222        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61223      fi
61224
61225      # Use eval to expand a potential ~
61226      eval path="$path"
61227      if test ! -f "$path" && test ! -d "$path"; then
61228        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61229      fi
61230
61231      if test -d "$path"; then
61232        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61233      else
61234        dir="`$DIRNAME "$path"`"
61235        base="`$BASENAME "$path"`"
61236        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61237      fi
61238    fi
61239  fi
61240
61241
61242  # Only process if variable expands to non-empty
61243
61244  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61246
61247  # Input might be given as Windows format, start by converting to
61248  # unix format.
61249  path="$POTENTIAL_FREETYPE_LIB_PATH"
61250  new_path=`$CYGPATH -u "$path"`
61251
61252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61255  # "foo.exe" is OK but "foo" is an error.
61256  #
61257  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61258  # It is also a way to make sure we got the proper file name for the real test later on.
61259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61260  if test "x$test_shortpath" = x; then
61261    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61262$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61263    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61264  fi
61265
61266  # Call helper function which possibly converts this using DOS-style short mode.
61267  # If so, the updated path is stored in $new_path.
61268
61269  input_path="$new_path"
61270  # Check if we need to convert this using DOS-style short mode. If the path
61271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61272  # take no chances and rewrite it.
61273  # Note: m4 eats our [], so we need to use [ and ] instead.
61274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61275  if test "x$has_forbidden_chars" != x; then
61276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61280      # Going to short mode and back again did indeed matter. Since short mode is
61281      # case insensitive, let's make it lowercase to improve readability.
61282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61283      # Now convert it back to Unix-style (cygpath)
61284      input_path=`$CYGPATH -u "$shortmode_path"`
61285      new_path="$input_path"
61286    fi
61287  fi
61288
61289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61290  if test "x$test_cygdrive_prefix" = x; then
61291    # As a simple fix, exclude /usr/bin since it's not a real path.
61292    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61294      # a path prefixed by /cygdrive for fixpath to work.
61295      new_path="$CYGWIN_ROOT_PATH$input_path"
61296    fi
61297  fi
61298
61299
61300  if test "x$path" != "x$new_path"; then
61301    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61303$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61304  fi
61305
61306    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61307
61308  path="$POTENTIAL_FREETYPE_LIB_PATH"
61309  has_colon=`$ECHO $path | $GREP ^.:`
61310  new_path="$path"
61311  if test "x$has_colon" = x; then
61312    # Not in mixed or Windows style, start by that.
61313    new_path=`cmd //c echo $path`
61314  fi
61315
61316
61317  input_path="$new_path"
61318  # Check if we need to convert this using DOS-style short mode. If the path
61319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61320  # take no chances and rewrite it.
61321  # Note: m4 eats our [], so we need to use [ and ] instead.
61322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61323  if test "x$has_forbidden_chars" != x; then
61324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61325    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61326  fi
61327
61328
61329  windows_path="$new_path"
61330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61331    unix_path=`$CYGPATH -u "$windows_path"`
61332    new_path="$unix_path"
61333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61335    new_path="$unix_path"
61336  fi
61337
61338  if test "x$path" != "x$new_path"; then
61339    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61341$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61342  fi
61343
61344  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61345  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61346
61347    else
61348      # We're on a unix platform. Hooray! :)
61349      path="$POTENTIAL_FREETYPE_LIB_PATH"
61350      has_space=`$ECHO "$path" | $GREP " "`
61351      if test "x$has_space" != x; then
61352        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61353$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61354        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61355      fi
61356
61357      # Use eval to expand a potential ~
61358      eval path="$path"
61359      if test ! -f "$path" && test ! -d "$path"; then
61360        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61361      fi
61362
61363      if test -d "$path"; then
61364        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61365      else
61366        dir="`$DIRNAME "$path"`"
61367        base="`$BASENAME "$path"`"
61368        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61369      fi
61370    fi
61371  fi
61372
61373
61374    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61376$as_echo_n "checking for freetype includes... " >&6; }
61377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61378$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61379    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61381$as_echo_n "checking for freetype libraries... " >&6; }
61382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61383$as_echo "$FREETYPE_LIB_PATH" >&6; }
61384  fi
61385
61386              fi
61387            fi
61388          fi
61389        else
61390          FREETYPE_BASE_DIR="$SYSROOT/usr"
61391
61392  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61393  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61394  METHOD="well-known location"
61395
61396  # Let's start with an optimistic view of the world :-)
61397  FOUND_FREETYPE=yes
61398
61399  # First look for the canonical freetype main include file ft2build.h.
61400  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61401    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61402    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61403    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61404      # Fail.
61405      FOUND_FREETYPE=no
61406    fi
61407  fi
61408
61409  if test "x$FOUND_FREETYPE" = xyes; then
61410    # Include file found, let's continue the sanity check.
61411    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61412$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61413
61414    # Reset to default value
61415    FREETYPE_BASE_NAME=freetype
61416    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61417    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61418      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61419          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61420        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61421        # for the .6 version explicitly.
61422        FREETYPE_BASE_NAME=freetype.6
61423        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61424        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61425$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61426      else
61427        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61428$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61429        FOUND_FREETYPE=no
61430      fi
61431    else
61432      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61433        # On Windows, we will need both .lib and .dll file.
61434        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61435          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61436$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61437          FOUND_FREETYPE=no
61438        fi
61439      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61440          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61441        # Found lib in isa dir, use that instead.
61442        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61443        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61444$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61445      fi
61446    fi
61447  fi
61448
61449  if test "x$FOUND_FREETYPE" = xyes; then
61450
61451  # Only process if variable expands to non-empty
61452
61453  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61455
61456  # Input might be given as Windows format, start by converting to
61457  # unix format.
61458  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61459  new_path=`$CYGPATH -u "$path"`
61460
61461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61464  # "foo.exe" is OK but "foo" is an error.
61465  #
61466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61467  # It is also a way to make sure we got the proper file name for the real test later on.
61468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61469  if test "x$test_shortpath" = x; then
61470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61471$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61472    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61473  fi
61474
61475  # Call helper function which possibly converts this using DOS-style short mode.
61476  # If so, the updated path is stored in $new_path.
61477
61478  input_path="$new_path"
61479  # Check if we need to convert this using DOS-style short mode. If the path
61480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61481  # take no chances and rewrite it.
61482  # Note: m4 eats our [], so we need to use [ and ] instead.
61483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61484  if test "x$has_forbidden_chars" != x; then
61485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61489      # Going to short mode and back again did indeed matter. Since short mode is
61490      # case insensitive, let's make it lowercase to improve readability.
61491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61492      # Now convert it back to Unix-style (cygpath)
61493      input_path=`$CYGPATH -u "$shortmode_path"`
61494      new_path="$input_path"
61495    fi
61496  fi
61497
61498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61499  if test "x$test_cygdrive_prefix" = x; then
61500    # As a simple fix, exclude /usr/bin since it's not a real path.
61501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61503      # a path prefixed by /cygdrive for fixpath to work.
61504      new_path="$CYGWIN_ROOT_PATH$input_path"
61505    fi
61506  fi
61507
61508
61509  if test "x$path" != "x$new_path"; then
61510    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61513  fi
61514
61515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61516
61517  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61518  has_colon=`$ECHO $path | $GREP ^.:`
61519  new_path="$path"
61520  if test "x$has_colon" = x; then
61521    # Not in mixed or Windows style, start by that.
61522    new_path=`cmd //c echo $path`
61523  fi
61524
61525
61526  input_path="$new_path"
61527  # Check if we need to convert this using DOS-style short mode. If the path
61528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61529  # take no chances and rewrite it.
61530  # Note: m4 eats our [], so we need to use [ and ] instead.
61531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61532  if test "x$has_forbidden_chars" != x; then
61533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61535  fi
61536
61537
61538  windows_path="$new_path"
61539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61540    unix_path=`$CYGPATH -u "$windows_path"`
61541    new_path="$unix_path"
61542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61544    new_path="$unix_path"
61545  fi
61546
61547  if test "x$path" != "x$new_path"; then
61548    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61550$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61551  fi
61552
61553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61555
61556    else
61557      # We're on a unix platform. Hooray! :)
61558      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61559      has_space=`$ECHO "$path" | $GREP " "`
61560      if test "x$has_space" != x; then
61561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61562$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61563        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61564      fi
61565
61566      # Use eval to expand a potential ~
61567      eval path="$path"
61568      if test ! -f "$path" && test ! -d "$path"; then
61569        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61570      fi
61571
61572      if test -d "$path"; then
61573        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61574      else
61575        dir="`$DIRNAME "$path"`"
61576        base="`$BASENAME "$path"`"
61577        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61578      fi
61579    fi
61580  fi
61581
61582
61583  # Only process if variable expands to non-empty
61584
61585  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61587
61588  # Input might be given as Windows format, start by converting to
61589  # unix format.
61590  path="$POTENTIAL_FREETYPE_LIB_PATH"
61591  new_path=`$CYGPATH -u "$path"`
61592
61593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61596  # "foo.exe" is OK but "foo" is an error.
61597  #
61598  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61599  # It is also a way to make sure we got the proper file name for the real test later on.
61600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61601  if test "x$test_shortpath" = x; then
61602    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61603$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61604    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61605  fi
61606
61607  # Call helper function which possibly converts this using DOS-style short mode.
61608  # If so, the updated path is stored in $new_path.
61609
61610  input_path="$new_path"
61611  # Check if we need to convert this using DOS-style short mode. If the path
61612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61613  # take no chances and rewrite it.
61614  # Note: m4 eats our [], so we need to use [ and ] instead.
61615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61616  if test "x$has_forbidden_chars" != x; then
61617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61621      # Going to short mode and back again did indeed matter. Since short mode is
61622      # case insensitive, let's make it lowercase to improve readability.
61623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61624      # Now convert it back to Unix-style (cygpath)
61625      input_path=`$CYGPATH -u "$shortmode_path"`
61626      new_path="$input_path"
61627    fi
61628  fi
61629
61630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61631  if test "x$test_cygdrive_prefix" = x; then
61632    # As a simple fix, exclude /usr/bin since it's not a real path.
61633    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61635      # a path prefixed by /cygdrive for fixpath to work.
61636      new_path="$CYGWIN_ROOT_PATH$input_path"
61637    fi
61638  fi
61639
61640
61641  if test "x$path" != "x$new_path"; then
61642    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61645  fi
61646
61647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61648
61649  path="$POTENTIAL_FREETYPE_LIB_PATH"
61650  has_colon=`$ECHO $path | $GREP ^.:`
61651  new_path="$path"
61652  if test "x$has_colon" = x; then
61653    # Not in mixed or Windows style, start by that.
61654    new_path=`cmd //c echo $path`
61655  fi
61656
61657
61658  input_path="$new_path"
61659  # Check if we need to convert this using DOS-style short mode. If the path
61660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61661  # take no chances and rewrite it.
61662  # Note: m4 eats our [], so we need to use [ and ] instead.
61663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61664  if test "x$has_forbidden_chars" != x; then
61665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61667  fi
61668
61669
61670  windows_path="$new_path"
61671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61672    unix_path=`$CYGPATH -u "$windows_path"`
61673    new_path="$unix_path"
61674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61676    new_path="$unix_path"
61677  fi
61678
61679  if test "x$path" != "x$new_path"; then
61680    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61682$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61683  fi
61684
61685  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61686  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61687
61688    else
61689      # We're on a unix platform. Hooray! :)
61690      path="$POTENTIAL_FREETYPE_LIB_PATH"
61691      has_space=`$ECHO "$path" | $GREP " "`
61692      if test "x$has_space" != x; then
61693        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61694$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61695        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61696      fi
61697
61698      # Use eval to expand a potential ~
61699      eval path="$path"
61700      if test ! -f "$path" && test ! -d "$path"; then
61701        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61702      fi
61703
61704      if test -d "$path"; then
61705        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61706      else
61707        dir="`$DIRNAME "$path"`"
61708        base="`$BASENAME "$path"`"
61709        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61710      fi
61711    fi
61712  fi
61713
61714
61715    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61717$as_echo_n "checking for freetype includes... " >&6; }
61718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61719$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61720    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61722$as_echo_n "checking for freetype libraries... " >&6; }
61723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61724$as_echo "$FREETYPE_LIB_PATH" >&6; }
61725  fi
61726
61727
61728          if test "x$FOUND_FREETYPE" != xyes; then
61729            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61730
61731  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61732  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61733  METHOD="well-known location"
61734
61735  # Let's start with an optimistic view of the world :-)
61736  FOUND_FREETYPE=yes
61737
61738  # First look for the canonical freetype main include file ft2build.h.
61739  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61740    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61741    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61742    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61743      # Fail.
61744      FOUND_FREETYPE=no
61745    fi
61746  fi
61747
61748  if test "x$FOUND_FREETYPE" = xyes; then
61749    # Include file found, let's continue the sanity check.
61750    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61751$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61752
61753    # Reset to default value
61754    FREETYPE_BASE_NAME=freetype
61755    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61756    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61757      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61758          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61759        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61760        # for the .6 version explicitly.
61761        FREETYPE_BASE_NAME=freetype.6
61762        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61763        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61764$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61765      else
61766        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61767$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61768        FOUND_FREETYPE=no
61769      fi
61770    else
61771      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61772        # On Windows, we will need both .lib and .dll file.
61773        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61774          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61775$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61776          FOUND_FREETYPE=no
61777        fi
61778      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61779          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61780        # Found lib in isa dir, use that instead.
61781        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61782        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61783$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61784      fi
61785    fi
61786  fi
61787
61788  if test "x$FOUND_FREETYPE" = xyes; then
61789
61790  # Only process if variable expands to non-empty
61791
61792  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61794
61795  # Input might be given as Windows format, start by converting to
61796  # unix format.
61797  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61798  new_path=`$CYGPATH -u "$path"`
61799
61800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61803  # "foo.exe" is OK but "foo" is an error.
61804  #
61805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61806  # It is also a way to make sure we got the proper file name for the real test later on.
61807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61808  if test "x$test_shortpath" = x; then
61809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61810$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61811    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61812  fi
61813
61814  # Call helper function which possibly converts this using DOS-style short mode.
61815  # If so, the updated path is stored in $new_path.
61816
61817  input_path="$new_path"
61818  # Check if we need to convert this using DOS-style short mode. If the path
61819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61820  # take no chances and rewrite it.
61821  # Note: m4 eats our [], so we need to use [ and ] instead.
61822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61823  if test "x$has_forbidden_chars" != x; then
61824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61828      # Going to short mode and back again did indeed matter. Since short mode is
61829      # case insensitive, let's make it lowercase to improve readability.
61830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61831      # Now convert it back to Unix-style (cygpath)
61832      input_path=`$CYGPATH -u "$shortmode_path"`
61833      new_path="$input_path"
61834    fi
61835  fi
61836
61837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61838  if test "x$test_cygdrive_prefix" = x; then
61839    # As a simple fix, exclude /usr/bin since it's not a real path.
61840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61842      # a path prefixed by /cygdrive for fixpath to work.
61843      new_path="$CYGWIN_ROOT_PATH$input_path"
61844    fi
61845  fi
61846
61847
61848  if test "x$path" != "x$new_path"; then
61849    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61851$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61852  fi
61853
61854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61855
61856  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61857  has_colon=`$ECHO $path | $GREP ^.:`
61858  new_path="$path"
61859  if test "x$has_colon" = x; then
61860    # Not in mixed or Windows style, start by that.
61861    new_path=`cmd //c echo $path`
61862  fi
61863
61864
61865  input_path="$new_path"
61866  # Check if we need to convert this using DOS-style short mode. If the path
61867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61868  # take no chances and rewrite it.
61869  # Note: m4 eats our [], so we need to use [ and ] instead.
61870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61871  if test "x$has_forbidden_chars" != x; then
61872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61874  fi
61875
61876
61877  windows_path="$new_path"
61878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61879    unix_path=`$CYGPATH -u "$windows_path"`
61880    new_path="$unix_path"
61881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61883    new_path="$unix_path"
61884  fi
61885
61886  if test "x$path" != "x$new_path"; then
61887    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61890  fi
61891
61892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61894
61895    else
61896      # We're on a unix platform. Hooray! :)
61897      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61898      has_space=`$ECHO "$path" | $GREP " "`
61899      if test "x$has_space" != x; then
61900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61902        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61903      fi
61904
61905      # Use eval to expand a potential ~
61906      eval path="$path"
61907      if test ! -f "$path" && test ! -d "$path"; then
61908        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61909      fi
61910
61911      if test -d "$path"; then
61912        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61913      else
61914        dir="`$DIRNAME "$path"`"
61915        base="`$BASENAME "$path"`"
61916        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61917      fi
61918    fi
61919  fi
61920
61921
61922  # Only process if variable expands to non-empty
61923
61924  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61925    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61926
61927  # Input might be given as Windows format, start by converting to
61928  # unix format.
61929  path="$POTENTIAL_FREETYPE_LIB_PATH"
61930  new_path=`$CYGPATH -u "$path"`
61931
61932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61935  # "foo.exe" is OK but "foo" is an error.
61936  #
61937  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61938  # It is also a way to make sure we got the proper file name for the real test later on.
61939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61940  if test "x$test_shortpath" = x; then
61941    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61942$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61943    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61944  fi
61945
61946  # Call helper function which possibly converts this using DOS-style short mode.
61947  # If so, the updated path is stored in $new_path.
61948
61949  input_path="$new_path"
61950  # Check if we need to convert this using DOS-style short mode. If the path
61951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61952  # take no chances and rewrite it.
61953  # Note: m4 eats our [], so we need to use [ and ] instead.
61954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61955  if test "x$has_forbidden_chars" != x; then
61956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61960      # Going to short mode and back again did indeed matter. Since short mode is
61961      # case insensitive, let's make it lowercase to improve readability.
61962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61963      # Now convert it back to Unix-style (cygpath)
61964      input_path=`$CYGPATH -u "$shortmode_path"`
61965      new_path="$input_path"
61966    fi
61967  fi
61968
61969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61970  if test "x$test_cygdrive_prefix" = x; then
61971    # As a simple fix, exclude /usr/bin since it's not a real path.
61972    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61974      # a path prefixed by /cygdrive for fixpath to work.
61975      new_path="$CYGWIN_ROOT_PATH$input_path"
61976    fi
61977  fi
61978
61979
61980  if test "x$path" != "x$new_path"; then
61981    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61983$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61984  fi
61985
61986    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61987
61988  path="$POTENTIAL_FREETYPE_LIB_PATH"
61989  has_colon=`$ECHO $path | $GREP ^.:`
61990  new_path="$path"
61991  if test "x$has_colon" = x; then
61992    # Not in mixed or Windows style, start by that.
61993    new_path=`cmd //c echo $path`
61994  fi
61995
61996
61997  input_path="$new_path"
61998  # Check if we need to convert this using DOS-style short mode. If the path
61999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62000  # take no chances and rewrite it.
62001  # Note: m4 eats our [], so we need to use [ and ] instead.
62002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62003  if test "x$has_forbidden_chars" != x; then
62004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62006  fi
62007
62008
62009  windows_path="$new_path"
62010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62011    unix_path=`$CYGPATH -u "$windows_path"`
62012    new_path="$unix_path"
62013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62015    new_path="$unix_path"
62016  fi
62017
62018  if test "x$path" != "x$new_path"; then
62019    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62021$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62022  fi
62023
62024  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62025  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62026
62027    else
62028      # We're on a unix platform. Hooray! :)
62029      path="$POTENTIAL_FREETYPE_LIB_PATH"
62030      has_space=`$ECHO "$path" | $GREP " "`
62031      if test "x$has_space" != x; then
62032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62033$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62034        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62035      fi
62036
62037      # Use eval to expand a potential ~
62038      eval path="$path"
62039      if test ! -f "$path" && test ! -d "$path"; then
62040        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62041      fi
62042
62043      if test -d "$path"; then
62044        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62045      else
62046        dir="`$DIRNAME "$path"`"
62047        base="`$BASENAME "$path"`"
62048        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62049      fi
62050    fi
62051  fi
62052
62053
62054    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62056$as_echo_n "checking for freetype includes... " >&6; }
62057    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62058$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62059    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62061$as_echo_n "checking for freetype libraries... " >&6; }
62062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62063$as_echo "$FREETYPE_LIB_PATH" >&6; }
62064  fi
62065
62066          fi
62067          if test "x$FOUND_FREETYPE" != xyes; then
62068            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
62069
62070  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62071  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62072  METHOD="well-known location"
62073
62074  # Let's start with an optimistic view of the world :-)
62075  FOUND_FREETYPE=yes
62076
62077  # First look for the canonical freetype main include file ft2build.h.
62078  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62079    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62080    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62081    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62082      # Fail.
62083      FOUND_FREETYPE=no
62084    fi
62085  fi
62086
62087  if test "x$FOUND_FREETYPE" = xyes; then
62088    # Include file found, let's continue the sanity check.
62089    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62090$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62091
62092    # Reset to default value
62093    FREETYPE_BASE_NAME=freetype
62094    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62095    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62096      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62097          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62098        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62099        # for the .6 version explicitly.
62100        FREETYPE_BASE_NAME=freetype.6
62101        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62102        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62103$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62104      else
62105        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62106$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62107        FOUND_FREETYPE=no
62108      fi
62109    else
62110      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62111        # On Windows, we will need both .lib and .dll file.
62112        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62113          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62114$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62115          FOUND_FREETYPE=no
62116        fi
62117      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62118          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62119        # Found lib in isa dir, use that instead.
62120        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62121        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62122$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62123      fi
62124    fi
62125  fi
62126
62127  if test "x$FOUND_FREETYPE" = xyes; then
62128
62129  # Only process if variable expands to non-empty
62130
62131  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62133
62134  # Input might be given as Windows format, start by converting to
62135  # unix format.
62136  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62137  new_path=`$CYGPATH -u "$path"`
62138
62139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62142  # "foo.exe" is OK but "foo" is an error.
62143  #
62144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62145  # It is also a way to make sure we got the proper file name for the real test later on.
62146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62147  if test "x$test_shortpath" = x; then
62148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62149$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62150    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62151  fi
62152
62153  # Call helper function which possibly converts this using DOS-style short mode.
62154  # If so, the updated path is stored in $new_path.
62155
62156  input_path="$new_path"
62157  # Check if we need to convert this using DOS-style short mode. If the path
62158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62159  # take no chances and rewrite it.
62160  # Note: m4 eats our [], so we need to use [ and ] instead.
62161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62162  if test "x$has_forbidden_chars" != x; then
62163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62167      # Going to short mode and back again did indeed matter. Since short mode is
62168      # case insensitive, let's make it lowercase to improve readability.
62169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62170      # Now convert it back to Unix-style (cygpath)
62171      input_path=`$CYGPATH -u "$shortmode_path"`
62172      new_path="$input_path"
62173    fi
62174  fi
62175
62176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62177  if test "x$test_cygdrive_prefix" = x; then
62178    # As a simple fix, exclude /usr/bin since it's not a real path.
62179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62181      # a path prefixed by /cygdrive for fixpath to work.
62182      new_path="$CYGWIN_ROOT_PATH$input_path"
62183    fi
62184  fi
62185
62186
62187  if test "x$path" != "x$new_path"; then
62188    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62190$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62191  fi
62192
62193    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62194
62195  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62196  has_colon=`$ECHO $path | $GREP ^.:`
62197  new_path="$path"
62198  if test "x$has_colon" = x; then
62199    # Not in mixed or Windows style, start by that.
62200    new_path=`cmd //c echo $path`
62201  fi
62202
62203
62204  input_path="$new_path"
62205  # Check if we need to convert this using DOS-style short mode. If the path
62206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62207  # take no chances and rewrite it.
62208  # Note: m4 eats our [], so we need to use [ and ] instead.
62209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62210  if test "x$has_forbidden_chars" != x; then
62211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62213  fi
62214
62215
62216  windows_path="$new_path"
62217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62218    unix_path=`$CYGPATH -u "$windows_path"`
62219    new_path="$unix_path"
62220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62222    new_path="$unix_path"
62223  fi
62224
62225  if test "x$path" != "x$new_path"; then
62226    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62228$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62229  fi
62230
62231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62233
62234    else
62235      # We're on a unix platform. Hooray! :)
62236      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62237      has_space=`$ECHO "$path" | $GREP " "`
62238      if test "x$has_space" != x; then
62239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62240$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62241        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62242      fi
62243
62244      # Use eval to expand a potential ~
62245      eval path="$path"
62246      if test ! -f "$path" && test ! -d "$path"; then
62247        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62248      fi
62249
62250      if test -d "$path"; then
62251        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62252      else
62253        dir="`$DIRNAME "$path"`"
62254        base="`$BASENAME "$path"`"
62255        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62256      fi
62257    fi
62258  fi
62259
62260
62261  # Only process if variable expands to non-empty
62262
62263  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62265
62266  # Input might be given as Windows format, start by converting to
62267  # unix format.
62268  path="$POTENTIAL_FREETYPE_LIB_PATH"
62269  new_path=`$CYGPATH -u "$path"`
62270
62271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62274  # "foo.exe" is OK but "foo" is an error.
62275  #
62276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62277  # It is also a way to make sure we got the proper file name for the real test later on.
62278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62279  if test "x$test_shortpath" = x; then
62280    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62282    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62283  fi
62284
62285  # Call helper function which possibly converts this using DOS-style short mode.
62286  # If so, the updated path is stored in $new_path.
62287
62288  input_path="$new_path"
62289  # Check if we need to convert this using DOS-style short mode. If the path
62290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62291  # take no chances and rewrite it.
62292  # Note: m4 eats our [], so we need to use [ and ] instead.
62293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62294  if test "x$has_forbidden_chars" != x; then
62295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62299      # Going to short mode and back again did indeed matter. Since short mode is
62300      # case insensitive, let's make it lowercase to improve readability.
62301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62302      # Now convert it back to Unix-style (cygpath)
62303      input_path=`$CYGPATH -u "$shortmode_path"`
62304      new_path="$input_path"
62305    fi
62306  fi
62307
62308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62309  if test "x$test_cygdrive_prefix" = x; then
62310    # As a simple fix, exclude /usr/bin since it's not a real path.
62311    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62313      # a path prefixed by /cygdrive for fixpath to work.
62314      new_path="$CYGWIN_ROOT_PATH$input_path"
62315    fi
62316  fi
62317
62318
62319  if test "x$path" != "x$new_path"; then
62320    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62322$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62323  fi
62324
62325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62326
62327  path="$POTENTIAL_FREETYPE_LIB_PATH"
62328  has_colon=`$ECHO $path | $GREP ^.:`
62329  new_path="$path"
62330  if test "x$has_colon" = x; then
62331    # Not in mixed or Windows style, start by that.
62332    new_path=`cmd //c echo $path`
62333  fi
62334
62335
62336  input_path="$new_path"
62337  # Check if we need to convert this using DOS-style short mode. If the path
62338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62339  # take no chances and rewrite it.
62340  # Note: m4 eats our [], so we need to use [ and ] instead.
62341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62342  if test "x$has_forbidden_chars" != x; then
62343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62345  fi
62346
62347
62348  windows_path="$new_path"
62349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62350    unix_path=`$CYGPATH -u "$windows_path"`
62351    new_path="$unix_path"
62352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62354    new_path="$unix_path"
62355  fi
62356
62357  if test "x$path" != "x$new_path"; then
62358    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62361  fi
62362
62363  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62364  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62365
62366    else
62367      # We're on a unix platform. Hooray! :)
62368      path="$POTENTIAL_FREETYPE_LIB_PATH"
62369      has_space=`$ECHO "$path" | $GREP " "`
62370      if test "x$has_space" != x; then
62371        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62372$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62373        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62374      fi
62375
62376      # Use eval to expand a potential ~
62377      eval path="$path"
62378      if test ! -f "$path" && test ! -d "$path"; then
62379        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62380      fi
62381
62382      if test -d "$path"; then
62383        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62384      else
62385        dir="`$DIRNAME "$path"`"
62386        base="`$BASENAME "$path"`"
62387        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62388      fi
62389    fi
62390  fi
62391
62392
62393    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62395$as_echo_n "checking for freetype includes... " >&6; }
62396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62397$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62398    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62400$as_echo_n "checking for freetype libraries... " >&6; }
62401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62402$as_echo "$FREETYPE_LIB_PATH" >&6; }
62403  fi
62404
62405          fi
62406
62407          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62408            if test "x$FOUND_FREETYPE" != xyes; then
62409              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62410              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62411
62412  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62413  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62414  METHOD="well-known location"
62415
62416  # Let's start with an optimistic view of the world :-)
62417  FOUND_FREETYPE=yes
62418
62419  # First look for the canonical freetype main include file ft2build.h.
62420  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62421    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62422    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62423    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62424      # Fail.
62425      FOUND_FREETYPE=no
62426    fi
62427  fi
62428
62429  if test "x$FOUND_FREETYPE" = xyes; then
62430    # Include file found, let's continue the sanity check.
62431    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62432$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62433
62434    # Reset to default value
62435    FREETYPE_BASE_NAME=freetype
62436    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62437    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62438      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62439          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62440        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62441        # for the .6 version explicitly.
62442        FREETYPE_BASE_NAME=freetype.6
62443        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62444        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62445$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62446      else
62447        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62448$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62449        FOUND_FREETYPE=no
62450      fi
62451    else
62452      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62453        # On Windows, we will need both .lib and .dll file.
62454        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62455          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62456$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62457          FOUND_FREETYPE=no
62458        fi
62459      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62460          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62461        # Found lib in isa dir, use that instead.
62462        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62463        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62464$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62465      fi
62466    fi
62467  fi
62468
62469  if test "x$FOUND_FREETYPE" = xyes; then
62470
62471  # Only process if variable expands to non-empty
62472
62473  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62475
62476  # Input might be given as Windows format, start by converting to
62477  # unix format.
62478  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62479  new_path=`$CYGPATH -u "$path"`
62480
62481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62484  # "foo.exe" is OK but "foo" is an error.
62485  #
62486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62487  # It is also a way to make sure we got the proper file name for the real test later on.
62488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62489  if test "x$test_shortpath" = x; then
62490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62491$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62492    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62493  fi
62494
62495  # Call helper function which possibly converts this using DOS-style short mode.
62496  # If so, the updated path is stored in $new_path.
62497
62498  input_path="$new_path"
62499  # Check if we need to convert this using DOS-style short mode. If the path
62500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62501  # take no chances and rewrite it.
62502  # Note: m4 eats our [], so we need to use [ and ] instead.
62503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62504  if test "x$has_forbidden_chars" != x; then
62505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62509      # Going to short mode and back again did indeed matter. Since short mode is
62510      # case insensitive, let's make it lowercase to improve readability.
62511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62512      # Now convert it back to Unix-style (cygpath)
62513      input_path=`$CYGPATH -u "$shortmode_path"`
62514      new_path="$input_path"
62515    fi
62516  fi
62517
62518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62519  if test "x$test_cygdrive_prefix" = x; then
62520    # As a simple fix, exclude /usr/bin since it's not a real path.
62521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62523      # a path prefixed by /cygdrive for fixpath to work.
62524      new_path="$CYGWIN_ROOT_PATH$input_path"
62525    fi
62526  fi
62527
62528
62529  if test "x$path" != "x$new_path"; then
62530    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62532$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62533  fi
62534
62535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62536
62537  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62538  has_colon=`$ECHO $path | $GREP ^.:`
62539  new_path="$path"
62540  if test "x$has_colon" = x; then
62541    # Not in mixed or Windows style, start by that.
62542    new_path=`cmd //c echo $path`
62543  fi
62544
62545
62546  input_path="$new_path"
62547  # Check if we need to convert this using DOS-style short mode. If the path
62548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62549  # take no chances and rewrite it.
62550  # Note: m4 eats our [], so we need to use [ and ] instead.
62551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62552  if test "x$has_forbidden_chars" != x; then
62553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62555  fi
62556
62557
62558  windows_path="$new_path"
62559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62560    unix_path=`$CYGPATH -u "$windows_path"`
62561    new_path="$unix_path"
62562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62564    new_path="$unix_path"
62565  fi
62566
62567  if test "x$path" != "x$new_path"; then
62568    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62570$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62571  fi
62572
62573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62575
62576    else
62577      # We're on a unix platform. Hooray! :)
62578      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62579      has_space=`$ECHO "$path" | $GREP " "`
62580      if test "x$has_space" != x; then
62581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62582$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62583        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62584      fi
62585
62586      # Use eval to expand a potential ~
62587      eval path="$path"
62588      if test ! -f "$path" && test ! -d "$path"; then
62589        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62590      fi
62591
62592      if test -d "$path"; then
62593        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62594      else
62595        dir="`$DIRNAME "$path"`"
62596        base="`$BASENAME "$path"`"
62597        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62598      fi
62599    fi
62600  fi
62601
62602
62603  # Only process if variable expands to non-empty
62604
62605  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62607
62608  # Input might be given as Windows format, start by converting to
62609  # unix format.
62610  path="$POTENTIAL_FREETYPE_LIB_PATH"
62611  new_path=`$CYGPATH -u "$path"`
62612
62613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62616  # "foo.exe" is OK but "foo" is an error.
62617  #
62618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62619  # It is also a way to make sure we got the proper file name for the real test later on.
62620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62621  if test "x$test_shortpath" = x; then
62622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62623$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62624    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62625  fi
62626
62627  # Call helper function which possibly converts this using DOS-style short mode.
62628  # If so, the updated path is stored in $new_path.
62629
62630  input_path="$new_path"
62631  # Check if we need to convert this using DOS-style short mode. If the path
62632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62633  # take no chances and rewrite it.
62634  # Note: m4 eats our [], so we need to use [ and ] instead.
62635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62636  if test "x$has_forbidden_chars" != x; then
62637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62641      # Going to short mode and back again did indeed matter. Since short mode is
62642      # case insensitive, let's make it lowercase to improve readability.
62643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62644      # Now convert it back to Unix-style (cygpath)
62645      input_path=`$CYGPATH -u "$shortmode_path"`
62646      new_path="$input_path"
62647    fi
62648  fi
62649
62650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62651  if test "x$test_cygdrive_prefix" = x; then
62652    # As a simple fix, exclude /usr/bin since it's not a real path.
62653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62655      # a path prefixed by /cygdrive for fixpath to work.
62656      new_path="$CYGWIN_ROOT_PATH$input_path"
62657    fi
62658  fi
62659
62660
62661  if test "x$path" != "x$new_path"; then
62662    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62664$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62665  fi
62666
62667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62668
62669  path="$POTENTIAL_FREETYPE_LIB_PATH"
62670  has_colon=`$ECHO $path | $GREP ^.:`
62671  new_path="$path"
62672  if test "x$has_colon" = x; then
62673    # Not in mixed or Windows style, start by that.
62674    new_path=`cmd //c echo $path`
62675  fi
62676
62677
62678  input_path="$new_path"
62679  # Check if we need to convert this using DOS-style short mode. If the path
62680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62681  # take no chances and rewrite it.
62682  # Note: m4 eats our [], so we need to use [ and ] instead.
62683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62684  if test "x$has_forbidden_chars" != x; then
62685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62687  fi
62688
62689
62690  windows_path="$new_path"
62691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62692    unix_path=`$CYGPATH -u "$windows_path"`
62693    new_path="$unix_path"
62694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62696    new_path="$unix_path"
62697  fi
62698
62699  if test "x$path" != "x$new_path"; then
62700    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62702$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62703  fi
62704
62705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62707
62708    else
62709      # We're on a unix platform. Hooray! :)
62710      path="$POTENTIAL_FREETYPE_LIB_PATH"
62711      has_space=`$ECHO "$path" | $GREP " "`
62712      if test "x$has_space" != x; then
62713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62714$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62716      fi
62717
62718      # Use eval to expand a potential ~
62719      eval path="$path"
62720      if test ! -f "$path" && test ! -d "$path"; then
62721        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62722      fi
62723
62724      if test -d "$path"; then
62725        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62726      else
62727        dir="`$DIRNAME "$path"`"
62728        base="`$BASENAME "$path"`"
62729        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62730      fi
62731    fi
62732  fi
62733
62734
62735    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62737$as_echo_n "checking for freetype includes... " >&6; }
62738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62739$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62740    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62741    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62742$as_echo_n "checking for freetype libraries... " >&6; }
62743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62744$as_echo "$FREETYPE_LIB_PATH" >&6; }
62745  fi
62746
62747            fi
62748          fi
62749
62750          if test "x$FOUND_FREETYPE" != xyes; then
62751            FREETYPE_BASE_DIR="$SYSROOT/usr"
62752            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62753
62754  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62755  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
62756  METHOD="well-known location"
62757
62758  # Let's start with an optimistic view of the world :-)
62759  FOUND_FREETYPE=yes
62760
62761  # First look for the canonical freetype main include file ft2build.h.
62762  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62763    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62764    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62765    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62766      # Fail.
62767      FOUND_FREETYPE=no
62768    fi
62769  fi
62770
62771  if test "x$FOUND_FREETYPE" = xyes; then
62772    # Include file found, let's continue the sanity check.
62773    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62774$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62775
62776    # Reset to default value
62777    FREETYPE_BASE_NAME=freetype
62778    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62779    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62780      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62781          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62782        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62783        # for the .6 version explicitly.
62784        FREETYPE_BASE_NAME=freetype.6
62785        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62786        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62787$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62788      else
62789        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62790$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62791        FOUND_FREETYPE=no
62792      fi
62793    else
62794      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62795        # On Windows, we will need both .lib and .dll file.
62796        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62797          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62798$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62799          FOUND_FREETYPE=no
62800        fi
62801      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62802          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62803        # Found lib in isa dir, use that instead.
62804        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62805        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62806$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62807      fi
62808    fi
62809  fi
62810
62811  if test "x$FOUND_FREETYPE" = xyes; then
62812
62813  # Only process if variable expands to non-empty
62814
62815  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62817
62818  # Input might be given as Windows format, start by converting to
62819  # unix format.
62820  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62821  new_path=`$CYGPATH -u "$path"`
62822
62823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62826  # "foo.exe" is OK but "foo" is an error.
62827  #
62828  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62829  # It is also a way to make sure we got the proper file name for the real test later on.
62830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62831  if test "x$test_shortpath" = x; then
62832    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62833$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62834    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62835  fi
62836
62837  # Call helper function which possibly converts this using DOS-style short mode.
62838  # If so, the updated path is stored in $new_path.
62839
62840  input_path="$new_path"
62841  # Check if we need to convert this using DOS-style short mode. If the path
62842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62843  # take no chances and rewrite it.
62844  # Note: m4 eats our [], so we need to use [ and ] instead.
62845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62846  if test "x$has_forbidden_chars" != x; then
62847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62851      # Going to short mode and back again did indeed matter. Since short mode is
62852      # case insensitive, let's make it lowercase to improve readability.
62853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62854      # Now convert it back to Unix-style (cygpath)
62855      input_path=`$CYGPATH -u "$shortmode_path"`
62856      new_path="$input_path"
62857    fi
62858  fi
62859
62860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62861  if test "x$test_cygdrive_prefix" = x; then
62862    # As a simple fix, exclude /usr/bin since it's not a real path.
62863    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62865      # a path prefixed by /cygdrive for fixpath to work.
62866      new_path="$CYGWIN_ROOT_PATH$input_path"
62867    fi
62868  fi
62869
62870
62871  if test "x$path" != "x$new_path"; then
62872    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62874$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62875  fi
62876
62877    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62878
62879  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62880  has_colon=`$ECHO $path | $GREP ^.:`
62881  new_path="$path"
62882  if test "x$has_colon" = x; then
62883    # Not in mixed or Windows style, start by that.
62884    new_path=`cmd //c echo $path`
62885  fi
62886
62887
62888  input_path="$new_path"
62889  # Check if we need to convert this using DOS-style short mode. If the path
62890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62891  # take no chances and rewrite it.
62892  # Note: m4 eats our [], so we need to use [ and ] instead.
62893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62894  if test "x$has_forbidden_chars" != x; then
62895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62897  fi
62898
62899
62900  windows_path="$new_path"
62901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62902    unix_path=`$CYGPATH -u "$windows_path"`
62903    new_path="$unix_path"
62904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62906    new_path="$unix_path"
62907  fi
62908
62909  if test "x$path" != "x$new_path"; then
62910    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62912$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62913  fi
62914
62915  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62916  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62917
62918    else
62919      # We're on a unix platform. Hooray! :)
62920      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62921      has_space=`$ECHO "$path" | $GREP " "`
62922      if test "x$has_space" != x; then
62923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62924$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62925        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62926      fi
62927
62928      # Use eval to expand a potential ~
62929      eval path="$path"
62930      if test ! -f "$path" && test ! -d "$path"; then
62931        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62932      fi
62933
62934      if test -d "$path"; then
62935        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62936      else
62937        dir="`$DIRNAME "$path"`"
62938        base="`$BASENAME "$path"`"
62939        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62940      fi
62941    fi
62942  fi
62943
62944
62945  # Only process if variable expands to non-empty
62946
62947  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62948    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62949
62950  # Input might be given as Windows format, start by converting to
62951  # unix format.
62952  path="$POTENTIAL_FREETYPE_LIB_PATH"
62953  new_path=`$CYGPATH -u "$path"`
62954
62955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62958  # "foo.exe" is OK but "foo" is an error.
62959  #
62960  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62961  # It is also a way to make sure we got the proper file name for the real test later on.
62962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62963  if test "x$test_shortpath" = x; then
62964    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62965$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62966    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62967  fi
62968
62969  # Call helper function which possibly converts this using DOS-style short mode.
62970  # If so, the updated path is stored in $new_path.
62971
62972  input_path="$new_path"
62973  # Check if we need to convert this using DOS-style short mode. If the path
62974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62975  # take no chances and rewrite it.
62976  # Note: m4 eats our [], so we need to use [ and ] instead.
62977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62978  if test "x$has_forbidden_chars" != x; then
62979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62983      # Going to short mode and back again did indeed matter. Since short mode is
62984      # case insensitive, let's make it lowercase to improve readability.
62985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62986      # Now convert it back to Unix-style (cygpath)
62987      input_path=`$CYGPATH -u "$shortmode_path"`
62988      new_path="$input_path"
62989    fi
62990  fi
62991
62992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62993  if test "x$test_cygdrive_prefix" = x; then
62994    # As a simple fix, exclude /usr/bin since it's not a real path.
62995    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62997      # a path prefixed by /cygdrive for fixpath to work.
62998      new_path="$CYGWIN_ROOT_PATH$input_path"
62999    fi
63000  fi
63001
63002
63003  if test "x$path" != "x$new_path"; then
63004    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63006$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63007  fi
63008
63009    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63010
63011  path="$POTENTIAL_FREETYPE_LIB_PATH"
63012  has_colon=`$ECHO $path | $GREP ^.:`
63013  new_path="$path"
63014  if test "x$has_colon" = x; then
63015    # Not in mixed or Windows style, start by that.
63016    new_path=`cmd //c echo $path`
63017  fi
63018
63019
63020  input_path="$new_path"
63021  # Check if we need to convert this using DOS-style short mode. If the path
63022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63023  # take no chances and rewrite it.
63024  # Note: m4 eats our [], so we need to use [ and ] instead.
63025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63026  if test "x$has_forbidden_chars" != x; then
63027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63029  fi
63030
63031
63032  windows_path="$new_path"
63033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63034    unix_path=`$CYGPATH -u "$windows_path"`
63035    new_path="$unix_path"
63036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63038    new_path="$unix_path"
63039  fi
63040
63041  if test "x$path" != "x$new_path"; then
63042    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63044$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63045  fi
63046
63047  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63048  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63049
63050    else
63051      # We're on a unix platform. Hooray! :)
63052      path="$POTENTIAL_FREETYPE_LIB_PATH"
63053      has_space=`$ECHO "$path" | $GREP " "`
63054      if test "x$has_space" != x; then
63055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63056$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63057        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63058      fi
63059
63060      # Use eval to expand a potential ~
63061      eval path="$path"
63062      if test ! -f "$path" && test ! -d "$path"; then
63063        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63064      fi
63065
63066      if test -d "$path"; then
63067        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63068      else
63069        dir="`$DIRNAME "$path"`"
63070        base="`$BASENAME "$path"`"
63071        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63072      fi
63073    fi
63074  fi
63075
63076
63077    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63079$as_echo_n "checking for freetype includes... " >&6; }
63080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63081$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63082    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63084$as_echo_n "checking for freetype libraries... " >&6; }
63085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63086$as_echo "$FREETYPE_LIB_PATH" >&6; }
63087  fi
63088
63089            else
63090
63091  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63092  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
63093  METHOD="well-known location"
63094
63095  # Let's start with an optimistic view of the world :-)
63096  FOUND_FREETYPE=yes
63097
63098  # First look for the canonical freetype main include file ft2build.h.
63099  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63100    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63101    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63102    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63103      # Fail.
63104      FOUND_FREETYPE=no
63105    fi
63106  fi
63107
63108  if test "x$FOUND_FREETYPE" = xyes; then
63109    # Include file found, let's continue the sanity check.
63110    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63111$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63112
63113    # Reset to default value
63114    FREETYPE_BASE_NAME=freetype
63115    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63116    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63117      if test "x$OPENJDK_TARGET_OS" = xmacosx \
63118          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63119        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63120        # for the .6 version explicitly.
63121        FREETYPE_BASE_NAME=freetype.6
63122        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63123        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63124$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63125      else
63126        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63127$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63128        FOUND_FREETYPE=no
63129      fi
63130    else
63131      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63132        # On Windows, we will need both .lib and .dll file.
63133        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63134          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63135$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63136          FOUND_FREETYPE=no
63137        fi
63138      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63139          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63140        # Found lib in isa dir, use that instead.
63141        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63142        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63143$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63144      fi
63145    fi
63146  fi
63147
63148  if test "x$FOUND_FREETYPE" = xyes; then
63149
63150  # Only process if variable expands to non-empty
63151
63152  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63154
63155  # Input might be given as Windows format, start by converting to
63156  # unix format.
63157  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63158  new_path=`$CYGPATH -u "$path"`
63159
63160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63163  # "foo.exe" is OK but "foo" is an error.
63164  #
63165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63166  # It is also a way to make sure we got the proper file name for the real test later on.
63167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63168  if test "x$test_shortpath" = x; then
63169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63170$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63171    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63172  fi
63173
63174  # Call helper function which possibly converts this using DOS-style short mode.
63175  # If so, the updated path is stored in $new_path.
63176
63177  input_path="$new_path"
63178  # Check if we need to convert this using DOS-style short mode. If the path
63179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63180  # take no chances and rewrite it.
63181  # Note: m4 eats our [], so we need to use [ and ] instead.
63182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63183  if test "x$has_forbidden_chars" != x; then
63184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63188      # Going to short mode and back again did indeed matter. Since short mode is
63189      # case insensitive, let's make it lowercase to improve readability.
63190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63191      # Now convert it back to Unix-style (cygpath)
63192      input_path=`$CYGPATH -u "$shortmode_path"`
63193      new_path="$input_path"
63194    fi
63195  fi
63196
63197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63198  if test "x$test_cygdrive_prefix" = x; then
63199    # As a simple fix, exclude /usr/bin since it's not a real path.
63200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63202      # a path prefixed by /cygdrive for fixpath to work.
63203      new_path="$CYGWIN_ROOT_PATH$input_path"
63204    fi
63205  fi
63206
63207
63208  if test "x$path" != "x$new_path"; then
63209    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63211$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63212  fi
63213
63214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63215
63216  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63217  has_colon=`$ECHO $path | $GREP ^.:`
63218  new_path="$path"
63219  if test "x$has_colon" = x; then
63220    # Not in mixed or Windows style, start by that.
63221    new_path=`cmd //c echo $path`
63222  fi
63223
63224
63225  input_path="$new_path"
63226  # Check if we need to convert this using DOS-style short mode. If the path
63227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63228  # take no chances and rewrite it.
63229  # Note: m4 eats our [], so we need to use [ and ] instead.
63230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63231  if test "x$has_forbidden_chars" != x; then
63232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63234  fi
63235
63236
63237  windows_path="$new_path"
63238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63239    unix_path=`$CYGPATH -u "$windows_path"`
63240    new_path="$unix_path"
63241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63243    new_path="$unix_path"
63244  fi
63245
63246  if test "x$path" != "x$new_path"; then
63247    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63249$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63250  fi
63251
63252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63254
63255    else
63256      # We're on a unix platform. Hooray! :)
63257      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63258      has_space=`$ECHO "$path" | $GREP " "`
63259      if test "x$has_space" != x; then
63260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63261$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63263      fi
63264
63265      # Use eval to expand a potential ~
63266      eval path="$path"
63267      if test ! -f "$path" && test ! -d "$path"; then
63268        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63269      fi
63270
63271      if test -d "$path"; then
63272        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63273      else
63274        dir="`$DIRNAME "$path"`"
63275        base="`$BASENAME "$path"`"
63276        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63277      fi
63278    fi
63279  fi
63280
63281
63282  # Only process if variable expands to non-empty
63283
63284  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63286
63287  # Input might be given as Windows format, start by converting to
63288  # unix format.
63289  path="$POTENTIAL_FREETYPE_LIB_PATH"
63290  new_path=`$CYGPATH -u "$path"`
63291
63292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63295  # "foo.exe" is OK but "foo" is an error.
63296  #
63297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63298  # It is also a way to make sure we got the proper file name for the real test later on.
63299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63300  if test "x$test_shortpath" = x; then
63301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63302$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63303    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63304  fi
63305
63306  # Call helper function which possibly converts this using DOS-style short mode.
63307  # If so, the updated path is stored in $new_path.
63308
63309  input_path="$new_path"
63310  # Check if we need to convert this using DOS-style short mode. If the path
63311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63312  # take no chances and rewrite it.
63313  # Note: m4 eats our [], so we need to use [ and ] instead.
63314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63315  if test "x$has_forbidden_chars" != x; then
63316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63320      # Going to short mode and back again did indeed matter. Since short mode is
63321      # case insensitive, let's make it lowercase to improve readability.
63322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63323      # Now convert it back to Unix-style (cygpath)
63324      input_path=`$CYGPATH -u "$shortmode_path"`
63325      new_path="$input_path"
63326    fi
63327  fi
63328
63329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63330  if test "x$test_cygdrive_prefix" = x; then
63331    # As a simple fix, exclude /usr/bin since it's not a real path.
63332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63334      # a path prefixed by /cygdrive for fixpath to work.
63335      new_path="$CYGWIN_ROOT_PATH$input_path"
63336    fi
63337  fi
63338
63339
63340  if test "x$path" != "x$new_path"; then
63341    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63343$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63344  fi
63345
63346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63347
63348  path="$POTENTIAL_FREETYPE_LIB_PATH"
63349  has_colon=`$ECHO $path | $GREP ^.:`
63350  new_path="$path"
63351  if test "x$has_colon" = x; then
63352    # Not in mixed or Windows style, start by that.
63353    new_path=`cmd //c echo $path`
63354  fi
63355
63356
63357  input_path="$new_path"
63358  # Check if we need to convert this using DOS-style short mode. If the path
63359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63360  # take no chances and rewrite it.
63361  # Note: m4 eats our [], so we need to use [ and ] instead.
63362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63363  if test "x$has_forbidden_chars" != x; then
63364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63366  fi
63367
63368
63369  windows_path="$new_path"
63370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63371    unix_path=`$CYGPATH -u "$windows_path"`
63372    new_path="$unix_path"
63373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63375    new_path="$unix_path"
63376  fi
63377
63378  if test "x$path" != "x$new_path"; then
63379    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63382  fi
63383
63384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63386
63387    else
63388      # We're on a unix platform. Hooray! :)
63389      path="$POTENTIAL_FREETYPE_LIB_PATH"
63390      has_space=`$ECHO "$path" | $GREP " "`
63391      if test "x$has_space" != x; then
63392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63394        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63395      fi
63396
63397      # Use eval to expand a potential ~
63398      eval path="$path"
63399      if test ! -f "$path" && test ! -d "$path"; then
63400        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63401      fi
63402
63403      if test -d "$path"; then
63404        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63405      else
63406        dir="`$DIRNAME "$path"`"
63407        base="`$BASENAME "$path"`"
63408        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63409      fi
63410    fi
63411  fi
63412
63413
63414    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63416$as_echo_n "checking for freetype includes... " >&6; }
63417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63418$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63419    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63421$as_echo_n "checking for freetype libraries... " >&6; }
63422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63423$as_echo "$FREETYPE_LIB_PATH" >&6; }
63424  fi
63425
63426              if test "x$FOUND_FREETYPE" != xyes; then
63427
63428  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63429  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63430  METHOD="well-known location"
63431
63432  # Let's start with an optimistic view of the world :-)
63433  FOUND_FREETYPE=yes
63434
63435  # First look for the canonical freetype main include file ft2build.h.
63436  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63437    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63438    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63439    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63440      # Fail.
63441      FOUND_FREETYPE=no
63442    fi
63443  fi
63444
63445  if test "x$FOUND_FREETYPE" = xyes; then
63446    # Include file found, let's continue the sanity check.
63447    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63448$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63449
63450    # Reset to default value
63451    FREETYPE_BASE_NAME=freetype
63452    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63453    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63454      if test "x$OPENJDK_TARGET_OS" = xmacosx \
63455          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63456        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63457        # for the .6 version explicitly.
63458        FREETYPE_BASE_NAME=freetype.6
63459        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63460        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63461$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63462      else
63463        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63464$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63465        FOUND_FREETYPE=no
63466      fi
63467    else
63468      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63469        # On Windows, we will need both .lib and .dll file.
63470        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63471          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63472$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63473          FOUND_FREETYPE=no
63474        fi
63475      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63476          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63477        # Found lib in isa dir, use that instead.
63478        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63479        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63480$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63481      fi
63482    fi
63483  fi
63484
63485  if test "x$FOUND_FREETYPE" = xyes; then
63486
63487  # Only process if variable expands to non-empty
63488
63489  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63491
63492  # Input might be given as Windows format, start by converting to
63493  # unix format.
63494  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63495  new_path=`$CYGPATH -u "$path"`
63496
63497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63500  # "foo.exe" is OK but "foo" is an error.
63501  #
63502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63503  # It is also a way to make sure we got the proper file name for the real test later on.
63504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63505  if test "x$test_shortpath" = x; then
63506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63507$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63508    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63509  fi
63510
63511  # Call helper function which possibly converts this using DOS-style short mode.
63512  # If so, the updated path is stored in $new_path.
63513
63514  input_path="$new_path"
63515  # Check if we need to convert this using DOS-style short mode. If the path
63516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63517  # take no chances and rewrite it.
63518  # Note: m4 eats our [], so we need to use [ and ] instead.
63519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63520  if test "x$has_forbidden_chars" != x; then
63521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63525      # Going to short mode and back again did indeed matter. Since short mode is
63526      # case insensitive, let's make it lowercase to improve readability.
63527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63528      # Now convert it back to Unix-style (cygpath)
63529      input_path=`$CYGPATH -u "$shortmode_path"`
63530      new_path="$input_path"
63531    fi
63532  fi
63533
63534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63535  if test "x$test_cygdrive_prefix" = x; then
63536    # As a simple fix, exclude /usr/bin since it's not a real path.
63537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63539      # a path prefixed by /cygdrive for fixpath to work.
63540      new_path="$CYGWIN_ROOT_PATH$input_path"
63541    fi
63542  fi
63543
63544
63545  if test "x$path" != "x$new_path"; then
63546    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63548$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63549  fi
63550
63551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63552
63553  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63554  has_colon=`$ECHO $path | $GREP ^.:`
63555  new_path="$path"
63556  if test "x$has_colon" = x; then
63557    # Not in mixed or Windows style, start by that.
63558    new_path=`cmd //c echo $path`
63559  fi
63560
63561
63562  input_path="$new_path"
63563  # Check if we need to convert this using DOS-style short mode. If the path
63564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63565  # take no chances and rewrite it.
63566  # Note: m4 eats our [], so we need to use [ and ] instead.
63567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63568  if test "x$has_forbidden_chars" != x; then
63569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63571  fi
63572
63573
63574  windows_path="$new_path"
63575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63576    unix_path=`$CYGPATH -u "$windows_path"`
63577    new_path="$unix_path"
63578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63580    new_path="$unix_path"
63581  fi
63582
63583  if test "x$path" != "x$new_path"; then
63584    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63586$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63587  fi
63588
63589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63591
63592    else
63593      # We're on a unix platform. Hooray! :)
63594      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63595      has_space=`$ECHO "$path" | $GREP " "`
63596      if test "x$has_space" != x; then
63597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63598$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63599        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63600      fi
63601
63602      # Use eval to expand a potential ~
63603      eval path="$path"
63604      if test ! -f "$path" && test ! -d "$path"; then
63605        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63606      fi
63607
63608      if test -d "$path"; then
63609        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63610      else
63611        dir="`$DIRNAME "$path"`"
63612        base="`$BASENAME "$path"`"
63613        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63614      fi
63615    fi
63616  fi
63617
63618
63619  # Only process if variable expands to non-empty
63620
63621  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63623
63624  # Input might be given as Windows format, start by converting to
63625  # unix format.
63626  path="$POTENTIAL_FREETYPE_LIB_PATH"
63627  new_path=`$CYGPATH -u "$path"`
63628
63629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63632  # "foo.exe" is OK but "foo" is an error.
63633  #
63634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63635  # It is also a way to make sure we got the proper file name for the real test later on.
63636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63637  if test "x$test_shortpath" = x; then
63638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63639$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63640    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63641  fi
63642
63643  # Call helper function which possibly converts this using DOS-style short mode.
63644  # If so, the updated path is stored in $new_path.
63645
63646  input_path="$new_path"
63647  # Check if we need to convert this using DOS-style short mode. If the path
63648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63649  # take no chances and rewrite it.
63650  # Note: m4 eats our [], so we need to use [ and ] instead.
63651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63652  if test "x$has_forbidden_chars" != x; then
63653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63657      # Going to short mode and back again did indeed matter. Since short mode is
63658      # case insensitive, let's make it lowercase to improve readability.
63659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63660      # Now convert it back to Unix-style (cygpath)
63661      input_path=`$CYGPATH -u "$shortmode_path"`
63662      new_path="$input_path"
63663    fi
63664  fi
63665
63666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63667  if test "x$test_cygdrive_prefix" = x; then
63668    # As a simple fix, exclude /usr/bin since it's not a real path.
63669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63671      # a path prefixed by /cygdrive for fixpath to work.
63672      new_path="$CYGWIN_ROOT_PATH$input_path"
63673    fi
63674  fi
63675
63676
63677  if test "x$path" != "x$new_path"; then
63678    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63680$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63681  fi
63682
63683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63684
63685  path="$POTENTIAL_FREETYPE_LIB_PATH"
63686  has_colon=`$ECHO $path | $GREP ^.:`
63687  new_path="$path"
63688  if test "x$has_colon" = x; then
63689    # Not in mixed or Windows style, start by that.
63690    new_path=`cmd //c echo $path`
63691  fi
63692
63693
63694  input_path="$new_path"
63695  # Check if we need to convert this using DOS-style short mode. If the path
63696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63697  # take no chances and rewrite it.
63698  # Note: m4 eats our [], so we need to use [ and ] instead.
63699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63700  if test "x$has_forbidden_chars" != x; then
63701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63703  fi
63704
63705
63706  windows_path="$new_path"
63707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63708    unix_path=`$CYGPATH -u "$windows_path"`
63709    new_path="$unix_path"
63710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63712    new_path="$unix_path"
63713  fi
63714
63715  if test "x$path" != "x$new_path"; then
63716    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63718$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63719  fi
63720
63721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63723
63724    else
63725      # We're on a unix platform. Hooray! :)
63726      path="$POTENTIAL_FREETYPE_LIB_PATH"
63727      has_space=`$ECHO "$path" | $GREP " "`
63728      if test "x$has_space" != x; then
63729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63730$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63731        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63732      fi
63733
63734      # Use eval to expand a potential ~
63735      eval path="$path"
63736      if test ! -f "$path" && test ! -d "$path"; then
63737        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63738      fi
63739
63740      if test -d "$path"; then
63741        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63742      else
63743        dir="`$DIRNAME "$path"`"
63744        base="`$BASENAME "$path"`"
63745        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63746      fi
63747    fi
63748  fi
63749
63750
63751    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63753$as_echo_n "checking for freetype includes... " >&6; }
63754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63755$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63756    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63758$as_echo_n "checking for freetype libraries... " >&6; }
63759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63760$as_echo "$FREETYPE_LIB_PATH" >&6; }
63761  fi
63762
63763              fi
63764            fi
63765          fi
63766        fi
63767      fi # end check in well-known locations
63768
63769      if test "x$FOUND_FREETYPE" != xyes; then
63770
63771  # Print a helpful message on how to acquire the necessary build dependency.
63772  # freetype is the help tag: freetype, cups, alsa etc
63773  MISSING_DEPENDENCY=freetype
63774
63775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63776    cygwin_help $MISSING_DEPENDENCY
63777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63778    msys_help $MISSING_DEPENDENCY
63779  else
63780    PKGHANDLER_COMMAND=
63781
63782    case $PKGHANDLER in
63783      apt-get)
63784        apt_help     $MISSING_DEPENDENCY ;;
63785      yum)
63786        yum_help     $MISSING_DEPENDENCY ;;
63787      brew)
63788        brew_help    $MISSING_DEPENDENCY ;;
63789      port)
63790        port_help    $MISSING_DEPENDENCY ;;
63791      pkgutil)
63792        pkgutil_help $MISSING_DEPENDENCY ;;
63793      pkgadd)
63794        pkgadd_help  $MISSING_DEPENDENCY ;;
63795    esac
63796
63797    if test "x$PKGHANDLER_COMMAND" != x; then
63798      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63799    fi
63800  fi
63801
63802        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63803      fi
63804    fi # end user specified settings
63805
63806    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63807    if test "x$FREETYPE_CFLAGS" = x; then
63808
63809  # Only process if variable expands to non-empty
63810
63811  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63813
63814  # Input might be given as Windows format, start by converting to
63815  # unix format.
63816  path="$FREETYPE_INCLUDE_PATH"
63817  new_path=`$CYGPATH -u "$path"`
63818
63819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63822  # "foo.exe" is OK but "foo" is an error.
63823  #
63824  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63825  # It is also a way to make sure we got the proper file name for the real test later on.
63826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63827  if test "x$test_shortpath" = x; then
63828    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63829$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63830    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63831  fi
63832
63833  # Call helper function which possibly converts this using DOS-style short mode.
63834  # If so, the updated path is stored in $new_path.
63835
63836  input_path="$new_path"
63837  # Check if we need to convert this using DOS-style short mode. If the path
63838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63839  # take no chances and rewrite it.
63840  # Note: m4 eats our [], so we need to use [ and ] instead.
63841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63842  if test "x$has_forbidden_chars" != x; then
63843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63847      # Going to short mode and back again did indeed matter. Since short mode is
63848      # case insensitive, let's make it lowercase to improve readability.
63849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63850      # Now convert it back to Unix-style (cygpath)
63851      input_path=`$CYGPATH -u "$shortmode_path"`
63852      new_path="$input_path"
63853    fi
63854  fi
63855
63856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63857  if test "x$test_cygdrive_prefix" = x; then
63858    # As a simple fix, exclude /usr/bin since it's not a real path.
63859    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63861      # a path prefixed by /cygdrive for fixpath to work.
63862      new_path="$CYGWIN_ROOT_PATH$input_path"
63863    fi
63864  fi
63865
63866
63867  if test "x$path" != "x$new_path"; then
63868    FREETYPE_INCLUDE_PATH="$new_path"
63869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63870$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63871  fi
63872
63873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63874
63875  path="$FREETYPE_INCLUDE_PATH"
63876  has_colon=`$ECHO $path | $GREP ^.:`
63877  new_path="$path"
63878  if test "x$has_colon" = x; then
63879    # Not in mixed or Windows style, start by that.
63880    new_path=`cmd //c echo $path`
63881  fi
63882
63883
63884  input_path="$new_path"
63885  # Check if we need to convert this using DOS-style short mode. If the path
63886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63887  # take no chances and rewrite it.
63888  # Note: m4 eats our [], so we need to use [ and ] instead.
63889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63890  if test "x$has_forbidden_chars" != x; then
63891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63893  fi
63894
63895
63896  windows_path="$new_path"
63897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63898    unix_path=`$CYGPATH -u "$windows_path"`
63899    new_path="$unix_path"
63900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63902    new_path="$unix_path"
63903  fi
63904
63905  if test "x$path" != "x$new_path"; then
63906    FREETYPE_INCLUDE_PATH="$new_path"
63907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63908$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63909  fi
63910
63911  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63912  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63913
63914    else
63915      # We're on a unix platform. Hooray! :)
63916      path="$FREETYPE_INCLUDE_PATH"
63917      has_space=`$ECHO "$path" | $GREP " "`
63918      if test "x$has_space" != x; then
63919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63920$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63921        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63922      fi
63923
63924      # Use eval to expand a potential ~
63925      eval path="$path"
63926      if test ! -f "$path" && test ! -d "$path"; then
63927        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63928      fi
63929
63930      if test -d "$path"; then
63931        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63932      else
63933        dir="`$DIRNAME "$path"`"
63934        base="`$BASENAME "$path"`"
63935        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63936      fi
63937    fi
63938  fi
63939
63940      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63941        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63942      else
63943        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63944      fi
63945    fi
63946
63947    if test "x$FREETYPE_LIBS" = x; then
63948
63949  # Only process if variable expands to non-empty
63950
63951  if test "x$FREETYPE_LIB_PATH" != x; then
63952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63953
63954  # Input might be given as Windows format, start by converting to
63955  # unix format.
63956  path="$FREETYPE_LIB_PATH"
63957  new_path=`$CYGPATH -u "$path"`
63958
63959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63962  # "foo.exe" is OK but "foo" is an error.
63963  #
63964  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63965  # It is also a way to make sure we got the proper file name for the real test later on.
63966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63967  if test "x$test_shortpath" = x; then
63968    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63969$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63970    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63971  fi
63972
63973  # Call helper function which possibly converts this using DOS-style short mode.
63974  # If so, the updated path is stored in $new_path.
63975
63976  input_path="$new_path"
63977  # Check if we need to convert this using DOS-style short mode. If the path
63978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63979  # take no chances and rewrite it.
63980  # Note: m4 eats our [], so we need to use [ and ] instead.
63981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63982  if test "x$has_forbidden_chars" != x; then
63983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63984    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63985    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63986    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63987      # Going to short mode and back again did indeed matter. Since short mode is
63988      # case insensitive, let's make it lowercase to improve readability.
63989      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63990      # Now convert it back to Unix-style (cygpath)
63991      input_path=`$CYGPATH -u "$shortmode_path"`
63992      new_path="$input_path"
63993    fi
63994  fi
63995
63996  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63997  if test "x$test_cygdrive_prefix" = x; then
63998    # As a simple fix, exclude /usr/bin since it's not a real path.
63999    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64000      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64001      # a path prefixed by /cygdrive for fixpath to work.
64002      new_path="$CYGWIN_ROOT_PATH$input_path"
64003    fi
64004  fi
64005
64006
64007  if test "x$path" != "x$new_path"; then
64008    FREETYPE_LIB_PATH="$new_path"
64009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
64010$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64011  fi
64012
64013    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64014
64015  path="$FREETYPE_LIB_PATH"
64016  has_colon=`$ECHO $path | $GREP ^.:`
64017  new_path="$path"
64018  if test "x$has_colon" = x; then
64019    # Not in mixed or Windows style, start by that.
64020    new_path=`cmd //c echo $path`
64021  fi
64022
64023
64024  input_path="$new_path"
64025  # Check if we need to convert this using DOS-style short mode. If the path
64026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64027  # take no chances and rewrite it.
64028  # Note: m4 eats our [], so we need to use [ and ] instead.
64029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64030  if test "x$has_forbidden_chars" != x; then
64031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64033  fi
64034
64035
64036  windows_path="$new_path"
64037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64038    unix_path=`$CYGPATH -u "$windows_path"`
64039    new_path="$unix_path"
64040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64042    new_path="$unix_path"
64043  fi
64044
64045  if test "x$path" != "x$new_path"; then
64046    FREETYPE_LIB_PATH="$new_path"
64047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
64048$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64049  fi
64050
64051  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64052  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64053
64054    else
64055      # We're on a unix platform. Hooray! :)
64056      path="$FREETYPE_LIB_PATH"
64057      has_space=`$ECHO "$path" | $GREP " "`
64058      if test "x$has_space" != x; then
64059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64060$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64061        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64062      fi
64063
64064      # Use eval to expand a potential ~
64065      eval path="$path"
64066      if test ! -f "$path" && test ! -d "$path"; then
64067        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64068      fi
64069
64070      if test -d "$path"; then
64071        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64072      else
64073        dir="`$DIRNAME "$path"`"
64074        base="`$BASENAME "$path"`"
64075        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64076      fi
64077    fi
64078  fi
64079
64080      if test "x$OPENJDK_TARGET_OS" = xwindows; then
64081        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
64082      else
64083        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
64084      fi
64085    fi
64086
64087    # Try to compile it
64088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
64089$as_echo_n "checking if we can compile and link with freetype... " >&6; }
64090    ac_ext=cpp
64091ac_cpp='$CXXCPP $CPPFLAGS'
64092ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64093ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64094ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64095
64096    PREV_CXXCFLAGS="$CXXFLAGS"
64097    PREV_LIBS="$LIBS"
64098    PREV_CXX="$CXX"
64099    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
64100    LIBS="$LIBS $FREETYPE_LIBS"
64101    CXX="$FIXPATH $CXX"
64102    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64103/* end confdefs.h.  */
64104
64105          #include<ft2build.h>
64106          #include FT_FREETYPE_H
64107          int main () {
64108            FT_Init_FreeType(NULL);
64109            return 0;
64110          }
64111
64112_ACEOF
64113if ac_fn_cxx_try_link "$LINENO"; then :
64114
64115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64116$as_echo "yes" >&6; }
64117
64118else
64119
64120          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64121$as_echo "no" >&6; }
64122          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
64123$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
64124          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
64125$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
64126
64127
64128  # Print a helpful message on how to acquire the necessary build dependency.
64129  # freetype is the help tag: freetype, cups, alsa etc
64130  MISSING_DEPENDENCY=freetype
64131
64132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64133    cygwin_help $MISSING_DEPENDENCY
64134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64135    msys_help $MISSING_DEPENDENCY
64136  else
64137    PKGHANDLER_COMMAND=
64138
64139    case $PKGHANDLER in
64140      apt-get)
64141        apt_help     $MISSING_DEPENDENCY ;;
64142      yum)
64143        yum_help     $MISSING_DEPENDENCY ;;
64144      brew)
64145        brew_help    $MISSING_DEPENDENCY ;;
64146      port)
64147        port_help    $MISSING_DEPENDENCY ;;
64148      pkgutil)
64149        pkgutil_help $MISSING_DEPENDENCY ;;
64150      pkgadd)
64151        pkgadd_help  $MISSING_DEPENDENCY ;;
64152    esac
64153
64154    if test "x$PKGHANDLER_COMMAND" != x; then
64155      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64156    fi
64157  fi
64158
64159
64160          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
64161
64162
64163fi
64164rm -f core conftest.err conftest.$ac_objext \
64165    conftest$ac_exeext conftest.$ac_ext
64166    CXXCFLAGS="$PREV_CXXFLAGS"
64167    LIBS="$PREV_LIBS"
64168    CXX="$PREV_CXX"
64169    ac_ext=cpp
64170ac_cpp='$CXXCPP $CPPFLAGS'
64171ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64172ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64173ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64174
64175
64176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
64177$as_echo_n "checking if we should bundle freetype... " >&6; }
64178    if test "x$BUNDLE_FREETYPE" = xyes; then
64179      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
64180    fi
64181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
64182$as_echo "$BUNDLE_FREETYPE" >&6; }
64183
64184  fi # end freetype needed
64185
64186  FREETYPE_LICENSE=""
64187  if test "x$with_freetype_license" = "xyes"; then
64188    as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
64189  elif test "x$with_freetype_license" != "x"; then
64190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
64191$as_echo_n "checking for freetype license... " >&6; }
64192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
64193$as_echo "$with_freetype_license" >&6; }
64194    FREETYPE_LICENSE="$with_freetype_license"
64195
64196  # Only process if variable expands to non-empty
64197
64198  if test "x$FREETYPE_LICENSE" != x; then
64199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64200
64201  # Input might be given as Windows format, start by converting to
64202  # unix format.
64203  path="$FREETYPE_LICENSE"
64204  new_path=`$CYGPATH -u "$path"`
64205
64206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64209  # "foo.exe" is OK but "foo" is an error.
64210  #
64211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64212  # It is also a way to make sure we got the proper file name for the real test later on.
64213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64214  if test "x$test_shortpath" = x; then
64215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64216$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64217    as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
64218  fi
64219
64220  # Call helper function which possibly converts this using DOS-style short mode.
64221  # If so, the updated path is stored in $new_path.
64222
64223  input_path="$new_path"
64224  # Check if we need to convert this using DOS-style short mode. If the path
64225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64226  # take no chances and rewrite it.
64227  # Note: m4 eats our [], so we need to use [ and ] instead.
64228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64229  if test "x$has_forbidden_chars" != x; then
64230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64234      # Going to short mode and back again did indeed matter. Since short mode is
64235      # case insensitive, let's make it lowercase to improve readability.
64236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64237      # Now convert it back to Unix-style (cygpath)
64238      input_path=`$CYGPATH -u "$shortmode_path"`
64239      new_path="$input_path"
64240    fi
64241  fi
64242
64243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64244  if test "x$test_cygdrive_prefix" = x; then
64245    # As a simple fix, exclude /usr/bin since it's not a real path.
64246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64248      # a path prefixed by /cygdrive for fixpath to work.
64249      new_path="$CYGWIN_ROOT_PATH$input_path"
64250    fi
64251  fi
64252
64253
64254  if test "x$path" != "x$new_path"; then
64255    FREETYPE_LICENSE="$new_path"
64256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64257$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64258  fi
64259
64260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64261
64262  path="$FREETYPE_LICENSE"
64263  has_colon=`$ECHO $path | $GREP ^.:`
64264  new_path="$path"
64265  if test "x$has_colon" = x; then
64266    # Not in mixed or Windows style, start by that.
64267    new_path=`cmd //c echo $path`
64268  fi
64269
64270
64271  input_path="$new_path"
64272  # Check if we need to convert this using DOS-style short mode. If the path
64273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64274  # take no chances and rewrite it.
64275  # Note: m4 eats our [], so we need to use [ and ] instead.
64276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64277  if test "x$has_forbidden_chars" != x; then
64278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64280  fi
64281
64282
64283  windows_path="$new_path"
64284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64285    unix_path=`$CYGPATH -u "$windows_path"`
64286    new_path="$unix_path"
64287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64289    new_path="$unix_path"
64290  fi
64291
64292  if test "x$path" != "x$new_path"; then
64293    FREETYPE_LICENSE="$new_path"
64294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64295$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64296  fi
64297
64298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64300
64301    else
64302      # We're on a unix platform. Hooray! :)
64303      path="$FREETYPE_LICENSE"
64304      has_space=`$ECHO "$path" | $GREP " "`
64305      if test "x$has_space" != x; then
64306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64307$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64309      fi
64310
64311      # Use eval to expand a potential ~
64312      eval path="$path"
64313      if test ! -f "$path" && test ! -d "$path"; then
64314        as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
64315      fi
64316
64317      if test -d "$path"; then
64318        FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
64319      else
64320        dir="`$DIRNAME "$path"`"
64321        base="`$BASENAME "$path"`"
64322        FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
64323      fi
64324    fi
64325  fi
64326
64327    if test ! -f "$FREETYPE_LICENSE"; then
64328      as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
64329    fi
64330  fi
64331
64332
64333
64334
64335
64336
64337
64338
64339# Check whether --with-alsa was given.
64340if test "${with_alsa+set}" = set; then :
64341  withval=$with_alsa;
64342fi
64343
64344
64345# Check whether --with-alsa-include was given.
64346if test "${with_alsa_include+set}" = set; then :
64347  withval=$with_alsa_include;
64348fi
64349
64350
64351# Check whether --with-alsa-lib was given.
64352if test "${with_alsa_lib+set}" = set; then :
64353  withval=$with_alsa_lib;
64354fi
64355
64356
64357  if test "x$NEEDS_LIB_ALSA" = xfalse; then
64358    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
64359        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
64360        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
64361      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
64362$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
64363    fi
64364    ALSA_CFLAGS=
64365    ALSA_LIBS=
64366  else
64367    ALSA_FOUND=no
64368
64369    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
64370      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
64371    fi
64372
64373    if test "x${with_alsa}" != x; then
64374      ALSA_LIBS="-L${with_alsa}/lib -lasound"
64375      ALSA_CFLAGS="-I${with_alsa}/include"
64376      ALSA_FOUND=yes
64377    fi
64378    if test "x${with_alsa_include}" != x; then
64379      ALSA_CFLAGS="-I${with_alsa_include}"
64380      ALSA_FOUND=yes
64381    fi
64382    if test "x${with_alsa_lib}" != x; then
64383      ALSA_LIBS="-L${with_alsa_lib} -lasound"
64384      ALSA_FOUND=yes
64385    fi
64386    # Do not try pkg-config if we have a sysroot set.
64387    if test "x$SYSROOT" = x; then
64388      if test "x$ALSA_FOUND" = xno; then
64389
64390pkg_failed=no
64391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
64392$as_echo_n "checking for ALSA... " >&6; }
64393
64394if test -n "$ALSA_CFLAGS"; then
64395    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
64396 elif test -n "$PKG_CONFIG"; then
64397    if test -n "$PKG_CONFIG" && \
64398    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64399  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64400  ac_status=$?
64401  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64402  test $ac_status = 0; }; then
64403  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
64404else
64405  pkg_failed=yes
64406fi
64407 else
64408    pkg_failed=untried
64409fi
64410if test -n "$ALSA_LIBS"; then
64411    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
64412 elif test -n "$PKG_CONFIG"; then
64413    if test -n "$PKG_CONFIG" && \
64414    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64415  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64416  ac_status=$?
64417  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64418  test $ac_status = 0; }; then
64419  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
64420else
64421  pkg_failed=yes
64422fi
64423 else
64424    pkg_failed=untried
64425fi
64426
64427
64428
64429if test $pkg_failed = yes; then
64430
64431if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64432        _pkg_short_errors_supported=yes
64433else
64434        _pkg_short_errors_supported=no
64435fi
64436        if test $_pkg_short_errors_supported = yes; then
64437	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
64438        else
64439	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
64440        fi
64441	# Put the nasty error message in config.log where it belongs
64442	echo "$ALSA_PKG_ERRORS" >&5
64443
64444	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64445$as_echo "no" >&6; }
64446                ALSA_FOUND=no
64447elif test $pkg_failed = untried; then
64448	ALSA_FOUND=no
64449else
64450	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
64451	ALSA_LIBS=$pkg_cv_ALSA_LIBS
64452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64453$as_echo "yes" >&6; }
64454	ALSA_FOUND=yes
64455fi
64456      fi
64457    fi
64458    if test "x$ALSA_FOUND" = xno; then
64459      for ac_header in alsa/asoundlib.h
64460do :
64461  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
64462if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
64463  cat >>confdefs.h <<_ACEOF
64464#define HAVE_ALSA_ASOUNDLIB_H 1
64465_ACEOF
64466
64467            ALSA_FOUND=yes
64468            ALSA_CFLAGS=-Iignoreme
64469            ALSA_LIBS=-lasound
64470            DEFAULT_ALSA=yes
64471
64472else
64473  ALSA_FOUND=no
64474
64475fi
64476
64477done
64478
64479    fi
64480    if test "x$ALSA_FOUND" = xno; then
64481
64482  # Print a helpful message on how to acquire the necessary build dependency.
64483  # alsa is the help tag: freetype, cups, alsa etc
64484  MISSING_DEPENDENCY=alsa
64485
64486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64487    cygwin_help $MISSING_DEPENDENCY
64488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64489    msys_help $MISSING_DEPENDENCY
64490  else
64491    PKGHANDLER_COMMAND=
64492
64493    case $PKGHANDLER in
64494      apt-get)
64495        apt_help     $MISSING_DEPENDENCY ;;
64496      yum)
64497        yum_help     $MISSING_DEPENDENCY ;;
64498      brew)
64499        brew_help    $MISSING_DEPENDENCY ;;
64500      port)
64501        port_help    $MISSING_DEPENDENCY ;;
64502      pkgutil)
64503        pkgutil_help $MISSING_DEPENDENCY ;;
64504      pkgadd)
64505        pkgadd_help  $MISSING_DEPENDENCY ;;
64506    esac
64507
64508    if test "x$PKGHANDLER_COMMAND" != x; then
64509      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64510    fi
64511  fi
64512
64513      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64514    fi
64515  fi
64516
64517
64518
64519
64520
64521
64522# Check whether --with-libffi was given.
64523if test "${with_libffi+set}" = set; then :
64524  withval=$with_libffi;
64525fi
64526
64527
64528# Check whether --with-libffi-include was given.
64529if test "${with_libffi_include+set}" = set; then :
64530  withval=$with_libffi_include;
64531fi
64532
64533
64534# Check whether --with-libffi-lib was given.
64535if test "${with_libffi_lib+set}" = set; then :
64536  withval=$with_libffi_lib;
64537fi
64538
64539  # Check whether --enable-libffi-bundling was given.
64540if test "${enable_libffi_bundling+set}" = set; then :
64541  enableval=$enable_libffi_bundling;
64542fi
64543
64544
64545  if test "x$NEEDS_LIB_FFI" = xfalse; then
64546    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64547        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64548        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64549      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64550$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64551    fi
64552    LIBFFI_CFLAGS=
64553    LIBFFI_LIBS=
64554  else
64555    LIBFFI_FOUND=no
64556
64557    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64558      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64559    fi
64560
64561    if test "x${with_libffi}" != x; then
64562      LIBFFI_LIB_PATH="${with_libffi}/lib"
64563      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64564      LIBFFI_CFLAGS="-I${with_libffi}/include"
64565      LIBFFI_FOUND=yes
64566    fi
64567    if test "x${with_libffi_include}" != x; then
64568      LIBFFI_CFLAGS="-I${with_libffi_include}"
64569      LIBFFI_FOUND=yes
64570    fi
64571    if test "x${with_libffi_lib}" != x; then
64572      LIBFFI_LIB_PATH="${with_libffi_lib}"
64573      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64574      LIBFFI_FOUND=yes
64575    fi
64576    # Do not try pkg-config if we have a sysroot set.
64577    if test "x$SYSROOT" = x; then
64578      if test "x$LIBFFI_FOUND" = xno; then
64579        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64580
64581pkg_failed=no
64582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64583$as_echo_n "checking for LIBFFI... " >&6; }
64584
64585if test -n "$LIBFFI_CFLAGS"; then
64586    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64587 elif test -n "$PKG_CONFIG"; then
64588    if test -n "$PKG_CONFIG" && \
64589    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64590  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64591  ac_status=$?
64592  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64593  test $ac_status = 0; }; then
64594  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64595else
64596  pkg_failed=yes
64597fi
64598 else
64599    pkg_failed=untried
64600fi
64601if test -n "$LIBFFI_LIBS"; then
64602    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64603 elif test -n "$PKG_CONFIG"; then
64604    if test -n "$PKG_CONFIG" && \
64605    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64606  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64607  ac_status=$?
64608  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64609  test $ac_status = 0; }; then
64610  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64611else
64612  pkg_failed=yes
64613fi
64614 else
64615    pkg_failed=untried
64616fi
64617
64618
64619
64620if test $pkg_failed = yes; then
64621
64622if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64623        _pkg_short_errors_supported=yes
64624else
64625        _pkg_short_errors_supported=no
64626fi
64627        if test $_pkg_short_errors_supported = yes; then
64628	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64629        else
64630	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64631        fi
64632	# Put the nasty error message in config.log where it belongs
64633	echo "$LIBFFI_PKG_ERRORS" >&5
64634
64635	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64636$as_echo "no" >&6; }
64637                LIBFFI_FOUND=no
64638elif test $pkg_failed = untried; then
64639	LIBFFI_FOUND=no
64640else
64641	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64642	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64644$as_echo "yes" >&6; }
64645	LIBFFI_FOUND=yes
64646fi
64647      fi
64648    fi
64649    if test "x$LIBFFI_FOUND" = xno; then
64650      for ac_header in ffi.h
64651do :
64652  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64653if test "x$ac_cv_header_ffi_h" = xyes; then :
64654  cat >>confdefs.h <<_ACEOF
64655#define HAVE_FFI_H 1
64656_ACEOF
64657
64658            LIBFFI_FOUND=yes
64659            LIBFFI_CFLAGS=
64660            LIBFFI_LIBS=-lffi
64661
64662else
64663  LIBFFI_FOUND=no
64664
64665fi
64666
64667done
64668
64669    fi
64670    if test "x$LIBFFI_FOUND" = xno; then
64671
64672  # Print a helpful message on how to acquire the necessary build dependency.
64673  # ffi is the help tag: freetype, cups, alsa etc
64674  MISSING_DEPENDENCY=ffi
64675
64676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64677    cygwin_help $MISSING_DEPENDENCY
64678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64679    msys_help $MISSING_DEPENDENCY
64680  else
64681    PKGHANDLER_COMMAND=
64682
64683    case $PKGHANDLER in
64684      apt-get)
64685        apt_help     $MISSING_DEPENDENCY ;;
64686      yum)
64687        yum_help     $MISSING_DEPENDENCY ;;
64688      brew)
64689        brew_help    $MISSING_DEPENDENCY ;;
64690      port)
64691        port_help    $MISSING_DEPENDENCY ;;
64692      pkgutil)
64693        pkgutil_help $MISSING_DEPENDENCY ;;
64694      pkgadd)
64695        pkgadd_help  $MISSING_DEPENDENCY ;;
64696    esac
64697
64698    if test "x$PKGHANDLER_COMMAND" != x; then
64699      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64700    fi
64701  fi
64702
64703      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64704    fi
64705
64706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64707$as_echo_n "checking if libffi works... " >&6; }
64708    ac_ext=c
64709ac_cpp='$CPP $CPPFLAGS'
64710ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64711ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64712ac_compiler_gnu=$ac_cv_c_compiler_gnu
64713
64714    OLD_CFLAGS="$CFLAGS"
64715    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64716    OLD_LIBS="$LIBS"
64717    LIBS="$LIBS $LIBFFI_LIBS"
64718    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64719/* end confdefs.h.  */
64720#include <ffi.h>
64721int
64722main ()
64723{
64724
64725          ffi_call(NULL, NULL, NULL, NULL);
64726          return 0;
64727
64728  ;
64729  return 0;
64730}
64731_ACEOF
64732if ac_fn_c_try_link "$LINENO"; then :
64733  LIBFFI_WORKS=yes
64734else
64735  LIBFFI_WORKS=no
64736
64737fi
64738rm -f core conftest.err conftest.$ac_objext \
64739    conftest$ac_exeext conftest.$ac_ext
64740    CFLAGS="$OLD_CFLAGS"
64741    LIBS="$OLD_LIBS"
64742    ac_ext=cpp
64743ac_cpp='$CXXCPP $CPPFLAGS'
64744ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64745ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64746ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64747
64748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64749$as_echo "$LIBFFI_WORKS" >&6; }
64750
64751    if test "x$LIBFFI_WORKS" = xno; then
64752
64753  # Print a helpful message on how to acquire the necessary build dependency.
64754  # ffi is the help tag: freetype, cups, alsa etc
64755  MISSING_DEPENDENCY=ffi
64756
64757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64758    cygwin_help $MISSING_DEPENDENCY
64759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64760    msys_help $MISSING_DEPENDENCY
64761  else
64762    PKGHANDLER_COMMAND=
64763
64764    case $PKGHANDLER in
64765      apt-get)
64766        apt_help     $MISSING_DEPENDENCY ;;
64767      yum)
64768        yum_help     $MISSING_DEPENDENCY ;;
64769      brew)
64770        brew_help    $MISSING_DEPENDENCY ;;
64771      port)
64772        port_help    $MISSING_DEPENDENCY ;;
64773      pkgutil)
64774        pkgutil_help $MISSING_DEPENDENCY ;;
64775      pkgadd)
64776        pkgadd_help  $MISSING_DEPENDENCY ;;
64777    esac
64778
64779    if test "x$PKGHANDLER_COMMAND" != x; then
64780      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64781    fi
64782  fi
64783
64784      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64785    fi
64786
64787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64788$as_echo_n "checking if libffi should be bundled... " >&6; }
64789    if test "x$enable_libffi_bundling" = "x"; then
64790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64791$as_echo "no" >&6; }
64792      ENABLE_LIBFFI_BUNDLING=false
64793    elif  test "x$enable_libffi_bundling" = "xno"; then
64794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64795$as_echo "no, forced" >&6; }
64796      ENABLE_LIBFFI_BUNDLING=false
64797    elif  test "x$enable_libffi_bundling" = "xyes"; then
64798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64799$as_echo "yes, forced" >&6; }
64800      ENABLE_LIBFFI_BUNDLING=true
64801    else
64802      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64803    fi
64804
64805    # Find the libffi.so.X to bundle
64806    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64807      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64808$as_echo_n "checking for libffi lib file location... " >&6; }
64809      if test "x${LIBFFI_LIB_PATH}" != x; then
64810        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64811          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64812        else
64813          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64814        fi
64815      else
64816        # If we don't have an explicit path, look in a few obvious places
64817        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64818          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64819            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64820          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64821            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64822          else
64823            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64824          fi
64825        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64826          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64827            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64828          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64829            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64830          else
64831            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64832          fi
64833        else
64834          # Fallback on the default /usr/lib dir
64835          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64836            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64837          else
64838            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64839          fi
64840        fi
64841      fi
64842      # Make sure the wildcard is evaluated
64843      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64845$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64846    fi
64847  fi
64848
64849
64850
64851
64852
64853
64854
64855  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64856    # Extract the first word of "llvm-config", so it can be a program name with args.
64857set dummy llvm-config; ac_word=$2
64858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64859$as_echo_n "checking for $ac_word... " >&6; }
64860if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64861  $as_echo_n "(cached) " >&6
64862else
64863  if test -n "$LLVM_CONFIG"; then
64864  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64865else
64866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64867for as_dir in $PATH
64868do
64869  IFS=$as_save_IFS
64870  test -z "$as_dir" && as_dir=.
64871    for ac_exec_ext in '' $ac_executable_extensions; do
64872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64873    ac_cv_prog_LLVM_CONFIG="llvm-config"
64874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64875    break 2
64876  fi
64877done
64878  done
64879IFS=$as_save_IFS
64880
64881fi
64882fi
64883LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64884if test -n "$LLVM_CONFIG"; then
64885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64886$as_echo "$LLVM_CONFIG" >&6; }
64887else
64888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64889$as_echo "no" >&6; }
64890fi
64891
64892
64893
64894    if test "x$LLVM_CONFIG" != xllvm-config; then
64895      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64896    fi
64897
64898    llvm_components="jit mcjit engine nativecodegen native"
64899    unset LLVM_CFLAGS
64900    for flag in $("$LLVM_CONFIG" --cxxflags); do
64901      if echo "${flag}" | grep -q '^-[ID]'; then
64902        if test "${flag}" != "-D_DEBUG" ; then
64903          if test "${LLVM_CFLAGS}" != "" ; then
64904            LLVM_CFLAGS="${LLVM_CFLAGS} "
64905          fi
64906          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64907        fi
64908      fi
64909    done
64910    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64911    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64912
64913    unset LLVM_LDFLAGS
64914    for flag in $("${LLVM_CONFIG}" --ldflags); do
64915      if echo "${flag}" | grep -q '^-L'; then
64916        if test "${LLVM_LDFLAGS}" != ""; then
64917          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64918        fi
64919        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64920      fi
64921    done
64922
64923    unset LLVM_LIBS
64924    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64925      if echo "${flag}" | grep -q '^-l'; then
64926        if test "${LLVM_LIBS}" != ""; then
64927          LLVM_LIBS="${LLVM_LIBS} "
64928        fi
64929        LLVM_LIBS="${LLVM_LIBS}${flag}"
64930      fi
64931    done
64932
64933    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64934    # always properly detect -ltinfo
64935    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64936
64937
64938
64939
64940  fi
64941
64942
64943
64944# Check whether --with-libjpeg was given.
64945if test "${with_libjpeg+set}" = set; then :
64946  withval=$with_libjpeg;
64947fi
64948
64949
64950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64951$as_echo_n "checking for which libjpeg to use... " >&6; }
64952  # default is bundled
64953  DEFAULT_LIBJPEG=bundled
64954  # if user didn't specify, use DEFAULT_LIBJPEG
64955  if test "x${with_libjpeg}" = "x"; then
64956    with_libjpeg=${DEFAULT_LIBJPEG}
64957  fi
64958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64959$as_echo "${with_libjpeg}" >&6; }
64960
64961  if test "x${with_libjpeg}" = "xbundled"; then
64962    USE_EXTERNAL_LIBJPEG=false
64963  elif test "x${with_libjpeg}" = "xsystem"; then
64964    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64965if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64966
64967else
64968   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64969fi
64970
64971
64972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64973$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64974if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64975  $as_echo_n "(cached) " >&6
64976else
64977  ac_check_lib_save_LIBS=$LIBS
64978LIBS="-ljpeg  $LIBS"
64979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64980/* end confdefs.h.  */
64981
64982/* Override any GCC internal prototype to avoid an error.
64983   Use char because int might match the return type of a GCC
64984   builtin and then its argument prototype would still apply.  */
64985#ifdef __cplusplus
64986extern "C"
64987#endif
64988char jpeg_CreateDecompress ();
64989int
64990main ()
64991{
64992return jpeg_CreateDecompress ();
64993  ;
64994  return 0;
64995}
64996_ACEOF
64997if ac_fn_cxx_try_link "$LINENO"; then :
64998  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64999else
65000  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
65001fi
65002rm -f core conftest.err conftest.$ac_objext \
65003    conftest$ac_exeext conftest.$ac_ext
65004LIBS=$ac_check_lib_save_LIBS
65005fi
65006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
65007$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
65008if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
65009  cat >>confdefs.h <<_ACEOF
65010#define HAVE_LIBJPEG 1
65011_ACEOF
65012
65013  LIBS="-ljpeg $LIBS"
65014
65015else
65016   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
65017fi
65018
65019
65020    USE_EXTERNAL_LIBJPEG=true
65021  else
65022    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
65023  fi
65024
65025
65026
65027
65028
65029# Check whether --with-giflib was given.
65030if test "${with_giflib+set}" = set; then :
65031  withval=$with_giflib;
65032fi
65033
65034
65035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
65036$as_echo_n "checking for which giflib to use... " >&6; }
65037  # default is bundled
65038  DEFAULT_GIFLIB=bundled
65039  # if user didn't specify, use DEFAULT_GIFLIB
65040  if test "x${with_giflib}" = "x"; then
65041    with_giflib=${DEFAULT_GIFLIB}
65042  fi
65043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
65044$as_echo "${with_giflib}" >&6; }
65045
65046  if test "x${with_giflib}" = "xbundled"; then
65047    USE_EXTERNAL_LIBGIF=false
65048  elif test "x${with_giflib}" = "xsystem"; then
65049    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
65050if test "x$ac_cv_header_gif_lib_h" = xyes; then :
65051
65052else
65053   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
65054fi
65055
65056
65057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
65058$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
65059if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
65060  $as_echo_n "(cached) " >&6
65061else
65062  ac_check_lib_save_LIBS=$LIBS
65063LIBS="-lgif  $LIBS"
65064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65065/* end confdefs.h.  */
65066
65067/* Override any GCC internal prototype to avoid an error.
65068   Use char because int might match the return type of a GCC
65069   builtin and then its argument prototype would still apply.  */
65070#ifdef __cplusplus
65071extern "C"
65072#endif
65073char DGifGetCode ();
65074int
65075main ()
65076{
65077return DGifGetCode ();
65078  ;
65079  return 0;
65080}
65081_ACEOF
65082if ac_fn_cxx_try_link "$LINENO"; then :
65083  ac_cv_lib_gif_DGifGetCode=yes
65084else
65085  ac_cv_lib_gif_DGifGetCode=no
65086fi
65087rm -f core conftest.err conftest.$ac_objext \
65088    conftest$ac_exeext conftest.$ac_ext
65089LIBS=$ac_check_lib_save_LIBS
65090fi
65091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
65092$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
65093if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
65094  cat >>confdefs.h <<_ACEOF
65095#define HAVE_LIBGIF 1
65096_ACEOF
65097
65098  LIBS="-lgif $LIBS"
65099
65100else
65101   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
65102fi
65103
65104
65105    USE_EXTERNAL_LIBGIF=true
65106  else
65107    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
65108  fi
65109
65110
65111
65112
65113
65114# Check whether --with-libpng was given.
65115if test "${with_libpng+set}" = set; then :
65116  withval=$with_libpng;
65117fi
65118
65119
65120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
65121$as_echo_n "checking for which libpng to use... " >&6; }
65122
65123  # default is bundled
65124  DEFAULT_LIBPNG=bundled
65125  # if user didn't specify, use DEFAULT_LIBPNG
65126  if test "x${with_libpng}" = "x"; then
65127    with_libpng=${DEFAULT_LIBPNG}
65128  fi
65129
65130  if test "x${with_libpng}" = "xbundled"; then
65131    USE_EXTERNAL_LIBPNG=false
65132    PNG_CFLAGS=""
65133    PNG_LIBS=""
65134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65135$as_echo "bundled" >&6; }
65136  elif test "x${with_libpng}" = "xsystem"; then
65137
65138pkg_failed=no
65139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
65140$as_echo_n "checking for PNG... " >&6; }
65141
65142if test -n "$PNG_CFLAGS"; then
65143    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
65144 elif test -n "$PKG_CONFIG"; then
65145    if test -n "$PKG_CONFIG" && \
65146    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65147  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65148  ac_status=$?
65149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65150  test $ac_status = 0; }; then
65151  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
65152else
65153  pkg_failed=yes
65154fi
65155 else
65156    pkg_failed=untried
65157fi
65158if test -n "$PNG_LIBS"; then
65159    pkg_cv_PNG_LIBS="$PNG_LIBS"
65160 elif test -n "$PKG_CONFIG"; then
65161    if test -n "$PKG_CONFIG" && \
65162    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65163  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65164  ac_status=$?
65165  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65166  test $ac_status = 0; }; then
65167  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
65168else
65169  pkg_failed=yes
65170fi
65171 else
65172    pkg_failed=untried
65173fi
65174
65175
65176
65177if test $pkg_failed = yes; then
65178
65179if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65180        _pkg_short_errors_supported=yes
65181else
65182        _pkg_short_errors_supported=no
65183fi
65184        if test $_pkg_short_errors_supported = yes; then
65185	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
65186        else
65187	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
65188        fi
65189	# Put the nasty error message in config.log where it belongs
65190	echo "$PNG_PKG_ERRORS" >&5
65191
65192	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65193$as_echo "no" >&6; }
65194                LIBPNG_FOUND=no
65195elif test $pkg_failed = untried; then
65196	LIBPNG_FOUND=no
65197else
65198	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
65199	PNG_LIBS=$pkg_cv_PNG_LIBS
65200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65201$as_echo "yes" >&6; }
65202	LIBPNG_FOUND=yes
65203fi
65204    if test "x${LIBPNG_FOUND}" = "xyes"; then
65205      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
65206      USE_EXTERNAL_LIBPNG=true
65207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65208$as_echo "system" >&6; }
65209    else
65210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65211$as_echo "system not found" >&6; }
65212      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
65213    fi
65214  else
65215    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
65216  fi
65217
65218
65219
65220
65221
65222
65223
65224# Check whether --with-zlib was given.
65225if test "${with_zlib+set}" = set; then :
65226  withval=$with_zlib;
65227fi
65228
65229
65230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
65231$as_echo_n "checking for compress in -lz... " >&6; }
65232if ${ac_cv_lib_z_compress+:} false; then :
65233  $as_echo_n "(cached) " >&6
65234else
65235  ac_check_lib_save_LIBS=$LIBS
65236LIBS="-lz  $LIBS"
65237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65238/* end confdefs.h.  */
65239
65240/* Override any GCC internal prototype to avoid an error.
65241   Use char because int might match the return type of a GCC
65242   builtin and then its argument prototype would still apply.  */
65243#ifdef __cplusplus
65244extern "C"
65245#endif
65246char compress ();
65247int
65248main ()
65249{
65250return compress ();
65251  ;
65252  return 0;
65253}
65254_ACEOF
65255if ac_fn_cxx_try_link "$LINENO"; then :
65256  ac_cv_lib_z_compress=yes
65257else
65258  ac_cv_lib_z_compress=no
65259fi
65260rm -f core conftest.err conftest.$ac_objext \
65261    conftest$ac_exeext conftest.$ac_ext
65262LIBS=$ac_check_lib_save_LIBS
65263fi
65264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
65265$as_echo "$ac_cv_lib_z_compress" >&6; }
65266if test "x$ac_cv_lib_z_compress" = xyes; then :
65267   ZLIB_FOUND=yes
65268else
65269   ZLIB_FOUND=no
65270fi
65271
65272
65273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
65274$as_echo_n "checking for which zlib to use... " >&6; }
65275
65276  DEFAULT_ZLIB=system
65277  if test "x$OPENJDK_TARGET_OS" = xwindows; then
65278    # On windows default is bundled...on others default is system
65279    DEFAULT_ZLIB=bundled
65280  fi
65281
65282  if test "x${ZLIB_FOUND}" != "xyes"; then
65283    # If we don't find any system...set default to bundled
65284    DEFAULT_ZLIB=bundled
65285  fi
65286
65287  # If user didn't specify, use DEFAULT_ZLIB
65288  if test "x${with_zlib}" = "x"; then
65289    with_zlib=${DEFAULT_ZLIB}
65290  fi
65291
65292  if test "x${with_zlib}" = "xbundled"; then
65293    USE_EXTERNAL_LIBZ=false
65294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65295$as_echo "bundled" >&6; }
65296  elif test "x${with_zlib}" = "xsystem"; then
65297    if test "x${ZLIB_FOUND}" = "xyes"; then
65298      USE_EXTERNAL_LIBZ=true
65299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65300$as_echo "system" >&6; }
65301    else
65302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65303$as_echo "system not found" >&6; }
65304      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
65305    fi
65306  else
65307    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
65308  fi
65309
65310
65311
65312
65313
65314# Check whether --with-lcms was given.
65315if test "${with_lcms+set}" = set; then :
65316  withval=$with_lcms;
65317fi
65318
65319
65320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
65321$as_echo_n "checking for which lcms to use... " >&6; }
65322
65323  DEFAULT_LCMS=bundled
65324  # If user didn't specify, use DEFAULT_LCMS
65325  if test "x${with_lcms}" = "x"; then
65326    with_lcms=${DEFAULT_LCMS}
65327  fi
65328
65329  if test "x${with_lcms}" = "xbundled"; then
65330    USE_EXTERNAL_LCMS=false
65331    LCMS_CFLAGS=""
65332    LCMS_LIBS=""
65333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65334$as_echo "bundled" >&6; }
65335  elif test "x${with_lcms}" = "xsystem"; then
65336    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65337$as_echo "system" >&6; }
65338
65339pkg_failed=no
65340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
65341$as_echo_n "checking for LCMS... " >&6; }
65342
65343if test -n "$LCMS_CFLAGS"; then
65344    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
65345 elif test -n "$PKG_CONFIG"; then
65346    if test -n "$PKG_CONFIG" && \
65347    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65348  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65349  ac_status=$?
65350  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65351  test $ac_status = 0; }; then
65352  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
65353else
65354  pkg_failed=yes
65355fi
65356 else
65357    pkg_failed=untried
65358fi
65359if test -n "$LCMS_LIBS"; then
65360    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
65361 elif test -n "$PKG_CONFIG"; then
65362    if test -n "$PKG_CONFIG" && \
65363    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65364  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65365  ac_status=$?
65366  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65367  test $ac_status = 0; }; then
65368  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
65369else
65370  pkg_failed=yes
65371fi
65372 else
65373    pkg_failed=untried
65374fi
65375
65376
65377
65378if test $pkg_failed = yes; then
65379
65380if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65381        _pkg_short_errors_supported=yes
65382else
65383        _pkg_short_errors_supported=no
65384fi
65385        if test $_pkg_short_errors_supported = yes; then
65386	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
65387        else
65388	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
65389        fi
65390	# Put the nasty error message in config.log where it belongs
65391	echo "$LCMS_PKG_ERRORS" >&5
65392
65393	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65394$as_echo "no" >&6; }
65395                LCMS_FOUND=no
65396elif test $pkg_failed = untried; then
65397	LCMS_FOUND=no
65398else
65399	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
65400	LCMS_LIBS=$pkg_cv_LCMS_LIBS
65401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65402$as_echo "yes" >&6; }
65403	LCMS_FOUND=yes
65404fi
65405    if test "x${LCMS_FOUND}" = "xyes"; then
65406      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
65407      USE_EXTERNAL_LCMS=true
65408    else
65409      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
65410    fi
65411  else
65412    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
65413  fi
65414
65415
65416
65417
65418
65419
65420
65421
65422
65423
65424
65425
65426
65427  # Setup libm (the maths library)
65428  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
65429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
65430$as_echo_n "checking for cos in -lm... " >&6; }
65431if ${ac_cv_lib_m_cos+:} false; then :
65432  $as_echo_n "(cached) " >&6
65433else
65434  ac_check_lib_save_LIBS=$LIBS
65435LIBS="-lm  $LIBS"
65436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65437/* end confdefs.h.  */
65438
65439/* Override any GCC internal prototype to avoid an error.
65440   Use char because int might match the return type of a GCC
65441   builtin and then its argument prototype would still apply.  */
65442#ifdef __cplusplus
65443extern "C"
65444#endif
65445char cos ();
65446int
65447main ()
65448{
65449return cos ();
65450  ;
65451  return 0;
65452}
65453_ACEOF
65454if ac_fn_cxx_try_link "$LINENO"; then :
65455  ac_cv_lib_m_cos=yes
65456else
65457  ac_cv_lib_m_cos=no
65458fi
65459rm -f core conftest.err conftest.$ac_objext \
65460    conftest$ac_exeext conftest.$ac_ext
65461LIBS=$ac_check_lib_save_LIBS
65462fi
65463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
65464$as_echo "$ac_cv_lib_m_cos" >&6; }
65465if test "x$ac_cv_lib_m_cos" = xyes; then :
65466  cat >>confdefs.h <<_ACEOF
65467#define HAVE_LIBM 1
65468_ACEOF
65469
65470  LIBS="-lm $LIBS"
65471
65472else
65473
65474        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
65475$as_echo "$as_me: Maths library was not found" >&6;}
65476
65477fi
65478
65479    LIBM="-lm"
65480  else
65481    LIBM=""
65482  fi
65483
65484
65485  # Setup libdl (for dynamic library loading)
65486  save_LIBS="$LIBS"
65487  LIBS=""
65488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65489$as_echo_n "checking for dlopen in -ldl... " >&6; }
65490if ${ac_cv_lib_dl_dlopen+:} false; then :
65491  $as_echo_n "(cached) " >&6
65492else
65493  ac_check_lib_save_LIBS=$LIBS
65494LIBS="-ldl  $LIBS"
65495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65496/* end confdefs.h.  */
65497
65498/* Override any GCC internal prototype to avoid an error.
65499   Use char because int might match the return type of a GCC
65500   builtin and then its argument prototype would still apply.  */
65501#ifdef __cplusplus
65502extern "C"
65503#endif
65504char dlopen ();
65505int
65506main ()
65507{
65508return dlopen ();
65509  ;
65510  return 0;
65511}
65512_ACEOF
65513if ac_fn_cxx_try_link "$LINENO"; then :
65514  ac_cv_lib_dl_dlopen=yes
65515else
65516  ac_cv_lib_dl_dlopen=no
65517fi
65518rm -f core conftest.err conftest.$ac_objext \
65519    conftest$ac_exeext conftest.$ac_ext
65520LIBS=$ac_check_lib_save_LIBS
65521fi
65522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65523$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65524if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65525  cat >>confdefs.h <<_ACEOF
65526#define HAVE_LIBDL 1
65527_ACEOF
65528
65529  LIBS="-ldl $LIBS"
65530
65531fi
65532
65533  LIBDL="$LIBS"
65534
65535  LIBS="$save_LIBS"
65536
65537  # Deprecated libraries, keep the flags for backwards compatibility
65538  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65539
65540
65541# Check whether --with-dxsdk was given.
65542if test "${with_dxsdk+set}" = set; then :
65543  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65544$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65545fi
65546
65547
65548
65549
65550# Check whether --with-dxsdk-lib was given.
65551if test "${with_dxsdk_lib+set}" = set; then :
65552  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65553$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65554fi
65555
65556
65557
65558
65559# Check whether --with-dxsdk-include was given.
65560if test "${with_dxsdk_include+set}" = set; then :
65561  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65562$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65563fi
65564
65565
65566  fi
65567
65568  # Control if libzip can use mmap. Available for purposes of overriding.
65569  LIBZIP_CAN_USE_MMAP=true
65570
65571
65572
65573  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65574    # Find the root of the Solaris Studio installation from the compiler path
65575    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65576    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65578$as_echo_n "checking for libstlport.so.1... " >&6; }
65579    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65580      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65581      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65582    fi
65583    if test -f "$STLPORT_LIB"; then
65584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65585$as_echo "yes, $STLPORT_LIB" >&6; }
65586
65587  # Only process if variable expands to non-empty
65588
65589  if test "x$STLPORT_LIB" != x; then
65590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65591
65592  # Input might be given as Windows format, start by converting to
65593  # unix format.
65594  path="$STLPORT_LIB"
65595  new_path=`$CYGPATH -u "$path"`
65596
65597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65600  # "foo.exe" is OK but "foo" is an error.
65601  #
65602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
65603  # It is also a way to make sure we got the proper file name for the real test later on.
65604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65605  if test "x$test_shortpath" = x; then
65606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65607$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65608    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65609  fi
65610
65611  # Call helper function which possibly converts this using DOS-style short mode.
65612  # If so, the updated path is stored in $new_path.
65613
65614  input_path="$new_path"
65615  # Check if we need to convert this using DOS-style short mode. If the path
65616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65617  # take no chances and rewrite it.
65618  # Note: m4 eats our [], so we need to use [ and ] instead.
65619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65620  if test "x$has_forbidden_chars" != x; then
65621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65625      # Going to short mode and back again did indeed matter. Since short mode is
65626      # case insensitive, let's make it lowercase to improve readability.
65627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65628      # Now convert it back to Unix-style (cygpath)
65629      input_path=`$CYGPATH -u "$shortmode_path"`
65630      new_path="$input_path"
65631    fi
65632  fi
65633
65634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65635  if test "x$test_cygdrive_prefix" = x; then
65636    # As a simple fix, exclude /usr/bin since it's not a real path.
65637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65639      # a path prefixed by /cygdrive for fixpath to work.
65640      new_path="$CYGWIN_ROOT_PATH$input_path"
65641    fi
65642  fi
65643
65644
65645  if test "x$path" != "x$new_path"; then
65646    STLPORT_LIB="$new_path"
65647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65648$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65649  fi
65650
65651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65652
65653  path="$STLPORT_LIB"
65654  has_colon=`$ECHO $path | $GREP ^.:`
65655  new_path="$path"
65656  if test "x$has_colon" = x; then
65657    # Not in mixed or Windows style, start by that.
65658    new_path=`cmd //c echo $path`
65659  fi
65660
65661
65662  input_path="$new_path"
65663  # Check if we need to convert this using DOS-style short mode. If the path
65664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65665  # take no chances and rewrite it.
65666  # Note: m4 eats our [], so we need to use [ and ] instead.
65667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65668  if test "x$has_forbidden_chars" != x; then
65669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65671  fi
65672
65673
65674  windows_path="$new_path"
65675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65676    unix_path=`$CYGPATH -u "$windows_path"`
65677    new_path="$unix_path"
65678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65680    new_path="$unix_path"
65681  fi
65682
65683  if test "x$path" != "x$new_path"; then
65684    STLPORT_LIB="$new_path"
65685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65686$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65687  fi
65688
65689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
65690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65691
65692    else
65693      # We're on a unix platform. Hooray! :)
65694      path="$STLPORT_LIB"
65695      has_space=`$ECHO "$path" | $GREP " "`
65696      if test "x$has_space" != x; then
65697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65698$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65700      fi
65701
65702      # Use eval to expand a potential ~
65703      eval path="$path"
65704      if test ! -f "$path" && test ! -d "$path"; then
65705        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65706      fi
65707
65708      if test -d "$path"; then
65709        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65710      else
65711        dir="`$DIRNAME "$path"`"
65712        base="`$BASENAME "$path"`"
65713        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65714      fi
65715    fi
65716  fi
65717
65718    else
65719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65720$as_echo "no, not found at $STLPORT_LIB" >&6; }
65721      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65722    fi
65723
65724  fi
65725
65726
65727
65728
65729
65730
65731
65732
65733
65734
65735
65736
65737
65738
65739# Hotspot setup depends on lib checks.
65740
65741
65742  # The user can in some cases supply additional jvm features. For the custom
65743  # variant, this defines the entire variant.
65744
65745# Check whether --with-jvm-features was given.
65746if test "${with_jvm_features+set}" = set; then :
65747  withval=$with_jvm_features;
65748fi
65749
65750  if test "x$with_jvm_features" != x; then
65751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65752$as_echo_n "checking additional JVM features... " >&6; }
65753    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65755$as_echo "$JVM_FEATURES" >&6; }
65756  fi
65757
65758  # Override hotspot cpu definitions for ARM platforms
65759  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65760    HOTSPOT_TARGET_CPU=arm_32
65761    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65762    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65763    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65764  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65765    HOTSPOT_TARGET_CPU=arm_64
65766    HOTSPOT_TARGET_CPU_ARCH=arm
65767    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65768    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65769  fi
65770
65771  # Verify that dependencies are met for explicitly set features.
65772  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65773    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65774  fi
65775
65776  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65777    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65778  fi
65779
65780  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65781    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65782  fi
65783
65784  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65785    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65786  fi
65787
65788  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65789    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65790  fi
65791
65792  # Turn on additional features based on other parts of configure
65793  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65794    JVM_FEATURES="$JVM_FEATURES dtrace"
65795  else
65796    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65797      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65798    fi
65799  fi
65800
65801  if test "x$STATIC_BUILD" = "xtrue"; then
65802    JVM_FEATURES="$JVM_FEATURES static-build"
65803  else
65804    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65805      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65806    fi
65807  fi
65808
65809  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65810    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65811      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65812    fi
65813  fi
65814
65815  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65816    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65817      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65818    fi
65819  fi
65820
65821  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65822  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65823     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65824     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65825    JVM_FEATURES_jvmci="jvmci"
65826  else
65827    JVM_FEATURES_jvmci=""
65828  fi
65829
65830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65831$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65832  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65834$as_echo "yes, forced" >&6; }
65835    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65836      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65837    fi
65838    INCLUDE_GRAAL="true"
65839  else
65840    # By default enable graal build on linux-x64 or where AOT is available.
65841    # graal build requires jvmci.
65842    if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
65843        (test "x$OPENJDK_TARGET_CPU" = "xx86_64" && \
65844         test "x$OPENJDK_TARGET_OS" = "xlinux" || \
65845         test "x$ENABLE_AOT" = "xtrue") ; then
65846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65847$as_echo "yes" >&6; }
65848      JVM_FEATURES_graal="graal"
65849      INCLUDE_GRAAL="true"
65850    else
65851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65852$as_echo "no" >&6; }
65853      JVM_FEATURES_graal=""
65854      INCLUDE_GRAAL="false"
65855    fi
65856  fi
65857
65858
65859
65860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65861$as_echo_n "checking if aot should be enabled... " >&6; }
65862  if test "x$ENABLE_AOT" = "xtrue"; then
65863    if test "x$enable_aot" = "xyes"; then
65864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65865$as_echo "yes, forced" >&6; }
65866    else
65867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65868$as_echo "yes" >&6; }
65869    fi
65870    JVM_FEATURES_aot="aot"
65871  else
65872    if test "x$enable_aot" = "xno"; then
65873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65874$as_echo "no, forced" >&6; }
65875    else
65876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65877$as_echo "no" >&6; }
65878    fi
65879    JVM_FEATURES_aot=""
65880  fi
65881
65882  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65883    # Default to use link time optimizations on minimal on arm
65884    JVM_FEATURES_link_time_opt="link-time-opt"
65885  else
65886    JVM_FEATURES_link_time_opt=""
65887  fi
65888
65889  # All variants but minimal (and custom) get these features
65890  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti vm-structs jni-check services management all-gcs nmt"
65891  if test "x$ENABLE_CDS" = "xtrue"; then
65892    NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
65893  fi
65894
65895  # Enable features depending on variant.
65896  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65897  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65898  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65899  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65900  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65901  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65902  JVM_FEATURES_custom="$JVM_FEATURES"
65903
65904
65905
65906
65907
65908
65909
65910
65911
65912  # Used for verification of Makefiles by check-jvm-feature
65913
65914
65915  # We don't support --with-jvm-interpreter anymore, use zero instead.
65916
65917
65918# Check whether --with-jvm-interpreter was given.
65919if test "${with_jvm_interpreter+set}" = set; then :
65920  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65921$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65922fi
65923
65924
65925
65926
65927###############################################################################
65928#
65929# We need to do some final tweaking, when everything else is done.
65930#
65931###############################################################################
65932
65933
65934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65935$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65936
65937  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65938    ENABLE_INTREE_EC=true
65939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65940$as_echo "yes" >&6; }
65941  else
65942    ENABLE_INTREE_EC=false
65943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65944$as_echo "no" >&6; }
65945  fi
65946
65947
65948
65949
65950  # Check whether --enable-jtreg-failure-handler was given.
65951if test "${enable_jtreg_failure_handler+set}" = set; then :
65952  enableval=$enable_jtreg_failure_handler;
65953fi
65954
65955
65956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65957$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65958
65959  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65960    if test "x$JT_HOME" = "x"; then
65961      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65962    else
65963      BUILD_FAILURE_HANDLER=true
65964      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65965$as_echo "yes, forced" >&6; }
65966    fi
65967  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65968    BUILD_FAILURE_HANDLER=false
65969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65970$as_echo "no, forced" >&6; }
65971  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65972      || test "x$enable_jtreg_failure_handler" = "x"; then
65973    if test "x$JT_HOME" = "x"; then
65974      BUILD_FAILURE_HANDLER=false
65975      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65976$as_echo "no, missing jtreg" >&6; }
65977    else
65978      BUILD_FAILURE_HANDLER=true
65979      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65980$as_echo "yes, jtreg present" >&6; }
65981    fi
65982  else
65983    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65984  fi
65985
65986
65987
65988
65989  # Check whether --enable-generate-classlist was given.
65990if test "${enable_generate_classlist+set}" = set; then :
65991  enableval=$enable_generate_classlist;
65992fi
65993
65994
65995  # Check if it's likely that it's possible to generate the classlist. Depending
65996  # on exact jvm configuration it could be possible anyway.
65997  if test "x$ENABLE_CDS" = "xtrue" && (  [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ); then
65998    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65999  else
66000    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
66001  fi
66002
66003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
66004$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
66005  if test "x$enable_generate_classlist" = "xyes"; then
66006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
66007$as_echo "yes, forced" >&6; }
66008    ENABLE_GENERATE_CLASSLIST="true"
66009    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
66010      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&5
66011$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&2;}
66012    fi
66013  elif test "x$enable_generate_classlist" = "xno"; then
66014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66015$as_echo "no, forced" >&6; }
66016    ENABLE_GENERATE_CLASSLIST="false"
66017  elif test "x$enable_generate_classlist" = "x"; then
66018    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
66019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66020$as_echo "yes" >&6; }
66021      ENABLE_GENERATE_CLASSLIST="true"
66022    else
66023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66024$as_echo "no" >&6; }
66025      ENABLE_GENERATE_CLASSLIST="false"
66026    fi
66027  else
66028    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
66029  fi
66030
66031
66032
66033
66034###############################################################################
66035#
66036# Configure parts of the build that only affect the build performance,
66037# not the result.
66038#
66039###############################################################################
66040
66041
66042  # How many cores do we have on this build system?
66043
66044# Check whether --with-num-cores was given.
66045if test "${with_num_cores+set}" = set; then :
66046  withval=$with_num_cores;
66047fi
66048
66049  if test "x$with_num_cores" = x; then
66050    # The number of cores were not specified, try to probe them.
66051
66052  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
66053$as_echo_n "checking for number of cores... " >&6; }
66054  NUM_CORES=1
66055  FOUND_CORES=no
66056
66057  if test -f /proc/cpuinfo; then
66058    # Looks like a Linux (or cygwin) system
66059    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
66060    FOUND_CORES=yes
66061  elif test -x /usr/sbin/psrinfo; then
66062    # Looks like a Solaris system
66063    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
66064    FOUND_CORES=yes
66065  elif test -x /usr/sbin/sysctl; then
66066    # Looks like a MacOSX system
66067    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
66068    FOUND_CORES=yes
66069  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
66070    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
66071    FOUND_CORES=yes
66072  elif test -n "$NUMBER_OF_PROCESSORS"; then
66073    # On windows, look in the env
66074    NUM_CORES=$NUMBER_OF_PROCESSORS
66075    FOUND_CORES=yes
66076  fi
66077
66078  if test "x$FOUND_CORES" = xyes; then
66079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
66080$as_echo "$NUM_CORES" >&6; }
66081  else
66082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
66083$as_echo "could not detect number of cores, defaulting to 1" >&6; }
66084    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
66085$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
66086  fi
66087
66088  else
66089    NUM_CORES=$with_num_cores
66090  fi
66091
66092
66093
66094  # How much memory do we have on this build system?
66095
66096# Check whether --with-memory-size was given.
66097if test "${with_memory_size+set}" = set; then :
66098  withval=$with_memory_size;
66099fi
66100
66101  if test "x$with_memory_size" = x; then
66102    # The memory size was not specified, try to probe it.
66103
66104  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
66105$as_echo_n "checking for memory size... " >&6; }
66106  # Default to 1024 MB
66107  MEMORY_SIZE=1024
66108  FOUND_MEM=no
66109
66110  if test -f /proc/meminfo; then
66111    # Looks like a Linux (or cygwin) system
66112    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
66113    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
66114    FOUND_MEM=yes
66115  elif test -x /usr/sbin/prtconf; then
66116    # Looks like a Solaris or AIX system
66117    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
66118    FOUND_MEM=yes
66119  elif test -x /usr/sbin/sysctl; then
66120    # Looks like a MacOSX system
66121    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
66122    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66123    FOUND_MEM=yes
66124  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
66125    # Windows, but without cygwin
66126    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
66127    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66128    FOUND_MEM=yes
66129  fi
66130
66131  if test "x$FOUND_MEM" = xyes; then
66132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
66133$as_echo "$MEMORY_SIZE MB" >&6; }
66134  else
66135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
66136$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
66137    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
66138$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
66139  fi
66140
66141  else
66142    MEMORY_SIZE=$with_memory_size
66143  fi
66144
66145
66146
66147  # Provide a decent default number of parallel jobs for make depending on
66148  # number of cores, amount of memory and machine architecture.
66149
66150# Check whether --with-jobs was given.
66151if test "${with_jobs+set}" = set; then :
66152  withval=$with_jobs;
66153fi
66154
66155  if test "x$with_jobs" = x; then
66156    # Number of jobs was not specified, calculate.
66157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
66158$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
66159    # Approximate memory in GB.
66160    memory_gb=`expr $MEMORY_SIZE / 1024`
66161    # Pick the lowest of memory in gb and number of cores.
66162    if test "$memory_gb" -lt "$NUM_CORES"; then
66163      JOBS="$memory_gb"
66164    else
66165      JOBS="$NUM_CORES"
66166    fi
66167    if test "$JOBS" -eq "0"; then
66168      JOBS=1
66169    fi
66170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
66171$as_echo "$JOBS" >&6; }
66172  else
66173    JOBS=$with_jobs
66174  fi
66175
66176
66177
66178  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
66179
66180# Check whether --with-test-jobs was given.
66181if test "${with_test_jobs+set}" = set; then :
66182  withval=$with_test_jobs;
66183fi
66184
66185  if test "x$with_test_jobs" = x; then
66186      TEST_JOBS=0
66187  else
66188      TEST_JOBS=$with_test_jobs
66189  fi
66190
66191
66192
66193# Setup arguments for the boot jdk (after cores and memory have been setup)
66194
66195  ##############################################################################
66196  #
66197  # Specify jvm options for anything that is run with the Boot JDK.
66198  # Not all JVM:s accept the same arguments on the command line.
66199  #
66200
66201# Check whether --with-boot-jdk-jvmargs was given.
66202if test "${with_boot_jdk_jvmargs+set}" = set; then :
66203  withval=$with_boot_jdk_jvmargs;
66204fi
66205
66206
66207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
66208$as_echo_n "checking flags for boot jdk java command ... " >&6; }
66209
66210  # Disable special log output when a debug build is used as Boot JDK...
66211
66212  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
66213  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
66214  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
66215  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66216  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66217  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66218    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
66219    JVM_ARG_OK=true
66220  else
66221    $ECHO "Arg failed:" >&5
66222    $ECHO "$OUTPUT" >&5
66223    JVM_ARG_OK=false
66224  fi
66225
66226
66227  # Force en-US environment
66228
66229  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
66230  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
66231  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
66232  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66233  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66234  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66235    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
66236    JVM_ARG_OK=true
66237  else
66238    $ECHO "Arg failed:" >&5
66239    $ECHO "$OUTPUT" >&5
66240    JVM_ARG_OK=false
66241  fi
66242
66243
66244  # Apply user provided options.
66245
66246  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
66247  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
66248  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
66249  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66250  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66251  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66252    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
66253    JVM_ARG_OK=true
66254  else
66255    $ECHO "Arg failed:" >&5
66256    $ECHO "$OUTPUT" >&5
66257    JVM_ARG_OK=false
66258  fi
66259
66260
66261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
66262$as_echo "$boot_jdk_jvmargs" >&6; }
66263
66264  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
66265  JAVA_FLAGS=$boot_jdk_jvmargs
66266
66267
66268
66269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
66270$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
66271
66272  # Starting amount of heap memory.
66273
66274  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
66275  $ECHO "Command: $JAVA -Xms64M -version" >&5
66276  OUTPUT=`$JAVA -Xms64M -version 2>&1`
66277  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66278  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66279  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66280    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
66281    JVM_ARG_OK=true
66282  else
66283    $ECHO "Arg failed:" >&5
66284    $ECHO "$OUTPUT" >&5
66285    JVM_ARG_OK=false
66286  fi
66287
66288  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
66289
66290  # Maximum amount of heap memory and stack size.
66291  JVM_HEAP_LIMIT_32="1024"
66292  # Running a 64 bit JVM allows for and requires a bigger heap
66293  JVM_HEAP_LIMIT_64="1600"
66294  STACK_SIZE_32=768
66295  STACK_SIZE_64=1536
66296  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
66297  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
66298    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
66299  fi
66300  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
66301    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
66302  fi
66303  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
66304    JVM_HEAP_LIMIT_32=512
66305    JVM_HEAP_LIMIT_64=512
66306  fi
66307
66308  if test "x$BOOT_JDK_BITS" = "x32"; then
66309    STACK_SIZE=$STACK_SIZE_32
66310    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
66311  else
66312    STACK_SIZE=$STACK_SIZE_64
66313    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
66314  fi
66315
66316  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
66317  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
66318  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
66319  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66320  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66321  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66322    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
66323    JVM_ARG_OK=true
66324  else
66325    $ECHO "Arg failed:" >&5
66326    $ECHO "$OUTPUT" >&5
66327    JVM_ARG_OK=false
66328  fi
66329
66330
66331  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
66332  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
66333  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
66334  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66335  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66336  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66337    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
66338    JVM_ARG_OK=true
66339  else
66340    $ECHO "Arg failed:" >&5
66341    $ECHO "$OUTPUT" >&5
66342    JVM_ARG_OK=false
66343  fi
66344
66345
66346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
66347$as_echo "$boot_jdk_jvmargs_big" >&6; }
66348
66349  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
66350
66351
66352  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
66353    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
66354    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
66355  else
66356    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
66357    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
66358  fi
66359  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
66360  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
66361  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
66362$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
66363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
66364$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
66365
66366
66367  # By default, the main javac compilations use big
66368  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
66369
66370
66371  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
66372$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
66373
66374  # Use serial gc for small short lived tools if possible
66375
66376  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
66377  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
66378  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
66379  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66380  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66381  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66382    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
66383    JVM_ARG_OK=true
66384  else
66385    $ECHO "Arg failed:" >&5
66386    $ECHO "$OUTPUT" >&5
66387    JVM_ARG_OK=false
66388  fi
66389
66390
66391  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66392  $ECHO "Command: $JAVA -Xms32M -version" >&5
66393  OUTPUT=`$JAVA -Xms32M -version 2>&1`
66394  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66395  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66396  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66397    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66398    JVM_ARG_OK=true
66399  else
66400    $ECHO "Arg failed:" >&5
66401    $ECHO "$OUTPUT" >&5
66402    JVM_ARG_OK=false
66403  fi
66404
66405
66406  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66407  $ECHO "Command: $JAVA -Xmx512M -version" >&5
66408  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66409  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66410  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66411  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66412    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66413    JVM_ARG_OK=true
66414  else
66415    $ECHO "Arg failed:" >&5
66416    $ECHO "$OUTPUT" >&5
66417    JVM_ARG_OK=false
66418  fi
66419
66420
66421  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66422  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66423  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66424  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66425  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66426  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66427    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66428    JVM_ARG_OK=true
66429  else
66430    $ECHO "Arg failed:" >&5
66431    $ECHO "$OUTPUT" >&5
66432    JVM_ARG_OK=false
66433  fi
66434
66435
66436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66437$as_echo "$boot_jdk_jvmargs_small" >&6; }
66438
66439  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66440
66441
66442  JAVA_TOOL_FLAGS_SMALL=""
66443  for f in $JAVA_FLAGS_SMALL; do
66444    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66445  done
66446
66447
66448
66449# Setup smart javac (after cores and memory have been setup)
66450
66451
66452# Check whether --with-sjavac-server-java was given.
66453if test "${with_sjavac_server_java+set}" = set; then :
66454  withval=$with_sjavac_server_java;
66455fi
66456
66457
66458  if test "x$with_sjavac_server_java" != x; then
66459    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66460    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66461    if test "x$FOUND_VERSION" = x; then
66462      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66463    fi
66464  else
66465    SJAVAC_SERVER_JAVA="$JAVA"
66466  fi
66467
66468
66469  if test "$MEMORY_SIZE" -gt "3000"; then
66470    if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
66471      JVM_64BIT=true
66472    fi
66473  fi
66474
66475  MX_VALUE=`expr $MEMORY_SIZE / 2`
66476  if test "$JVM_64BIT" = true; then
66477    # Set ms lower than mx since more than one instance of the server might
66478    # get launched at the same time before they figure out which instance won.
66479    MS_VALUE=512
66480    if test "$MX_VALUE" -gt "2048"; then
66481      MX_VALUE=2048
66482    fi
66483  else
66484    MS_VALUE=256
66485    if test "$MX_VALUE" -gt "1500"; then
66486      MX_VALUE=1500
66487    fi
66488  fi
66489  if test "$MX_VALUE" -lt "512"; then
66490    MX_VALUE=512
66491  fi
66492
66493  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66494  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66495  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66496  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66497  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66498  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66499    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66500    JVM_ARG_OK=true
66501  else
66502    $ECHO "Arg failed:" >&5
66503    $ECHO "$OUTPUT" >&5
66504    JVM_ARG_OK=false
66505  fi
66506
66507
66508
66509  # Check whether --enable-sjavac was given.
66510if test "${enable_sjavac+set}" = set; then :
66511  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66512else
66513  ENABLE_SJAVAC="no"
66514fi
66515
66516  if test "x$JVM_ARG_OK" = "xfalse"; then
66517    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66518$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66519    ENABLE_SJAVAC="no"
66520  fi
66521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66522$as_echo_n "checking whether to use sjavac... " >&6; }
66523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66524$as_echo "$ENABLE_SJAVAC" >&6; }
66525
66526
66527  # Check whether --enable-javac-server was given.
66528if test "${enable_javac_server+set}" = set; then :
66529  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66530else
66531  ENABLE_JAVAC_SERVER="yes"
66532fi
66533
66534  if test "x$JVM_ARG_OK" = "xfalse"; then
66535    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66536$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66537    ENABLE_JAVAC_SERVER="no"
66538  fi
66539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66540$as_echo_n "checking whether to use javac server... " >&6; }
66541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66542$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66543
66544
66545  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66546    # When using a server javac, the small client instances do not need much
66547    # resources.
66548    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66549  fi
66550
66551
66552# Setup use of icecc if requested
66553
66554  # Check whether --enable-icecc was given.
66555if test "${enable_icecc+set}" = set; then :
66556  enableval=$enable_icecc;
66557fi
66558
66559
66560  if test "x${enable_icecc}" = "xyes"; then
66561
66562
66563
66564  # Publish this variable in the help.
66565
66566
66567  if [ -z "${ICECC_CMD+x}" ]; then
66568    # The variable is not set by user, try to locate tool using the code snippet
66569    for ac_prog in icecc
66570do
66571  # Extract the first word of "$ac_prog", so it can be a program name with args.
66572set dummy $ac_prog; ac_word=$2
66573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66574$as_echo_n "checking for $ac_word... " >&6; }
66575if ${ac_cv_path_ICECC_CMD+:} false; then :
66576  $as_echo_n "(cached) " >&6
66577else
66578  case $ICECC_CMD in
66579  [\\/]* | ?:[\\/]*)
66580  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66581  ;;
66582  *)
66583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66584for as_dir in $PATH
66585do
66586  IFS=$as_save_IFS
66587  test -z "$as_dir" && as_dir=.
66588    for ac_exec_ext in '' $ac_executable_extensions; do
66589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66590    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66592    break 2
66593  fi
66594done
66595  done
66596IFS=$as_save_IFS
66597
66598  ;;
66599esac
66600fi
66601ICECC_CMD=$ac_cv_path_ICECC_CMD
66602if test -n "$ICECC_CMD"; then
66603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66604$as_echo "$ICECC_CMD" >&6; }
66605else
66606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66607$as_echo "no" >&6; }
66608fi
66609
66610
66611  test -n "$ICECC_CMD" && break
66612done
66613
66614  else
66615    # The variable is set, but is it from the command line or the environment?
66616
66617    # Try to remove the string !ICECC_CMD! from our list.
66618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66620      # If it failed, the variable was not from the command line. Ignore it,
66621      # but warn the user (except for BASH, which is always set by the calling BASH).
66622      if test "xICECC_CMD" != xBASH; then
66623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66624$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66625      fi
66626      # Try to locate tool using the code snippet
66627      for ac_prog in icecc
66628do
66629  # Extract the first word of "$ac_prog", so it can be a program name with args.
66630set dummy $ac_prog; ac_word=$2
66631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66632$as_echo_n "checking for $ac_word... " >&6; }
66633if ${ac_cv_path_ICECC_CMD+:} false; then :
66634  $as_echo_n "(cached) " >&6
66635else
66636  case $ICECC_CMD in
66637  [\\/]* | ?:[\\/]*)
66638  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66639  ;;
66640  *)
66641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66642for as_dir in $PATH
66643do
66644  IFS=$as_save_IFS
66645  test -z "$as_dir" && as_dir=.
66646    for ac_exec_ext in '' $ac_executable_extensions; do
66647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66648    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66650    break 2
66651  fi
66652done
66653  done
66654IFS=$as_save_IFS
66655
66656  ;;
66657esac
66658fi
66659ICECC_CMD=$ac_cv_path_ICECC_CMD
66660if test -n "$ICECC_CMD"; then
66661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66662$as_echo "$ICECC_CMD" >&6; }
66663else
66664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66665$as_echo "no" >&6; }
66666fi
66667
66668
66669  test -n "$ICECC_CMD" && break
66670done
66671
66672    else
66673      # If it succeeded, then it was overridden by the user. We will use it
66674      # for the tool.
66675
66676      # First remove it from the list of overridden variables, so we can test
66677      # for unknown variables in the end.
66678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66679
66680      # Check if we try to supply an empty value
66681      if test "x$ICECC_CMD" = x; then
66682        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66683$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66685$as_echo_n "checking for ICECC_CMD... " >&6; }
66686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66687$as_echo "disabled" >&6; }
66688      else
66689        # Check if the provided tool contains a complete path.
66690        tool_specified="$ICECC_CMD"
66691        tool_basename="${tool_specified##*/}"
66692        if test "x$tool_basename" = "x$tool_specified"; then
66693          # A command without a complete path is provided, search $PATH.
66694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66695$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66696          # Extract the first word of "$tool_basename", so it can be a program name with args.
66697set dummy $tool_basename; ac_word=$2
66698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66699$as_echo_n "checking for $ac_word... " >&6; }
66700if ${ac_cv_path_ICECC_CMD+:} false; then :
66701  $as_echo_n "(cached) " >&6
66702else
66703  case $ICECC_CMD in
66704  [\\/]* | ?:[\\/]*)
66705  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66706  ;;
66707  *)
66708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66709for as_dir in $PATH
66710do
66711  IFS=$as_save_IFS
66712  test -z "$as_dir" && as_dir=.
66713    for ac_exec_ext in '' $ac_executable_extensions; do
66714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66715    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66717    break 2
66718  fi
66719done
66720  done
66721IFS=$as_save_IFS
66722
66723  ;;
66724esac
66725fi
66726ICECC_CMD=$ac_cv_path_ICECC_CMD
66727if test -n "$ICECC_CMD"; then
66728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66729$as_echo "$ICECC_CMD" >&6; }
66730else
66731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66732$as_echo "no" >&6; }
66733fi
66734
66735
66736          if test "x$ICECC_CMD" = x; then
66737            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66738          fi
66739        else
66740          # Otherwise we believe it is a complete path. Use it as it is.
66741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66742$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66743          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66744$as_echo_n "checking for ICECC_CMD... " >&6; }
66745          if test ! -x "$tool_specified"; then
66746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66747$as_echo "not found" >&6; }
66748            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66749          fi
66750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66751$as_echo "$tool_specified" >&6; }
66752        fi
66753      fi
66754    fi
66755
66756  fi
66757
66758
66759
66760  if test "x$ICECC_CMD" = x; then
66761    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66762  fi
66763
66764
66765    old_path="$PATH"
66766
66767    # Look for icecc-create-env in some known places
66768    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66769
66770
66771
66772  # Publish this variable in the help.
66773
66774
66775  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66776    # The variable is not set by user, try to locate tool using the code snippet
66777    for ac_prog in icecc-create-env
66778do
66779  # Extract the first word of "$ac_prog", so it can be a program name with args.
66780set dummy $ac_prog; ac_word=$2
66781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66782$as_echo_n "checking for $ac_word... " >&6; }
66783if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66784  $as_echo_n "(cached) " >&6
66785else
66786  case $ICECC_CREATE_ENV in
66787  [\\/]* | ?:[\\/]*)
66788  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66789  ;;
66790  *)
66791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66792for as_dir in $PATH
66793do
66794  IFS=$as_save_IFS
66795  test -z "$as_dir" && as_dir=.
66796    for ac_exec_ext in '' $ac_executable_extensions; do
66797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66798    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66800    break 2
66801  fi
66802done
66803  done
66804IFS=$as_save_IFS
66805
66806  ;;
66807esac
66808fi
66809ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66810if test -n "$ICECC_CREATE_ENV"; then
66811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66812$as_echo "$ICECC_CREATE_ENV" >&6; }
66813else
66814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66815$as_echo "no" >&6; }
66816fi
66817
66818
66819  test -n "$ICECC_CREATE_ENV" && break
66820done
66821
66822  else
66823    # The variable is set, but is it from the command line or the environment?
66824
66825    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66828      # If it failed, the variable was not from the command line. Ignore it,
66829      # but warn the user (except for BASH, which is always set by the calling BASH).
66830      if test "xICECC_CREATE_ENV" != xBASH; then
66831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66832$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66833      fi
66834      # Try to locate tool using the code snippet
66835      for ac_prog in icecc-create-env
66836do
66837  # Extract the first word of "$ac_prog", so it can be a program name with args.
66838set dummy $ac_prog; ac_word=$2
66839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66840$as_echo_n "checking for $ac_word... " >&6; }
66841if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66842  $as_echo_n "(cached) " >&6
66843else
66844  case $ICECC_CREATE_ENV in
66845  [\\/]* | ?:[\\/]*)
66846  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66847  ;;
66848  *)
66849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66850for as_dir in $PATH
66851do
66852  IFS=$as_save_IFS
66853  test -z "$as_dir" && as_dir=.
66854    for ac_exec_ext in '' $ac_executable_extensions; do
66855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66856    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66858    break 2
66859  fi
66860done
66861  done
66862IFS=$as_save_IFS
66863
66864  ;;
66865esac
66866fi
66867ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66868if test -n "$ICECC_CREATE_ENV"; then
66869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66870$as_echo "$ICECC_CREATE_ENV" >&6; }
66871else
66872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66873$as_echo "no" >&6; }
66874fi
66875
66876
66877  test -n "$ICECC_CREATE_ENV" && break
66878done
66879
66880    else
66881      # If it succeeded, then it was overridden by the user. We will use it
66882      # for the tool.
66883
66884      # First remove it from the list of overridden variables, so we can test
66885      # for unknown variables in the end.
66886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66887
66888      # Check if we try to supply an empty value
66889      if test "x$ICECC_CREATE_ENV" = x; then
66890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66891$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66893$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66895$as_echo "disabled" >&6; }
66896      else
66897        # Check if the provided tool contains a complete path.
66898        tool_specified="$ICECC_CREATE_ENV"
66899        tool_basename="${tool_specified##*/}"
66900        if test "x$tool_basename" = "x$tool_specified"; then
66901          # A command without a complete path is provided, search $PATH.
66902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66903$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66904          # Extract the first word of "$tool_basename", so it can be a program name with args.
66905set dummy $tool_basename; ac_word=$2
66906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66907$as_echo_n "checking for $ac_word... " >&6; }
66908if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66909  $as_echo_n "(cached) " >&6
66910else
66911  case $ICECC_CREATE_ENV in
66912  [\\/]* | ?:[\\/]*)
66913  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66914  ;;
66915  *)
66916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66917for as_dir in $PATH
66918do
66919  IFS=$as_save_IFS
66920  test -z "$as_dir" && as_dir=.
66921    for ac_exec_ext in '' $ac_executable_extensions; do
66922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66923    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66925    break 2
66926  fi
66927done
66928  done
66929IFS=$as_save_IFS
66930
66931  ;;
66932esac
66933fi
66934ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66935if test -n "$ICECC_CREATE_ENV"; then
66936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66937$as_echo "$ICECC_CREATE_ENV" >&6; }
66938else
66939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66940$as_echo "no" >&6; }
66941fi
66942
66943
66944          if test "x$ICECC_CREATE_ENV" = x; then
66945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66946          fi
66947        else
66948          # Otherwise we believe it is a complete path. Use it as it is.
66949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66950$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66952$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66953          if test ! -x "$tool_specified"; then
66954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66955$as_echo "not found" >&6; }
66956            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66957          fi
66958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66959$as_echo "$tool_specified" >&6; }
66960        fi
66961      fi
66962    fi
66963
66964  fi
66965
66966
66967
66968  if test "x$ICECC_CREATE_ENV" = x; then
66969    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66970  fi
66971
66972
66973    # Use icecc-create-env to create a minimal compilation environment that can
66974    # be sent to the other hosts in the icecream cluster.
66975    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66976    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66977    # Older versions of icecc does not have the --gcc parameter
66978    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66979      icecc_gcc_arg="--gcc"
66980    fi
66981    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66982
66983  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66984      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66985          ${icecc_create_env_log} 2>&1 )
66986  if test "$?" != "0"; then
66987    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66988$as_echo "$as_me: icecc-create-env output:" >&6;}
66989    cat \
66990          ${icecc_create_env_log}
66991    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66992  fi
66993
66994    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66995      # For clang, the icecc compilerwrapper is needed. It usually resides next
66996      # to icecc-create-env.
66997
66998
66999
67000  # Publish this variable in the help.
67001
67002
67003  if [ -z "${ICECC_WRAPPER+x}" ]; then
67004    # The variable is not set by user, try to locate tool using the code snippet
67005    for ac_prog in compilerwrapper
67006do
67007  # Extract the first word of "$ac_prog", so it can be a program name with args.
67008set dummy $ac_prog; ac_word=$2
67009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67010$as_echo_n "checking for $ac_word... " >&6; }
67011if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67012  $as_echo_n "(cached) " >&6
67013else
67014  case $ICECC_WRAPPER in
67015  [\\/]* | ?:[\\/]*)
67016  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67017  ;;
67018  *)
67019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67020for as_dir in $PATH
67021do
67022  IFS=$as_save_IFS
67023  test -z "$as_dir" && as_dir=.
67024    for ac_exec_ext in '' $ac_executable_extensions; do
67025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67026    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67028    break 2
67029  fi
67030done
67031  done
67032IFS=$as_save_IFS
67033
67034  ;;
67035esac
67036fi
67037ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67038if test -n "$ICECC_WRAPPER"; then
67039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67040$as_echo "$ICECC_WRAPPER" >&6; }
67041else
67042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67043$as_echo "no" >&6; }
67044fi
67045
67046
67047  test -n "$ICECC_WRAPPER" && break
67048done
67049
67050  else
67051    # The variable is set, but is it from the command line or the environment?
67052
67053    # Try to remove the string !ICECC_WRAPPER! from our list.
67054    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
67055    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67056      # If it failed, the variable was not from the command line. Ignore it,
67057      # but warn the user (except for BASH, which is always set by the calling BASH).
67058      if test "xICECC_WRAPPER" != xBASH; then
67059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
67060$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
67061      fi
67062      # Try to locate tool using the code snippet
67063      for ac_prog in compilerwrapper
67064do
67065  # Extract the first word of "$ac_prog", so it can be a program name with args.
67066set dummy $ac_prog; ac_word=$2
67067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67068$as_echo_n "checking for $ac_word... " >&6; }
67069if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67070  $as_echo_n "(cached) " >&6
67071else
67072  case $ICECC_WRAPPER in
67073  [\\/]* | ?:[\\/]*)
67074  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67075  ;;
67076  *)
67077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67078for as_dir in $PATH
67079do
67080  IFS=$as_save_IFS
67081  test -z "$as_dir" && as_dir=.
67082    for ac_exec_ext in '' $ac_executable_extensions; do
67083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67084    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67086    break 2
67087  fi
67088done
67089  done
67090IFS=$as_save_IFS
67091
67092  ;;
67093esac
67094fi
67095ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67096if test -n "$ICECC_WRAPPER"; then
67097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67098$as_echo "$ICECC_WRAPPER" >&6; }
67099else
67100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67101$as_echo "no" >&6; }
67102fi
67103
67104
67105  test -n "$ICECC_WRAPPER" && break
67106done
67107
67108    else
67109      # If it succeeded, then it was overridden by the user. We will use it
67110      # for the tool.
67111
67112      # First remove it from the list of overridden variables, so we can test
67113      # for unknown variables in the end.
67114      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67115
67116      # Check if we try to supply an empty value
67117      if test "x$ICECC_WRAPPER" = x; then
67118        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
67119$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
67120        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67121$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67123$as_echo "disabled" >&6; }
67124      else
67125        # Check if the provided tool contains a complete path.
67126        tool_specified="$ICECC_WRAPPER"
67127        tool_basename="${tool_specified##*/}"
67128        if test "x$tool_basename" = "x$tool_specified"; then
67129          # A command without a complete path is provided, search $PATH.
67130          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
67131$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
67132          # Extract the first word of "$tool_basename", so it can be a program name with args.
67133set dummy $tool_basename; ac_word=$2
67134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67135$as_echo_n "checking for $ac_word... " >&6; }
67136if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67137  $as_echo_n "(cached) " >&6
67138else
67139  case $ICECC_WRAPPER in
67140  [\\/]* | ?:[\\/]*)
67141  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67142  ;;
67143  *)
67144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67145for as_dir in $PATH
67146do
67147  IFS=$as_save_IFS
67148  test -z "$as_dir" && as_dir=.
67149    for ac_exec_ext in '' $ac_executable_extensions; do
67150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67151    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67153    break 2
67154  fi
67155done
67156  done
67157IFS=$as_save_IFS
67158
67159  ;;
67160esac
67161fi
67162ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67163if test -n "$ICECC_WRAPPER"; then
67164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67165$as_echo "$ICECC_WRAPPER" >&6; }
67166else
67167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67168$as_echo "no" >&6; }
67169fi
67170
67171
67172          if test "x$ICECC_WRAPPER" = x; then
67173            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67174          fi
67175        else
67176          # Otherwise we believe it is a complete path. Use it as it is.
67177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
67178$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
67179          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67180$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67181          if test ! -x "$tool_specified"; then
67182            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67183$as_echo "not found" >&6; }
67184            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
67185          fi
67186          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67187$as_echo "$tool_specified" >&6; }
67188        fi
67189      fi
67190    fi
67191
67192  fi
67193
67194
67195
67196  if test "x$ICECC_WRAPPER" = x; then
67197    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
67198  fi
67199
67200
67201
67202  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67203      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
67204  if test "$?" != "0"; then
67205    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67206$as_echo "$as_me: icecc-create-env output:" >&6;}
67207    cat ${icecc_create_env_log}
67208    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67209  fi
67210
67211    else
67212      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
67213    fi
67214    PATH="$old_path"
67215    # The bundle with the compiler gets a name based on checksums. Parse log file
67216    # to find it.
67217    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
67218    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67219    if test ! -f ${ICECC_ENV_BUNDLE}; then
67220      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67221    fi
67222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
67223$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
67224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67225$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67226    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
67227
67228    if test "x${COMPILE_TYPE}" = "xcross"; then
67229      # If cross compiling, create a separate env package for the build compiler
67230      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
67231      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
67232      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
67233
67234  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67235      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
67236            ${icecc_create_env_log_build} 2>&1 )
67237  if test "$?" != "0"; then
67238    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67239$as_echo "$as_me: icecc-create-env output:" >&6;}
67240    cat \
67241            ${icecc_create_env_log_build}
67242    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67243  fi
67244
67245      elif test "x${BUILD_CC##*/}" = "xclang"; then
67246
67247  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67248      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
67249  if test "$?" != "0"; then
67250    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67251$as_echo "$as_me: icecc-create-env output:" >&6;}
67252    cat ${icecc_create_env_log_build}
67253    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67254  fi
67255
67256      else
67257        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
67258      fi
67259      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
67260      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67261      if test ! -f ${ICECC_ENV_BUNDLE}; then
67262        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67263      fi
67264      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
67265$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
67266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67267$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67268      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
67269          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
67270    else
67271      BUILD_ICECC="${ICECC}"
67272    fi
67273
67274
67275  fi
67276
67277
67278# Can the C/C++ compiler use precompiled headers?
67279
67280
67281  ###############################################################################
67282  #
67283  # Can the C/C++ compiler use precompiled headers?
67284  #
67285  # Check whether --enable-precompiled-headers was given.
67286if test "${enable_precompiled_headers+set}" = set; then :
67287  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
67288else
67289  ENABLE_PRECOMPH=yes
67290fi
67291
67292
67293  USE_PRECOMPILED_HEADER=true
67294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
67295$as_echo_n "checking If precompiled header is enabled... " >&6; }
67296  if test "x$ENABLE_PRECOMPH" = xno; then
67297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67298$as_echo "no, forced" >&6; }
67299    USE_PRECOMPILED_HEADER=false
67300  elif test "x$ICECC" != "x"; then
67301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
67302$as_echo "no, does not work effectively with icecc" >&6; }
67303    USE_PRECOMPILED_HEADER=false
67304  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
67305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
67306$as_echo "no, does not work with Solaris Studio" >&6; }
67307    USE_PRECOMPILED_HEADER=false
67308  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
67309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
67310$as_echo "no, does not work with xlc" >&6; }
67311    USE_PRECOMPILED_HEADER=false
67312  else
67313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67314$as_echo "yes" >&6; }
67315  fi
67316
67317  if test "x$ENABLE_PRECOMPH" = xyes; then
67318    # Check that the compiler actually supports precomp headers.
67319    if test "x$TOOLCHAIN_TYPE" = xgcc; then
67320      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
67321$as_echo_n "checking that precompiled headers work... " >&6; }
67322      echo "int alfa();" > conftest.h
67323      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
67324      if test ! -f conftest.hpp.gch; then
67325        USE_PRECOMPILED_HEADER=false
67326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67327$as_echo "no" >&6; }
67328      else
67329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67330$as_echo "yes" >&6; }
67331      fi
67332      $RM conftest.h conftest.hpp.gch
67333    fi
67334  fi
67335
67336
67337
67338
67339# Setup use of ccache, if available
67340
67341  # Check whether --enable-ccache was given.
67342if test "${enable_ccache+set}" = set; then :
67343  enableval=$enable_ccache;
67344fi
67345
67346
67347  CCACHE_STATUS=
67348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
67349$as_echo_n "checking is ccache enabled... " >&6; }
67350  if test "x$enable_ccache" = xyes; then
67351    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
67352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67353$as_echo "yes" >&6; }
67354      OLD_PATH="$PATH"
67355      if test "x$TOOLCHAIN_PATH" != x; then
67356        PATH=$TOOLCHAIN_PATH:$PATH
67357      fi
67358
67359
67360
67361  # Publish this variable in the help.
67362
67363
67364  if [ -z "${CCACHE+x}" ]; then
67365    # The variable is not set by user, try to locate tool using the code snippet
67366    for ac_prog in ccache
67367do
67368  # Extract the first word of "$ac_prog", so it can be a program name with args.
67369set dummy $ac_prog; ac_word=$2
67370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67371$as_echo_n "checking for $ac_word... " >&6; }
67372if ${ac_cv_path_CCACHE+:} false; then :
67373  $as_echo_n "(cached) " >&6
67374else
67375  case $CCACHE in
67376  [\\/]* | ?:[\\/]*)
67377  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67378  ;;
67379  *)
67380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67381for as_dir in $PATH
67382do
67383  IFS=$as_save_IFS
67384  test -z "$as_dir" && as_dir=.
67385    for ac_exec_ext in '' $ac_executable_extensions; do
67386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67387    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67389    break 2
67390  fi
67391done
67392  done
67393IFS=$as_save_IFS
67394
67395  ;;
67396esac
67397fi
67398CCACHE=$ac_cv_path_CCACHE
67399if test -n "$CCACHE"; then
67400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67401$as_echo "$CCACHE" >&6; }
67402else
67403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67404$as_echo "no" >&6; }
67405fi
67406
67407
67408  test -n "$CCACHE" && break
67409done
67410
67411  else
67412    # The variable is set, but is it from the command line or the environment?
67413
67414    # Try to remove the string !CCACHE! from our list.
67415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67417      # If it failed, the variable was not from the command line. Ignore it,
67418      # but warn the user (except for BASH, which is always set by the calling BASH).
67419      if test "xCCACHE" != xBASH; then
67420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67421$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67422      fi
67423      # Try to locate tool using the code snippet
67424      for ac_prog in ccache
67425do
67426  # Extract the first word of "$ac_prog", so it can be a program name with args.
67427set dummy $ac_prog; ac_word=$2
67428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67429$as_echo_n "checking for $ac_word... " >&6; }
67430if ${ac_cv_path_CCACHE+:} false; then :
67431  $as_echo_n "(cached) " >&6
67432else
67433  case $CCACHE in
67434  [\\/]* | ?:[\\/]*)
67435  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67436  ;;
67437  *)
67438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67439for as_dir in $PATH
67440do
67441  IFS=$as_save_IFS
67442  test -z "$as_dir" && as_dir=.
67443    for ac_exec_ext in '' $ac_executable_extensions; do
67444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67445    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67447    break 2
67448  fi
67449done
67450  done
67451IFS=$as_save_IFS
67452
67453  ;;
67454esac
67455fi
67456CCACHE=$ac_cv_path_CCACHE
67457if test -n "$CCACHE"; then
67458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67459$as_echo "$CCACHE" >&6; }
67460else
67461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67462$as_echo "no" >&6; }
67463fi
67464
67465
67466  test -n "$CCACHE" && break
67467done
67468
67469    else
67470      # If it succeeded, then it was overridden by the user. We will use it
67471      # for the tool.
67472
67473      # First remove it from the list of overridden variables, so we can test
67474      # for unknown variables in the end.
67475      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67476
67477      # Check if we try to supply an empty value
67478      if test "x$CCACHE" = x; then
67479        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67480$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67482$as_echo_n "checking for CCACHE... " >&6; }
67483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67484$as_echo "disabled" >&6; }
67485      else
67486        # Check if the provided tool contains a complete path.
67487        tool_specified="$CCACHE"
67488        tool_basename="${tool_specified##*/}"
67489        if test "x$tool_basename" = "x$tool_specified"; then
67490          # A command without a complete path is provided, search $PATH.
67491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67492$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67493          # Extract the first word of "$tool_basename", so it can be a program name with args.
67494set dummy $tool_basename; ac_word=$2
67495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67496$as_echo_n "checking for $ac_word... " >&6; }
67497if ${ac_cv_path_CCACHE+:} false; then :
67498  $as_echo_n "(cached) " >&6
67499else
67500  case $CCACHE in
67501  [\\/]* | ?:[\\/]*)
67502  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67503  ;;
67504  *)
67505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67506for as_dir in $PATH
67507do
67508  IFS=$as_save_IFS
67509  test -z "$as_dir" && as_dir=.
67510    for ac_exec_ext in '' $ac_executable_extensions; do
67511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67512    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67514    break 2
67515  fi
67516done
67517  done
67518IFS=$as_save_IFS
67519
67520  ;;
67521esac
67522fi
67523CCACHE=$ac_cv_path_CCACHE
67524if test -n "$CCACHE"; then
67525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67526$as_echo "$CCACHE" >&6; }
67527else
67528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67529$as_echo "no" >&6; }
67530fi
67531
67532
67533          if test "x$CCACHE" = x; then
67534            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67535          fi
67536        else
67537          # Otherwise we believe it is a complete path. Use it as it is.
67538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67539$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67540          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67541$as_echo_n "checking for CCACHE... " >&6; }
67542          if test ! -x "$tool_specified"; then
67543            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67544$as_echo "not found" >&6; }
67545            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67546          fi
67547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67548$as_echo "$tool_specified" >&6; }
67549        fi
67550      fi
67551    fi
67552
67553  fi
67554
67555
67556
67557  if test "x$CCACHE" = x; then
67558    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67559  fi
67560
67561
67562      PATH="$OLD_PATH"
67563      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67564      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67565    else
67566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67567$as_echo "no" >&6; }
67568      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67569$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67570    fi
67571  elif test "x$enable_ccache" = xno; then
67572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67573$as_echo "no, explicitly disabled" >&6; }
67574    CCACHE_STATUS="Disabled"
67575  elif test "x$enable_ccache" = x; then
67576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67577$as_echo "no" >&6; }
67578  else
67579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67580$as_echo "unknown" >&6; }
67581    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67582  fi
67583
67584
67585
67586# Check whether --with-ccache-dir was given.
67587if test "${with_ccache_dir+set}" = set; then :
67588  withval=$with_ccache_dir;
67589fi
67590
67591
67592  if test "x$with_ccache_dir" != x; then
67593    # When using a non home ccache directory, assume the use is to share ccache files
67594    # with other users. Thus change the umask.
67595    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67596    if test "x$CCACHE" = x; then
67597      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67598$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67599    fi
67600  fi
67601
67602  if test "x$CCACHE" != x; then
67603
67604  if test "x$CCACHE" != x; then
67605    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67606      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67607          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67608      if test "x$HAS_BAD_CCACHE" != "x"; then
67609        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67610      fi
67611    fi
67612    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67613      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67614          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67615      if test "x$HAS_BAD_CCACHE" != "x"; then
67616        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67617      fi
67618      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67619$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67620      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67621      PUSHED_FLAGS="$CXXFLAGS"
67622      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67623      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67624/* end confdefs.h.  */
67625
67626int
67627main ()
67628{
67629
67630  ;
67631  return 0;
67632}
67633_ACEOF
67634if ac_fn_cxx_try_compile "$LINENO"; then :
67635  CC_KNOWS_CCACHE_TRICK=yes
67636else
67637  CC_KNOWS_CCACHE_TRICK=no
67638fi
67639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67640      CXXFLAGS="$PUSHED_FLAGS"
67641      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67643$as_echo "yes" >&6; }
67644        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67645
67646        CCACHE_SLOPPINESS=pch_defines,time_macros
67647      else
67648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67649$as_echo "no" >&6; }
67650        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67651      fi
67652    fi
67653
67654    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67655        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67656
67657    if test "x$SET_CCACHE_DIR" != x; then
67658      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67659      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67660    fi
67661  fi
67662
67663  fi
67664
67665
67666###############################################################################
67667#
67668# And now the finish...
67669#
67670###############################################################################
67671
67672# Check for some common pitfalls
67673
67674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67675    file_to_test="$SRC_ROOT/LICENSE"
67676    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67677      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
67678    fi
67679  fi
67680
67681
67682  # Did user specify any unknown variables?
67683
67684  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67685    # Replace the separating ! with spaces before presenting for end user.
67686    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67687    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67688$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67689  fi
67690
67691
67692  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67693$as_echo_n "checking if build directory is on local disk... " >&6; }
67694
67695  # df -l lists only local disks; if the given directory is not found then
67696  # a non-zero exit code is given
67697  if test "x$DF" = x; then
67698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67699      # msys does not have df; use Windows "net use" instead.
67700      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67701      if test "x$IS_NETWORK_DISK" = x; then
67702        OUTPUT_DIR_IS_LOCAL="yes"
67703      else
67704        OUTPUT_DIR_IS_LOCAL="no"
67705      fi
67706    else
67707      # No df here, say it's local
67708      OUTPUT_DIR_IS_LOCAL="yes"
67709    fi
67710  else
67711    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67712      OUTPUT_DIR_IS_LOCAL="yes"
67713    else
67714      OUTPUT_DIR_IS_LOCAL="no"
67715    fi
67716  fi
67717
67718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67719$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67720
67721
67722
67723  # Check if the user has any old-style ALT_ variables set.
67724  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67725
67726  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67727  # Since we can't properly handle the dependencies for this, warn the user about the situation
67728  if test -e $OUTPUT_ROOT/spec.gmk; then
67729    IS_RECONFIGURE=yes
67730  else
67731    IS_RECONFIGURE=no
67732  fi
67733
67734
67735# At the end, call the custom hook. (Dummy macro if no custom sources available)
67736
67737
67738# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67739
67740  # Keep feature lists sorted and free of duplicates
67741  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67742  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67743  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67744  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67745  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67746  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67747  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67748
67749  # Validate features
67750  for variant in $JVM_VARIANTS; do
67751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67752$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67753    features_var_name=JVM_FEATURES_$variant
67754    JVM_FEATURES_TO_TEST=${!features_var_name}
67755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67756$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67757    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67758    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67759    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67760    if test "x$INVALID_FEATURES" != x; then
67761      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67762    fi
67763  done
67764
67765
67766# We're messing a bit with internal autoconf variables to put the config.status
67767# in the output directory instead of the current directory.
67768CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67769
67770# Create the actual output files. Now the main work of configure is done.
67771cat >confcache <<\_ACEOF
67772# This file is a shell script that caches the results of configure
67773# tests run on this system so they can be shared between configure
67774# scripts and configure runs, see configure's option --config-cache.
67775# It is not useful on other systems.  If it contains results you don't
67776# want to keep, you may remove or edit it.
67777#
67778# config.status only pays attention to the cache file if you give it
67779# the --recheck option to rerun configure.
67780#
67781# `ac_cv_env_foo' variables (set or unset) will be overridden when
67782# loading this file, other *unset* `ac_cv_foo' will be assigned the
67783# following values.
67784
67785_ACEOF
67786
67787# The following way of writing the cache mishandles newlines in values,
67788# but we know of no workaround that is simple, portable, and efficient.
67789# So, we kill variables containing newlines.
67790# Ultrix sh set writes to stderr and can't be redirected directly,
67791# and sets the high bit in the cache file unless we assign to the vars.
67792(
67793  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67794    eval ac_val=\$$ac_var
67795    case $ac_val in #(
67796    *${as_nl}*)
67797      case $ac_var in #(
67798      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67799$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67800      esac
67801      case $ac_var in #(
67802      _ | IFS | as_nl) ;; #(
67803      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67804      *) { eval $ac_var=; unset $ac_var;} ;;
67805      esac ;;
67806    esac
67807  done
67808
67809  (set) 2>&1 |
67810    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67811    *${as_nl}ac_space=\ *)
67812      # `set' does not quote correctly, so add quotes: double-quote
67813      # substitution turns \\\\ into \\, and sed turns \\ into \.
67814      sed -n \
67815	"s/'/'\\\\''/g;
67816	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67817      ;; #(
67818    *)
67819      # `set' quotes correctly as required by POSIX, so do not add quotes.
67820      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67821      ;;
67822    esac |
67823    sort
67824) |
67825  sed '
67826     /^ac_cv_env_/b end
67827     t clear
67828     :clear
67829     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67830     t end
67831     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67832     :end' >>confcache
67833if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67834  if test -w "$cache_file"; then
67835    if test "x$cache_file" != "x/dev/null"; then
67836      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67837$as_echo "$as_me: updating cache $cache_file" >&6;}
67838      if test ! -f "$cache_file" || test -h "$cache_file"; then
67839	cat confcache >"$cache_file"
67840      else
67841        case $cache_file in #(
67842        */* | ?:*)
67843	  mv -f confcache "$cache_file"$$ &&
67844	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67845        *)
67846	  mv -f confcache "$cache_file" ;;
67847	esac
67848      fi
67849    fi
67850  else
67851    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67852$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67853  fi
67854fi
67855rm -f confcache
67856
67857test "x$prefix" = xNONE && prefix=$ac_default_prefix
67858# Let make expand exec_prefix.
67859test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67860
67861# Transform confdefs.h into DEFS.
67862# Protect against shell expansion while executing Makefile rules.
67863# Protect against Makefile macro expansion.
67864#
67865# If the first sed substitution is executed (which looks for macros that
67866# take arguments), then branch to the quote section.  Otherwise,
67867# look for a macro that doesn't take arguments.
67868ac_script='
67869:mline
67870/\\$/{
67871 N
67872 s,\\\n,,
67873 b mline
67874}
67875t clear
67876:clear
67877s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67878t quote
67879s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67880t quote
67881b any
67882:quote
67883s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67884s/\[/\\&/g
67885s/\]/\\&/g
67886s/\$/$$/g
67887H
67888:any
67889${
67890	g
67891	s/^\n//
67892	s/\n/ /g
67893	p
67894}
67895'
67896DEFS=`sed -n "$ac_script" confdefs.h`
67897
67898
67899ac_libobjs=
67900ac_ltlibobjs=
67901U=
67902for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67903  # 1. Remove the extension, and $U if already installed.
67904  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67905  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67906  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67907  #    will be set to the directory where LIBOBJS objects are built.
67908  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67909  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67910done
67911LIBOBJS=$ac_libobjs
67912
67913LTLIBOBJS=$ac_ltlibobjs
67914
67915
67916
67917: "${CONFIG_STATUS=./config.status}"
67918ac_write_fail=0
67919ac_clean_files_save=$ac_clean_files
67920ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67921{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67922$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67923as_write_fail=0
67924cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67925#! $SHELL
67926# Generated by $as_me.
67927# Run this file to recreate the current configuration.
67928# Compiler output produced by configure, useful for debugging
67929# configure, is in config.log if it exists.
67930
67931debug=false
67932ac_cs_recheck=false
67933ac_cs_silent=false
67934
67935SHELL=\${CONFIG_SHELL-$SHELL}
67936export SHELL
67937_ASEOF
67938cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67939## -------------------- ##
67940## M4sh Initialization. ##
67941## -------------------- ##
67942
67943# Be more Bourne compatible
67944DUALCASE=1; export DUALCASE # for MKS sh
67945if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67946  emulate sh
67947  NULLCMD=:
67948  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67949  # is contrary to our usage.  Disable this feature.
67950  alias -g '${1+"$@"}'='"$@"'
67951  setopt NO_GLOB_SUBST
67952else
67953  case `(set -o) 2>/dev/null` in #(
67954  *posix*) :
67955    set -o posix ;; #(
67956  *) :
67957     ;;
67958esac
67959fi
67960
67961
67962as_nl='
67963'
67964export as_nl
67965# Printing a long string crashes Solaris 7 /usr/bin/printf.
67966as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67967as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67968as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67969# Prefer a ksh shell builtin over an external printf program on Solaris,
67970# but without wasting forks for bash or zsh.
67971if test -z "$BASH_VERSION$ZSH_VERSION" \
67972    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67973  as_echo='print -r --'
67974  as_echo_n='print -rn --'
67975elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67976  as_echo='printf %s\n'
67977  as_echo_n='printf %s'
67978else
67979  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67980    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67981    as_echo_n='/usr/ucb/echo -n'
67982  else
67983    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67984    as_echo_n_body='eval
67985      arg=$1;
67986      case $arg in #(
67987      *"$as_nl"*)
67988	expr "X$arg" : "X\\(.*\\)$as_nl";
67989	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67990      esac;
67991      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67992    '
67993    export as_echo_n_body
67994    as_echo_n='sh -c $as_echo_n_body as_echo'
67995  fi
67996  export as_echo_body
67997  as_echo='sh -c $as_echo_body as_echo'
67998fi
67999
68000# The user is always right.
68001if test "${PATH_SEPARATOR+set}" != set; then
68002  PATH_SEPARATOR=:
68003  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
68004    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
68005      PATH_SEPARATOR=';'
68006  }
68007fi
68008
68009
68010# IFS
68011# We need space, tab and new line, in precisely that order.  Quoting is
68012# there to prevent editors from complaining about space-tab.
68013# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68014# splitting by setting IFS to empty value.)
68015IFS=" ""	$as_nl"
68016
68017# Find who we are.  Look in the path if we contain no directory separator.
68018as_myself=
68019case $0 in #((
68020  *[\\/]* ) as_myself=$0 ;;
68021  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68022for as_dir in $PATH
68023do
68024  IFS=$as_save_IFS
68025  test -z "$as_dir" && as_dir=.
68026    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
68027  done
68028IFS=$as_save_IFS
68029
68030     ;;
68031esac
68032# We did not find ourselves, most probably we were run as `sh COMMAND'
68033# in which case we are not to be found in the path.
68034if test "x$as_myself" = x; then
68035  as_myself=$0
68036fi
68037if test ! -f "$as_myself"; then
68038  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
68039  exit 1
68040fi
68041
68042# Unset variables that we do not need and which cause bugs (e.g. in
68043# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
68044# suppresses any "Segmentation fault" message there.  '((' could
68045# trigger a bug in pdksh 5.2.14.
68046for as_var in BASH_ENV ENV MAIL MAILPATH
68047do eval test x\${$as_var+set} = xset \
68048  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68049done
68050PS1='$ '
68051PS2='> '
68052PS4='+ '
68053
68054# NLS nuisances.
68055LC_ALL=C
68056export LC_ALL
68057LANGUAGE=C
68058export LANGUAGE
68059
68060# CDPATH.
68061(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
68062
68063
68064# as_fn_error STATUS ERROR [LINENO LOG_FD]
68065# ----------------------------------------
68066# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
68067# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
68068# script with STATUS, using 1 if that was 0.
68069as_fn_error ()
68070{
68071  as_status=$1; test $as_status -eq 0 && as_status=1
68072  if test "$4"; then
68073    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
68074    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
68075  fi
68076  $as_echo "$as_me: error: $2" >&2
68077  as_fn_exit $as_status
68078} # as_fn_error
68079
68080
68081# as_fn_set_status STATUS
68082# -----------------------
68083# Set $? to STATUS, without forking.
68084as_fn_set_status ()
68085{
68086  return $1
68087} # as_fn_set_status
68088
68089# as_fn_exit STATUS
68090# -----------------
68091# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
68092as_fn_exit ()
68093{
68094  set +e
68095  as_fn_set_status $1
68096  exit $1
68097} # as_fn_exit
68098
68099# as_fn_unset VAR
68100# ---------------
68101# Portably unset VAR.
68102as_fn_unset ()
68103{
68104  { eval $1=; unset $1;}
68105}
68106as_unset=as_fn_unset
68107# as_fn_append VAR VALUE
68108# ----------------------
68109# Append the text in VALUE to the end of the definition contained in VAR. Take
68110# advantage of any shell optimizations that allow amortized linear growth over
68111# repeated appends, instead of the typical quadratic growth present in naive
68112# implementations.
68113if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
68114  eval 'as_fn_append ()
68115  {
68116    eval $1+=\$2
68117  }'
68118else
68119  as_fn_append ()
68120  {
68121    eval $1=\$$1\$2
68122  }
68123fi # as_fn_append
68124
68125# as_fn_arith ARG...
68126# ------------------
68127# Perform arithmetic evaluation on the ARGs, and store the result in the
68128# global $as_val. Take advantage of shells that can avoid forks. The arguments
68129# must be portable across $(()) and expr.
68130if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
68131  eval 'as_fn_arith ()
68132  {
68133    as_val=$(( $* ))
68134  }'
68135else
68136  as_fn_arith ()
68137  {
68138    as_val=`expr "$@" || test $? -eq 1`
68139  }
68140fi # as_fn_arith
68141
68142
68143if expr a : '\(a\)' >/dev/null 2>&1 &&
68144   test "X`expr 00001 : '.*\(...\)'`" = X001; then
68145  as_expr=expr
68146else
68147  as_expr=false
68148fi
68149
68150if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
68151  as_basename=basename
68152else
68153  as_basename=false
68154fi
68155
68156if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
68157  as_dirname=dirname
68158else
68159  as_dirname=false
68160fi
68161
68162as_me=`$as_basename -- "$0" ||
68163$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68164	 X"$0" : 'X\(//\)$' \| \
68165	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
68166$as_echo X/"$0" |
68167    sed '/^.*\/\([^/][^/]*\)\/*$/{
68168	    s//\1/
68169	    q
68170	  }
68171	  /^X\/\(\/\/\)$/{
68172	    s//\1/
68173	    q
68174	  }
68175	  /^X\/\(\/\).*/{
68176	    s//\1/
68177	    q
68178	  }
68179	  s/.*/./; q'`
68180
68181# Avoid depending upon Character Ranges.
68182as_cr_letters='abcdefghijklmnopqrstuvwxyz'
68183as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
68184as_cr_Letters=$as_cr_letters$as_cr_LETTERS
68185as_cr_digits='0123456789'
68186as_cr_alnum=$as_cr_Letters$as_cr_digits
68187
68188ECHO_C= ECHO_N= ECHO_T=
68189case `echo -n x` in #(((((
68190-n*)
68191  case `echo 'xy\c'` in
68192  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
68193  xy)  ECHO_C='\c';;
68194  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
68195       ECHO_T='	';;
68196  esac;;
68197*)
68198  ECHO_N='-n';;
68199esac
68200
68201rm -f conf$$ conf$$.exe conf$$.file
68202if test -d conf$$.dir; then
68203  rm -f conf$$.dir/conf$$.file
68204else
68205  rm -f conf$$.dir
68206  mkdir conf$$.dir 2>/dev/null
68207fi
68208if (echo >conf$$.file) 2>/dev/null; then
68209  if ln -s conf$$.file conf$$ 2>/dev/null; then
68210    as_ln_s='ln -s'
68211    # ... but there are two gotchas:
68212    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
68213    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
68214    # In both cases, we have to default to `cp -pR'.
68215    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
68216      as_ln_s='cp -pR'
68217  elif ln conf$$.file conf$$ 2>/dev/null; then
68218    as_ln_s=ln
68219  else
68220    as_ln_s='cp -pR'
68221  fi
68222else
68223  as_ln_s='cp -pR'
68224fi
68225rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
68226rmdir conf$$.dir 2>/dev/null
68227
68228
68229# as_fn_mkdir_p
68230# -------------
68231# Create "$as_dir" as a directory, including parents if necessary.
68232as_fn_mkdir_p ()
68233{
68234
68235  case $as_dir in #(
68236  -*) as_dir=./$as_dir;;
68237  esac
68238  test -d "$as_dir" || eval $as_mkdir_p || {
68239    as_dirs=
68240    while :; do
68241      case $as_dir in #(
68242      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
68243      *) as_qdir=$as_dir;;
68244      esac
68245      as_dirs="'$as_qdir' $as_dirs"
68246      as_dir=`$as_dirname -- "$as_dir" ||
68247$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68248	 X"$as_dir" : 'X\(//\)[^/]' \| \
68249	 X"$as_dir" : 'X\(//\)$' \| \
68250	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
68251$as_echo X"$as_dir" |
68252    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68253	    s//\1/
68254	    q
68255	  }
68256	  /^X\(\/\/\)[^/].*/{
68257	    s//\1/
68258	    q
68259	  }
68260	  /^X\(\/\/\)$/{
68261	    s//\1/
68262	    q
68263	  }
68264	  /^X\(\/\).*/{
68265	    s//\1/
68266	    q
68267	  }
68268	  s/.*/./; q'`
68269      test -d "$as_dir" && break
68270    done
68271    test -z "$as_dirs" || eval "mkdir $as_dirs"
68272  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
68273
68274
68275} # as_fn_mkdir_p
68276if mkdir -p . 2>/dev/null; then
68277  as_mkdir_p='mkdir -p "$as_dir"'
68278else
68279  test -d ./-p && rmdir ./-p
68280  as_mkdir_p=false
68281fi
68282
68283
68284# as_fn_executable_p FILE
68285# -----------------------
68286# Test if FILE is an executable regular file.
68287as_fn_executable_p ()
68288{
68289  test -f "$1" && test -x "$1"
68290} # as_fn_executable_p
68291as_test_x='test -x'
68292as_executable_p=as_fn_executable_p
68293
68294# Sed expression to map a string onto a valid CPP name.
68295as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
68296
68297# Sed expression to map a string onto a valid variable name.
68298as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
68299
68300
68301exec 6>&1
68302## ----------------------------------- ##
68303## Main body of $CONFIG_STATUS script. ##
68304## ----------------------------------- ##
68305_ASEOF
68306test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
68307
68308cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68309# Save the log message, to keep $0 and so on meaningful, and to
68310# report actual input values of CONFIG_FILES etc. instead of their
68311# values after options handling.
68312ac_log="
68313This file was extended by OpenJDK $as_me jdk9, which was
68314generated by GNU Autoconf 2.69.  Invocation command line was
68315
68316  CONFIG_FILES    = $CONFIG_FILES
68317  CONFIG_HEADERS  = $CONFIG_HEADERS
68318  CONFIG_LINKS    = $CONFIG_LINKS
68319  CONFIG_COMMANDS = $CONFIG_COMMANDS
68320  $ $0 $@
68321
68322on `(hostname || uname -n) 2>/dev/null | sed 1q`
68323"
68324
68325_ACEOF
68326
68327case $ac_config_files in *"
68328"*) set x $ac_config_files; shift; ac_config_files=$*;;
68329esac
68330
68331
68332
68333cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68334# Files that config.status was made for.
68335config_files="$ac_config_files"
68336
68337_ACEOF
68338
68339cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68340ac_cs_usage="\
68341\`$as_me' instantiates files and other configuration actions
68342from templates according to the current configuration.  Unless the files
68343and actions are specified as TAGs, all are instantiated by default.
68344
68345Usage: $0 [OPTION]... [TAG]...
68346
68347  -h, --help       print this help, then exit
68348  -V, --version    print version number and configuration settings, then exit
68349      --config     print configuration, then exit
68350  -q, --quiet, --silent
68351                   do not print progress messages
68352  -d, --debug      don't remove temporary files
68353      --recheck    update $as_me by reconfiguring in the same conditions
68354      --file=FILE[:TEMPLATE]
68355                   instantiate the configuration file FILE
68356
68357Configuration files:
68358$config_files
68359
68360Report bugs to <build-dev@openjdk.java.net>.
68361OpenJDK home page: <http://openjdk.java.net>."
68362
68363_ACEOF
68364cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68365ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
68366ac_cs_version="\\
68367OpenJDK config.status jdk9
68368configured by $0, generated by GNU Autoconf 2.69,
68369  with options \\"\$ac_cs_config\\"
68370
68371Copyright (C) 2012 Free Software Foundation, Inc.
68372This config.status script is free software; the Free Software Foundation
68373gives unlimited permission to copy, distribute and modify it."
68374
68375ac_pwd='$ac_pwd'
68376srcdir='$srcdir'
68377AWK='$AWK'
68378test -n "\$AWK" || AWK=awk
68379_ACEOF
68380
68381cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68382# The default lists apply if the user does not specify any file.
68383ac_need_defaults=:
68384while test $# != 0
68385do
68386  case $1 in
68387  --*=?*)
68388    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68389    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68390    ac_shift=:
68391    ;;
68392  --*=)
68393    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68394    ac_optarg=
68395    ac_shift=:
68396    ;;
68397  *)
68398    ac_option=$1
68399    ac_optarg=$2
68400    ac_shift=shift
68401    ;;
68402  esac
68403
68404  case $ac_option in
68405  # Handling of the options.
68406  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68407    ac_cs_recheck=: ;;
68408  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68409    $as_echo "$ac_cs_version"; exit ;;
68410  --config | --confi | --conf | --con | --co | --c )
68411    $as_echo "$ac_cs_config"; exit ;;
68412  --debug | --debu | --deb | --de | --d | -d )
68413    debug=: ;;
68414  --file | --fil | --fi | --f )
68415    $ac_shift
68416    case $ac_optarg in
68417    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68418    '') as_fn_error $? "missing file argument" ;;
68419    esac
68420    as_fn_append CONFIG_FILES " '$ac_optarg'"
68421    ac_need_defaults=false;;
68422  --he | --h |  --help | --hel | -h )
68423    $as_echo "$ac_cs_usage"; exit ;;
68424  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68425  | -silent | --silent | --silen | --sile | --sil | --si | --s)
68426    ac_cs_silent=: ;;
68427
68428  # This is an error.
68429  -*) as_fn_error $? "unrecognized option: \`$1'
68430Try \`$0 --help' for more information." ;;
68431
68432  *) as_fn_append ac_config_targets " $1"
68433     ac_need_defaults=false ;;
68434
68435  esac
68436  shift
68437done
68438
68439ac_configure_extra_args=
68440
68441if $ac_cs_silent; then
68442  exec 6>/dev/null
68443  ac_configure_extra_args="$ac_configure_extra_args --silent"
68444fi
68445
68446_ACEOF
68447cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68448if \$ac_cs_recheck; then
68449  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68450  shift
68451  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68452  CONFIG_SHELL='$SHELL'
68453  export CONFIG_SHELL
68454  exec "\$@"
68455fi
68456
68457_ACEOF
68458cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68459exec 5>>config.log
68460{
68461  echo
68462  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68463## Running $as_me. ##
68464_ASBOX
68465  $as_echo "$ac_log"
68466} >&5
68467
68468_ACEOF
68469cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68470_ACEOF
68471
68472cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68473
68474# Handling of arguments.
68475for ac_config_target in $ac_config_targets
68476do
68477  case $ac_config_target in
68478    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68479    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68480    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68481    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68482    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68483
68484  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68485  esac
68486done
68487
68488
68489# If the user did not use the arguments to specify the items to instantiate,
68490# then the envvar interface is used.  Set only those that are not.
68491# We use the long form for the default assignment because of an extremely
68492# bizarre bug on SunOS 4.1.3.
68493if $ac_need_defaults; then
68494  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68495fi
68496
68497# Have a temporary directory for convenience.  Make it in the build tree
68498# simply because there is no reason against having it here, and in addition,
68499# creating and moving files from /tmp can sometimes cause problems.
68500# Hook for its removal unless debugging.
68501# Note that there is a small window in which the directory will not be cleaned:
68502# after its creation but before its name has been assigned to `$tmp'.
68503$debug ||
68504{
68505  tmp= ac_tmp=
68506  trap 'exit_status=$?
68507  : "${ac_tmp:=$tmp}"
68508  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68509' 0
68510  trap 'as_fn_exit 1' 1 2 13 15
68511}
68512# Create a (secure) tmp directory for tmp files.
68513
68514{
68515  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68516  test -d "$tmp"
68517}  ||
68518{
68519  tmp=./conf$$-$RANDOM
68520  (umask 077 && mkdir "$tmp")
68521} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68522ac_tmp=$tmp
68523
68524# Set up the scripts for CONFIG_FILES section.
68525# No need to generate them if there are no CONFIG_FILES.
68526# This happens for instance with `./config.status config.h'.
68527if test -n "$CONFIG_FILES"; then
68528
68529
68530ac_cr=`echo X | tr X '\015'`
68531# On cygwin, bash can eat \r inside `` if the user requested igncr.
68532# But we know of no other shell where ac_cr would be empty at this
68533# point, so we can use a bashism as a fallback.
68534if test "x$ac_cr" = x; then
68535  eval ac_cr=\$\'\\r\'
68536fi
68537ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68538if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68539  ac_cs_awk_cr='\\r'
68540else
68541  ac_cs_awk_cr=$ac_cr
68542fi
68543
68544echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68545_ACEOF
68546
68547
68548{
68549  echo "cat >conf$$subs.awk <<_ACEOF" &&
68550  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68551  echo "_ACEOF"
68552} >conf$$subs.sh ||
68553  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68554ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68555ac_delim='%!_!# '
68556for ac_last_try in false false false false false :; do
68557  . ./conf$$subs.sh ||
68558    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68559
68560  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68561  if test $ac_delim_n = $ac_delim_num; then
68562    break
68563  elif $ac_last_try; then
68564    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68565  else
68566    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68567  fi
68568done
68569rm -f conf$$subs.sh
68570
68571cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68572cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68573_ACEOF
68574sed -n '
68575h
68576s/^/S["/; s/!.*/"]=/
68577p
68578g
68579s/^[^!]*!//
68580:repl
68581t repl
68582s/'"$ac_delim"'$//
68583t delim
68584:nl
68585h
68586s/\(.\{148\}\)..*/\1/
68587t more1
68588s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68589p
68590n
68591b repl
68592:more1
68593s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68594p
68595g
68596s/.\{148\}//
68597t nl
68598:delim
68599h
68600s/\(.\{148\}\)..*/\1/
68601t more2
68602s/["\\]/\\&/g; s/^/"/; s/$/"/
68603p
68604b
68605:more2
68606s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68607p
68608g
68609s/.\{148\}//
68610t delim
68611' <conf$$subs.awk | sed '
68612/^[^""]/{
68613  N
68614  s/\n//
68615}
68616' >>$CONFIG_STATUS || ac_write_fail=1
68617rm -f conf$$subs.awk
68618cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68619_ACAWK
68620cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68621  for (key in S) S_is_set[key] = 1
68622  FS = ""
68623
68624}
68625{
68626  line = $ 0
68627  nfields = split(line, field, "@")
68628  substed = 0
68629  len = length(field[1])
68630  for (i = 2; i < nfields; i++) {
68631    key = field[i]
68632    keylen = length(key)
68633    if (S_is_set[key]) {
68634      value = S[key]
68635      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68636      len += length(value) + length(field[++i])
68637      substed = 1
68638    } else
68639      len += 1 + keylen
68640  }
68641
68642  print line
68643}
68644
68645_ACAWK
68646_ACEOF
68647cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68648if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68649  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68650else
68651  cat
68652fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68653  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68654_ACEOF
68655
68656# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68657# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68658# trailing colons and then remove the whole line if VPATH becomes empty
68659# (actually we leave an empty line to preserve line numbers).
68660if test "x$srcdir" = x.; then
68661  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68662h
68663s///
68664s/^/:/
68665s/[	 ]*$/:/
68666s/:\$(srcdir):/:/g
68667s/:\${srcdir}:/:/g
68668s/:@srcdir@:/:/g
68669s/^:*//
68670s/:*$//
68671x
68672s/\(=[	 ]*\).*/\1/
68673G
68674s/\n//
68675s/^[^=]*=[	 ]*$//
68676}'
68677fi
68678
68679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68680fi # test -n "$CONFIG_FILES"
68681
68682
68683eval set X "  :F $CONFIG_FILES      "
68684shift
68685for ac_tag
68686do
68687  case $ac_tag in
68688  :[FHLC]) ac_mode=$ac_tag; continue;;
68689  esac
68690  case $ac_mode$ac_tag in
68691  :[FHL]*:*);;
68692  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68693  :[FH]-) ac_tag=-:-;;
68694  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68695  esac
68696  ac_save_IFS=$IFS
68697  IFS=:
68698  set x $ac_tag
68699  IFS=$ac_save_IFS
68700  shift
68701  ac_file=$1
68702  shift
68703
68704  case $ac_mode in
68705  :L) ac_source=$1;;
68706  :[FH])
68707    ac_file_inputs=
68708    for ac_f
68709    do
68710      case $ac_f in
68711      -) ac_f="$ac_tmp/stdin";;
68712      *) # Look for the file first in the build tree, then in the source tree
68713	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68714	 # because $ac_f cannot contain `:'.
68715	 test -f "$ac_f" ||
68716	   case $ac_f in
68717	   [\\/$]*) false;;
68718	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68719	   esac ||
68720	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68721      esac
68722      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68723      as_fn_append ac_file_inputs " '$ac_f'"
68724    done
68725
68726    # Let's still pretend it is `configure' which instantiates (i.e., don't
68727    # use $as_me), people would be surprised to read:
68728    #    /* config.h.  Generated by config.status.  */
68729    configure_input='Generated from '`
68730	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68731	`' by configure.'
68732    if test x"$ac_file" != x-; then
68733      configure_input="$ac_file.  $configure_input"
68734      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68735$as_echo "$as_me: creating $ac_file" >&6;}
68736    fi
68737    # Neutralize special characters interpreted by sed in replacement strings.
68738    case $configure_input in #(
68739    *\&* | *\|* | *\\* )
68740       ac_sed_conf_input=`$as_echo "$configure_input" |
68741       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68742    *) ac_sed_conf_input=$configure_input;;
68743    esac
68744
68745    case $ac_tag in
68746    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68747      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68748    esac
68749    ;;
68750  esac
68751
68752  ac_dir=`$as_dirname -- "$ac_file" ||
68753$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68754	 X"$ac_file" : 'X\(//\)[^/]' \| \
68755	 X"$ac_file" : 'X\(//\)$' \| \
68756	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68757$as_echo X"$ac_file" |
68758    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68759	    s//\1/
68760	    q
68761	  }
68762	  /^X\(\/\/\)[^/].*/{
68763	    s//\1/
68764	    q
68765	  }
68766	  /^X\(\/\/\)$/{
68767	    s//\1/
68768	    q
68769	  }
68770	  /^X\(\/\).*/{
68771	    s//\1/
68772	    q
68773	  }
68774	  s/.*/./; q'`
68775  as_dir="$ac_dir"; as_fn_mkdir_p
68776  ac_builddir=.
68777
68778case "$ac_dir" in
68779.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68780*)
68781  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68782  # A ".." for each directory in $ac_dir_suffix.
68783  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68784  case $ac_top_builddir_sub in
68785  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68786  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68787  esac ;;
68788esac
68789ac_abs_top_builddir=$ac_pwd
68790ac_abs_builddir=$ac_pwd$ac_dir_suffix
68791# for backward compatibility:
68792ac_top_builddir=$ac_top_build_prefix
68793
68794case $srcdir in
68795  .)  # We are building in place.
68796    ac_srcdir=.
68797    ac_top_srcdir=$ac_top_builddir_sub
68798    ac_abs_top_srcdir=$ac_pwd ;;
68799  [\\/]* | ?:[\\/]* )  # Absolute name.
68800    ac_srcdir=$srcdir$ac_dir_suffix;
68801    ac_top_srcdir=$srcdir
68802    ac_abs_top_srcdir=$srcdir ;;
68803  *) # Relative name.
68804    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68805    ac_top_srcdir=$ac_top_build_prefix$srcdir
68806    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68807esac
68808ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68809
68810
68811  case $ac_mode in
68812  :F)
68813  #
68814  # CONFIG_FILE
68815  #
68816
68817_ACEOF
68818
68819cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68820# If the template does not know about datarootdir, expand it.
68821# FIXME: This hack should be removed a few years after 2.60.
68822ac_datarootdir_hack=; ac_datarootdir_seen=
68823ac_sed_dataroot='
68824/datarootdir/ {
68825  p
68826  q
68827}
68828/@datadir@/p
68829/@docdir@/p
68830/@infodir@/p
68831/@localedir@/p
68832/@mandir@/p'
68833case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68834*datarootdir*) ac_datarootdir_seen=yes;;
68835*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68836  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68837$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68838_ACEOF
68839cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68840  ac_datarootdir_hack='
68841  s&@datadir@&$datadir&g
68842  s&@docdir@&$docdir&g
68843  s&@infodir@&$infodir&g
68844  s&@localedir@&$localedir&g
68845  s&@mandir@&$mandir&g
68846  s&\\\${datarootdir}&$datarootdir&g' ;;
68847esac
68848_ACEOF
68849
68850# Neutralize VPATH when `$srcdir' = `.'.
68851# Shell code in configure.ac might set extrasub.
68852# FIXME: do we really want to maintain this feature?
68853cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68854ac_sed_extra="$ac_vpsub
68855$extrasub
68856_ACEOF
68857cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68858:t
68859/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68860s|@configure_input@|$ac_sed_conf_input|;t t
68861s&@top_builddir@&$ac_top_builddir_sub&;t t
68862s&@top_build_prefix@&$ac_top_build_prefix&;t t
68863s&@srcdir@&$ac_srcdir&;t t
68864s&@abs_srcdir@&$ac_abs_srcdir&;t t
68865s&@top_srcdir@&$ac_top_srcdir&;t t
68866s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68867s&@builddir@&$ac_builddir&;t t
68868s&@abs_builddir@&$ac_abs_builddir&;t t
68869s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68870$ac_datarootdir_hack
68871"
68872eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68873  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68874
68875test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68876  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68877  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68878      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68879  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68880which seems to be undefined.  Please make sure it is defined" >&5
68881$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68882which seems to be undefined.  Please make sure it is defined" >&2;}
68883
68884  rm -f "$ac_tmp/stdin"
68885  case $ac_file in
68886  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68887  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68888  esac \
68889  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68890 ;;
68891
68892
68893
68894  esac
68895
68896done # for ac_tag
68897
68898
68899as_fn_exit 0
68900_ACEOF
68901ac_clean_files=$ac_clean_files_save
68902
68903test $ac_write_fail = 0 ||
68904  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68905
68906
68907# configure is writing to config.log, and then calls config.status.
68908# config.status does its own redirection, appending to config.log.
68909# Unfortunately, on DOS this fails, as config.log is still kept open
68910# by configure, so config.status won't be able to write to it; its
68911# output is simply discarded.  So we exec the FD to /dev/null,
68912# effectively closing config.log, so it can be properly (re)opened and
68913# appended to by config.status.  When coming back to configure, we
68914# need to make the FD available again.
68915if test "$no_create" != yes; then
68916  ac_cs_success=:
68917  ac_config_status_args=
68918  test "$silent" = yes &&
68919    ac_config_status_args="$ac_config_status_args --quiet"
68920  exec 5>/dev/null
68921  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68922  exec 5>>config.log
68923  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68924  # would make configure fail if this is the last instruction.
68925  $ac_cs_success || as_fn_exit 1
68926fi
68927if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68928  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68929$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68930fi
68931
68932
68933# After AC_OUTPUT, we need to do final work
68934
68935
68936  # Try to move config.log (generated by autoconf) to the configure-support directory.
68937  if test -e ./config.log; then
68938    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68939  fi
68940
68941  # Rotate our log file (configure.log)
68942  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68943    $RM -f "$OUTPUT_ROOT/configure.log.old"
68944  fi
68945  if test -e "$OUTPUT_ROOT/configure.log"; then
68946    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68947  fi
68948
68949  # Move configure.log from current directory to the build output root
68950  if test -e ./configure.log; then
68951    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68952  fi
68953
68954  # Make the compare script executable
68955  $CHMOD +x $OUTPUT_ROOT/compare.sh
68956
68957
68958# Finally output some useful information to the user
68959
68960  # Finally output some useful information to the user
68961
68962  printf "\n"
68963  printf "====================================================\n"
68964  if test "x$no_create" != "xyes"; then
68965    if test "x$IS_RECONFIGURE" != "xyes"; then
68966      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68967    else
68968      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68969    fi
68970  else
68971    if test "x$IS_RECONFIGURE" != "xyes"; then
68972      printf "A configuration has been successfully checked but not created\n"
68973    else
68974      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68975    fi
68976  fi
68977  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68978    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68979  else
68980    printf "using default settings.\n"
68981  fi
68982
68983  printf "\n"
68984  printf "Configuration summary:\n"
68985  printf "* Debug level:    $DEBUG_LEVEL\n"
68986  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68987  printf "* JDK variant:    $JDK_VARIANT\n"
68988  printf "* JVM variants:   $JVM_VARIANTS\n"
68989  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68990  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68991
68992  printf "\n"
68993  printf "Tools summary:\n"
68994  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68995    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68996  fi
68997  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68998  if test "x$TOOLCHAIN_VERSION" != "x"; then
68999    print_version=" $TOOLCHAIN_VERSION"
69000  fi
69001  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
69002  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
69003  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
69004
69005  printf "\n"
69006  printf "Build performance summary:\n"
69007  printf "* Cores to use:   $JOBS\n"
69008  printf "* Memory limit:   $MEMORY_SIZE MB\n"
69009  if test "x$CCACHE_STATUS" != "x"; then
69010    printf "* ccache status:  $CCACHE_STATUS\n"
69011  fi
69012  printf "\n"
69013
69014  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
69015    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
69016    printf "will result in longer build times.\n"
69017    printf "\n"
69018  fi
69019
69020  if test "x$FOUND_ALT_VARIABLES" != "x"; then
69021    printf "WARNING: You have old-style ALT_ environment variables set.\n"
69022    printf "These are not respected, and will be ignored. It is recommended\n"
69023    printf "that you clean your environment. The following variables are set:\n"
69024    printf "$FOUND_ALT_VARIABLES\n"
69025    printf "\n"
69026  fi
69027
69028  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
69029    printf "WARNING: Your build output directory is not on a local disk.\n"
69030    printf "This will severely degrade build performance!\n"
69031    printf "It is recommended that you create an output directory on a local disk,\n"
69032    printf "and run the configure script again from that directory.\n"
69033    printf "\n"
69034  fi
69035
69036  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
69037    printf "WARNING: The result of this configuration has overridden an older\n"
69038    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
69039    printf "proper build. Failure to do so might result in strange build problems.\n"
69040    printf "\n"
69041  fi
69042
69043  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
69044    printf "WARNING: The result of this configuration was not saved.\n"
69045    printf "You should run without '--no-create | -n' to create the configuration.\n"
69046    printf "\n"
69047  fi
69048
69049
69050
69051  # Locate config.log.
69052  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
69053    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
69054  elif test -e "./config.log"; then
69055    CONFIG_LOG_PATH="."
69056  fi
69057
69058  if test -e "$CONFIG_LOG_PATH/config.log"; then
69059    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
69060    if test $? -eq 0; then
69061      printf "The following warnings were produced. Repeated here for convenience:\n"
69062      # We must quote sed expression (using []) to stop m4 from eating the [].
69063      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
69064      printf "\n"
69065    fi
69066  fi
69067
69068