--- a/common/autoconf/generated-configure.sh Thu Oct 25 20:04:23 2012 -0700
+++ b/common/autoconf/generated-configure.sh Wed Oct 31 18:30:07 2012 -0700
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for openjdk jdk8.
+# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
#
# Report bugs to <build-dev@openjdk.java.net>.
#
@@ -550,12 +550,12 @@
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME='openjdk'
+PACKAGE_NAME='OpenJDK'
PACKAGE_TARNAME='openjdk'
PACKAGE_VERSION='jdk8'
-PACKAGE_STRING='openjdk jdk8'
+PACKAGE_STRING='OpenJDK jdk8'
PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
-PACKAGE_URL=''
+PACKAGE_URL='http://openjdk.java.net'
# Factoring default headers for most tests.
ac_includes_default="\
@@ -606,7 +606,9 @@
NUM_CORES
SALIB_NAME
HOTSPOT_MAKE_ARGS
+FIXPATH
LIBCXX
+STATIC_CXX_SETTING
LIBDL
LIBM
LIBZIP_CAN_USE_MMAP
@@ -619,7 +621,6 @@
USING_SYSTEM_FT_LIB
FREETYPE2_LIBS
FREETYPE2_CFLAGS
-CUPS_LIBS
CUPS_CFLAGS
OPENWIN_HOME
X_EXTRA_LIBS
@@ -631,7 +632,6 @@
CFLAGS_DEBUG_SYMBOLS
ZIP_DEBUGINFO_FILES
ENABLE_DEBUG_SYMBOLS
-UNCYGDRIVE
LDFLAGS_CXX_JDK
LDFLAGS_JDKEXE_SUFFIX
LDFLAGS_JDKLIB_SUFFIX
@@ -672,6 +672,9 @@
SHARED_LIBRARY
OBJ_SUFFIX
LIPO
+ac_ct_OBJDUMP
+OBJDUMP
+ac_ct_OBJCOPY
OBJCOPY
MCS
STRIP
@@ -683,9 +686,13 @@
RC_FLAGS
DUMPBIN
WINAR
+HOTSPOT_RC
+HOTSPOT_MT
RC
MT
WINLD
+HOTSPOT_LD
+HOTSPOT_CXX
ARFLAGS
AR
LDEXECXX
@@ -698,6 +705,9 @@
ac_ct_CXX
CXXFLAGS
CXX
+ac_ct_PROPER_COMPILER_CXX
+PROPER_COMPILER_CXX
+POTENTIAL_CXX
OBJEXT
EXEEXT
ac_ct_CC
@@ -705,12 +715,16 @@
LDFLAGS
CFLAGS
CC
+ac_ct_PROPER_COMPILER_CC
+PROPER_COMPILER_CC
+POTENTIAL_CC
BUILD_LD
BUILD_CXX
BUILD_CC
-MSVCR100DLL
-CHECK_FOR_VCINSTALLDIR
-SETUPDEVENV
+MSVCR_DLL
+VS_PATH
+VS_LIB
+VS_INCLUDE
CYGWIN_LINK
AR_OUT_OPTION
LD_OUT_OPTION
@@ -733,15 +747,14 @@
BOOT_RTJAR
JAVA_CHECK
JAVAC_CHECK
-OUTPUT_ROOT
-CONF_NAME
-SPEC
COOKED_BUILD_NUMBER
FULL_VERSION
RELEASE
JDK_VERSION
RUNTIME_NAME
COPYRIGHT_YEAR
+MACOSX_BUNDLE_ID_BASE
+MACOSX_BUNDLE_NAME_BASE
COMPANY_NAME
JDK_RC_PLATFORM_NAME
PRODUCT_SUFFIX
@@ -753,16 +766,39 @@
JDK_MICRO_VERSION
JDK_MINOR_VERSION
JDK_MAJOR_VERSION
-ENABLE_JFR
COMPRESS_JARS
+UNLIMITED_CRYPTO
CACERTS_FILE
TEST_IN_BUILD
-DISABLE_NIMBUS
BUILD_HEADLESS
SUPPORT_HEADFUL
SUPPORT_HEADLESS
-JIGSAW
SET_OPENJDK
+BDEPS_FTP
+BDEPS_UNZIP
+OS_VERSION_MICRO
+OS_VERSION_MINOR
+OS_VERSION_MAJOR
+PKG_CONFIG
+COMM
+TIME
+STAT
+HG
+READELF
+OTOOL
+LDD
+ZIP
+UNZIP
+FIND_DELETE
+MAKE
+CHECK_TOOLSDIR_MAKE
+CHECK_TOOLSDIR_GMAKE
+CHECK_MAKE
+CHECK_GMAKE
+PKGHANDLER
+OUTPUT_ROOT
+CONF_NAME
+SPEC
BUILD_VARIANT_RELEASE
DEBUG_CLASSFILES
FASTDEBUG
@@ -776,72 +812,12 @@
JVM_VARIANT_SERVER
JVM_VARIANTS
JDK_VARIANT
-BDEPS_FTP
-BDEPS_UNZIP
-OS_VERSION_MICRO
-OS_VERSION_MINOR
-OS_VERSION_MAJOR
-PKG_CONFIG
-HG
-OBJDUMP
-READELF
-OTOOL
-LDD
-THEPWDCMD
-FIND_DELETE
-RM
-MAKE
-CHECK_TOOLSDIR_MAKE
-CHECK_TOOLSDIR_GMAKE
-CHECK_MAKE
-CHECK_GMAKE
-NAWK
-SED
-FGREP
-EGREP
-GREP
-AWK
-ZIP
-XARGS
-WC
-UNZIP
-UNIQ
-TR
-TOUCH
-TEE
-TAR
-TAIL
-SORT
-SH
-PRINTF
-MV
-MKDIR
-LS
-LN
-HEAD
-FIND
-FILE
-EXPR
-ECHO
-DIFF
-DF
-DATE
-CUT
-CPIO
-CP
-CMP
-CHMOD
-CAT
-BASENAME
-PKGHANDLER
BUILD_LOG_WRAPPER
BUILD_LOG_PREVIOUS
BUILD_LOG
SYS_ROOT
PATH_SEP
-CYGPATH
SRC_ROOT
-READLINK
DEFINE_CROSS_COMPILE_ARCH
LP64
OPENJDK_TARGET_OS_API_DIR
@@ -854,18 +830,18 @@
REQUIRED_OS_VERSION
REQUIRED_OS_NAME
COMPILE_TYPE
+OPENJDK_TARGET_CPU_ENDIAN
+OPENJDK_TARGET_CPU_BITS
+OPENJDK_TARGET_CPU_ARCH
+OPENJDK_TARGET_CPU
+OPENJDK_TARGET_OS_API
+OPENJDK_TARGET_OS
OPENJDK_BUILD_CPU_ENDIAN
OPENJDK_BUILD_CPU_BITS
OPENJDK_BUILD_CPU_ARCH
OPENJDK_BUILD_CPU
OPENJDK_BUILD_OS_API
OPENJDK_BUILD_OS
-OPENJDK_TARGET_CPU_ENDIAN
-OPENJDK_TARGET_CPU_BITS
-OPENJDK_TARGET_CPU_ARCH
-OPENJDK_TARGET_CPU
-OPENJDK_TARGET_OS_API
-OPENJDK_TARGET_OS
OPENJDK_BUILD_AUTOCONF_NAME
OPENJDK_TARGET_AUTOCONF_NAME
target_os
@@ -880,6 +856,51 @@
build_vendor
build_cpu
build
+SETFILE
+DF
+READLINK
+CYGPATH
+NAWK
+SED
+FGREP
+EGREP
+GREP
+AWK
+XARGS
+WHICH
+WC
+UNIQ
+UNAME
+TR
+TOUCH
+TEE
+TAR
+TAIL
+SORT
+SH
+RM
+THEPWDCMD
+PRINTF
+MV
+MKTEMP
+MKDIR
+LS
+LN
+HEAD
+FIND
+FILE
+EXPR
+ECHO
+DIRNAME
+DIFF
+DATE
+CUT
+CP
+CMP
+CHMOD
+CAT
+BASH
+BASENAME
DATE_WHEN_CONFIGURED
CONFIGURE_COMMAND_LINE
CUSTOM_MAKE_DIR
@@ -929,23 +950,20 @@
with_sys_root
with_tools_dir
with_devkit
-with_builddeps_conf
-with_builddeps_server
-with_builddeps_dir
-with_builddeps_group
-enable_list_builddeps
with_jdk_variant
with_jvm_variants
enable_debug
with_debug_level
+with_conf_name
+with_builddeps_conf
+with_builddeps_server
+with_builddeps_dir
+with_builddeps_group
enable_openjdk_only
-enable_jigsaw
enable_headful
-enable_nimbus
enable_hotspot_test_in_build
with_cacerts_file
-enable_jfr
-with_conf_name
+enable_unlimited_crypto
with_boot_jdk
with_boot_jdk_jvmargs
with_add_source_root
@@ -957,7 +975,7 @@
with_override_jaxws
with_override_hotspot
with_override_jdk
-with_msvcr100dll
+with_msvcr_dll
with_extra_cflags
with_extra_cxxflags
with_extra_ldflags
@@ -967,7 +985,6 @@
with_x
with_cups
with_cups_include
-with_cups_lib
with_freetype
with_alsa
with_alsa_include
@@ -1546,7 +1563,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures openjdk jdk8 to adapt to many kinds of systems.
+\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1616,7 +1633,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of openjdk jdk8:";;
+ short | recursive ) echo "Configuration of OpenJDK jdk8:";;
esac
cat <<\_ACEOF
@@ -1624,24 +1641,19 @@
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-list-builddeps list all build dependencies known to the configure
- script
--enable-debug set the debug level to fastdebug (shorthand for
--with-debug-level=fastdebug) [disabled]
- --enable-openjdk-only build OpenJDK regardless of the presence of closed
- repositories [disabled]
- --enable-jigsaw build Jigsaw images (not yet available) [disabled]
- --disable-headful build headful support (graphical UI support)
- [enabled]
- --disable-nimbus disable Nimbus L&F [enabled]
+ --enable-openjdk-only supress building closed source even if present
+ [disabled]
+ --disable-headful disable building headful support (graphical UI
+ support) [enabled]
--enable-hotspot-test-in-build
- enable running of Queens test after Hotspot build
- (not yet available) [disabled]
- --enable-jfr enable jfr (default is no)
- ENABLE_JFR="${enableval}"
- --disable-debug-symbols disable generation of debug symbols ([enabled])
+ run the Queens test after Hotspot build [disabled]
+ --enable-unlimited-crypto
+ Enable unlimited crypto policy [disabled]
+ --disable-debug-symbols disable generation of debug symbols [enabled]
--disable-zip-debug-info
- don't zip debug-info files ([enabled@:@)
+ disable zipping of debug-info files [enabled]
--disable-macosx-runtime-support
disable the use of MacOSX Java runtime support
framework [enabled]
@@ -1651,38 +1663,38 @@
--enable-sjavac use sjavac to do fast incremental compiles
[disabled]
--disable-precompiled-headers
- use precompiled headers when compiling C++ [enabled]
- --disable-ccache use ccache to speed up recompilations [enabled]
+ disable using precompiled headers when compiling C++
+ [enabled]
+ --disable-ccache disable using ccache to speed up recompilations
+ [enabled]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-custom-make-dir directory containing custom build/make files
+ --with-custom-make-dir use this directory for custom build/make files
--with-target-bits build 32-bit or 64-bit binaries (for platforms that
support it), e.g. --with-target-bits=32 [guessed]
- --with-sys-root pass this sys-root to the compilers and linker
- (useful if the sys-root encoded in the cross
- compiler tools is incorrect)
- --with-tools-dir search this directory for (cross-compiling)
- compilers and tools
+ --with-sys-root pass this sys-root to the compilers and tools (for
+ cross-compiling)
+ --with-tools-dir search this directory for compilers and tools (for
+ cross-compiling)
--with-devkit use this directory as base for tools-dir and
sys-root (for cross-compiling)
- --with-builddeps-conf use this configuration file for the builddeps
- --with-builddeps-server download and use build dependencies from this server
- url, e.g.
- --with-builddeps-server=ftp://example.com/dir
- --with-builddeps-dir store downloaded build dependencies here
- [d/localhome/builddeps]
- --with-builddeps-group chgrp the downloaded build dependencies to this
- group
--with-jdk-variant JDK variant to build (normal) [normal]
--with-jvm-variants JVM variants (separated by commas) to build (server,
client, kernel, zero, zeroshark) [server]
--with-debug-level set the debug level (release, fastdebug, slowdebug)
[release]
+ --with-conf-name use this as the name of the configuration [generated
+ from important configuration options]
+ --with-builddeps-conf use this configuration file for the builddeps
+ --with-builddeps-server download and use build dependencies from this server
+ url
+ --with-builddeps-dir store downloaded build dependencies here
+ [/localhome/builddeps]
+ --with-builddeps-group chgrp the downloaded build dependencies to this
+ group
--with-cacerts-file specify alternative cacerts file
- --with-conf-name use this as the name of the configuration,
- overriding the generated default
--with-boot-jdk path to Boot JDK (used to bootstrap build) [probed]
--with-boot-jdk-jvmargs specify JVM arguments to be passed to all
invocations of the Boot JDK, overriding the default
@@ -1707,16 +1719,15 @@
--with-override-jaxws use this jaxws dir for the build
--with-override-hotspot use this hotspot dir for the build
--with-override-jdk use this jdk dir for the build
- --with-msvcr100dll copy this msvcr100.dll into the built JDK
+ --with-msvcr-dll copy this msvcr100.dll into the built JDK (Windows
+ only) [probed]
--with-extra-cflags extra flags to be used when compiling jdk c-files
--with-extra-cxxflags extra flags to be used when compiling jdk c++-files
--with-extra-ldflags extra flags to be used when linking jdk
--with-x use the X Window System
--with-cups specify prefix directory for the cups package
- (expecting the libraries under PATH/lib and the
- headers under PATH/include)
+ (expecting the headers under PATH/include)
--with-cups-include specify directory for the cups include files
- --with-cups-lib specify directory for the cups library
--with-freetype specify prefix directory for the freetype2 package
(expecting the libraries under PATH/lib and the
headers under PATH/include)
@@ -1733,10 +1744,7 @@
--with-memory-size=1024 [probed]
--with-sjavac-server-java
use this java binary for running the sjavac
- background server and other long running java tasks
- in the build process, e.g.
- ---with-sjavac-server-java="/opt/jrockit/bin/java
- -server"
+ background server [Boot JDK java]
--with-sjavac-server-cores
use at most this number of concurrent threads on the
sjavac server [probed]
@@ -1769,6 +1777,7 @@
it to find libraries and programs with nonstandard names/locations.
Report bugs to <build-dev@openjdk.java.net>.
+OpenJDK home page: <http://openjdk.java.net>.
_ACEOF
ac_status=$?
fi
@@ -1831,7 +1840,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-openjdk configure jdk8
+OpenJDK configure jdk8
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2488,101 +2497,41 @@
} # ac_fn_cxx_check_func
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
+ eval "$3=yes"
+else
+ eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ----------------------------------------- ##
-## Report this to build-dev@openjdk.java.net ##
-## ----------------------------------------- ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-} # ac_fn_c_check_header_mongrel
+} # ac_fn_c_check_header_compile
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by openjdk $as_me jdk8, which was
+It was created by OpenJDK $as_me jdk8, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -2931,9 +2880,6 @@
-# Do not change or remove the following line, it is needed for consistency checks:
-# DATE_WHEN_GENERATED: 1347963060
-
ac_aux_dir=
for ac_dir in build-aux "$srcdir"/build-aux; do
if test -f "$ac_dir/install-sh"; then
@@ -3053,14 +2999,46 @@
-
-
-
-
-
-
-
-
+# This will make sure the given variable points to a full and proper
+# path. This means:
+# 1) There will be no spaces in the path. On posix platforms,
+# spaces in the path will result in an error. On Windows,
+# the path will be rewritten using short-style to be space-free.
+# 2) The path will be absolute, and it will be in unix-style (on
+# cygwin).
+# $1: The name of the variable to fix
+
+
+# This will make sure the given variable points to a executable
+# with a full and proper path. This means:
+# 1) There will be no spaces in the path. On posix platforms,
+# spaces in the path will result in an error. On Windows,
+# the path will be rewritten using short-style to be space-free.
+# 2) The path will be absolute, and it will be in unix-style (on
+# cygwin).
+# Any arguments given to the executable is preserved.
+# If the input variable does not have a directory specification, then
+# it need to be in the PATH.
+# $1: The name of the variable to fix
+
+
+
+
+
+
+# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
+# $1: variable to check
+# $2: executable name to print in warning (optional)
+
+
+# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
+# Arguments as AC_PATH_PROG:
+# $1: variable to set
+# $2: executable name to look for
+
+
+# Setup the most fundamental tools that relies on not much else to set up,
+# but is used by much of the early bootstrap code.
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
@@ -3083,23 +3061,10 @@
-# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
-# $1: variable to check
-# $2: executable name to print in warning (optional)
-
-
-# Does AC_PATH_PROG followed by CHECK_NONEMPTY.
-# Arguments as AC_PATH_PROG:
-# $1: variable to set
-# $2: executable name to look for
-
-
-
-
-
-
-
-# Check if build directory is on local disk.
+
+
+# Check if build directory is on local disk. If not possible to determine,
+# we prefer to claim it's local.
# Argument 1: directory to test
# Argument 2: what to do if it is on local disk
# Argument 3: what to do otherwise (remote disk or failure)
@@ -3136,6 +3101,64 @@
+# Helper function which possibly converts a path using DOS-style short mode.
+# If so, the updated path is stored in $new_path.
+# $1: The path to check
+
+
+# Helper function which possibly converts a path using DOS-style short mode.
+# If so, the updated path is stored in $new_path.
+# $1: The path to check
+
+
+# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
+# and could probably be heavily simplified. However, all changes in this
+# area tend to need lot of testing in different scenarios, and in lack of
+# proper unit testing, cleaning this up has not been deemed worth the effort
+# at the moment.
+
+
+
+
+
+
+
+
+
+# Setup basic configuration paths, and platform-specific stuff related to PATHs.
+
+
+
+
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+
+
+
+
@@ -3287,6 +3310,19 @@
+cygwin_help() {
+ case $1 in
+ unzip)
+ PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
+ zip)
+ PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
+ make)
+ PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
+ * )
+ break ;;
+ esac
+}
+
apt_help() {
case $1 in
devkit)
@@ -3561,28 +3597,82 @@
# questions.
#
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# This line needs to be here, verbatim, after all includes.
-# It is replaced with custom functionality when building
+# $1 = compiler to test (CC or CXX)
+# $2 = human readable name of compiler (C or C++)
+
+
+
+
+
+# $1 = compiler to test (CC or CXX)
+# $2 = human readable name of compiler (C or C++)
+# $3 = list of compiler names to search for
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+
+
+
+
+
+
+# Check if the VS env variables were setup prior to running configure.
+# If not, then find vcvarsall.bat and run it automatically, and integrate
+# the set env variables into the spec file.
+
+
+
+
+
+
+# This line needs to be here, verbatim, after all includes and the dummy hook
+# definitions. It is replaced with custom functionality when building
# custom sources.
-
-
-###############################################################################
-#
-# Initialization
+#CUSTOM_AUTOCONF_INCLUDE
+
+# Do not change or remove the following line, it is needed for consistency checks:
+DATE_WHEN_GENERATED=1351539315
+
+###############################################################################
+#
+# Initialization / Boot-strapping
+#
+# The bootstrapping process needs to solve the "chicken or the egg" problem,
+# thus it jumps back and forth, each time gaining something needed later on.
#
###############################################################################
@@ -3592,789 +3682,12 @@
DATE_WHEN_CONFIGURED=`LANG=C date`
-
-
-# Now we can determine OpenJDK build and target platforms. This is required to
-# have early on.
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$target_alias" = x; then
- ac_cv_target=$ac_cv_host
-else
- ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
-# is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the
-# product you're building. The target of this build is called "host". Since this is confusing to most people, we
-# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
-# to use the configure naming style.
-
-
-
-
-
- # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
- # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
- # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
- # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
- OPENJDK_TARGET_AUTOCONF_NAME="$host"
- OPENJDK_BUILD_AUTOCONF_NAME="$build"
-
-
-
- # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
-
- case "$host_os" in
- *linux*)
- VAR_OS=linux
- VAR_OS_API=posix
- ;;
- *solaris*)
- VAR_OS=solaris
- VAR_OS_API=posix
- ;;
- *darwin*)
- VAR_OS=macosx
- VAR_OS_API=posix
- ;;
- *bsd*)
- VAR_OS=bsd
- VAR_OS_API=posix
- ;;
- *cygwin*|*windows*)
- VAR_OS=windows
- VAR_OS_API=winapi
- ;;
- *)
- as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
- ;;
- esac
-
-
- # First argument is the cpu name from the trip/quad
- case "$host_cpu" in
- x86_64)
- VAR_CPU=x86_64
- VAR_CPU_ARCH=x86
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=little
- ;;
- i?86)
- VAR_CPU=x86
- VAR_CPU_ARCH=x86
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=little
- ;;
- arm*)
- VAR_CPU=arm
- VAR_CPU_ARCH=arm
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=little
- ;;
- powerpc)
- VAR_CPU=ppc
- VAR_CPU_ARCH=ppc
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=big
- ;;
- powerpc64)
- VAR_CPU=ppc64
- VAR_CPU_ARCH=ppc
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=big
- ;;
- sparc)
- VAR_CPU=sparc
- VAR_CPU_ARCH=sparc
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=big
- ;;
- sparcv9)
- VAR_CPU=sparcv9
- VAR_CPU_ARCH=sparc
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=big
- ;;
- *)
- as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
- ;;
- esac
-
- # ... and setup our own variables. (Do this explicitely to facilitate searching)
- OPENJDK_TARGET_OS="$VAR_OS"
- OPENJDK_TARGET_OS_API="$VAR_OS_API"
- OPENJDK_TARGET_CPU="$VAR_CPU"
- OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
- OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
- OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
-
-
-
-
-
-
-
- # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
-
- case "$build_os" in
- *linux*)
- VAR_OS=linux
- VAR_OS_API=posix
- ;;
- *solaris*)
- VAR_OS=solaris
- VAR_OS_API=posix
- ;;
- *darwin*)
- VAR_OS=macosx
- VAR_OS_API=posix
- ;;
- *bsd*)
- VAR_OS=bsd
- VAR_OS_API=posix
- ;;
- *cygwin*|*windows*)
- VAR_OS=windows
- VAR_OS_API=winapi
- ;;
- *)
- as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
- ;;
- esac
-
-
- # First argument is the cpu name from the trip/quad
- case "$build_cpu" in
- x86_64)
- VAR_CPU=x86_64
- VAR_CPU_ARCH=x86
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=little
- ;;
- i?86)
- VAR_CPU=x86
- VAR_CPU_ARCH=x86
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=little
- ;;
- arm*)
- VAR_CPU=arm
- VAR_CPU_ARCH=arm
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=little
- ;;
- powerpc)
- VAR_CPU=ppc
- VAR_CPU_ARCH=ppc
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=big
- ;;
- powerpc64)
- VAR_CPU=ppc64
- VAR_CPU_ARCH=ppc
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=big
- ;;
- sparc)
- VAR_CPU=sparc
- VAR_CPU_ARCH=sparc
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=big
- ;;
- sparcv9)
- VAR_CPU=sparcv9
- VAR_CPU_ARCH=sparc
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=big
- ;;
- *)
- as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
- ;;
- esac
-
- # ..and setup our own variables. (Do this explicitely to facilitate searching)
- OPENJDK_BUILD_OS="$VAR_OS"
- OPENJDK_BUILD_OS_API="$VAR_OS_API"
- OPENJDK_BUILD_CPU="$VAR_CPU"
- OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
- OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
- OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
-
-
-
-
-
-
-
-
-
-# Check whether --with-target-bits was given.
-if test "${with_target_bits+set}" = set; then :
- withval=$with_target_bits;
-fi
-
-
- # We have three types of compiles:
- # native == normal compilation, target system == build system
- # cross == traditional cross compilation, target system != build system; special toolchain needed
- # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
- #
- if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
- # We're doing a proper cross-compilation
- COMPILE_TYPE="cross"
- else
- COMPILE_TYPE="native"
- fi
-
- if test "x$with_target_bits" != x; then
- if test "x$COMPILE_TYPE" = "xcross"; then
- as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
- fi
-
- if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- # A reduced build is requested
- COMPILE_TYPE="reduced"
- OPENJDK_TARGET_CPU_BITS=32
- if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
- OPENJDK_TARGET_CPU=x86
- elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
- OPENJDK_TARGET_CPU=sparc
- else
- as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
- fi
- elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- 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
- elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
-$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
- else
- as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
- fi
- fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compilation type" >&5
-$as_echo_n "checking for compilation type... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
-$as_echo "$COMPILE_TYPE" >&6; }
-
-
- if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
- REQUIRED_OS_NAME=SunOS
- REQUIRED_OS_VERSION=5.10
- fi
- if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
- REQUIRED_OS_NAME=Linux
- REQUIRED_OS_VERSION=2.6
- fi
- if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
- REQUIRED_OS_NAME=Windows
- if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
- REQUIRED_OS_VERSION=5.2
- else
- REQUIRED_OS_VERSION=5.1
- fi
- fi
- if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
- REQUIRED_OS_NAME=Darwin
- REQUIRED_OS_VERSION=11.2
- fi
-
-
-
-
-
- # Also store the legacy naming of the cpu.
- # Ie i586 and amd64 instead of x86 and x86_64
- OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
- if test "x$OPENJDK_TARGET_CPU" = xx86; then
- OPENJDK_TARGET_CPU_LEGACY="i586"
- elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- # On all platforms except MacOSX replace x86_64 with amd64.
- OPENJDK_TARGET_CPU_LEGACY="amd64"
- fi
-
-
- # And the second legacy naming of the cpu.
- # Ie i386 and amd64 instead of x86 and x86_64.
- OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
- if test "x$OPENJDK_TARGET_CPU" = xx86; then
- OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
- elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
- fi
-
-
- # This is the name of the cpu (but using i386 and amd64 instead of
- # x86 and x86_64, respectively), preceeded by a /, to be used when
- # locating libraries. On macosx, it's empty, though.
- OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- OPENJDK_TARGET_CPU_LIBDIR=""
- fi
-
-
- # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
- # /amd64 or /sparcv9. This string is appended to some library paths, like this:
- # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
- OPENJDK_TARGET_CPU_ISADIR=""
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- OPENJDK_TARGET_CPU_ISADIR="/amd64"
- elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
- OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
- fi
- fi
-
-
- # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
- OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
- if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
- # On linux only, we replace x86 with i386.
- OPENJDK_TARGET_CPU_OSARCH="i386"
- elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- # On all platforms except macosx, we replace x86_64 with amd64.
- OPENJDK_TARGET_CPU_OSARCH="amd64"
- fi
-
-
- OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
- if test "x$OPENJDK_TARGET_CPU" = xx86; then
- OPENJDK_TARGET_CPU_JLI="i386"
- elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- # On all platforms except macosx, we replace x86_64 with amd64.
- OPENJDK_TARGET_CPU_JLI="amd64"
- fi
- # Now setup the -D flags for building libjli.
- OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
- OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
- elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
- OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
- fi
- fi
-
-
- # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
- if test "x$OPENJDK_TARGET_OS_API" = xposix; then
- OPENJDK_TARGET_OS_API_DIR="solaris"
- fi
- if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
- OPENJDK_TARGET_OS_API_DIR="windows"
- fi
-
-
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- A_LP64="LP64:="
- ADD_LP64="-D_LP64=1"
- fi
- LP64=$A_LP64
-
-
- if test "x$COMPILE_TYPE" = "xcross"; then
- # FIXME: ... or should this include reduced builds..?
- DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
- else
- DEFINE_CROSS_COMPILE_ARCH=""
- fi
-
-
-
-
-# Continue setting up basic stuff.
-
-# Locate the directory of this script.
-SCRIPT="$0"
-
- if test "x$OPENJDK_BUILD_OS" != xwindows; then
- # Follow a chain of symbolic links. Use readlink
- # where it exists, else fall back to horribly
- # complicated shell code.
- # Extract the first word of "readlink", so it can be a program name with args.
-set dummy readlink; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_READLINK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $READLINK in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-READLINK=$ac_cv_path_READLINK
-if test -n "$READLINK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
-$as_echo "$READLINK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test "x$READLINK_TESTED" != yes; then
- # On MacOSX there is a readlink tool with a different
- # purpose than the GNU readlink tool. Check the found readlink.
- ISGNU=`$READLINK --help 2>&1 | grep GNU`
- if test "x$ISGNU" = x; then
- # A readlink that we do not know how to use.
- # Are there other non-GNU readlinks out there?
- READLINK_TESTED=yes
- READLINK=
- fi
- fi
-
- if test "x$READLINK" != x; then
- SCRIPT=`$READLINK -f $SCRIPT`
- else
- STARTDIR=$PWD
- COUNTER=0
- DIR=`dirname $SCRIPT`
- FIL=`basename $SCRIPT`
- while test $COUNTER -lt 20; do
- ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
- if test "x$ISLINK" == x; then
- # This is not a symbolic link! We are done!
- break
- fi
- # The link might be relative! We have to use cd to travel safely.
- cd $DIR
- cd `dirname $ISLINK`
- DIR=`pwd`
- FIL=`basename $ISLINK`
- let COUNTER=COUNTER+1
- done
- cd $STARTDIR
- SCRIPT=$DIR/$FIL
- fi
- fi
-
-AUTOCONF_DIR=`dirname $0`
-
-# Where is the source? It is located two levels above the configure script.
-CURDIR="$PWD"
-cd "$AUTOCONF_DIR/../.."
-SRC_ROOT="`pwd`"
-if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- SRC_ROOT_LENGTH=`pwd|wc -m`
- if test $SRC_ROOT_LENGTH -gt 100; then
- as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
- fi
-fi
-
-cd "$CURDIR"
-
-
- # Fail with message the path to the source root if var SRC_ROOT contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$SRC_ROOT" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- SRC_ROOT=`$CYGPATH -s -m -a "$SRC_ROOT"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- SRC_ROOT=`$ECHO "$SRC_ROOT" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- SRC_ROOT=`$CYGPATH -u "$SRC_ROOT"`
- else
- as_fn_error $? "You cannot have spaces in the path to the source root! \"$SRC_ROOT\"" "$LINENO" 5
- fi
- fi
-
-
- # Fail with message the path to the current directory if var CURDIR contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$CURDIR" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- CURDIR=`$CYGPATH -s -m -a "$CURDIR"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- CURDIR=`$ECHO "$CURDIR" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- CURDIR=`$CYGPATH -u "$CURDIR"`
- else
- as_fn_error $? "You cannot have spaces in the path to the current directory! \"$CURDIR\"" "$LINENO" 5
- fi
- fi
-
-
-if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
- # Add extra search paths on solaris for utilities like ar and as etc...
- PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
-fi
-
-# For cygwin we need cygpath first, since it is used everywhere.
-# Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CYGPATH+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CYGPATH in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-CYGPATH=$ac_cv_path_CYGPATH
-if test -n "$CYGPATH"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
-$as_echo "$CYGPATH" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-PATH_SEP=":"
-if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- if test "x$CYGPATH" = x; then
- as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
- fi
- PATH_SEP=";"
-fi
-
-
-# You can force the sys-root if the sys-root encoded into the cross compiler tools
-# is not correct.
-
-# Check whether --with-sys-root was given.
-if test "${with_sys_root+set}" = set; then :
- withval=$with_sys_root;
-fi
-
-
-if test "x$with_sys_root" != x; then
- SYS_ROOT=$with_sys_root
-else
- SYS_ROOT=/
-fi
-
-
-
-# Check whether --with-tools-dir was given.
-if test "${with_tools_dir+set}" = set; then :
- withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
-fi
-
-
-
-# Check whether --with-devkit was given.
-if test "${with_devkit+set}" = set; then :
- withval=$with_devkit;
- if test "x$with_sys_root" != x; then
- as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
- fi
- if test "x$with_tools_dir" != x; then
- as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
- fi
- TOOLS_DIR=$with_devkit/bin
- SYS_ROOT=$with_devkit/$host_alias/libc
-
-fi
-
-
-
-
-# Setup default logging of stdout and stderr to build.log in the output root.
-BUILD_LOG='$(OUTPUT_ROOT)/build.log'
-BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
-BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
-
-
-
-
-
-# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
-
- for ac_prog in apt-get yum port pkgutil pkgadd
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PKGHANDLER"; then
- ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_PKGHANDLER="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-PKGHANDLER=$ac_cv_prog_PKGHANDLER
-if test -n "$PKGHANDLER"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
-$as_echo "$PKGHANDLER" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$PKGHANDLER" && break
-done
-
-
-
-# Setup simple tools, that do not need have cross compilation support.
-# Without these, we can't properly run the rest of the configure script.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
+$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
+$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
+
+
# Start with tools that do not need have cross compilation support
# and can be expected to be found in the default PATH. These tools are
@@ -4443,6 +3756,65 @@
+ for ac_prog in bash
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_BASH+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $BASH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+BASH=$ac_cv_path_BASH
+if test -n "$BASH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
+$as_echo "$BASH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$BASH" && break
+done
+
+
+ if test "x$BASH" = x; then
+ if test "xbash" = x; then
+ PROG_NAME=bash
+ else
+ PROG_NAME=bash
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+
+
for ac_prog in cat
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -4679,65 +4051,6 @@
- for ac_prog in cpio
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CPIO+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CPIO in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-CPIO=$ac_cv_path_CPIO
-if test -n "$CPIO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
-$as_echo "$CPIO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CPIO" && break
-done
-
-
- if test "x$CPIO" = x; then
- if test "xcpio" = x; then
- PROG_NAME=cpio
- else
- PROG_NAME=cpio
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
- as_fn_error $? "Cannot continue" "$LINENO" 5
- fi
-
-
-
for ac_prog in cut
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -4856,65 +4169,6 @@
- for ac_prog in df
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DF+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $DF in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_DF="$DF" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-DF=$ac_cv_path_DF
-if test -n "$DF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
-$as_echo "$DF" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$DF" && break
-done
-
-
- if test "x$DF" = x; then
- if test "xdf" = x; then
- PROG_NAME=df
- else
- PROG_NAME=df
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
- as_fn_error $? "Cannot continue" "$LINENO" 5
- fi
-
-
-
for ac_prog in gdiff diff
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -4974,6 +4228,65 @@
+ for ac_prog in dirname
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_DIRNAME+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $DIRNAME in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DIRNAME=$ac_cv_path_DIRNAME
+if test -n "$DIRNAME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
+$as_echo "$DIRNAME" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DIRNAME" && break
+done
+
+
+ if test "x$DIRNAME" = x; then
+ if test "xdirname" = x; then
+ PROG_NAME=dirname
+ else
+ PROG_NAME=dirname
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+
+
for ac_prog in echo
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -5446,6 +4759,65 @@
+ for ac_prog in mktemp
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MKTEMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MKTEMP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+MKTEMP=$ac_cv_path_MKTEMP
+if test -n "$MKTEMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
+$as_echo "$MKTEMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$MKTEMP" && break
+done
+
+
+ if test "x$MKTEMP" = x; then
+ if test "xmktemp" = x; then
+ PROG_NAME=mktemp
+ else
+ PROG_NAME=mktemp
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+
+
for ac_prog in mv
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -5564,6 +4936,124 @@
+ for ac_prog in pwd
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $THEPWDCMD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+THEPWDCMD=$ac_cv_path_THEPWDCMD
+if test -n "$THEPWDCMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
+$as_echo "$THEPWDCMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$THEPWDCMD" && break
+done
+
+
+ if test "x$THEPWDCMD" = x; then
+ if test "xpwd" = x; then
+ PROG_NAME=thepwdcmd
+ else
+ PROG_NAME=pwd
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+
+
+ for ac_prog in rm
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_RM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $RM in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_RM="$RM" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+RM=$ac_cv_path_RM
+if test -n "$RM"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
+$as_echo "$RM" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$RM" && break
+done
+
+
+ if test "x$RM" = x; then
+ if test "xrm" = x; then
+ PROG_NAME=rm
+ else
+ PROG_NAME=rm
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+
+
for ac_prog in sh
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -5977,6 +5467,65 @@
+ for ac_prog in uname
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_UNAME+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $UNAME in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+UNAME=$ac_cv_path_UNAME
+if test -n "$UNAME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
+$as_echo "$UNAME" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$UNAME" && break
+done
+
+
+ if test "x$UNAME" = x; then
+ if test "xuname" = x; then
+ PROG_NAME=uname
+ else
+ PROG_NAME=uname
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+
+
for ac_prog in uniq
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -6036,65 +5585,6 @@
- for ac_prog in unzip
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_UNZIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $UNZIP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-UNZIP=$ac_cv_path_UNZIP
-if test -n "$UNZIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
-$as_echo "$UNZIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$UNZIP" && break
-done
-
-
- if test "x$UNZIP" = x; then
- if test "xunzip" = x; then
- PROG_NAME=unzip
- else
- PROG_NAME=unzip
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
- as_fn_error $? "Cannot continue" "$LINENO" 5
- fi
-
-
-
for ac_prog in wc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -6154,6 +5644,65 @@
+ for ac_prog in which
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_WHICH+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $WHICH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+WHICH=$ac_cv_path_WHICH
+if test -n "$WHICH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
+$as_echo "$WHICH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$WHICH" && break
+done
+
+
+ if test "x$WHICH" = x; then
+ if test "xwhich" = x; then
+ PROG_NAME=which
+ else
+ PROG_NAME=which
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+
+
for ac_prog in xargs
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -6213,65 +5762,6 @@
- for ac_prog in zip
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ZIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $ZIP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ZIP=$ac_cv_path_ZIP
-if test -n "$ZIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
-$as_echo "$ZIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ZIP" && break
-done
-
-
- if test "x$ZIP" = x; then
- if test "xzip" = x; then
- PROG_NAME=zip
- else
- PROG_NAME=zip
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
- as_fn_error $? "Cannot continue" "$LINENO" 5
- fi
-
-
-
# Then required tools that require some special treatment.
for ac_prog in gawk mawk nawk awk
do
@@ -6700,1231 +6190,1150 @@
fi
-
- # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
- if test "x$MAKE" != x; then
- # User has supplied a make, test it.
- if test ! -f "$MAKE"; then
- as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
- fi
-
- MAKE_CANDIDATE=""$MAKE""
- DESCRIPTION="user supplied MAKE="
- if test "x$MAKE_CANDIDATE" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
-$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$MAKE_CANDIDATE"
- car="${tmp%% *}"
- tmp="$MAKE_CANDIDATE EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- MAKE_CANDIDATE="$car ${cdr% *}"
- else
- MAKE_CANDIDATE="$car"
- fi
-
- MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
- IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
- if test "x$IS_GNU_MAKE" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
-$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
- else
- IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
- if test "x$IS_MODERN_MAKE" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
- else
- FOUND_MAKE=$MAKE_CANDIDATE
- fi
- fi
- fi
-
- if test "x$FOUND_MAKE" = x; then
- as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
- fi
- else
- # Try our hardest to locate a correct version of GNU make
- for ac_prog in gmake
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CHECK_GMAKE in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
-if test -n "$CHECK_GMAKE"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
-$as_echo "$CHECK_GMAKE" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CHECK_GMAKE" && break
-done
-
-
- MAKE_CANDIDATE=""$CHECK_GMAKE""
- DESCRIPTION="gmake in PATH"
- if test "x$MAKE_CANDIDATE" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
-$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$MAKE_CANDIDATE"
- car="${tmp%% *}"
- tmp="$MAKE_CANDIDATE EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- MAKE_CANDIDATE="$car ${cdr% *}"
- else
- MAKE_CANDIDATE="$car"
- fi
-
- MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
- IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
- if test "x$IS_GNU_MAKE" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
-$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
- else
- IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
- if test "x$IS_MODERN_MAKE" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
- else
- FOUND_MAKE=$MAKE_CANDIDATE
- fi
- fi
- fi
-
-
- if test "x$FOUND_MAKE" = x; then
- for ac_prog in make
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CHECK_MAKE in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-CHECK_MAKE=$ac_cv_path_CHECK_MAKE
-if test -n "$CHECK_MAKE"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
-$as_echo "$CHECK_MAKE" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CHECK_MAKE" && break
-done
-
-
- MAKE_CANDIDATE=""$CHECK_MAKE""
- DESCRIPTION="make in PATH"
- if test "x$MAKE_CANDIDATE" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
-$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$MAKE_CANDIDATE"
- car="${tmp%% *}"
- tmp="$MAKE_CANDIDATE EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- MAKE_CANDIDATE="$car ${cdr% *}"
- else
- MAKE_CANDIDATE="$car"
- fi
-
- MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
- IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
- if test "x$IS_GNU_MAKE" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
-$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
- else
- IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
- if test "x$IS_MODERN_MAKE" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
- else
- FOUND_MAKE=$MAKE_CANDIDATE
- fi
- fi
- fi
-
- fi
-
- if test "x$FOUND_MAKE" = x; then
- if test "x$TOOLS_DIR" != x; then
- # We have a tools-dir, check that as well before giving up.
- OLD_PATH=$PATH
- PATH=$TOOLS_DIR:$PATH
- for ac_prog in gmake
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CHECK_TOOLSDIR_GMAKE in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
-if test -n "$CHECK_TOOLSDIR_GMAKE"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
-$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CHECK_TOOLSDIR_GMAKE" && break
-done
-
-
- MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
- DESCRIPTION="gmake in tools-dir"
- if test "x$MAKE_CANDIDATE" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
-$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$MAKE_CANDIDATE"
- car="${tmp%% *}"
- tmp="$MAKE_CANDIDATE EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- MAKE_CANDIDATE="$car ${cdr% *}"
- else
- MAKE_CANDIDATE="$car"
- fi
-
- MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
- IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
- if test "x$IS_GNU_MAKE" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
-$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
- else
- IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
- if test "x$IS_MODERN_MAKE" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
- else
- FOUND_MAKE=$MAKE_CANDIDATE
- fi
- fi
- fi
-
- if test "x$FOUND_MAKE" = x; then
- for ac_prog in make
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CHECK_TOOLSDIR_MAKE in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
-if test -n "$CHECK_TOOLSDIR_MAKE"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
-$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CHECK_TOOLSDIR_MAKE" && break
-done
-
-
- MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
- DESCRIPTION="make in tools-dir"
- if test "x$MAKE_CANDIDATE" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
-$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$MAKE_CANDIDATE"
- car="${tmp%% *}"
- tmp="$MAKE_CANDIDATE EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- MAKE_CANDIDATE="$car ${cdr% *}"
- else
- MAKE_CANDIDATE="$car"
- fi
-
- MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
- IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
- if test "x$IS_GNU_MAKE" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
-$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
- else
- IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
- if test "x$IS_MODERN_MAKE" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
- else
- FOUND_MAKE=$MAKE_CANDIDATE
- fi
- fi
- fi
-
- fi
- PATH=$OLD_PATH
- fi
- fi
-
- if test "x$FOUND_MAKE" = x; then
- as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
- fi
- fi
-
- MAKE=$FOUND_MAKE
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
-$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
-
-
-
- for ac_prog in rm
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_RM+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $RM in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_RM="$RM" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-RM=$ac_cv_path_RM
-if test -n "$RM"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
-$as_echo "$RM" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$RM" && break
-done
-
-
- if test "x$RM" = x; then
- if test "xrm" = x; then
- PROG_NAME=rm
- else
- PROG_NAME=rm
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
- as_fn_error $? "Cannot continue" "$LINENO" 5
- fi
-
-
+# Always force rm.
RM="$RM -f"
-
- # Test if find supports -delete
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
-$as_echo_n "checking if find supports -delete... " >&6; }
- FIND_DELETE="-delete"
-
- DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
-
- echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
-
- TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
- if test -f $DELETEDIR/TestIfFindSupportsDelete; then
- # No, it does not.
- rm $DELETEDIR/TestIfFindSupportsDelete
- FIND_DELETE="-exec rm \{\} \+"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
- rmdir $DELETEDIR
-
-
-
-# Non-required basic tools
-
-# Extract the first word of "pwd", so it can be a program name with args.
-set dummy pwd; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $THEPWDCMD in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-THEPWDCMD=$ac_cv_path_THEPWDCMD
-if test -n "$THEPWDCMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
-$as_echo "$THEPWDCMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "ldd", so it can be a program name with args.
-set dummy ldd; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_LDD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $LDD in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-LDD=$ac_cv_path_LDD
-if test -n "$LDD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
-$as_echo "$LDD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test "x$LDD" = "x"; then
- # List shared lib dependencies is used for
- # debug output and checking for forbidden dependencies.
- # We can build without it.
- LDD="true"
-fi
-# Extract the first word of "otool", so it can be a program name with args.
-set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_OTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $OTOOL in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-OTOOL=$ac_cv_path_OTOOL
-if test -n "$OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test "x$OTOOL" = "x"; then
- OTOOL="true"
-fi
-for ac_prog in readelf greadelf
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_READELF+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $READELF in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-READELF=$ac_cv_path_READELF
-if test -n "$READELF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
-$as_echo "$READELF" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$READELF" && break
-done
-
-for ac_prog in objdump gobjdump
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $OBJDUMP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-OBJDUMP=$ac_cv_path_OBJDUMP
-if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$OBJDUMP" && break
-done
-
-# Extract the first word of "hg", so it can be a program name with args.
-set dummy hg; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_HG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $HG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_HG="$HG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-HG=$ac_cv_path_HG
-if test -n "$HG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
-$as_echo "$HG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-# Check if pkg-config is available.
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
- ac_pt_PKG_CONFIG=$PKG_CONFIG
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $ac_pt_PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_pt_PKG_CONFIG" = x; then
- PKG_CONFIG=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- PKG_CONFIG=$ac_pt_PKG_CONFIG
- fi
-else
- PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
- _pkg_min_version=0.9.0
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- PKG_CONFIG=""
- fi
-
-fi
-
-# After basic tools have been setup, we can check build os specific details.
-
-###############################################################################
-
-# Note that this is the build platform OS version!
-
-OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
-OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
-OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
-OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
-
-
-
-
-
-# Setup builddeps, for automatic downloading of tools we need.
-# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
-# boot-jdk setup, but we need to have basic tools setup first.
-
-
-# Check whether --with-builddeps-conf was given.
-if test "${with_builddeps_conf+set}" = set; then :
- withval=$with_builddeps_conf;
-fi
-
-
-
-# Check whether --with-builddeps-server was given.
-if test "${with_builddeps_server+set}" = set; then :
- withval=$with_builddeps_server;
-fi
-
-
-
-# Check whether --with-builddeps-dir was given.
-if test "${with_builddeps_dir+set}" = set; then :
- withval=$with_builddeps_dir;
-else
- with_builddeps_dir=/localhome/builddeps
-fi
-
-
-
-# Check whether --with-builddeps-group was given.
-if test "${with_builddeps_group+set}" = set; then :
- withval=$with_builddeps_group;
-fi
-
-
-# Check whether --enable-list-builddeps was given.
-if test "${enable_list_builddeps+set}" = set; then :
- enableval=$enable_list_builddeps; LIST_BUILDDEPS="${enableval}"
-else
- LIST_BUILDDEPS='no'
-fi
-
-
-if test "x$LIST_BUILDDEPS" = xyes; then
- echo
- echo List of build dependencies known to the configure script,
- echo that can be used in builddeps.conf files:
- cat $AUTOCONF_DIR/*.ac $AUTOCONF_DIR/*.m4 | grep BDEPS_CHECK_MODULE\( | cut -f 2 -d ',' | tr -d ' ' | sort
- echo
- exit 1
-fi
-
-
-
- if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
- if test "x$with_builddeps_conf" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
-$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
- builddepsfile=$with_builddeps_conf
- if test -s $builddepsfile; then
- . $builddepsfile
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
-$as_echo "loaded!" >&6; }
- else
- as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
-$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
- builddepsfile=`mktemp`
- touch $builddepsfile
- # Put all found confs into a single file.
- find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
- # Source the file to acquire the variables
- if test -s $builddepsfile; then
- . $builddepsfile
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
-$as_echo "found at least one!" >&6; }
- else
- as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
- fi
- fi
- # Create build and target names that use _ instead of "-" and ".".
- # This is necessary to use them in variable names.
- build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
- target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
- # Extract rewrite information for build and target
- eval rewritten_build=\${REWRITE_${build_var}}
- if test "x$rewritten_build" = x; then
- rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
- echo Build stays the same $rewritten_build
- else
- echo Rewriting build for builddeps into $rewritten_build
- fi
- eval rewritten_target=\${REWRITE_${target_var}}
- if test "x$rewritten_target" = x; then
- rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
- echo Target stays the same $rewritten_target
- else
- echo Rewriting target for builddeps into $rewritten_target
- fi
- rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
- rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
- fi
- for ac_prog in 7z unzip
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$BDEPS_UNZIP"; then
- ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_BDEPS_UNZIP="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
-if test -n "$BDEPS_UNZIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
-$as_echo "$BDEPS_UNZIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$BDEPS_UNZIP" && break
-done
-
- if test "x$BDEPS_UNZIP" = x7z; then
- BDEPS_UNZIP="7z x"
- fi
-
- for ac_prog in wget lftp ftp
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$BDEPS_FTP"; then
- ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_BDEPS_FTP="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
-if test -n "$BDEPS_FTP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
-$as_echo "$BDEPS_FTP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$BDEPS_FTP" && break
-done
-
-
-
-###############################################################################
-#
-# Determine OpenJDK variants, options and version numbers.
-#
-###############################################################################
-
-# We need build & target for this.
+# These are not required on all platforms
+# Extract the first word of "cygpath", so it can be a program name with args.
+set dummy cygpath; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CYGPATH+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CYGPATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+CYGPATH=$ac_cv_path_CYGPATH
+if test -n "$CYGPATH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
+$as_echo "$CYGPATH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "readlink", so it can be a program name with args.
+set dummy readlink; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_READLINK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $READLINK in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+READLINK=$ac_cv_path_READLINK
+if test -n "$READLINK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
+$as_echo "$READLINK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "df", so it can be a program name with args.
+set dummy df; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_DF+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $DF in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DF="$DF" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DF=$ac_cv_path_DF
+if test -n "$DF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
+$as_echo "$DF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "SetFile", so it can be a program name with args.
+set dummy SetFile; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_SETFILE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SETFILE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SETFILE=$ac_cv_path_SETFILE
+if test -n "$SETFILE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
+$as_echo "$SETFILE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+# Now we can determine OpenJDK build and target platforms. This is required to
+# have early on.
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if test "${ac_cv_target+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
+# is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the
+# product you're building. The target of this build is called "host". Since this is confusing to most people, we
+# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
+# to use the configure naming style.
+
+
+
+
+
+ # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
+ # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
+ # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
+ # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
+ OPENJDK_TARGET_AUTOCONF_NAME="$host"
+ OPENJDK_BUILD_AUTOCONF_NAME="$build"
+
+
+
+ # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
+
+ case "$build_os" in
+ *linux*)
+ VAR_OS=linux
+ VAR_OS_API=posix
+ VAR_OS_ENV=linux
+ ;;
+ *solaris*)
+ VAR_OS=solaris
+ VAR_OS_API=posix
+ VAR_OS_ENV=solaris
+ ;;
+ *darwin*)
+ VAR_OS=macosx
+ VAR_OS_API=posix
+ VAR_OS_ENV=macosx
+ ;;
+ *bsd*)
+ VAR_OS=bsd
+ VAR_OS_API=posix
+ VAR_OS_ENV=bsd
+ ;;
+ *cygwin*)
+ VAR_OS=windows
+ VAR_OS_API=winapi
+ VAR_OS_ENV=windows.cygwin
+ ;;
+ *mingw*)
+ VAR_OS=windows
+ VAR_OS_API=winapi
+ VAR_OS_ENV=windows.msys
+ ;;
+ *)
+ as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
+ ;;
+ esac
+
+
+ # First argument is the cpu name from the trip/quad
+ case "$build_cpu" in
+ x86_64)
+ VAR_CPU=x86_64
+ VAR_CPU_ARCH=x86
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=little
+ ;;
+ i?86)
+ VAR_CPU=x86
+ VAR_CPU_ARCH=x86
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=little
+ ;;
+ arm*)
+ VAR_CPU=arm
+ VAR_CPU_ARCH=arm
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=little
+ ;;
+ powerpc)
+ VAR_CPU=ppc
+ VAR_CPU_ARCH=ppc
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=big
+ ;;
+ powerpc64)
+ VAR_CPU=ppc64
+ VAR_CPU_ARCH=ppc
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ ;;
+ sparc)
+ VAR_CPU=sparc
+ VAR_CPU_ARCH=sparc
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=big
+ ;;
+ sparcv9)
+ VAR_CPU=sparcv9
+ VAR_CPU_ARCH=sparc
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ ;;
+ *)
+ as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
+ ;;
+ esac
+
+ # ..and setup our own variables. (Do this explicitely to facilitate searching)
+ OPENJDK_BUILD_OS="$VAR_OS"
+ OPENJDK_BUILD_OS_API="$VAR_OS_API"
+ OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
+ OPENJDK_BUILD_CPU="$VAR_CPU"
+ OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
+ OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
+ OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
+$as_echo_n "checking openjdk-build os-cpu... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
+$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
+
+ # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
+
+ case "$host_os" in
+ *linux*)
+ VAR_OS=linux
+ VAR_OS_API=posix
+ VAR_OS_ENV=linux
+ ;;
+ *solaris*)
+ VAR_OS=solaris
+ VAR_OS_API=posix
+ VAR_OS_ENV=solaris
+ ;;
+ *darwin*)
+ VAR_OS=macosx
+ VAR_OS_API=posix
+ VAR_OS_ENV=macosx
+ ;;
+ *bsd*)
+ VAR_OS=bsd
+ VAR_OS_API=posix
+ VAR_OS_ENV=bsd
+ ;;
+ *cygwin*)
+ VAR_OS=windows
+ VAR_OS_API=winapi
+ VAR_OS_ENV=windows.cygwin
+ ;;
+ *mingw*)
+ VAR_OS=windows
+ VAR_OS_API=winapi
+ VAR_OS_ENV=windows.msys
+ ;;
+ *)
+ as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
+ ;;
+ esac
+
+
+ # First argument is the cpu name from the trip/quad
+ case "$host_cpu" in
+ x86_64)
+ VAR_CPU=x86_64
+ VAR_CPU_ARCH=x86
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=little
+ ;;
+ i?86)
+ VAR_CPU=x86
+ VAR_CPU_ARCH=x86
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=little
+ ;;
+ arm*)
+ VAR_CPU=arm
+ VAR_CPU_ARCH=arm
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=little
+ ;;
+ powerpc)
+ VAR_CPU=ppc
+ VAR_CPU_ARCH=ppc
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=big
+ ;;
+ powerpc64)
+ VAR_CPU=ppc64
+ VAR_CPU_ARCH=ppc
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ ;;
+ sparc)
+ VAR_CPU=sparc
+ VAR_CPU_ARCH=sparc
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=big
+ ;;
+ sparcv9)
+ VAR_CPU=sparcv9
+ VAR_CPU_ARCH=sparc
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ ;;
+ *)
+ as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
+ ;;
+ esac
+
+ # ... and setup our own variables. (Do this explicitely to facilitate searching)
+ OPENJDK_TARGET_OS="$VAR_OS"
+ OPENJDK_TARGET_OS_API="$VAR_OS_API"
+ OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
+ OPENJDK_TARGET_CPU="$VAR_CPU"
+ OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
+ OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
+ OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
+$as_echo_n "checking openjdk-target os-cpu... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
+$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
+
+
+
+# Check whether --with-target-bits was given.
+if test "${with_target_bits+set}" = set; then :
+ withval=$with_target_bits;
+fi
+
+
+ # We have three types of compiles:
+ # native == normal compilation, target system == build system
+ # cross == traditional cross compilation, target system != build system; special toolchain needed
+ # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
+ #
+ if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
+ # We're doing a proper cross-compilation
+ COMPILE_TYPE="cross"
+ else
+ COMPILE_TYPE="native"
+ fi
+
+ if test "x$with_target_bits" != x; then
+ if test "x$COMPILE_TYPE" = "xcross"; then
+ as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
+ fi
+
+ if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ # A reduced build is requested
+ COMPILE_TYPE="reduced"
+ OPENJDK_TARGET_CPU_BITS=32
+ if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
+ OPENJDK_TARGET_CPU=x86
+ elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
+ OPENJDK_TARGET_CPU=sparc
+ else
+ as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
+ fi
+ elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ 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
+ elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
+$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
+ else
+ as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
+ fi
+ fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
+$as_echo_n "checking compilation type... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
+$as_echo "$COMPILE_TYPE" >&6; }
+
+
+ if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+ REQUIRED_OS_NAME=SunOS
+ REQUIRED_OS_VERSION=5.10
+ fi
+ if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
+ REQUIRED_OS_NAME=Linux
+ REQUIRED_OS_VERSION=2.6
+ fi
+ if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+ REQUIRED_OS_NAME=Windows
+ if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
+ REQUIRED_OS_VERSION=5.2
+ else
+ REQUIRED_OS_VERSION=5.1
+ fi
+ fi
+ if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+ REQUIRED_OS_NAME=Darwin
+ REQUIRED_OS_VERSION=11.2
+ fi
+
+
+
+
+
+ # Also store the legacy naming of the cpu.
+ # Ie i586 and amd64 instead of x86 and x86_64
+ OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
+ if test "x$OPENJDK_TARGET_CPU" = xx86; then
+ OPENJDK_TARGET_CPU_LEGACY="i586"
+ elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ # On all platforms except MacOSX replace x86_64 with amd64.
+ OPENJDK_TARGET_CPU_LEGACY="amd64"
+ fi
+
+
+ # And the second legacy naming of the cpu.
+ # Ie i386 and amd64 instead of x86 and x86_64.
+ OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
+ if test "x$OPENJDK_TARGET_CPU" = xx86; then
+ OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
+ elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
+ fi
+
+
+ # This is the name of the cpu (but using i386 and amd64 instead of
+ # x86 and x86_64, respectively), preceeded by a /, to be used when
+ # locating libraries. On macosx, it's empty, though.
+ OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ OPENJDK_TARGET_CPU_LIBDIR=""
+ fi
+
+
+ # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
+ # /amd64 or /sparcv9. This string is appended to some library paths, like this:
+ # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
+ OPENJDK_TARGET_CPU_ISADIR=""
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ OPENJDK_TARGET_CPU_ISADIR="/amd64"
+ elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
+ OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
+ fi
+ fi
+
+
+ # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
+ OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
+ if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
+ # On linux only, we replace x86 with i386.
+ OPENJDK_TARGET_CPU_OSARCH="i386"
+ elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ # On all platforms except macosx, we replace x86_64 with amd64.
+ OPENJDK_TARGET_CPU_OSARCH="amd64"
+ fi
+
+
+ OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
+ if test "x$OPENJDK_TARGET_CPU" = xx86; then
+ OPENJDK_TARGET_CPU_JLI="i386"
+ elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ # On all platforms except macosx, we replace x86_64 with amd64.
+ OPENJDK_TARGET_CPU_JLI="amd64"
+ fi
+ # Now setup the -D flags for building libjli.
+ OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
+ OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
+ elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
+ OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
+ fi
+ fi
+
+
+ # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
+ if test "x$OPENJDK_TARGET_OS_API" = xposix; then
+ OPENJDK_TARGET_OS_API_DIR="solaris"
+ fi
+ if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
+ OPENJDK_TARGET_OS_API_DIR="windows"
+ fi
+
+
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ A_LP64="LP64:="
+ # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
+ # unpack200.exe
+ if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ ADD_LP64="-D_LP64=1"
+ fi
+ fi
+ LP64=$A_LP64
+
+
+ if test "x$COMPILE_TYPE" = "xcross"; then
+ # FIXME: ... or should this include reduced builds..?
+ DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
+ else
+ DEFINE_CROSS_COMPILE_ARCH=""
+ fi
+
+
+
+
+# Continue setting up basic stuff. Most remaining code require fundamental tools.
+
+# Locate the directory of this script.
+SCRIPT="$0"
+
+ if test "x$OPENJDK_BUILD_OS" != xwindows; then
+ # Follow a chain of symbolic links. Use readlink
+ # where it exists, else fall back to horribly
+ # complicated shell code.
+ if test "x$READLINK_TESTED" != yes; then
+ # On MacOSX there is a readlink tool with a different
+ # purpose than the GNU readlink tool. Check the found readlink.
+ ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
+ if test "x$ISGNU" = x; then
+ # A readlink that we do not know how to use.
+ # Are there other non-GNU readlinks out there?
+ READLINK_TESTED=yes
+ READLINK=
+ fi
+ fi
+
+ if test "x$READLINK" != x; then
+ SCRIPT=`$READLINK -f $SCRIPT`
+ else
+ STARTDIR=$PWD
+ COUNTER=0
+ sym_link_dir=`$DIRNAME $SCRIPT`
+ sym_link_file=`$BASENAME $SCRIPT`
+ while test $COUNTER -lt 20; do
+ ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+ if test "x$ISLINK" == x; then
+ # This is not a symbolic link! We are done!
+ break
+ fi
+ # The link might be relative! We have to use cd to travel safely.
+ cd $sym_link_dir
+ # ... and we must get the to the absolute path, not one using symbolic links.
+ cd `pwd -P`
+ cd `$DIRNAME $ISLINK`
+ sym_link_dir=`$THEPWDCMD`
+ sym_link_file=`$BASENAME $ISLINK`
+ let COUNTER=COUNTER+1
+ done
+ cd $STARTDIR
+ SCRIPT=$sym_link_dir/$sym_link_file
+ fi
+ fi
+
+AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
+
+# Where is the source? It is located two levels above the configure script.
+CURDIR="$PWD"
+cd "$AUTOCONF_DIR/../.."
+SRC_ROOT="`pwd`"
+
+if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+ PATH_SEP=";"
+
+ SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
+ if test $SRC_ROOT_LENGTH -gt 100; then
+ as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
+ fi
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
+$as_echo_n "checking cygwin release... " >&6; }
+ CYGWIN_VERSION=`$UNAME -r`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
+$as_echo "$CYGWIN_VERSION" >&6; }
+ WINDOWS_ENV_VENDOR='cygwin'
+ WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
+
+ CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
+ if test "x$CYGWIN_VERSION_OK" = x; then
+ { $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
+$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;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+ if test "x$CYGPATH" = x; then
+ as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
+$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
+ # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
+ cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
+ # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
+ CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
+$as_echo "$CYGWIN_ROOT_PATH" >&6; }
+ WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
+ test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
+ fi
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
+$as_echo_n "checking msys release... " >&6; }
+ MSYS_VERSION=`$UNAME -r`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
+$as_echo "$MSYS_VERSION" >&6; }
+
+ WINDOWS_ENV_VENDOR='msys'
+ WINDOWS_ENV_VERSION="$MSYS_VERSION"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
+$as_echo_n "checking msys root directory as unix-style path... " >&6; }
+ # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
+ MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
+
+ windows_path="$MSYS_ROOT_PATH"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ MSYS_ROOT_PATH="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ MSYS_ROOT_PATH="$unix_path"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
+$as_echo "$MSYS_ROOT_PATH" >&6; }
+ WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
+ else
+ as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
+ fi
+
+ # Test if windows or unix (cygwin/msys) find is first in path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
+$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
+ FIND_BINARY_OUTPUT=`find --version 2>&1`
+ if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
+$as_echo "unix style" >&6; }
+ elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
+$as_echo "Windows" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
+$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
+ { $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
+$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
+$as_echo "unknown" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
+$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
+ fi
+
+else
+ PATH_SEP=":"
+fi
+
+
+
+cd "$CURDIR"
+
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$SRC_ROOT"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ SRC_ROOT="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$SRC_ROOT"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ SRC_ROOT="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$SRC_ROOT"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$CURDIR"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ CURDIR="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$CURDIR"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ CURDIR="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$CURDIR"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+
+if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
+ # Add extra search paths on solaris for utilities like ar and as etc...
+ PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
+fi
+
+# You can force the sys-root if the sys-root encoded into the cross compiler tools
+# is not correct.
+
+# Check whether --with-sys-root was given.
+if test "${with_sys_root+set}" = set; then :
+ withval=$with_sys_root;
+fi
+
+
+if test "x$with_sys_root" != x; then
+ SYS_ROOT=$with_sys_root
+else
+ SYS_ROOT=/
+fi
+
+
+
+# Check whether --with-tools-dir was given.
+if test "${with_tools_dir+set}" = set; then :
+ withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
+fi
+
+
+
+# Check whether --with-devkit was given.
+if test "${with_devkit+set}" = set; then :
+ withval=$with_devkit;
+ if test "x$with_sys_root" != x; then
+ as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
+ fi
+ if test "x$with_tools_dir" != x; then
+ as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
+ fi
+ TOOLS_DIR=$with_devkit/bin
+ SYS_ROOT=$with_devkit/$host_alias/libc
+
+fi
+
+
+
+
+# Setup default logging of stdout and stderr to build.log in the output root.
+BUILD_LOG='$(OUTPUT_ROOT)/build.log'
+BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
+BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
+
+
+
+
+
+# These are needed to be able to create a configuration name (and thus the output directory)
###############################################################################
#
@@ -7969,8 +7378,8 @@
# ie normal interpreter and C1, only the serial GC, kernel jvmti etc
# zero: no machine code interpreter, no compiler
# zeroshark: zero interpreter and shark/llvm compiler backend
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM that should be built" >&5
-$as_echo_n "checking which variants of the JVM that should be built... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
+$as_echo_n "checking which variants of the JVM to build... " >&6; }
# Check whether --with-jvm-variants was given.
if test "${with_jvm_variants+set}" = set; then :
@@ -8151,6 +7560,2687 @@
+# With basic setup done, call the custom early hook.
+
+
+# To properly create a configuration name, we need to have the OpenJDK target
+# and options (variants and debug level) parsed.
+
+
+
+# Check whether --with-conf-name was given.
+if test "${with_conf_name+set}" = set; then :
+ withval=$with_conf_name; CONF_NAME=${with_conf_name}
+fi
+
+
+# Test from where we are running configure, in or outside of src root.
+if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
+ # We are running configure from the src root.
+ # Create a default ./build/target-variant-debuglevel output root.
+ if test "x${CONF_NAME}" = x; then
+ CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
+ fi
+ OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
+ $MKDIR -p "$OUTPUT_ROOT"
+ if test ! -d "$OUTPUT_ROOT"; then
+ as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
+ fi
+else
+ # We are running configure from outside of the src dir.
+ # Then use the current directory as output dir!
+ # If configuration is situated in normal build directory, just use the build
+ # directory name as configuration name, otherwise use the complete path.
+ if test "x${CONF_NAME}" = x; then
+ CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
+ fi
+ OUTPUT_ROOT="$CURDIR"
+
+ # WARNING: This might be a bad thing to do. You need to be sure you want to
+ # have a configuration in this directory. Do some sanity checks!
+
+ if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
+ # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
+ # other files
+ files_present=`$LS $OUTPUT_ROOT`
+ if test "x$files_present" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
+$as_echo "$as_me: Current directory is $CURDIR." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
+$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
+$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
+$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
+$as_echo "$as_me: seriously mess up just about everything." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
+$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
+$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
+ as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
+$as_echo_n "checking what configuration name to use... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
+$as_echo "$CONF_NAME" >&6; }
+
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$OUTPUT_ROOT"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ OUTPUT_ROOT="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$OUTPUT_ROOT"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ OUTPUT_ROOT="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$OUTPUT_ROOT"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+
+SPEC=$OUTPUT_ROOT/spec.gmk
+
+CONF_NAME=$CONF_NAME
+
+OUTPUT_ROOT=$OUTPUT_ROOT
+
+
+# Most of the probed defines are put into config.h
+ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
+
+# The spec.gmk file contains all variables for the make system.
+ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
+
+# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
+ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
+
+# The bootcycle-spec.gmk file contains support for boot cycle builds.
+ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
+
+# The compare.sh is used to compare the build output to other builds.
+ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
+
+# Spec.sh is currently used by compare-objects.sh
+ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
+
+# The generated Makefile knows where the spec.gmk is and where the source is.
+# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
+# which will look for generated configurations
+ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
+
+
+# Save the arguments given to us
+echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
+
+
+# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
+
+ for ac_prog in apt-get yum port pkgutil pkgadd
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKGHANDLER"; then
+ ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_PKGHANDLER="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PKGHANDLER=$ac_cv_prog_PKGHANDLER
+if test -n "$PKGHANDLER"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
+$as_echo "$PKGHANDLER" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$PKGHANDLER" && break
+done
+
+
+
+# Setup tools that requires more complex handling, or that is not needed by the configure script.
+
+
+ # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
+ if test "x$MAKE" != x; then
+ # User has supplied a make, test it.
+ if test ! -f "$MAKE"; then
+ as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
+ fi
+
+ MAKE_CANDIDATE=""$MAKE""
+ DESCRIPTION="user supplied MAKE=$MAKE"
+ if test "x$MAKE_CANDIDATE" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
+$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
+ MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
+ IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
+ if test "x$IS_GNU_MAKE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
+$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
+ else
+ IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
+ if test "x$IS_MODERN_MAKE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
+$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
+ else
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ MAKE_EXPECTED_ENV='cygwin'
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ MAKE_EXPECTED_ENV='msys'
+ else
+ as_fn_error $? "Unknown Windows environment" "$LINENO" 5
+ fi
+ MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
+ IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
+ else
+ # Not relevant for non-Windows
+ IS_MAKE_CORRECT_ENV=true
+ fi
+ if test "x$IS_MAKE_CORRECT_ENV" = x; then
+ { $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
+$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;}
+ else
+ FOUND_MAKE=$MAKE_CANDIDATE
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ FOUND_MAKE="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
+ fi
+
+ fi
+ fi
+ fi
+ fi
+
+ if test "x$FOUND_MAKE" = x; then
+ as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
+ fi
+ else
+ # Try our hardest to locate a correct version of GNU make
+ for ac_prog in gmake
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CHECK_GMAKE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
+if test -n "$CHECK_GMAKE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
+$as_echo "$CHECK_GMAKE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CHECK_GMAKE" && break
+done
+
+
+ MAKE_CANDIDATE=""$CHECK_GMAKE""
+ DESCRIPTION="gmake in PATH"
+ if test "x$MAKE_CANDIDATE" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
+$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
+ MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
+ IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
+ if test "x$IS_GNU_MAKE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
+$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
+ else
+ IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
+ if test "x$IS_MODERN_MAKE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
+$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
+ else
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ MAKE_EXPECTED_ENV='cygwin'
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ MAKE_EXPECTED_ENV='msys'
+ else
+ as_fn_error $? "Unknown Windows environment" "$LINENO" 5
+ fi
+ MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
+ IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
+ else
+ # Not relevant for non-Windows
+ IS_MAKE_CORRECT_ENV=true
+ fi
+ if test "x$IS_MAKE_CORRECT_ENV" = x; then
+ { $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
+$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;}
+ else
+ FOUND_MAKE=$MAKE_CANDIDATE
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ FOUND_MAKE="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
+ fi
+
+ fi
+ fi
+ fi
+ fi
+
+
+ if test "x$FOUND_MAKE" = x; then
+ for ac_prog in make
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CHECK_MAKE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+CHECK_MAKE=$ac_cv_path_CHECK_MAKE
+if test -n "$CHECK_MAKE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
+$as_echo "$CHECK_MAKE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CHECK_MAKE" && break
+done
+
+
+ MAKE_CANDIDATE=""$CHECK_MAKE""
+ DESCRIPTION="make in PATH"
+ if test "x$MAKE_CANDIDATE" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
+$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
+ MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
+ IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
+ if test "x$IS_GNU_MAKE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
+$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
+ else
+ IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
+ if test "x$IS_MODERN_MAKE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
+$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
+ else
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ MAKE_EXPECTED_ENV='cygwin'
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ MAKE_EXPECTED_ENV='msys'
+ else
+ as_fn_error $? "Unknown Windows environment" "$LINENO" 5
+ fi
+ MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
+ IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
+ else
+ # Not relevant for non-Windows
+ IS_MAKE_CORRECT_ENV=true
+ fi
+ if test "x$IS_MAKE_CORRECT_ENV" = x; then
+ { $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
+$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;}
+ else
+ FOUND_MAKE=$MAKE_CANDIDATE
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ FOUND_MAKE="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
+ fi
+
+ fi
+ fi
+ fi
+ fi
+
+ fi
+
+ if test "x$FOUND_MAKE" = x; then
+ if test "x$TOOLS_DIR" != x; then
+ # We have a tools-dir, check that as well before giving up.
+ OLD_PATH=$PATH
+ PATH=$TOOLS_DIR:$PATH
+ for ac_prog in gmake
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CHECK_TOOLSDIR_GMAKE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
+if test -n "$CHECK_TOOLSDIR_GMAKE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
+$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CHECK_TOOLSDIR_GMAKE" && break
+done
+
+
+ MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
+ DESCRIPTION="gmake in tools-dir"
+ if test "x$MAKE_CANDIDATE" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
+$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
+ MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
+ IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
+ if test "x$IS_GNU_MAKE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
+$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
+ else
+ IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
+ if test "x$IS_MODERN_MAKE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
+$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
+ else
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ MAKE_EXPECTED_ENV='cygwin'
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ MAKE_EXPECTED_ENV='msys'
+ else
+ as_fn_error $? "Unknown Windows environment" "$LINENO" 5
+ fi
+ MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
+ IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
+ else
+ # Not relevant for non-Windows
+ IS_MAKE_CORRECT_ENV=true
+ fi
+ if test "x$IS_MAKE_CORRECT_ENV" = x; then
+ { $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
+$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;}
+ else
+ FOUND_MAKE=$MAKE_CANDIDATE
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ FOUND_MAKE="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
+ fi
+
+ fi
+ fi
+ fi
+ fi
+
+ if test "x$FOUND_MAKE" = x; then
+ for ac_prog in make
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CHECK_TOOLSDIR_MAKE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
+if test -n "$CHECK_TOOLSDIR_MAKE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
+$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CHECK_TOOLSDIR_MAKE" && break
+done
+
+
+ MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
+ DESCRIPTION="make in tools-dir"
+ if test "x$MAKE_CANDIDATE" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
+$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
+ MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
+ IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
+ if test "x$IS_GNU_MAKE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
+$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
+ else
+ IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
+ if test "x$IS_MODERN_MAKE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
+$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
+ else
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ MAKE_EXPECTED_ENV='cygwin'
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ MAKE_EXPECTED_ENV='msys'
+ else
+ as_fn_error $? "Unknown Windows environment" "$LINENO" 5
+ fi
+ MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
+ IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
+ else
+ # Not relevant for non-Windows
+ IS_MAKE_CORRECT_ENV=true
+ fi
+ if test "x$IS_MAKE_CORRECT_ENV" = x; then
+ { $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
+$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;}
+ else
+ FOUND_MAKE=$MAKE_CANDIDATE
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$FOUND_MAKE"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ FOUND_MAKE="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
+ fi
+
+ fi
+ fi
+ fi
+ fi
+
+ fi
+ PATH=$OLD_PATH
+ fi
+ fi
+
+ if test "x$FOUND_MAKE" = x; then
+ as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
+ fi
+ fi
+
+ MAKE=$FOUND_MAKE
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
+$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
+
+
+
+ # Test if find supports -delete
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
+$as_echo_n "checking if find supports -delete... " >&6; }
+ FIND_DELETE="-delete"
+
+ DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
+
+ echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
+
+ TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
+ if test -f $DELETEDIR/TestIfFindSupportsDelete; then
+ # No, it does not.
+ rm $DELETEDIR/TestIfFindSupportsDelete
+ FIND_DELETE="-exec rm \{\} \+"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+ rmdir $DELETEDIR
+
+
+
+# These tools might not be installed by default,
+# need hint on how to install them.
+
+ for ac_prog in unzip
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_UNZIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $UNZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+UNZIP=$ac_cv_path_UNZIP
+if test -n "$UNZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
+$as_echo "$UNZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$UNZIP" && break
+done
+
+
+ if test "x$UNZIP" = x; then
+ if test "xunzip" = x; then
+ PROG_NAME=unzip
+ else
+ PROG_NAME=unzip
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+
+
+ for ac_prog in zip
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ZIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ZIP=$ac_cv_path_ZIP
+if test -n "$ZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
+$as_echo "$ZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ZIP" && break
+done
+
+
+ if test "x$ZIP" = x; then
+ if test "xzip" = x; then
+ PROG_NAME=zip
+ else
+ PROG_NAME=zip
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+
+
+# Non-required basic tools
+
+# Extract the first word of "ldd", so it can be a program name with args.
+set dummy ldd; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_LDD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $LDD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+LDD=$ac_cv_path_LDD
+if test -n "$LDD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
+$as_echo "$LDD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "x$LDD" = "x"; then
+ # List shared lib dependencies is used for
+ # debug output and checking for forbidden dependencies.
+ # We can build without it.
+ LDD="true"
+fi
+# Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $OTOOL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+OTOOL=$ac_cv_path_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "x$OTOOL" = "x"; then
+ OTOOL="true"
+fi
+for ac_prog in readelf greadelf
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_READELF+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $READELF in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+READELF=$ac_cv_path_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$READELF" && break
+done
+
+# Extract the first word of "hg", so it can be a program name with args.
+set dummy hg; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_HG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $HG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_HG="$HG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+HG=$ac_cv_path_HG
+if test -n "$HG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
+$as_echo "$HG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "stat", so it can be a program name with args.
+set dummy stat; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_STAT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $STAT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+STAT=$ac_cv_path_STAT
+if test -n "$STAT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
+$as_echo "$STAT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "time", so it can be a program name with args.
+set dummy time; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_TIME+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $TIME in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+TIME=$ac_cv_path_TIME
+if test -n "$TIME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
+$as_echo "$TIME" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+
+ for ac_prog in comm
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_COMM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $COMM in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+COMM=$ac_cv_path_COMM
+if test -n "$COMM"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
+$as_echo "$COMM" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$COMM" && break
+done
+
+
+ if test "x$COMM" = x; then
+ if test "xcomm" = x; then
+ PROG_NAME=comm
+ else
+ PROG_NAME=comm
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+
+fi
+
+
+# Check if pkg-config is available.
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+
+fi
+
+# After basic tools have been setup, we can check build os specific details.
+
+###############################################################################
+
+# Note that this is the build platform OS version!
+
+OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
+OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
+OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
+OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
+
+
+
+
+
+# Setup builddeps, for automatic downloading of tools we need.
+# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
+# boot-jdk setup, but we need to have basic tools setup first.
+
+
+# Check whether --with-builddeps-conf was given.
+if test "${with_builddeps_conf+set}" = set; then :
+ withval=$with_builddeps_conf;
+fi
+
+
+
+# Check whether --with-builddeps-server was given.
+if test "${with_builddeps_server+set}" = set; then :
+ withval=$with_builddeps_server;
+fi
+
+
+
+# Check whether --with-builddeps-dir was given.
+if test "${with_builddeps_dir+set}" = set; then :
+ withval=$with_builddeps_dir;
+else
+ with_builddeps_dir=/localhome/builddeps
+fi
+
+
+
+# Check whether --with-builddeps-group was given.
+if test "${with_builddeps_group+set}" = set; then :
+ withval=$with_builddeps_group;
+fi
+
+
+
+
+ if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+ if test "x$with_builddeps_conf" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
+$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
+ builddepsfile=$with_builddeps_conf
+ if test -s $builddepsfile; then
+ . $builddepsfile
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
+$as_echo "loaded!" >&6; }
+ else
+ as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
+$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
+ builddepsfile=`mktemp`
+ touch $builddepsfile
+ # Put all found confs into a single file.
+ find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
+ # Source the file to acquire the variables
+ if test -s $builddepsfile; then
+ . $builddepsfile
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
+$as_echo "found at least one!" >&6; }
+ else
+ as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
+ fi
+ fi
+ # Create build and target names that use _ instead of "-" and ".".
+ # This is necessary to use them in variable names.
+ build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
+ target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
+ # Extract rewrite information for build and target
+ eval rewritten_build=\${REWRITE_${build_var}}
+ if test "x$rewritten_build" = x; then
+ rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
+ echo Build stays the same $rewritten_build
+ else
+ echo Rewriting build for builddeps into $rewritten_build
+ fi
+ eval rewritten_target=\${REWRITE_${target_var}}
+ if test "x$rewritten_target" = x; then
+ rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
+ echo Target stays the same $rewritten_target
+ else
+ echo Rewriting target for builddeps into $rewritten_target
+ fi
+ rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
+ rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
+ fi
+ for ac_prog in 7z unzip
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$BDEPS_UNZIP"; then
+ ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_BDEPS_UNZIP="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
+if test -n "$BDEPS_UNZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
+$as_echo "$BDEPS_UNZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$BDEPS_UNZIP" && break
+done
+
+ if test "x$BDEPS_UNZIP" = x7z; then
+ BDEPS_UNZIP="7z x"
+ fi
+
+ for ac_prog in wget lftp ftp
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$BDEPS_FTP"; then
+ ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_BDEPS_FTP="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
+if test -n "$BDEPS_FTP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
+$as_echo "$BDEPS_FTP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$BDEPS_FTP" && break
+done
+
+
+
+###############################################################################
+#
+# Determine OpenJDK variants, options and version numbers.
+#
+###############################################################################
+
+# We need build & target for this.
+
###############################################################################
#
@@ -8159,42 +10249,45 @@
# Check whether --enable-openjdk-only was given.
if test "${enable_openjdk_only+set}" = set; then :
enableval=$enable_openjdk_only;
-fi
-
-
-if test "x$enable_openjdk_only" = "xyes"; then
+else
+ enable_openjdk_only="no"
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
+$as_echo_n "checking for presence of closed sources... " >&6; }
+if test -d "$SRC_ROOT/jdk/src/closed"; then
+ CLOSED_SOURCE_PRESENT=yes
+else
+ CLOSED_SOURCE_PRESENT=no
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
+$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
+$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
+SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
+$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
+
+if test "x$CLOSED_SOURCE_PRESENT" = xno; then
+ OPENJDK=true
+ if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
+$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
+ fi
+else
+ if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
OPENJDK=true
-elif test "x$enable_openjdk_only" = "xno"; then
+ else
OPENJDK=false
-elif test -d "$SRC_ROOT/jdk/src/closed"; then
- OPENJDK=false
-else
- OPENJDK=true
+ fi
fi
if test "x$OPENJDK" = "xtrue"; then
- SET_OPENJDK=OPENJDK=true
-fi
-
-
-
-###############################################################################
-#
-# JIGSAW or not. The JIGSAW variable is used during the intermediate
-# stage when we are building both the old style JDK and the new style modularized JDK.
-# When the modularized JDK is finalized, this option will go away.
-#
-# Check whether --enable-jigsaw was given.
-if test "${enable_jigsaw+set}" = set; then :
- enableval=$enable_jigsaw;
-fi
-
-
-if test "x$enable_jigsaw" = "xyes"; then
- JIGSAW=true
-else
- JIGSAW=false
-fi
+ SET_OPENJDK="OPENJDK=true"
+fi
+
###############################################################################
@@ -8233,28 +10326,6 @@
-###############################################################################
-#
-# Should we compile nimbus swing L&F? We can probably remove this option
-# since nimbus is officially part of javax now.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build nimbus L&F" >&5
-$as_echo_n "checking whether to build nimbus L&F... " >&6; }
-# Check whether --enable-nimbus was given.
-if test "${enable_nimbus+set}" = set; then :
- enableval=$enable_nimbus; ENABLE_NIMBUS="${enableval}"
-else
- ENABLE_NIMBUS='yes'
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_NIMBUS" >&5
-$as_echo "$ENABLE_NIMBUS" >&6; }
-DISABLE_NIMBUS=
-if test "x$ENABLE_NIMBUS" = xno; then
- DISABLE_NIMBUS=true
-fi
-
-
# Control wether Hotspot runs Queens test after build.
# Check whether --enable-hotspot-test-in-build was given.
if test "${enable_hotspot_test_in_build+set}" = set; then :
@@ -8293,48 +10364,30 @@
###############################################################################
#
+# Enable or disable unlimited crypto
+#
+# Check whether --enable-unlimited-crypto was given.
+if test "${enable_unlimited_crypto+set}" = set; then :
+ enableval=$enable_unlimited_crypto;
+else
+ enable_unlimited_crypto=no
+fi
+
+if test "x$enable_unlimited_crypto" = "xyes"; then
+ UNLIMITED_CRYPTO=true
+else
+ UNLIMITED_CRYPTO=false
+fi
+
+
+###############################################################################
+#
# Compress jars
#
COMPRESS_JARS=false
-###############################################################################
-#
-# Should we compile JFR
-# default no, except for on closed-jdk
-#
-ENABLE_JFR=no
-
-# Is the JFR source present
-
-#
-# For closed default is yes
-#
-if test "x${OPENJDK}" != "xtrue"; then
- ENABLE_JFR=yes
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build jfr" >&5
-$as_echo_n "checking whether to build jfr... " >&6; }
-# Check whether --enable-jfr was given.
-if test "${enable_jfr+set}" = set; then :
- enableval=$enable_jfr;
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ENABLE_JFR}" >&5
-$as_echo "${ENABLE_JFR}" >&6; }
-
-if test "x$ENABLE_JFR" = "xyes"; then
- ENABLE_JFR=true
-elif test "x$ENABLE_JFR" = "xno"; then
- ENABLE_JFR=false
-else
- as_fn_error $? "Invalid argument to --enable-jfr" "$LINENO" 5
-fi
-
-
-
# Source the version numbers
. $AUTOCONF_DIR/version.numbers
@@ -8354,6 +10407,8 @@
+
+
COPYRIGHT_YEAR=`date +'%Y'`
@@ -8381,7 +10436,7 @@
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
# Avoid [:alnum:] since it depends on the locale.
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
- USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
+ USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
fi
@@ -8389,93 +10444,6 @@
-# To properly create a configuration name, we need to have the OpenJDK target
-# and options (variants and debug level) parsed.
-
-
-
-# Check whether --with-conf-name was given.
-if test "${with_conf_name+set}" = set; then :
- withval=$with_conf_name; CONF_NAME=${with_conf_name}
-fi
-
-
-# Test from where we are running configure, in or outside of src root.
-if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
- # We are running configure from the src root.
- # Create a default ./build/target-variant-debuglevel output root.
- if test "x${CONF_NAME}" = x; then
- CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
- fi
- OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
- mkdir -p "$OUTPUT_ROOT"
- if test ! -d "$OUTPUT_ROOT"; then
- as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
- fi
-else
- # We are running configure from outside of the src dir.
- # Then use the current directory as output dir!
- # If configuration is situated in normal build directory, just use the build
- # directory name as configuration name, otherwise use the complete path.
- if test "x${CONF_NAME}" = x; then
- CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
- fi
- OUTPUT_ROOT="$CURDIR"
-fi
-
-
- # Fail with message the path to the output root if var OUTPUT_ROOT contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$OUTPUT_ROOT" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- OUTPUT_ROOT=`$CYGPATH -s -m -a "$OUTPUT_ROOT"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- OUTPUT_ROOT=`$ECHO "$OUTPUT_ROOT" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- OUTPUT_ROOT=`$CYGPATH -u "$OUTPUT_ROOT"`
- else
- as_fn_error $? "You cannot have spaces in the path to the output root! \"$OUTPUT_ROOT\"" "$LINENO" 5
- fi
- fi
-
-
-SPEC=$OUTPUT_ROOT/spec.gmk
-
-CONF_NAME=$CONF_NAME
-
-OUTPUT_ROOT=$OUTPUT_ROOT
-
-
-# Most of the probed defines are put into config.h
-ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
-
-# The spec.gmk file contains all variables for the make system.
-ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
-
-# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
-ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
-
-# The bootcycle-spec.gmk file contains support for boot cycle builds.
-ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
-
-# The compare.sh is used to compare the build output to other builds.
-ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
-
-# Spec.sh is currently used by compare-objects.sh
-ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
-
-# The generated Makefile knows where the spec.gmk is and where the source is.
-# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
-# which will look for generated configurations
-ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
-
-
-# Save the arguments given to us
-echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
-
-
###############################################################################
#
# Setup BootJDK, used to bootstrap the build.
@@ -8546,26 +10514,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -8768,26 +10843,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -8802,12 +10984,126 @@
# Now execute the test
if test "x$JAVA_HOME" != x; then
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, JAVA_HOME is likely in DOS-style
- JAVA_HOME_PROCESSED="`$CYGPATH -u "$JAVA_HOME"`"
- else
- JAVA_HOME_PROCESSED="$JAVA_HOME"
- fi
+ JAVA_HOME_PROCESSED="$JAVA_HOME"
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$JAVA_HOME_PROCESSED"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ JAVA_HOME_PROCESSED="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$JAVA_HOME_PROCESSED"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ JAVA_HOME_PROCESSED="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$JAVA_HOME_PROCESSED"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
if test ! -d "$JAVA_HOME_PROCESSED"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
@@ -8859,26 +11155,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -8937,26 +11340,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -9060,75 +11570,14 @@
# Linux/GNU systems often have links from /usr/bin/java to
# /etc/alternatives/java to the real JDK binary.
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$BINARY"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$BINARY"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- BINARY="$tmp"
-
-
if test "x$OPENJDK_BUILD_OS" != xwindows; then
# Follow a chain of symbolic links. Use readlink
# where it exists, else fall back to horribly
# complicated shell code.
- # Extract the first word of "readlink", so it can be a program name with args.
-set dummy readlink; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_READLINK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $READLINK in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-READLINK=$ac_cv_path_READLINK
-if test -n "$READLINK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
-$as_echo "$READLINK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
- ISGNU=`$READLINK --help 2>&1 | grep GNU`
+ ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
@@ -9142,23 +11591,25 @@
else
STARTDIR=$PWD
COUNTER=0
- DIR=`dirname $BINARY`
- FIL=`basename $BINARY`
+ sym_link_dir=`$DIRNAME $BINARY`
+ sym_link_file=`$BASENAME $BINARY`
while test $COUNTER -lt 20; do
- ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
+ ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# The link might be relative! We have to use cd to travel safely.
- cd $DIR
- cd `dirname $ISLINK`
- DIR=`pwd`
- FIL=`basename $ISLINK`
+ cd $sym_link_dir
+ # ... and we must get the to the absolute path, not one using symbolic links.
+ cd `pwd -P`
+ cd `$DIRNAME $ISLINK`
+ sym_link_dir=`$THEPWDCMD`
+ sym_link_file=`$BASENAME $ISLINK`
let COUNTER=COUNTER+1
done
cd $STARTDIR
- BINARY=$DIR/$FIL
+ BINARY=$sym_link_dir/$sym_link_file
fi
fi
@@ -9210,26 +11661,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -9249,17 +11807,207 @@
# Now execute the test
if test "x$ProgramW6432" != x; then
-
- BOOT_JDK_PREFIX="`$CYGPATH -u "$ProgramW6432"`/Java"
+ VIRTUAL_DIR="$ProgramW6432/Java"
+
+ windows_path="$VIRTUAL_DIR"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ VIRTUAL_DIR="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ VIRTUAL_DIR="$unix_path"
+ fi
+
+
+ BOOT_JDK_PREFIX="$VIRTUAL_DIR"
BOOT_JDK_SUFFIX=""
- BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
- if test "x$BEST_JDK_FOUND" != x; then
- BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
- if test -d "$BOOT_JDK"; then
- BOOT_JDK_FOUND=maybe
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
-$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
- fi
+ ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
+ if test "x$ALL_JDKS_FOUND" != x; then
+ for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
+
+ if test "x$BOOT_JDK_FOUND" = xno; then
+ # Now execute the test
+
+ BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
+ if test -d "$BOOT_JDK"; then
+ BOOT_JDK_FOUND=maybe
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
+$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
+ fi
+
+
+ # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
+ if test "x$BOOT_JDK_FOUND" = xmaybe; then
+ # Do we have a bin/java?
+ if test ! -x "$BOOT_JDK/bin/java"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have a bin/javac?
+ if test ! -x "$BOOT_JDK/bin/javac"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
+$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have an rt.jar? (On MacOSX it is called classes.jar)
+ if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
+
+ # Extra M4 quote needed to protect [] in grep expression.
+ FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
+ if test "x$FOUND_VERSION_78" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # We're done! :-)
+ BOOT_JDK_FOUND=yes
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
+$as_echo_n "checking for Boot JDK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
+ fi # end check jdk version
+ fi # end check rt.jar
+ fi # end check javac
+ fi # end check java
+ fi # end check boot jdk found
+ fi
+
+ done
fi
fi
@@ -9302,26 +12050,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -9334,17 +12189,207 @@
# Now execute the test
if test "x$PROGRAMW6432" != x; then
-
- BOOT_JDK_PREFIX="`$CYGPATH -u "$PROGRAMW6432"`/Java"
+ VIRTUAL_DIR="$PROGRAMW6432/Java"
+
+ windows_path="$VIRTUAL_DIR"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ VIRTUAL_DIR="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ VIRTUAL_DIR="$unix_path"
+ fi
+
+
+ BOOT_JDK_PREFIX="$VIRTUAL_DIR"
BOOT_JDK_SUFFIX=""
- BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
- if test "x$BEST_JDK_FOUND" != x; then
- BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
- if test -d "$BOOT_JDK"; then
- BOOT_JDK_FOUND=maybe
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
-$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
- fi
+ ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
+ if test "x$ALL_JDKS_FOUND" != x; then
+ for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
+
+ if test "x$BOOT_JDK_FOUND" = xno; then
+ # Now execute the test
+
+ BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
+ if test -d "$BOOT_JDK"; then
+ BOOT_JDK_FOUND=maybe
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
+$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
+ fi
+
+
+ # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
+ if test "x$BOOT_JDK_FOUND" = xmaybe; then
+ # Do we have a bin/java?
+ if test ! -x "$BOOT_JDK/bin/java"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have a bin/javac?
+ if test ! -x "$BOOT_JDK/bin/javac"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
+$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have an rt.jar? (On MacOSX it is called classes.jar)
+ if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
+
+ # Extra M4 quote needed to protect [] in grep expression.
+ FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
+ if test "x$FOUND_VERSION_78" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # We're done! :-)
+ BOOT_JDK_FOUND=yes
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
+$as_echo_n "checking for Boot JDK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
+ fi # end check jdk version
+ fi # end check rt.jar
+ fi # end check javac
+ fi # end check java
+ fi # end check boot jdk found
+ fi
+
+ done
fi
fi
@@ -9387,26 +12432,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -9419,17 +12571,589 @@
# Now execute the test
if test "x$PROGRAMFILES" != x; then
-
- BOOT_JDK_PREFIX="`$CYGPATH -u "$PROGRAMFILES"`/Java"
+ VIRTUAL_DIR="$PROGRAMFILES/Java"
+
+ windows_path="$VIRTUAL_DIR"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ VIRTUAL_DIR="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ VIRTUAL_DIR="$unix_path"
+ fi
+
+
+ BOOT_JDK_PREFIX="$VIRTUAL_DIR"
BOOT_JDK_SUFFIX=""
- BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
- if test "x$BEST_JDK_FOUND" != x; then
- BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
- if test -d "$BOOT_JDK"; then
- BOOT_JDK_FOUND=maybe
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
-$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
- fi
+ ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
+ if test "x$ALL_JDKS_FOUND" != x; then
+ for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
+
+ if test "x$BOOT_JDK_FOUND" = xno; then
+ # Now execute the test
+
+ BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
+ if test -d "$BOOT_JDK"; then
+ BOOT_JDK_FOUND=maybe
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
+$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
+ fi
+
+
+ # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
+ if test "x$BOOT_JDK_FOUND" = xmaybe; then
+ # Do we have a bin/java?
+ if test ! -x "$BOOT_JDK/bin/java"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have a bin/javac?
+ if test ! -x "$BOOT_JDK/bin/javac"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
+$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have an rt.jar? (On MacOSX it is called classes.jar)
+ if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
+
+ # Extra M4 quote needed to protect [] in grep expression.
+ FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
+ if test "x$FOUND_VERSION_78" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # We're done! :-)
+ BOOT_JDK_FOUND=yes
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
+$as_echo_n "checking for Boot JDK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
+ fi # end check jdk version
+ fi # end check rt.jar
+ fi # end check javac
+ fi # end check java
+ fi # end check boot jdk found
+ fi
+
+ done
+ fi
+
+ fi
+
+
+ # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
+ if test "x$BOOT_JDK_FOUND" = xmaybe; then
+ # Do we have a bin/java?
+ if test ! -x "$BOOT_JDK/bin/java"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have a bin/javac?
+ if test ! -x "$BOOT_JDK/bin/javac"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
+$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have an rt.jar? (On MacOSX it is called classes.jar)
+ if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
+
+ # Extra M4 quote needed to protect [] in grep expression.
+ FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
+ if test "x$FOUND_VERSION_78" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # We're done! :-)
+ BOOT_JDK_FOUND=yes
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
+$as_echo_n "checking for Boot JDK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
+ fi # end check jdk version
+ fi # end check rt.jar
+ fi # end check javac
+ fi # end check java
+ fi # end check boot jdk found
+ fi
+
+
+ if test "x$BOOT_JDK_FOUND" = xno; then
+ # Now execute the test
+
+ if test "x$ProgramFiles" != x; then
+ VIRTUAL_DIR="$ProgramFiles/Java"
+
+ windows_path="$VIRTUAL_DIR"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ VIRTUAL_DIR="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ VIRTUAL_DIR="$unix_path"
+ fi
+
+
+ BOOT_JDK_PREFIX="$VIRTUAL_DIR"
+ BOOT_JDK_SUFFIX=""
+ ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
+ if test "x$ALL_JDKS_FOUND" != x; then
+ for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
+
+ if test "x$BOOT_JDK_FOUND" = xno; then
+ # Now execute the test
+
+ BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
+ if test -d "$BOOT_JDK"; then
+ BOOT_JDK_FOUND=maybe
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
+$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
+ fi
+
+
+ # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
+ if test "x$BOOT_JDK_FOUND" = xmaybe; then
+ # Do we have a bin/java?
+ if test ! -x "$BOOT_JDK/bin/java"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have a bin/javac?
+ if test ! -x "$BOOT_JDK/bin/javac"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
+$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have an rt.jar? (On MacOSX it is called classes.jar)
+ if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
+
+ # Extra M4 quote needed to protect [] in grep expression.
+ FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
+ if test "x$FOUND_VERSION_78" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # We're done! :-)
+ BOOT_JDK_FOUND=yes
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
+$as_echo_n "checking for Boot JDK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
+ fi # end check jdk version
+ fi # end check rt.jar
+ fi # end check javac
+ fi # end check java
+ fi # end check boot jdk found
+ fi
+
+ done
fi
fi
@@ -9472,26 +13196,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -9503,20 +13334,195 @@
if test "x$BOOT_JDK_FOUND" = xno; then
# Now execute the test
- if test "x$ProgramFiles" != x; then
-
- BOOT_JDK_PREFIX="`$CYGPATH -u "$ProgramFiles"`/Java"
+ BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
BOOT_JDK_SUFFIX=""
- BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
- if test "x$BEST_JDK_FOUND" != x; then
- BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
- if test -d "$BOOT_JDK"; then
- BOOT_JDK_FOUND=maybe
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
-$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
- fi
- fi
-
+ ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
+ if test "x$ALL_JDKS_FOUND" != x; then
+ for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
+
+ if test "x$BOOT_JDK_FOUND" = xno; then
+ # Now execute the test
+
+ BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
+ if test -d "$BOOT_JDK"; then
+ BOOT_JDK_FOUND=maybe
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
+$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
+ fi
+
+
+ # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
+ if test "x$BOOT_JDK_FOUND" = xmaybe; then
+ # Do we have a bin/java?
+ if test ! -x "$BOOT_JDK/bin/java"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have a bin/javac?
+ if test ! -x "$BOOT_JDK/bin/javac"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
+$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have an rt.jar? (On MacOSX it is called classes.jar)
+ if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
+
+ # Extra M4 quote needed to protect [] in grep expression.
+ FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
+ if test "x$FOUND_VERSION_78" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # We're done! :-)
+ BOOT_JDK_FOUND=yes
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
+$as_echo_n "checking for Boot JDK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
+ fi # end check jdk version
+ fi # end check rt.jar
+ fi # end check javac
+ fi # end check java
+ fi # end check boot jdk found
+ fi
+
+ done
fi
@@ -9557,26 +13563,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -9584,20 +13697,200 @@
fi # end check boot jdk found
fi
+ elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
+
+ if test "x$BOOT_JDK_FOUND" = xno; then
+ # Now execute the test
+
+ BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
+ BOOT_JDK_SUFFIX="/Contents/Home"
+ ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
+ if test "x$ALL_JDKS_FOUND" != x; then
+ for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
if test "x$BOOT_JDK_FOUND" = xno; then
# Now execute the test
- BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
- BOOT_JDK_SUFFIX=""
- BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
- if test "x$BEST_JDK_FOUND" != x; then
- BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
- if test -d "$BOOT_JDK"; then
- BOOT_JDK_FOUND=maybe
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
-$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
- fi
+ BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
+ if test -d "$BOOT_JDK"; then
+ BOOT_JDK_FOUND=maybe
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
+$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
+ fi
+
+
+ # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
+ if test "x$BOOT_JDK_FOUND" = xmaybe; then
+ # Do we have a bin/java?
+ if test ! -x "$BOOT_JDK/bin/java"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have a bin/javac?
+ if test ! -x "$BOOT_JDK/bin/javac"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
+$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have an rt.jar? (On MacOSX it is called classes.jar)
+ if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
+
+ # Extra M4 quote needed to protect [] in grep expression.
+ FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
+ if test "x$FOUND_VERSION_78" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # We're done! :-)
+ BOOT_JDK_FOUND=yes
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
+$as_echo_n "checking for Boot JDK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
+ fi # end check jdk version
+ fi # end check rt.jar
+ fi # end check javac
+ fi # end check java
+ fi # end check boot jdk found
+ fi
+
+ done
fi
@@ -9638,26 +13931,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -9665,21 +14065,199 @@
fi # end check boot jdk found
fi
- elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
+
+ if test "x$BOOT_JDK_FOUND" = xno; then
+ # Now execute the test
+
+ BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
+ BOOT_JDK_SUFFIX="/Contents/Home"
+ ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
+ if test "x$ALL_JDKS_FOUND" != x; then
+ for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
if test "x$BOOT_JDK_FOUND" = xno; then
# Now execute the test
- BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
- BOOT_JDK_SUFFIX="/Contents/Home"
- BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
- if test "x$BEST_JDK_FOUND" != x; then
- BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
- if test -d "$BOOT_JDK"; then
- BOOT_JDK_FOUND=maybe
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
-$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
- fi
+ BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
+ if test -d "$BOOT_JDK"; then
+ BOOT_JDK_FOUND=maybe
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
+$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
+ fi
+
+
+ # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
+ if test "x$BOOT_JDK_FOUND" = xmaybe; then
+ # Do we have a bin/java?
+ if test ! -x "$BOOT_JDK/bin/java"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have a bin/javac?
+ if test ! -x "$BOOT_JDK/bin/javac"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
+$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have an rt.jar? (On MacOSX it is called classes.jar)
+ if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
+
+ # Extra M4 quote needed to protect [] in grep expression.
+ FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
+ if test "x$FOUND_VERSION_78" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # We're done! :-)
+ BOOT_JDK_FOUND=yes
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
+$as_echo_n "checking for Boot JDK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
+ fi # end check jdk version
+ fi # end check rt.jar
+ fi # end check javac
+ fi # end check java
+ fi # end check boot jdk found
+ fi
+
+ done
fi
@@ -9720,26 +14298,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -9747,20 +14432,200 @@
fi # end check boot jdk found
fi
+ elif test "x$OPENJDK_TARGET_OS" = xlinux; then
+
+ if test "x$BOOT_JDK_FOUND" = xno; then
+ # Now execute the test
+
+ BOOT_JDK_PREFIX="/usr/lib/jvm"
+ BOOT_JDK_SUFFIX=""
+ ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
+ if test "x$ALL_JDKS_FOUND" != x; then
+ for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
if test "x$BOOT_JDK_FOUND" = xno; then
# Now execute the test
- BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
- BOOT_JDK_SUFFIX="/Contents/Home"
- BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
- if test "x$BEST_JDK_FOUND" != x; then
- BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
- if test -d "$BOOT_JDK"; then
- BOOT_JDK_FOUND=maybe
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
-$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
- fi
+ BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
+ if test -d "$BOOT_JDK"; then
+ BOOT_JDK_FOUND=maybe
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
+$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
+ fi
+
+
+ # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
+ if test "x$BOOT_JDK_FOUND" = xmaybe; then
+ # Do we have a bin/java?
+ if test ! -x "$BOOT_JDK/bin/java"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have a bin/javac?
+ if test ! -x "$BOOT_JDK/bin/javac"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
+$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Do we have an rt.jar? (On MacOSX it is called classes.jar)
+ if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
+
+ # Extra M4 quote needed to protect [] in grep expression.
+ FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
+ if test "x$FOUND_VERSION_78" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
+$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
+ BOOT_JDK_FOUND=no
+ else
+ # We're done! :-)
+ BOOT_JDK_FOUND=yes
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
+$as_echo_n "checking for Boot JDK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
+ fi # end check jdk version
+ fi # end check rt.jar
+ fi # end check javac
+ fi # end check java
+ fi # end check boot jdk found
+ fi
+
+ done
fi
@@ -9801,26 +14666,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -9868,26 +14840,133 @@
# We're done! :-)
BOOT_JDK_FOUND=yes
- # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$BOOT_JDK"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$BOOT_JDK"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ BOOT_JDK="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$BOOT_JDK"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
$as_echo_n "checking for Boot JDK... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
-$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
+$as_echo_n "checking Boot JDK version... " >&6; }
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
+$as_echo "$BOOT_JDK_VERSION" >&6; }
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
@@ -10465,16 +15544,13 @@
-
-
-# Check if the VS env variables were setup prior to running configure.
-# If not, then find vcvarsall.bat and run it automatically, and integrate
-# the set env variables into the spec file.
-SETUPDEVENV="# No special vars"
-if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # Store path to cygwin link.exe to help excluding it when searching for
- # VS linker.
- # Extract the first word of "link", so it can be a program name with args.
+# Locate the actual tools
+
+if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+
+ # Store path to cygwin link.exe to help excluding it when searching for
+ # VS linker. This must be done before changing the PATH when looking for VS.
+ # Extract the first word of "link", so it can be a program name with args.
set dummy link; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -10514,6 +15590,7 @@
fi
+ if test "x$CYGWIN_LINK" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
"$CYGWIN_LINK" --version > /dev/null
@@ -10526,123 +15603,861 @@
# This might be the VS linker. Don't exclude it later on.
CYGWIN_LINK=""
fi
-
- # If vcvarsall.bat has been run, then VCINSTALLDIR is set.
+ fi
+
+ # First-hand choice is to locate and run the vsvars bat file.
+
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ VCVARSFILE="vc/bin/vcvars32.bat"
+ else
+ VCVARSFILE="vc/bin/amd64/vcvars64.bat"
+ fi
+
+ VS_ENV_CMD=""
+ VS_ENV_ARGS=""
+ if test "x$with_toolsdir" != x; then
+
+ if test "x$VS_ENV_CMD" = x; then
+ VS100BASE="$with_toolsdir/../.."
+ METHOD="--with-tools-dir"
+
+ windows_path="$VS100BASE"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ VS100BASE="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ VS100BASE="$unix_path"
+ fi
+
+ if test -d "$VS100BASE"; then
+ if test -f "$VS100BASE/$VCVARSFILE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
+$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
+ VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
+$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
+$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
+ fi
+ fi
+ fi
+
+ fi
+
+ if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
+ # Having specified an argument which is incorrect will produce an instant failure;
+ # we should not go on looking
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
+$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
+$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
+ as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
+ fi
+
+ if test "x$ProgramW6432" != x; then
+
+ if test "x$VS_ENV_CMD" = x; then
+ WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
+ METHOD="well-known name"
+
+ windows_path="$WIN_SDK_BASE"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ WIN_SDK_BASE="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ WIN_SDK_BASE="$unix_path"
+ fi
+
+ if test -d "$WIN_SDK_BASE"; then
+ if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
+$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
+ VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ VS_ENV_ARGS="/x86"
+ else
+ VS_ENV_ARGS="/x64"
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
+$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
+$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
+ fi
+ fi
+ fi
+
+ fi
+ if test "x$PROGRAMW6432" != x; then
+
+ if test "x$VS_ENV_CMD" = x; then
+ WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
+ METHOD="well-known name"
+
+ windows_path="$WIN_SDK_BASE"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ WIN_SDK_BASE="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ WIN_SDK_BASE="$unix_path"
+ fi
+
+ if test -d "$WIN_SDK_BASE"; then
+ if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
+$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
+ VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ VS_ENV_ARGS="/x86"
+ else
+ VS_ENV_ARGS="/x64"
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
+$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
+$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
+ fi
+ fi
+ fi
+
+ fi
+ if test "x$PROGRAMFILES" != x; then
+
+ if test "x$VS_ENV_CMD" = x; then
+ WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
+ METHOD="well-known name"
+
+ windows_path="$WIN_SDK_BASE"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ WIN_SDK_BASE="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ WIN_SDK_BASE="$unix_path"
+ fi
+
+ if test -d "$WIN_SDK_BASE"; then
+ if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
+$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
+ VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ VS_ENV_ARGS="/x86"
+ else
+ VS_ENV_ARGS="/x64"
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
+$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
+$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
+ fi
+ fi
+ fi
+
+ fi
+
+ if test "x$VS_ENV_CMD" = x; then
+ WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
+ METHOD="well-known name"
+
+ windows_path="$WIN_SDK_BASE"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ WIN_SDK_BASE="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ WIN_SDK_BASE="$unix_path"
+ fi
+
+ if test -d "$WIN_SDK_BASE"; then
+ if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
+$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
+ VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ VS_ENV_ARGS="/x86"
+ else
+ VS_ENV_ARGS="/x64"
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
+$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
+$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
+ fi
+ fi
+ fi
+
+
+ if test "x$VS_ENV_CMD" = x; then
+ WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
+ METHOD="well-known name"
+
+ windows_path="$WIN_SDK_BASE"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ WIN_SDK_BASE="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ WIN_SDK_BASE="$unix_path"
+ fi
+
+ if test -d "$WIN_SDK_BASE"; then
+ if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
+$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
+ VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ VS_ENV_ARGS="/x86"
+ else
+ VS_ENV_ARGS="/x64"
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
+$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
+$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
+ fi
+ fi
+ fi
+
+
+ if test "x$VS100COMNTOOLS" != x; then
+
+ if test "x$VS_ENV_CMD" = x; then
+ VS100BASE="$VS100COMNTOOLS/../.."
+ METHOD="VS100COMNTOOLS variable"
+
+ windows_path="$VS100BASE"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ VS100BASE="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ VS100BASE="$unix_path"
+ fi
+
+ if test -d "$VS100BASE"; then
+ if test -f "$VS100BASE/$VCVARSFILE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
+$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
+ VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
+$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
+$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
+ fi
+ fi
+ fi
+
+ fi
+ if test "x$PROGRAMFILES" != x; then
+
+ if test "x$VS_ENV_CMD" = x; then
+ VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
+ METHOD="well-known name"
+
+ windows_path="$VS100BASE"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ VS100BASE="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ VS100BASE="$unix_path"
+ fi
+
+ if test -d "$VS100BASE"; then
+ if test -f "$VS100BASE/$VCVARSFILE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
+$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
+ VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
+$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
+$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
+ fi
+ fi
+ fi
+
+ fi
+
+ if test "x$VS_ENV_CMD" = x; then
+ VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
+ METHOD="well-known name"
+
+ windows_path="$VS100BASE"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ VS100BASE="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ VS100BASE="$unix_path"
+ fi
+
+ if test -d "$VS100BASE"; then
+ if test -f "$VS100BASE/$VCVARSFILE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
+$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
+ VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
+$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
+$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
+ fi
+ fi
+ fi
+
+
+ if test "x$VS_ENV_CMD" = x; then
+ VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
+ METHOD="well-known name"
+
+ windows_path="$VS100BASE"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ VS100BASE="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ VS100BASE="$unix_path"
+ fi
+
+ if test -d "$VS100BASE"; then
+ if test -f "$VS100BASE/$VCVARSFILE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
+$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
+ VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
+$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
+$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
+ fi
+ fi
+ fi
+
+
+ if test "x$VS_ENV_CMD" != x; then
+ # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$VS_ENV_CMD"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$VS_ENV_CMD"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$VS_ENV_CMD"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ VS_ENV_CMD="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
+ fi
+
+
+ # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
+$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
+ cd $OUTPUT_ROOT
+ # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
+ # to autoconf standards.
+
+ #----
+
+ # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
+ # but calculate the difference in Cygwin environment before/after running it and then
+ # apply the diff.
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
+ _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
+ _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
+ _dosbash=`cygpath -a -w -s \`which bash\`.*`
+ else
+ _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
+ _dosbash=`cmd //c echo \`which bash\``
+ fi
+
+ # generate the set of exported vars before/after the vs10 setup
+ $ECHO "@echo off" > localdevenvtmp.bat
+ $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
+ $ECHO "call $_dosvs10varsall $VS_ENV_ARGS" >> localdevenvtmp.bat
+ $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
+
+ # Now execute the newly created bat file.
+ # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
+ cmd /c localdevenvtmp.bat | cat
+
+ # apply the diff (less some non-vs10 vars named by "!")
+ $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
+ $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
+ $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
+
+ # cleanup
+ $RM localdevenvtmp*
+ #----
+ cd $CURDIR
+ if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
+$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
+$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
+$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+ # Now set all paths and other env variables. This will allow the rest of
+ # the configure script to find and run the compiler in the proper way.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
+$as_echo "$as_me: Setting extracted environment variables" >&6;}
+ . $OUTPUT_ROOT/localdevenv.sh
+ else
+ # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
+$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
+ fi
+
+ # At this point, we should have corrent variables in the environment, or we can't continue.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
+$as_echo_n "checking for Visual Studio variables... " >&6; }
+
+ if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
+ if test "x$INCLUDE" = x || test "x$LIB" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
+$as_echo "present but broken" >&6; }
+ as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ VS_INCLUDE="$INCLUDE"
+ VS_LIB="$LIB"
+ VS_PATH="$PATH"
+
+
+
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+
+ if test "x$VS_ENV_CMD" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
+$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
+$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
+$as_echo "$as_me: Running the extraction script failed." >&6;}
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
+$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
+$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
+$as_echo_n "checking for msvcr100.dll... " >&6; }
+
+# Check whether --with-msvcr-dll was given.
+if test "${with_msvcr_dll+set}" = set; then :
+ withval=$with_msvcr_dll;
+fi
+
+ if test "x$with_msvcr_dll" != x; then
+ MSVCR_DLL="$with_msvcr_dll"
+ else
if test "x$VCINSTALLDIR" != x; then
- # No further setup is needed. The build will happen from this kind
- # of shell.
- SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
- # Make sure to remind you, if you forget to run make from a cygwin bash shell
- # that is spawned "bash -l" from a VS command prompt.
- CHECK_FOR_VCINSTALLDIR=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you are running from within a VS command prompt" >&5
-$as_echo_n "checking if you are running from within a VS command prompt... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
- if test "x$VS100COMNTOOLS" != x; then
- VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
- SEARCH_ROOT="$VS100COMNTOOLS"
- else
- VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
- SEARCH_ROOT="$PROGRAMFILES"
- fi
- VCPATH=`dirname "$VARSBAT"`
- VCPATH=`cygpath -w "$VCPATH"`
- if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
-$as_echo_n "checking if we can find the VS installation... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
- fi
- case "$OPENJDK_TARGET_CPU" in
- x86)
- VARSBAT_ARCH=x86
- ;;
- x86_64)
- VARSBAT_ARCH=amd64
- ;;
- esac
- # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
- cd $OUTPUT_ROOT
- bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
- cd $CURDIR
- if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can extract the needed env variables" >&5
-$as_echo_n "checking if we can extract the needed env variables... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "Could not succesfully extract the env variables needed for the VS setup. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
- fi
- # Now set all paths and other env variables. This will allow the rest of
- # the configure script to find and run the compiler in the proper way.
- . $OUTPUT_ROOT/localdevenv.sh
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
-$as_echo_n "checking if we can find the VS installation... " >&6; }
- if test "x$VCINSTALLDIR" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VCINSTALLDIR" >&5
-$as_echo "$VCINSTALLDIR" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "Could not find VS installation. Please install. If you are sure you have installed VS, then please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
- fi
- CHECK_FOR_VCINSTALLDIR=no
- SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
-$as_echo_n "checking for msvcr100.dll... " >&6; }
-
-# Check whether --with-msvcr100dll was given.
-if test "${with_msvcr100dll+set}" = set; then :
- withval=$with_msvcr100dll;
-fi
-
- if test "x$with_msvcr100dll" != x; then
- MSVCR100DLL="$with_msvcr100dll"
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
- else
- MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
- if test "x$MSVCR100DLL" = x; then
- MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
- fi
- fi
- fi
- if test "x$MSVCR100DLL" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR100DLL" >&5
-$as_echo "$MSVCR100DLL" >&6; }
-
- # Fail with message the path to msvcr100.dll if var MSVCR100DLL contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$MSVCR100DLL" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- MSVCR100DLL=`$CYGPATH -s -m -a "$MSVCR100DLL"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- MSVCR100DLL=`$ECHO "$MSVCR100DLL" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- MSVCR100DLL=`$CYGPATH -u "$MSVCR100DLL"`
- else
- as_fn_error $? "You cannot have spaces in the path to msvcr100.dll! \"$MSVCR100DLL\"" "$LINENO" 5
- fi
- fi
-
- fi
-fi
-
-
-
-
-# Locate the actual tools
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
+ else
+ MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
+ if test "x$MSVCR_DLL" = x; then
+ MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
+ fi
+ fi
+ if test "x$MSVCR_DLL" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
+$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
+$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
+ fi
+ fi
+ if test "x$MSVCR_DLL" = x; then
+ if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
+$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
+ MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
+ fi
+ fi
+ fi
+ if test "x$MSVCR_DLL" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
+$as_echo "$MSVCR_DLL" >&6; }
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVCR_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVCR_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVCR_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVCR_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$MSVCR_DLL"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+
+fi
+
+
# If --build AND --host is set, then the configure script will find any
# cross compilation tools in the PATH. Cross compilation tools
@@ -10707,47 +16522,245 @@
done
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$BUILD_CC"
- car="${tmp%% *}"
- tmp="$BUILD_CC EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- BUILD_CC="$car ${cdr% *}"
- else
- BUILD_CC="$car"
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$BUILD_CC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$BUILD_CC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$BUILD_CC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ BUILD_CC="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
+ fi
for ac_prog in cl CC g++
do
@@ -10795,47 +16808,245 @@
done
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$BUILD_CXX"
- car="${tmp%% *}"
- tmp="$BUILD_CXX EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- BUILD_CXX="$car ${cdr% *}"
- else
- BUILD_CXX="$car"
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$BUILD_CXX"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$BUILD_CXX"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$BUILD_CXX"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ BUILD_CXX="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
+ fi
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
@@ -10878,47 +17089,245 @@
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$BUILD_LD"
- car="${tmp%% *}"
- tmp="$BUILD_LD EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- BUILD_LD="$car ${cdr% *}"
- else
- BUILD_LD="$car"
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$BUILD_LD"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$BUILD_LD"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$BUILD_LD"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ BUILD_LD="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
+ fi
fi
@@ -11102,16 +17511,874 @@
PATH=$TOOLS_DIR:$PATH
fi
+
+### Locate C compiler (CC)
+
# gcc is almost always present, but on Windows we
# prefer cl.exe and on Solaris we prefer CC.
# Thus test for them in this order.
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # Do not probe for cc on MacOSX.
+ COMPILER_CHECK_LIST="cl gcc"
+else
+ COMPILER_CHECK_LIST="cl cc gcc"
+fi
+
+
+ COMPILER_NAME=C
+
+ # Do a first initial attempt at searching the list of compiler names.
+ # AC_PATH_PROGS can't be run multiple times with the same variable,
+ # so create a new name for this run.
+ for ac_prog in $COMPILER_CHECK_LIST
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $POTENTIAL_CC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
+if test -n "$POTENTIAL_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
+$as_echo "$POTENTIAL_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$POTENTIAL_CC" && break
+done
+
+ CC=$POTENTIAL_CC
+
+ if test "x$$CC" = x; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # devkit is the help tag: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=devkit
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
+ fi
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ CC="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
+$as_echo_n "checking resolved symbolic links for CC... " >&6; }
+ TEST_COMPILER="$CC"
+
+ if test "x$OPENJDK_BUILD_OS" != xwindows; then
+ # Follow a chain of symbolic links. Use readlink
+ # where it exists, else fall back to horribly
+ # complicated shell code.
+ if test "x$READLINK_TESTED" != yes; then
+ # On MacOSX there is a readlink tool with a different
+ # purpose than the GNU readlink tool. Check the found readlink.
+ ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
+ if test "x$ISGNU" = x; then
+ # A readlink that we do not know how to use.
+ # Are there other non-GNU readlinks out there?
+ READLINK_TESTED=yes
+ READLINK=
+ fi
+ fi
+
+ if test "x$READLINK" != x; then
+ TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
+ else
+ STARTDIR=$PWD
+ COUNTER=0
+ sym_link_dir=`$DIRNAME $TEST_COMPILER`
+ sym_link_file=`$BASENAME $TEST_COMPILER`
+ while test $COUNTER -lt 20; do
+ ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+ if test "x$ISLINK" == x; then
+ # This is not a symbolic link! We are done!
+ break
+ fi
+ # The link might be relative! We have to use cd to travel safely.
+ cd $sym_link_dir
+ # ... and we must get the to the absolute path, not one using symbolic links.
+ cd `pwd -P`
+ cd `$DIRNAME $ISLINK`
+ sym_link_dir=`$THEPWDCMD`
+ sym_link_file=`$BASENAME $ISLINK`
+ let COUNTER=COUNTER+1
+ done
+ cd $STARTDIR
+ TEST_COMPILER=$sym_link_dir/$sym_link_file
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
+$as_echo "$TEST_COMPILER" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
+$as_echo_n "checking if CC is disguised ccache... " >&6; }
+
+ COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
+ if test "x$COMPILER_BASENAME" = "xccache"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
+$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
+ # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
+ # We want to control ccache invocation ourselves, so ignore this cc and try
+ # searching again.
+
+ # Remove the path to the fake ccache cc from the PATH
+ RETRY_COMPILER_SAVED_PATH="$PATH"
+ COMPILER_DIRNAME=`$DIRNAME $CC`
+ PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
+
+ # Try again looking for our compiler
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in $COMPILER_CHECK_LIST
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PROPER_COMPILER_CC"; then
+ ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
+if test -n "$PROPER_COMPILER_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
+$as_echo "$PROPER_COMPILER_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$PROPER_COMPILER_CC" && break
+ done
+fi
+if test -z "$PROPER_COMPILER_CC"; then
+ ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
+ for ac_prog in $COMPILER_CHECK_LIST
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PROPER_COMPILER_CC"; then
+ ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
+if test -n "$ac_ct_PROPER_COMPILER_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
+$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_PROPER_COMPILER_CC" && break
+done
+
+ if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
+ PROPER_COMPILER_CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
+ fi
+fi
+
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$PROPER_COMPILER_CC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$PROPER_COMPILER_CC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$PROPER_COMPILER_CC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ PROPER_COMPILER_CC="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
+ fi
+
+ PATH="$RETRY_COMPILER_SAVED_PATH"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
+$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
+
+ if test "x$OPENJDK_BUILD_OS" != xwindows; then
+ # Follow a chain of symbolic links. Use readlink
+ # where it exists, else fall back to horribly
+ # complicated shell code.
+ if test "x$READLINK_TESTED" != yes; then
+ # On MacOSX there is a readlink tool with a different
+ # purpose than the GNU readlink tool. Check the found readlink.
+ ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
+ if test "x$ISGNU" = x; then
+ # A readlink that we do not know how to use.
+ # Are there other non-GNU readlinks out there?
+ READLINK_TESTED=yes
+ READLINK=
+ fi
+ fi
+
+ if test "x$READLINK" != x; then
+ PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
+ else
+ STARTDIR=$PWD
+ COUNTER=0
+ sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
+ sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
+ while test $COUNTER -lt 20; do
+ ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+ if test "x$ISLINK" == x; then
+ # This is not a symbolic link! We are done!
+ break
+ fi
+ # The link might be relative! We have to use cd to travel safely.
+ cd $sym_link_dir
+ # ... and we must get the to the absolute path, not one using symbolic links.
+ cd `pwd -P`
+ cd `$DIRNAME $ISLINK`
+ sym_link_dir=`$THEPWDCMD`
+ sym_link_file=`$BASENAME $ISLINK`
+ let COUNTER=COUNTER+1
+ done
+ cd $STARTDIR
+ PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
+$as_echo "$PROPER_COMPILER_CC" >&6; }
+ CC="$PROPER_COMPILER_CC"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
+$as_echo "no, keeping CC" >&6; }
+ CC="$TEST_COMPILER"
+ fi
+
+ COMPILER=$CC
+ COMPILER_NAME=$COMPILER_NAME
+
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
+ COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
+ $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
+ if test $? -ne 0; then
+ GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
+$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
+$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
+ as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
+ else
+ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
+ COMPILER_VENDOR="Sun Studio"
+ fi
+ elif test "x$OPENJDK_TARGET_OS" = xwindows; then
+ # First line typically looks something like:
+ # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
+ COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
+ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
+ COMPILER_VENDOR="Microsoft CL.EXE"
+ COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
+ if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
+ if test "x$COMPILER_CPU_TEST" != "x80x86"; then
+ as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
+ fi
+ elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
+ if test "x$COMPILER_CPU_TEST" != "xx64"; then
+ as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
+ fi
+ fi
+ else
+ COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
+ # Check that this is likely to be GCC.
+ $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
+ if test $? -ne 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
+$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
+$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
+ as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
+ fi
+
+ # First line typically looks something like:
+ # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
+ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
+ COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
+ fi
+ # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
+ CC_VERSION="$COMPILER_VERSION"
+ # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
+ CC_VENDOR="$COMPILER_VENDOR"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
+$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
+
+
+# Now that we have resolved CC ourself, let autoconf have it's go at it
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
- for ac_prog in cl cc gcc
+ for ac_prog in $CC
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -11155,7 +18422,7 @@
fi
if test -z "$CC"; then
ac_ct_CC=$CC
- for ac_prog in cl cc gcc
+ for ac_prog in $CC
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -11703,7 +18970,69 @@
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test "x$CC" = x; then
+
+### Locate C++ compiler (CXX)
+
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # Do not probe for CC on MacOSX.
+ COMPILER_CHECK_LIST="cl g++"
+else
+ COMPILER_CHECK_LIST="cl CC g++"
+fi
+
+ COMPILER_NAME=C++
+
+ # Do a first initial attempt at searching the list of compiler names.
+ # AC_PATH_PROGS can't be run multiple times with the same variable,
+ # so create a new name for this run.
+ for ac_prog in $COMPILER_CHECK_LIST
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $POTENTIAL_CXX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
+if test -n "$POTENTIAL_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
+$as_echo "$POTENTIAL_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$POTENTIAL_CXX" && break
+done
+
+ CXX=$POTENTIAL_CXX
+
+ if test "x$$CXX" = x; then
# Print a helpful message on how to acquire the necessary build dependency.
# devkit is the help tag: freetyp2, cups, pulse, alsa etc
@@ -11729,56 +19058,775 @@
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
fi
- as_fn_error $? "Could not find a compiler. $HELP_MSG" "$LINENO" 5
-fi
-if test "x$CC" = xcc && test "x$OPENJDK_BUILD_OS" = xmacosx; then
- # Do not use cc on MacOSX use gcc instead.
- CC="gcc"
-fi
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$CC"
- car="${tmp%% *}"
- tmp="$CC EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- CC="$car ${cdr% *}"
- else
- CC="$car"
- fi
-
-
+ as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
+ fi
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CXX"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CXX"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CXX"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ CXX="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
+$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
+ TEST_COMPILER="$CXX"
+
+ if test "x$OPENJDK_BUILD_OS" != xwindows; then
+ # Follow a chain of symbolic links. Use readlink
+ # where it exists, else fall back to horribly
+ # complicated shell code.
+ if test "x$READLINK_TESTED" != yes; then
+ # On MacOSX there is a readlink tool with a different
+ # purpose than the GNU readlink tool. Check the found readlink.
+ ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
+ if test "x$ISGNU" = x; then
+ # A readlink that we do not know how to use.
+ # Are there other non-GNU readlinks out there?
+ READLINK_TESTED=yes
+ READLINK=
+ fi
+ fi
+
+ if test "x$READLINK" != x; then
+ TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
+ else
+ STARTDIR=$PWD
+ COUNTER=0
+ sym_link_dir=`$DIRNAME $TEST_COMPILER`
+ sym_link_file=`$BASENAME $TEST_COMPILER`
+ while test $COUNTER -lt 20; do
+ ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+ if test "x$ISLINK" == x; then
+ # This is not a symbolic link! We are done!
+ break
+ fi
+ # The link might be relative! We have to use cd to travel safely.
+ cd $sym_link_dir
+ # ... and we must get the to the absolute path, not one using symbolic links.
+ cd `pwd -P`
+ cd `$DIRNAME $ISLINK`
+ sym_link_dir=`$THEPWDCMD`
+ sym_link_file=`$BASENAME $ISLINK`
+ let COUNTER=COUNTER+1
+ done
+ cd $STARTDIR
+ TEST_COMPILER=$sym_link_dir/$sym_link_file
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
+$as_echo "$TEST_COMPILER" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
+$as_echo_n "checking if CXX is disguised ccache... " >&6; }
+
+ COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
+ if test "x$COMPILER_BASENAME" = "xccache"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
+$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
+ # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
+ # We want to control ccache invocation ourselves, so ignore this cc and try
+ # searching again.
+
+ # Remove the path to the fake ccache cc from the PATH
+ RETRY_COMPILER_SAVED_PATH="$PATH"
+ COMPILER_DIRNAME=`$DIRNAME $CXX`
+ PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
+
+ # Try again looking for our compiler
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in $COMPILER_CHECK_LIST
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PROPER_COMPILER_CXX"; then
+ ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
+if test -n "$PROPER_COMPILER_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
+$as_echo "$PROPER_COMPILER_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$PROPER_COMPILER_CXX" && break
+ done
+fi
+if test -z "$PROPER_COMPILER_CXX"; then
+ ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
+ for ac_prog in $COMPILER_CHECK_LIST
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
+ ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
+if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
+$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_PROPER_COMPILER_CXX" && break
+done
+
+ if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
+ PROPER_COMPILER_CXX=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
+ fi
+fi
+
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$PROPER_COMPILER_CXX"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$PROPER_COMPILER_CXX"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$PROPER_COMPILER_CXX"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ PROPER_COMPILER_CXX="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
+ fi
+
+ PATH="$RETRY_COMPILER_SAVED_PATH"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
+$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
+
+ if test "x$OPENJDK_BUILD_OS" != xwindows; then
+ # Follow a chain of symbolic links. Use readlink
+ # where it exists, else fall back to horribly
+ # complicated shell code.
+ if test "x$READLINK_TESTED" != yes; then
+ # On MacOSX there is a readlink tool with a different
+ # purpose than the GNU readlink tool. Check the found readlink.
+ ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
+ if test "x$ISGNU" = x; then
+ # A readlink that we do not know how to use.
+ # Are there other non-GNU readlinks out there?
+ READLINK_TESTED=yes
+ READLINK=
+ fi
+ fi
+
+ if test "x$READLINK" != x; then
+ PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
+ else
+ STARTDIR=$PWD
+ COUNTER=0
+ sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
+ sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
+ while test $COUNTER -lt 20; do
+ ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+ if test "x$ISLINK" == x; then
+ # This is not a symbolic link! We are done!
+ break
+ fi
+ # The link might be relative! We have to use cd to travel safely.
+ cd $sym_link_dir
+ # ... and we must get the to the absolute path, not one using symbolic links.
+ cd `pwd -P`
+ cd `$DIRNAME $ISLINK`
+ sym_link_dir=`$THEPWDCMD`
+ sym_link_file=`$BASENAME $ISLINK`
+ let COUNTER=COUNTER+1
+ done
+ cd $STARTDIR
+ PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
+$as_echo "$PROPER_COMPILER_CXX" >&6; }
+ CXX="$PROPER_COMPILER_CXX"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
+$as_echo "no, keeping CXX" >&6; }
+ CXX="$TEST_COMPILER"
+ fi
+
+ COMPILER=$CXX
+ COMPILER_NAME=$COMPILER_NAME
+
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
+ COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
+ $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
+ if test $? -ne 0; then
+ GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
+$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
+$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
+ as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
+ else
+ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
+ COMPILER_VENDOR="Sun Studio"
+ fi
+ elif test "x$OPENJDK_TARGET_OS" = xwindows; then
+ # First line typically looks something like:
+ # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
+ COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
+ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
+ COMPILER_VENDOR="Microsoft CL.EXE"
+ COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
+ if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
+ if test "x$COMPILER_CPU_TEST" != "x80x86"; then
+ as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
+ fi
+ elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
+ if test "x$COMPILER_CPU_TEST" != "xx64"; then
+ as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
+ fi
+ fi
+ else
+ COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
+ # Check that this is likely to be GCC.
+ $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
+ if test $? -ne 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
+$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
+$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
+ as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
+ fi
+
+ # First line typically looks something like:
+ # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
+ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
+ COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
+ fi
+ # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
+ CXX_VERSION="$COMPILER_VERSION"
+ # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
+ CXX_VENDOR="$COMPILER_VENDOR"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
+$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
+
+
+# Now that we have resolved CXX ourself, let autoconf have it's go at it
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -11789,7 +19837,7 @@
CXX=$CCC
else
if test -n "$ac_tool_prefix"; then
- for ac_prog in cl CC g++
+ for ac_prog in $CXX
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -11833,7 +19881,7 @@
fi
if test -z "$CXX"; then
ac_ct_CXX=$CXX
- for ac_prog in cl CC g++
+ for ac_prog in $CXX
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -12036,85 +20084,10 @@
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test "x$CXX" = xCC && test "x$OPENJDK_BUILD_OS" = xmacosx; then
- # The found CC, even though it seems to be a g++ derivate, cannot compile
- # c++ code. Override.
- CXX="g++"
-fi
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$CXX"
- car="${tmp%% *}"
- tmp="$CXX EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- CXX="$car ${cdr% *}"
- else
- CXX="$car"
- fi
-
-
-if test "x$CXX" = x || test "x$CC" = x; then
-
- # Print a helpful message on how to acquire the necessary build dependency.
- # devkit is the help tag: freetyp2, cups, pulse, alsa etc
- MISSING_DEPENDENCY=devkit
- PKGHANDLER_COMMAND=
-
- case $PKGHANDLER in
- apt-get)
- apt_help $MISSING_DEPENDENCY ;;
- yum)
- yum_help $MISSING_DEPENDENCY ;;
- port)
- port_help $MISSING_DEPENDENCY ;;
- pkgutil)
- pkgutil_help $MISSING_DEPENDENCY ;;
- pkgadd)
- pkgadd_help $MISSING_DEPENDENCY ;;
- * )
- break ;;
- esac
-
- if test "x$PKGHANDLER_COMMAND" != x; then
- HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
- fi
-
- as_fn_error $? "Could not find the needed compilers! $HELP_MSG " "$LINENO" 5
-fi
-
-if test "x$OPENJDK_BUILD_OS" != xwindows; then
+
+### Locate other tools
+
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ac_ext=m
ac_cpp='$OBJCPP $CPPFLAGS'
ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -12367,47 +20340,245 @@
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$OBJC"
- car="${tmp%% *}"
- tmp="$OBJC EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- OBJC="$car ${cdr% *}"
- else
- OBJC="$car"
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$OBJC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$OBJC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$OBJC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ OBJC="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
+ fi
else
OBJC=
@@ -12431,7 +20602,7 @@
# Linking C++ executables.
-if test "x$OPENJDK_BUILD_OS" != xwindows; then
+if test "x$OPENJDK_TARGET_OS" != xwindows; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -12525,59 +20696,263 @@
fi
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$AR"
- car="${tmp%% *}"
- tmp="$AR EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- AR="$car ${cdr% *}"
- else
- AR="$car"
- fi
-
-fi
-if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$AR"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$AR"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$AR"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ AR="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
+ fi
+
+fi
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ARFLAGS="-r"
else
ARFLAGS=""
fi
+# For hotspot, we need these in Windows mixed path; other platforms keep them the same
+HOTSPOT_CXX="$CXX"
+HOTSPOT_LD="$LD"
+
+
+
COMPILER_NAME=gcc
COMPILER_TYPE=CC
-if test "x$OPENJDK_BUILD_OS" = xwindows; then :
+if test "x$OPENJDK_TARGET_OS" = xwindows; then :
# For now, assume that we are always compiling using cl.exe.
CC_OUT_OPTION=-Fo
@@ -12643,25 +21018,245 @@
# Since we must ignore the first found link, WINLD will contain
# the full path to the link.exe program.
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$WINLD"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$WINLD"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- WINLD="$tmp"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$WINLD"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$WINLD"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$WINLD"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ WINLD="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
+ fi
printf "Windows linker was found at $WINLD\n"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
@@ -12735,25 +21330,245 @@
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$MT"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$MT"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- MT="$tmp"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$MT"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$MT"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$MT"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ MT="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
+ fi
# The resource compiler
# Extract the first word of "rc", so it can be a program name with args.
@@ -12811,28 +21626,297 @@
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$RC"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$RC"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- RC="$tmp"
-
-
- RC_FLAGS="-nologo /l 0x409 /r"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$RC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$RC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$RC"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ RC="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
+ fi
+
+
+ # For hotspot, we need these in Windows mixed path,
+ # so rewrite them all. Need added .exe suffix.
+ HOTSPOT_CXX="$CXX.exe"
+ HOTSPOT_LD="$LD.exe"
+ HOTSPOT_MT="$MT.exe"
+ HOTSPOT_RC="$RC.exe"
+
+ unix_path="$HOTSPOT_CXX"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ windows_path=`$CYGPATH -m "$unix_path"`
+ HOTSPOT_CXX="$windows_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ windows_path=`cmd //c echo $unix_path`
+ HOTSPOT_CXX="$windows_path"
+ fi
+
+
+ unix_path="$HOTSPOT_LD"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ windows_path=`$CYGPATH -m "$unix_path"`
+ HOTSPOT_LD="$windows_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ windows_path=`cmd //c echo $unix_path`
+ HOTSPOT_LD="$windows_path"
+ fi
+
+
+ unix_path="$HOTSPOT_MT"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ windows_path=`$CYGPATH -m "$unix_path"`
+ HOTSPOT_MT="$windows_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ windows_path=`cmd //c echo $unix_path`
+ HOTSPOT_MT="$windows_path"
+ fi
+
+
+ unix_path="$HOTSPOT_RC"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ windows_path=`$CYGPATH -m "$unix_path"`
+ HOTSPOT_RC="$windows_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ windows_path=`cmd //c echo $unix_path`
+ HOTSPOT_RC="$windows_path"
+ fi
+
+
+
+
+ RC_FLAGS="-nologo -l 0x409 -r"
if test "x$VARIANT" = xOPT; then :
RC_FLAGS="$RC_FLAGS -d NDEBUG"
@@ -12891,25 +21975,245 @@
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$WINAR"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$WINAR"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- WINAR="$tmp"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$WINAR"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$WINAR"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$WINAR"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ WINAR="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
+ fi
AR="$WINAR"
ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
@@ -12952,25 +22256,245 @@
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$DUMPBIN"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$DUMPBIN"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- DUMPBIN="$tmp"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$DUMPBIN"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$DUMPBIN"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$DUMPBIN"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ DUMPBIN="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
+ fi
COMPILER_TYPE=CL
@@ -13118,47 +22642,245 @@
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$CPP"
- car="${tmp%% *}"
- tmp="$CPP EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- CPP="$car ${cdr% *}"
- else
- CPP="$car"
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CPP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CPP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CPP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ CPP="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
+ fi
ac_ext=cpp
@@ -13295,47 +23017,245 @@
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$CXXCPP"
- car="${tmp%% *}"
- tmp="$CXXCPP EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- CXXCPP="$car ${cdr% *}"
- else
- CXXCPP="$car"
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CXXCPP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CXXCPP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$CXXCPP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ CXXCPP="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
+ fi
if test "x$COMPILE_TYPE" != "xcross"; then
@@ -13359,7 +23279,7 @@
fi
# Find the right assembler.
-if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -13401,54 +23321,252 @@
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$AS"
- car="${tmp%% *}"
- tmp="$AS EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- AS="$car ${cdr% *}"
- else
- AS="$car"
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$AS"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$AS"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$AS"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ AS="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
+ fi
else
AS="$CC -c"
fi
-if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
for ac_prog in gnm nm
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -13495,47 +23613,245 @@
done
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$NM"
- car="${tmp%% *}"
- tmp="$NM EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- NM="$car ${cdr% *}"
- else
- NM="$car"
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$NM"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$NM"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$NM"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ NM="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
+ fi
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
@@ -13578,47 +23894,245 @@
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$STRIP"
- car="${tmp%% *}"
- tmp="$STRIP EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- STRIP="$car ${cdr% *}"
- else
- STRIP="$car"
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$STRIP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$STRIP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$STRIP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ STRIP="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
+ fi
# Extract the first word of "mcs", so it can be a program name with args.
set dummy mcs; ac_word=$2
@@ -13661,49 +24175,247 @@
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$MCS"
- car="${tmp%% *}"
- tmp="$MCS EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- MCS="$car ${cdr% *}"
- else
- MCS="$car"
- fi
-
-elif test "x$OPENJDK_BUILD_OS" != xwindows; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$MCS"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$MCS"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$MCS"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ MCS="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
+ fi
+
+elif test "x$OPENJDK_TARGET_OS" != xwindows; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
set dummy ${ac_tool_prefix}nm; ac_word=$2
@@ -13797,47 +24509,245 @@
fi
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$NM"
- car="${tmp%% *}"
- tmp="$NM EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- NM="$car ${cdr% *}"
- else
- NM="$car"
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$NM"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$NM"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$NM"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ NM="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
+ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
@@ -13932,89 +24842,282 @@
fi
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$STRIP"
- car="${tmp%% *}"
- tmp="$STRIP EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- STRIP="$car ${cdr% *}"
- else
- STRIP="$car"
- fi
-
-fi
-
-###
-#
-# Check for objcopy
-#
-# but search for gobjcopy first...
-# since I on solaris found a broken objcopy...buhh
-#
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gobjcopy", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gobjcopy; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_OBJCOPY+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $OBJCOPY in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-OBJCOPY=$ac_cv_path_OBJCOPY
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$STRIP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$STRIP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$STRIP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ STRIP="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
+ fi
+
+fi
+
+# objcopy is used for moving debug symbols to separate files when
+# full debug symbols are enabled.
+if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in gobjcopy objcopy
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJCOPY"; then
+ ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJCOPY=$ac_cv_prog_OBJCOPY
if test -n "$OBJCOPY"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
$as_echo "$OBJCOPY" >&6; }
@@ -14024,49 +25127,54 @@
fi
-fi
-if test -z "$ac_cv_path_OBJCOPY"; then
- ac_pt_OBJCOPY=$OBJCOPY
- # Extract the first word of "gobjcopy", so it can be a program name with args.
-set dummy gobjcopy; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_OBJCOPY+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $ac_pt_OBJCOPY in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_OBJCOPY="$ac_pt_OBJCOPY" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_ac_pt_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ac_pt_OBJCOPY=$ac_cv_path_ac_pt_OBJCOPY
-if test -n "$ac_pt_OBJCOPY"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OBJCOPY" >&5
-$as_echo "$ac_pt_OBJCOPY" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_pt_OBJCOPY" = x; then
+ test -n "$OBJCOPY" && break
+ done
+fi
+if test -z "$OBJCOPY"; then
+ ac_ct_OBJCOPY=$OBJCOPY
+ for ac_prog in gobjcopy objcopy
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJCOPY"; then
+ ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
+if test -n "$ac_ct_OBJCOPY"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
+$as_echo "$ac_ct_OBJCOPY" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_OBJCOPY" && break
+done
+
+ if test "x$ac_ct_OBJCOPY" = x; then
OBJCOPY=""
else
case $cross_compiling:$ac_tool_warned in
@@ -14075,98 +25183,342 @@
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
- OBJCOPY=$ac_pt_OBJCOPY
- fi
-else
- OBJCOPY="$ac_cv_path_OBJCOPY"
-fi
-
-if test "x$OBJCOPY" = x; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objcopy; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_OBJCOPY+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $OBJCOPY in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-OBJCOPY=$ac_cv_path_OBJCOPY
-if test -n "$OBJCOPY"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
-$as_echo "$OBJCOPY" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_OBJCOPY"; then
- ac_pt_OBJCOPY=$OBJCOPY
- # Extract the first word of "objcopy", so it can be a program name with args.
-set dummy objcopy; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_OBJCOPY+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $ac_pt_OBJCOPY in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_OBJCOPY="$ac_pt_OBJCOPY" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_ac_pt_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ac_pt_OBJCOPY=$ac_cv_path_ac_pt_OBJCOPY
-if test -n "$ac_pt_OBJCOPY"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OBJCOPY" >&5
-$as_echo "$ac_pt_OBJCOPY" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_pt_OBJCOPY" = x; then
- OBJCOPY=""
+ OBJCOPY=$ac_ct_OBJCOPY
+ fi
+fi
+
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$OBJCOPY"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$OBJCOPY"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$OBJCOPY"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ OBJCOPY="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
+ fi
+
+fi
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in gobjdump objdump
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$OBJDUMP" && break
+ done
+fi
+if test -z "$OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ for ac_prog in gobjdump objdump
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_OBJDUMP" && break
+done
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
@@ -14174,11 +25526,252 @@
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
- OBJCOPY=$ac_pt_OBJCOPY
- fi
-else
- OBJCOPY="$ac_cv_path_OBJCOPY"
-fi
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+fi
+
+if test "x$OBJDUMP" != x; then
+ # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$OBJDUMP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$OBJDUMP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$OBJDUMP"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ OBJDUMP="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
+ fi
fi
@@ -14224,47 +25817,245 @@
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$LIPO"
- car="${tmp%% *}"
- tmp="$LIPO EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
-
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- LIPO="$car ${cdr% *}"
- else
- LIPO="$car"
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$LIPO"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path=`$CYGPATH -u "$path"`
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path=`$CYGPATH -u "$path"`
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
+ fi
+ fi
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ # Short path failed, file does not exist as specified.
+ # Try adding .exe or .cmd
+ if test -f "${new_path}.exe"; then
+ input_to_shortpath="${new_path}.exe"
+ elif test -f "${new_path}.cmd"; then
+ input_to_shortpath="${new_path}.cmd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+ as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
+ fi
+ else
+ input_to_shortpath="$new_path"
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+ new_path="$input_to_shortpath"
+
+ input_path="$input_to_shortpath"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$LIPO"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ # Now try to locate executable using which
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # Oops. Which didn't find the executable.
+ # The splitting of arguments from the executable at a space might have been incorrect,
+ # since paths with space are more likely in Windows. Give it another try with the whole
+ # argument.
+ path="$complete"
+ arguments="EOL"
+ new_path="$path"
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+
+ new_path=`$WHICH "$new_path" 2> /dev/null`
+
+ if test "x$new_path" = x; then
+ # It's still not found. Now this is an unrecoverable error.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
+ fi
+ fi
+
+ # Now new_path has a complete unix path to the binary
+ if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+ # Keep paths in /bin as-is, but remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+ # Do not save /bin paths to all_fixpath_prefixes!
+ else
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $new_path`
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+ # Output is in $new_path
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ # remove trailing .exe if any
+ new_path="${new_path/%.exe/}"
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ fi
+
+ else
+ # We're on a posix platform. Hooray! :)
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ complete="$LIPO"
+ path="${complete%% *}"
+ tmp="$complete EOL"
+ arguments="${tmp#* }"
+
+ new_path=`$WHICH $path 2> /dev/null`
+ if test "x$new_path" = x; then
+ is_absolute_path=`$ECHO "$path" | $GREP ^/`
+ if test "x$is_absolute_path" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
+$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
+ new_path="$path"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
+ has_space=`$ECHO "$complete" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+ fi
+ as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
+ fi
+ fi
+ fi
+
+ # Now join together the path and the arguments once again
+ if test "x$arguments" != xEOL; then
+ new_complete="$new_path ${arguments% *}"
+ else
+ new_complete="$new_path"
+ fi
+
+ if test "x$complete" != "x$new_complete"; then
+ LIPO="$new_complete"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
+ fi
fi
@@ -14800,7 +26591,7 @@
POST_STRIP_CMD="$STRIP -g"
# Linking is different on MacOSX
- if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# Might change in the future to clang.
COMPILER_NAME=gcc
SHARED_LIBRARY='lib$1.dylib'
@@ -14814,7 +26605,7 @@
POST_STRIP_CMD="$STRIP -S"
fi
else
- if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
# If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
COMPILER_NAME=ossc
PICFLAG="-KPIC"
@@ -14838,7 +26629,7 @@
POST_STRIP_CMD="$STRIP -x"
POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
fi
- if test "x$OPENJDK_BUILD_OS" = xwindows; then
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
# If it is not gcc, then assume it is the MS Visual Studio compiler
COMPILER_NAME=cl
PICFLAG=""
@@ -14986,6 +26777,11 @@
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
#CC_HIGHEST="$CC_HIGHEST -xlibmopt"
+ if test "x$OPENJDK_TARGET_CPU" = xsparc; then
+ CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
+ CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
+ fi
+
case $OPENJDK_TARGET_CPU_ARCH in
x86)
C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
@@ -15002,8 +26798,6 @@
fi
;;
sparc)
- CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
- CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
@@ -15132,7 +26926,7 @@
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
case $OPENJDK_TARGET_CPU_ARCH in
x86 )
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -Di386"
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
;;
esac
@@ -15232,7 +27026,7 @@
# libraries will link to whatever is in memory. Yuck.
#
# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
-if test "x$COMPILER_TYPE" = xCL; then
+if test "x$COMPILER_NAME" = xcl; then
LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
if test "x$OPENJDK_TARGET_CPU" = xx86; then
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
@@ -15248,19 +27042,23 @@
fi
LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
else
- # If this is a --hash-style=gnu system, use --hash-style=both, why?
- HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
- if test -n "$HAS_GNU_HASH"; then
- # And since we now know that the linker is gnu, then add -z defs, to forbid
- # undefined symbols in object files.
- LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
- if test "x$DEBUG_LEVEL" == "xrelease"; then
- # When building release libraries, tell the linker optimize them.
- # Should this be supplied to the OSS linker as well?
- LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
- fi
- fi
-
+ if test "x$COMPILER_NAME" = xgcc; then
+ # If this is a --hash-style=gnu system, use --hash-style=both, why?
+ HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
+ if test -n "$HAS_GNU_HASH"; then
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ # And since we now know that the linker is gnu, then add -z defs, to forbid
+ # undefined symbols in object files.
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
+ if test "x$DEBUG_LEVEL" = "xrelease"; then
+ # When building release libraries, tell the linker optimize them.
+ # Should this be supplied to the OSS linker as well?
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
+ fi
+ fi
+ fi
LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
@@ -15307,53 +27105,6 @@
-# After we have toolchain, we can compile the uncygdrive helper
-
-# When using cygwin, we need a wrapper binary that renames
-# /cygdrive/c/ arguments into c:/ arguments and peeks into
-# @files and rewrites these too! This wrapper binary is
-# called uncygdrive.exe.
-UNCYGDRIVE=
-if test "x$OPENJDK_BUILD_OS" = xwindows; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive can be created" >&5
-$as_echo_n "checking if uncygdrive can be created... " >&6; }
- UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c`
- rm -f $OUTPUT_ROOT/uncygdrive*
- UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe`
- cd $OUTPUT_ROOT
- $CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1
- cd $CURDIR
-
- if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- cat $OUTPUT_ROOT/uncygdrive1.log
- as_fn_error $? "Could not create $OUTPUT_ROOT/uncygdrive.exe" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNCYGDRIVE" >&5
-$as_echo "$UNCYGDRIVE" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive.exe works" >&5
-$as_echo_n "checking if uncygdrive.exe works... " >&6; }
- cd $OUTPUT_ROOT
- $UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1
- cd $CURDIR
- if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- cat $OUTPUT_ROOT/uncygdrive2.log
- as_fn_error $? "Uncygdrive did not work!" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
- # The path to uncygdrive to use should be Unix-style
- UNCYGDRIVE="$OUTPUT_ROOT/uncygdrive.exe"
-fi
-
-
-
-
-
# Setup debug symbols (need objcopy from the toolchain for that)
#
@@ -15384,7 +27135,7 @@
if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
# Default is on if objcopy is found, otherwise off
- if test "x$OBJCOPY" != x; then
+ if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
ENABLE_DEBUG_SYMBOLS=yes
else
ENABLE_DEBUG_SYMBOLS=no
@@ -15536,7 +27287,6 @@
-
###############################################################################
#
# Check for X Windows
@@ -16308,10 +28058,15 @@
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $X_CFLAGS"
+
+# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
+ # include <X11/Xutil.h>
+
+"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
@@ -16323,6 +28078,7 @@
done
+
CFLAGS="$OLD_CFLAGS"
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
@@ -16382,28 +28138,20 @@
fi
-# Check whether --with-cups-lib was given.
-if test "${with_cups_lib+set}" = set; then :
- withval=$with_cups_lib;
-fi
-
-
if test "x$CUPS_NOT_NEEDED" = xyes; then
- if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
+ if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
fi
CUPS_CFLAGS=
- CUPS_LIBS=
else
CUPS_FOUND=no
- if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
+ if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
fi
if test "x${with_cups}" != x; then
- CUPS_LIBS="-L${with_cups}/lib -lcups"
CUPS_CFLAGS="-I${with_cups}/include"
CUPS_FOUND=yes
fi
@@ -16411,10 +28159,6 @@
CUPS_CFLAGS="-I${with_cups_include}"
CUPS_FOUND=yes
fi
- if test "x${with_cups_lib}" != x; then
- CUPS_LIBS="-L${with_cups_lib} -lcups"
- CUPS_FOUND=yes
- fi
if test "x$CUPS_FOUND" = xno; then
@@ -16572,7 +28316,6 @@
_ACEOF
CUPS_FOUND=yes
CUPS_CFLAGS=
- CUPS_LIBS="-lcups"
DEFAULT_CUPS=yes
fi
@@ -16582,18 +28325,16 @@
if test "x$CUPS_FOUND" = xno; then
# Getting nervous now? Lets poke around for standard Solaris third-party
# package installation locations.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers and libs" >&5
-$as_echo_n "checking for cups headers and libs... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
+$as_echo_n "checking for cups headers... " >&6; }
if test -s /opt/sfw/cups/include/cups/cups.h; then
# An SFW package seems to be installed!
CUPS_FOUND=yes
CUPS_CFLAGS="-I/opt/sfw/cups/include"
- CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
elif test -s /opt/csw/include/cups/cups.h; then
# A CSW package seems to be installed!
CUPS_FOUND=yes
CUPS_CFLAGS="-I/opt/csw/include"
- CUPS_LIBS="-L/opt/csw/lib -lcups"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
$as_echo "$CUPS_FOUND" >&6; }
@@ -16633,7 +28374,6 @@
-
###############################################################################
#
# The ubiquitous freetype2 library is used to render fonts.
@@ -16661,32 +28401,138 @@
if test "x$with_freetype" != x; then
- # Fail with message the path to freetype if var with_freetype contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$with_freetype" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- # First convert it to DOS-style, short mode (no spaces)
- with_freetype=`$CYGPATH -s -m -a "$with_freetype"`
- # Now it's case insensitive; let's make it lowercase to improve readability
- with_freetype=`$ECHO "$with_freetype" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- # Now convert it back to Unix-stile (cygpath)
- with_freetype=`$CYGPATH -u "$with_freetype"`
- else
- as_fn_error $? "You cannot have spaces in the path to freetype! \"$with_freetype\"" "$LINENO" 5
- fi
- fi
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$with_freetype"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ with_freetype="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$with_freetype"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ with_freetype="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$with_freetype"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
+ FREETYPE2_LIB_PATH="$with_freetype/lib"
+ if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
+ FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
+ FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
+ fi
if test "x$OPENJDK_TARGET_OS" = xwindows; then
FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
fi
- FREETYPE2_LIB_PATH="$with_freetype/lib"
FREETYPE2_CFLAGS="-I$with_freetype/include"
if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
fi
- FREETYPE2_FOUND=yes
+ FREETYPE2_FOUND=yes
if test "x$FREETYPE2_FOUND" = xyes; then
# Verify that the directories exist
if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
@@ -16695,7 +28541,7 @@
# List the contents of the lib.
FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
if test "x$FREETYPELIB" = x; then
- as_fn_error $? "Could not find libfreetype.se nor freetype.dll in $with_freetype/lib" "$LINENO" 5
+ as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
fi
# Check one h-file
if ! test -s "$with_freetype/include/ft2build.h"; then
@@ -16851,6 +28697,145 @@
USING_SYSTEM_FT_LIB=true
fi
+ if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
+ FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$FREETYPELOCATION"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-stile (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ FREETYPELOCATION="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$FREETYPELOCATION"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ FREETYPELOCATION="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a posix platform. Hooray! :)
+ path="$FREETYPELOCATION"
+
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
+$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
+ if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
+ FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
+ FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
+ FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
+ if ! test -s "$FREETYPE2_LIBS"; then
+ as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
+ fi
+ if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
+ as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
+ fi
+ USING_SYSTEM_FT_LIB=true
+ FREETYPE2_FOUND=yes
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
+$as_echo "$FREETYPE2_FOUND" >&6; }
+ fi
if test "x$FREETYPE2_FOUND" = xno; then
pkg_failed=no
@@ -16919,7 +28904,13 @@
$as_echo "yes" >&6; }
FREETYPE2_FOUND=yes
fi
+ # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
+ FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
USING_SYSTEM_FT_LIB=true
+ # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
+ if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
+ fi
fi
if test "x$FREETYPE2_FOUND" = xno; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
@@ -16993,6 +28984,60 @@
as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
fi
+
+ if test "x$OPENJDK_TARGET_OS" != xwindows; then
+ # AC_CHECK_LIB does not support use of cl.exe
+ PREV_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$FREETYPE2_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
+$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
+if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfreetype $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char FT_Init_FreeType ();
+int
+main ()
+{
+return FT_Init_FreeType ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_freetype_FT_Init_FreeType=yes
+else
+ ac_cv_lib_freetype_FT_Init_FreeType=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
+$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
+if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBFREETYPE 1
+_ACEOF
+
+ LIBS="-lfreetype $LIBS"
+
+else
+ as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
+fi
+
+ LDFLAGS="$PREV_LDFLAGS"
+ fi
fi
@@ -17795,16 +29840,19 @@
if test "x$enable_static_link_stdc__" = xyes; then
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
LDCXX="$CC"
+ STATIC_CXX_SETTING="STATIC_CXX=true"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
$as_echo "static" >&6; }
else
LIBCXX="$LIBCXX -lstdc++"
LDCXX="$CXX"
+ STATIC_CXX_SETTING="STATIC_CXX=false"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
$as_echo "dynamic" >&6; }
fi
fi
+
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
@@ -17819,6 +29867,66 @@
+# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
+
+# When using cygwin or msys, we need a wrapper binary that renames
+# /cygdrive/c/ arguments into c:/ arguments and peeks into
+# @files and rewrites these too! This wrapper binary is
+# called fixpath.
+FIXPATH=
+if test "x$OPENJDK_BUILD_OS" = xwindows; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
+$as_echo_n "checking if fixpath can be created... " >&6; }
+ FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
+ FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
+ if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
+ FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
+ FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
+ # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
+ FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
+ FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
+ FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
+
+ # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
+ # @ was chosen as separator to minimize risk of other tools messing around with it
+ all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
+ fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
+
+ FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
+ fi
+ rm -f $OUTPUT_ROOT/fixpath*
+ cd $OUTPUT_ROOT
+ $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
+ cd $CURDIR
+
+ if test ! -x $OUTPUT_ROOT/fixpath.exe; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ cat $OUTPUT_ROOT/fixpath1.log
+ as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
+$as_echo_n "checking if fixpath.exe works... " >&6; }
+ cd $OUTPUT_ROOT
+ $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
+ cd $CURDIR
+ if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ cat $OUTPUT_ROOT/fixpath2.log
+ as_fn_error $? "fixpath did not work!" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
+fi
+
+
+
+
###############################################################################
#
# We need to do some final tweaking, when everything else is done.
@@ -17873,6 +29981,10 @@
# Looks like a MacOSX system
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'`
FOUND_CORES=yes
+ elif test -n "$NUMBER_OF_PROCESSORS"; then
+ # On windows, look in the env
+ NUM_CORES=$NUMBER_OF_PROCESSORS
+ FOUND_CORES=yes
fi
# For c/c++ code we run twice as many concurrent build
@@ -17883,8 +29995,10 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
$as_echo "$NUM_CORES" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1!" >&5
-$as_echo "could not detect number of cores, defaulting to 1!" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
+$as_echo "could not detect number of cores, defaulting to 1" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
+$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
fi
@@ -17926,9 +30040,10 @@
MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
FOUND_MEM=yes
- elif test "x$build_os" = xwindows; then
+ elif test "x$OPENJDK_BUILD_OS" = xwindows; then
# Windows, but without cygwin
- MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print $4 }' | sed 's/,//'`
+ MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
+ MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
FOUND_MEM=yes
fi
@@ -17936,8 +30051,10 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
$as_echo "$MEMORY_SIZE MB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size defaulting to 1024 MB!" >&5
-$as_echo "could not detect memory size defaulting to 1024 MB!" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
+$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
+$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
fi
else
@@ -18366,11 +30483,26 @@
# df -l lists only local disks; if the given directory is not found then
# a non-zero exit code is given
- if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
- OUTPUT_DIR_IS_LOCAL="yes"
- else
- OUTPUT_DIR_IS_LOCAL="no"
- fi
+ if test "x$DF" = x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # msys does not have df; use Windows "net use" instead.
+ IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
+ if test "x$IS_NETWORK_DISK" = x; then
+ OUTPUT_DIR_IS_LOCAL="yes"
+ else
+ OUTPUT_DIR_IS_LOCAL="no"
+ fi
+ else
+ # No df here, say it's local
+ OUTPUT_DIR_IS_LOCAL="yes"
+ fi
+ else
+ if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
+ OUTPUT_DIR_IS_LOCAL="yes"
+ else
+ OUTPUT_DIR_IS_LOCAL="no"
+ fi
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
@@ -18909,7 +31041,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by openjdk $as_me jdk8, which was
+This file was extended by OpenJDK $as_me jdk8, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -18965,13 +31097,14 @@
Configuration headers:
$config_headers
-Report bugs to <build-dev@openjdk.java.net>."
+Report bugs to <build-dev@openjdk.java.net>.
+OpenJDK home page: <http://openjdk.java.net>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-openjdk config.status jdk8
+OpenJDK config.status jdk8
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
@@ -19718,7 +31851,15 @@
printf "* JDK variant: $JDK_VARIANT\n"
printf "* JVM variants: $with_jvm_variants\n"
printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
-printf "* Boot JDK: $BOOT_JDK\n"
+
+printf "\n"
+printf "Tools summary:\n"
+if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
+fi
+printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
+printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n"
+printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
printf "\n"
printf "Build performance summary:\n"